Skip to content

Commit

Permalink
Merge pull request #145 from AllenNeuralDynamics/feat-137-schema-v1
Browse files Browse the repository at this point in the history
feat: upgrades aind-data-schema to v1.0
  • Loading branch information
jtyoung84 authored Sep 7, 2024
2 parents 8c5c1dd + b6cf2c9 commit 67831d3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ dynamic = ["version"]

dependencies = [
'boto3',
'pydantic>=2.0',
'pydantic>=2.0,<2.9',
'pydantic-settings>=2.0',
'aind-data-transfer-models==0.6.2'
'aind-data-transfer-models==0.7.0'
]

[project.optional-dependencies]
Expand Down
8 changes: 4 additions & 4 deletions src/aind_data_transfer_service/configs/job_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ModalityConfigs(BaseSettings):
# added to the Modality class
_MODALITY_MAP: ClassVar = {
m().abbreviation.upper().replace("-", "_"): m().abbreviation
for m in Modality._ALL
for m in Modality.ALL
}

# Optional number id to assign to modality config
Expand Down Expand Up @@ -116,10 +116,10 @@ class BasicUploadJobConfigs(BaseSettings):
extra="allow",
)

# Need some way to extract abbreviations. Maybe a public method can be
# added to the Platform class
# Legacy way required users to input platform in screaming snake case
_PLATFORM_MAP: ClassVar = {
p().abbreviation.upper(): p().abbreviation for p in Platform._ALL
a.upper().replace("-", "_"): a
for a in Platform.abbreviation_map.keys()
}
_MODALITY_ENTRY_PATTERN: ClassVar = re.compile(r"^modality(\d*)$")
_DATETIME_PATTERN1: ClassVar = re.compile(
Expand Down
4 changes: 2 additions & 2 deletions src/aind_data_transfer_service/configs/job_upload_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,13 @@ def validators(self) -> List[Dict[str, Any]]:
{
"name": "platform",
"type": "list",
"options": [p().abbreviation for p in Platform._ALL],
"options": list(Platform.abbreviation_map.keys()),
"column_indexes": [self.HEADERS.index("platform")],
},
{
"name": "modality",
"type": "list",
"options": [m().abbreviation for m in Modality._ALL],
"options": list(Modality.abbreviation_map.keys()),
"column_indexes": [
self.HEADERS.index("modality0"),
self.HEADERS.index("modality1"),
Expand Down

0 comments on commit 67831d3

Please sign in to comment.