Skip to content

Commit 0e81e78

Browse files
authored
fix: removes redundant subdir (#153)
* fix: remove any redundant copy_original_md_subdir defaults * update the unittests to have all the required arguments * fix:update json file with new page response with no CommonPrefixes; updateunit tes with new expected empty list * Revert "fix:update json file with new page response with no CommonPrefixes; updateunit tes with new expected empty list" This reverts commit 17763d2.
1 parent 6922378 commit 0e81e78

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/aind_data_asset_indexer/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ def cond_copy_then_sync_core_json_files(
553553
bucket: str,
554554
prefix: str,
555555
s3_client: S3Client,
556-
copy_original_md_subdir: str = "original_metadata",
556+
copy_original_md_subdir: str,
557557
) -> None:
558558
"""
559559
For a given bucket and prefix

tests/test_utils.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -994,6 +994,7 @@ def test_cond_copy_then_sync_core_json_files(
994994
bucket=bucket,
995995
prefix=pfx,
996996
s3_client=mock_s3_client,
997+
copy_original_md_subdir="original_metadata"
997998
)
998999
expected_output_messages = [
9991000
f"WARNING:root:Copy of original metadata already exists at "
@@ -1112,6 +1113,7 @@ def test_cond_copy_then_sync_core_json_files_mismatch(
11121113
bucket=bucket,
11131114
prefix=pfx,
11141115
s3_client=mock_s3_client,
1116+
copy_original_md_subdir="original_metadata",
11151117
)
11161118
expected_log_messages = [
11171119
f"INFO:root:Source file "

0 commit comments

Comments
 (0)