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

Release v0.22.0 #218

Merged
merged 3 commits into from
Dec 18, 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
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
Loading