Skip to content

Commit

Permalink
Rename to be more specific
Browse files Browse the repository at this point in the history
  • Loading branch information
Isaac Hill committed Apr 26, 2024
1 parent d2e0874 commit 28ff61b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions workflow_support_scripts/file_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ def get_arguments() -> Tuple[str, str]:
parser = argparse.ArgumentParser(description='Get the input and output folder')
parser.add_argument('-i', "--input", dest="input_folder", type=str, help='The input folder', required=True)
parser.add_argument('-o', "--output", dest="output_folder", type=str, help='The output folder', required=True)
parser.add_argument('-hl', "--header_lines", dest="num_of_header_lines", type=int, help='The number of header lines to strip', required=False, default=1)
parser.add_argument('-thl', "--temp_header_lines", dest="num_of_temp_header_lines", type=int, help='The number of header lines to strip from temp files', required=False, default=1)
args = parser.parse_args()
return os.path.join(dir_path, args.input_folder), os.path.join(dir_path, args.output_folder), args.num_of_header_lines
return os.path.join(dir_path, args.input_folder), os.path.join(dir_path, args.output_folder), args.num_of_temp_header_lines


class FileConverter:
Expand Down Expand Up @@ -110,7 +110,7 @@ def convert_file(root, original_file_name) -> None:
convert_curve_files.convert(original_file_name, output_folder, root)
# If the file is in .dat format
if original_file_name.endswith(FileTypes.ORIGINAL_DAT_FILE_EXTENSION):
convert_temp_calib_files.convert(original_file_name, output_folder, root, num_of_header_lines)
convert_temp_calib_files.convert(original_file_name, output_folder, root, num_of_temp_header_lines)

def convert_all_files(self) -> None:
"""
Expand All @@ -124,7 +124,7 @@ def convert_all_files(self) -> None:

if __name__ == "__main__":
# Get the input and output folders from the command line
input_folder, output_folder, num_of_header_lines = get_arguments()
input_folder, output_folder, num_of_temp_header_lines = get_arguments()
# Create Instance of FileConverter
file_converter = FileConverter(input_folder, output_folder)
# Check input folder exists
Expand Down

0 comments on commit 28ff61b

Please sign in to comment.