Skip to content

Commit

Permalink
Merge pull request #218 from AllenNeuralDynamics/release-v0.22.0
Browse files Browse the repository at this point in the history
Release v0.22.0
  • Loading branch information
jtyoung84 authored Dec 18, 2024
2 parents 3f87384 + 9714fb5 commit 4470c0b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 29 deletions.
2 changes: 1 addition & 1 deletion src/aind_metadata_mapper/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Init package"""

__version__ = "0.21.1"
__version__ = "0.22.0"
32 changes: 4 additions & 28 deletions src/aind_metadata_mapper/gather_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ def _get_file_from_user_defined_directory(self, file_name: str) -> dict:
def get_subject(self) -> dict:
"""Get subject metadata"""
file_name = Subject.default_filename()
should_use_service: bool = (
not self.settings.metadata_dir_force
or not self._does_file_exist_in_user_defined_dir(
file_name=file_name
)
)
if should_use_service:
if not self._does_file_exist_in_user_defined_dir(file_name=file_name):
response = requests.get(
self.settings.metadata_service_domain
+ f"/{self.settings.subject_settings.metadata_service_path}/"
Expand All @@ -130,13 +124,7 @@ def get_subject(self) -> dict:
def get_procedures(self) -> Optional[dict]:
"""Get procedures metadata"""
file_name = Procedures.default_filename()
should_use_service: bool = (
not self.settings.metadata_dir_force
or not self._does_file_exist_in_user_defined_dir(
file_name=file_name
)
)
if should_use_service:
if not self._does_file_exist_in_user_defined_dir(file_name=file_name):
procedures_file_path = (
self.settings.procedures_settings.metadata_service_path
)
Expand Down Expand Up @@ -193,13 +181,7 @@ def get_funding_info(domain: str, url_path: str, project_name: str):

# Returns a dict with platform, subject_id, and acq_datetime
file_name = RawDataDescription.default_filename()
should_use_service: bool = (
not self.settings.metadata_dir_force
or not self._does_file_exist_in_user_defined_dir(
file_name=file_name
)
)
if should_use_service:
if not self._does_file_exist_in_user_defined_dir(file_name=file_name):
# Returns a dictionary with name, subject_id, and creation_time
basic_settings = RawDataDescription.parse_name(
name=self.settings.raw_data_description_settings.name
Expand Down Expand Up @@ -256,13 +238,7 @@ def get_processing_metadata(self):
"""Get processing metadata"""

file_name = Processing.default_filename()
should_use_service: bool = (
not self.settings.metadata_dir_force
or not self._does_file_exist_in_user_defined_dir(
file_name=file_name
)
)
if should_use_service:
if not self._does_file_exist_in_user_defined_dir(file_name=file_name):
try:
processing_pipeline = PipelineProcess.model_validate_json(
json.dumps(
Expand Down

0 comments on commit 4470c0b

Please sign in to comment.