Skip to content

Commit

Permalink
fix: patches bug with metadata_force_flag
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyoung84 committed Dec 24, 2024
1 parent 1f21220 commit a497ea0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/aind_metadata_mapper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ class JobSettings(BaseSettings, extra="allow"):
default=None,
description="Optional path where user defined metadata files might be",
)
metadata_dir_force: bool = Field(
default=False,
metadata_dir_force: Optional[bool] = Field(
default=None,
description=(
"Whether to override the user defined files in metadata_dir with "
"those pulled from metadata service"
Expand Down
5 changes: 0 additions & 5 deletions tests/test_gather_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ def test_get_subject_from_dir(self, mock_get: MagicMock):
subject_id="632269",
),
metadata_dir=metadata_dir,
metadata_dir_force=True,
)
metadata_job = GatherMetadataJob(settings=job_settings)
contents = metadata_job.get_subject()
Expand Down Expand Up @@ -238,7 +237,6 @@ def test_get_procedures_from_dir(self, mock_get: MagicMock):
subject_id="632269",
),
metadata_dir=metadata_dir,
metadata_dir_force=True,
)
metadata_job = GatherMetadataJob(settings=job_settings)
contents = metadata_job.get_procedures()
Expand Down Expand Up @@ -325,7 +323,6 @@ def test_get_raw_data_description_from_dir(self, mock_get: MagicMock):
modality=[Modality.ECEPHYS, Modality.BEHAVIOR_VIDEOS],
),
metadata_dir=metadata_dir,
metadata_dir_force=True,
)
metadata_job = GatherMetadataJob(settings=job_settings)
contents = metadata_job.get_raw_data_description()
Expand Down Expand Up @@ -477,7 +474,6 @@ def test_get_processing_metadata_from_dir(self):
)
),
metadata_dir=metadata_dir,
metadata_dir_force=True,
)
metadata_job = GatherMetadataJob(settings=job_settings)
contents = metadata_job.get_processing_metadata()
Expand Down Expand Up @@ -1062,7 +1058,6 @@ def test_project_name_is_set(self):
metadata_service_path="funding",
),
directory_to_write_to="/some/dir/data_dir",
metadata_dir_force=False,
)

job = GatherMetadataJob(settings=settings)
Expand Down

0 comments on commit a497ea0

Please sign in to comment.