From 765110184eed23d6b7f81441fcb94e78d8ec291b Mon Sep 17 00:00:00 2001 From: Megan Davidson Date: Wed, 24 Aug 2022 14:03:51 +1200 Subject: [PATCH 1/2] fix: ensure extension is always .tiff instead of .tif --- scripts/files/files_helper.py | 3 ++- scripts/standardising.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/files/files_helper.py b/scripts/files/files_helper.py index 33a7190ae..8756eee27 100644 --- a/scripts/files/files_helper.py +++ b/scripts/files/files_helper.py @@ -2,7 +2,8 @@ def get_file_name_from_path(path: str) -> str: - return os.path.basename(path) + filename, _ = os.path.splitext(os.path.basename(path)) + return filename def is_tiff(path: str) -> bool: diff --git a/scripts/standardising.py b/scripts/standardising.py index 959e15fdc..d88e680dd 100644 --- a/scripts/standardising.py +++ b/scripts/standardising.py @@ -40,7 +40,7 @@ def standardising(file: str) -> str: get_log().info("standardising_start", source=file) _, src_file_path = parse_path(file) - standardized_file_name = f"standardized_{get_file_name_from_path(src_file_path)}" + standardized_file_name = f"{get_file_name_from_path(s3_path.key)}.tiff" tmp_file_path = os.path.join(output_folder, standardized_file_name) command = [ From 67dbf7e4dce59f18cc4563cbd7b5745617237bee Mon Sep 17 00:00:00 2001 From: Megan Davidson Date: Wed, 24 Aug 2022 14:25:56 +1200 Subject: [PATCH 2/2] fix: fix rebase error --- scripts/standardising.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/standardising.py b/scripts/standardising.py index d88e680dd..1e95b8ecc 100644 --- a/scripts/standardising.py +++ b/scripts/standardising.py @@ -40,7 +40,7 @@ def standardising(file: str) -> str: get_log().info("standardising_start", source=file) _, src_file_path = parse_path(file) - standardized_file_name = f"{get_file_name_from_path(s3_path.key)}.tiff" + standardized_file_name = f"{get_file_name_from_path(src_file_path)}.tiff" tmp_file_path = os.path.join(output_folder, standardized_file_name) command = [