Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: patches bug with metadata_force_flag #220

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading