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

Main #141

Merged
merged 2 commits into from
Sep 8, 2024
Merged

Main #141

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.17.0"
__version__ = "0.17.1"
2 changes: 1 addition & 1 deletion src/aind_metadata_mapper/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def __call__(self) -> Dict[str, Any]:
class BaseJobSettings(BaseSettings):
"""Parent class for generating settings from a config file."""

user_settings_config_file: Optional[Path] = Field(
user_settings_config_file: Optional[Union[Path, str]] = Field(
default=None,
repr=False,
description="Optionally pull settings from a local config file.",
Expand Down
3 changes: 3 additions & 0 deletions src/aind_metadata_mapper/gather_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ def __init__(self, settings: JobSettings):
settings : JobSettings
"""
self.settings = settings
# convert metadata_str to Path object
if isinstance(self.settings.metadata_dir, str):
self.settings.metadata_dir = Path(self.settings.metadata_dir)

def _does_file_exist_in_user_defined_dir(self, file_name: str) -> bool:
"""
Expand Down
2 changes: 1 addition & 1 deletion src/aind_metadata_mapper/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class JobSettings(BaseJobSettings):
processing_settings: Optional[ProcessingSettings] = None
metadata_settings: Optional[MetadataSettings] = None
directory_to_write_to: Path
metadata_dir: Optional[Path] = Field(
metadata_dir: Optional[Union[Path, str]] = Field(
default=None,
description="Optional path where user defined metadata files might be",
)
Expand Down
Loading