Skip to content

Commit

Permalink
RB
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 24, 2023
1 parent 29819c6 commit de18890
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions pynxtools/dataconverter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,28 +222,6 @@ def convert(input_file: Tuple[str],
logger.info("The output file generated: %s", output)


def convert_and_return_template(input_file: Tuple[str],
reader: str,
nxdl: str,
output: str,
generate_template: bool = False,
fair: bool = False,
undocumented: bool = False,
**kwargs):

"""Convert input files into structure data according template and return template.
This function only is special than convert function by return value which is filled data
template.
"""
temp_data_dict = {'data': None}
convert(input_file=input_file, reader=reader,
nxdl=nxdl, output=output, generate_template=generate_template,
fair=fair, undocumented=undocumented, temp_data_dict=temp_data_dict, **kwargs)

return temp_data_dict['data']


def parse_params_file(params_file):
"""Parses the parameters from a given dictionary and returns them"""
params = yaml.load(params_file, Loader=yaml.Loader)['dataconverter']
Expand Down Expand Up @@ -333,7 +311,7 @@ def convert_cli(input_file: Tuple[str, ...],
reader = "json_map"
if mapping:
input_file = input_file + tuple([mapping])
convert(input_file, reader, nxdl, output, generate_template, fair, undocumented)
convert(input_file, reader, nxdl, output, generate_template, fair, undocumented) # type: ignore


if __name__ == '__main__':
Expand Down

0 comments on commit de18890

Please sign in to comment.