aind-data-schema-models 5.7.2__tar.gz → 5.7.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.gitignore +1 -0
- {aind_data_schema_models-5.7.2/src/aind_data_schema_models.egg-info → aind_data_schema_models-5.7.4}/PKG-INFO +3 -3
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/README.md +1 -1
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/pyproject.toml +1 -1
- aind_data_schema_models-5.7.4/src/aind_data_schema_models/__init__.py +3 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/modalities.csv +1 -0
- aind_data_schema_models-5.7.4/src/aind_data_schema_models/_generators/templates/organizations.txt +52 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/modalities.py +9 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/organizations.py +0 -159
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4/src/aind_data_schema_models.egg-info}/PKG-INFO +3 -3
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models.egg-info/SOURCES.txt +0 -2
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_organizations.py +0 -10
- aind_data_schema_models-5.7.2/src/aind_data_schema_models/__init__.py +0 -3
- aind_data_schema_models-5.7.2/src/aind_data_schema_models/_generators/templates/organizations.txt +0 -204
- aind_data_schema_models-5.7.2/src/aind_data_schema_models/utils.py +0 -27
- aind_data_schema_models-5.7.2/tests/test_utils.py +0 -11
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.flake8 +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/ISSUE_TEMPLATE/user-story.md +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/link-issues-by-milestone.yml +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/publish_models_dev.yml +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/publish_models_main.yml +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/tag_and_publish_main.yml +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/test_and_lint.yml +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/CODE_OF_CONDUCT.md +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/LICENSE +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/Makefile +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/make.bat +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/_static/dark-logo.svg +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/_static/favicon.ico +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/_static/light-logo.svg +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/conf.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/index.rst +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/run_all.sh +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/__init__.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/get_protocols.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/test_genbank_integration.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/test_mouse_anatomy_integration.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/write_to_docdb.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/setup.cfg +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/setup.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/__init__.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/dev_utils.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/generator.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/atlas.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/brain_atlas.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/harp_types.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/mouse_anatomy.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/organizations.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/process_names.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/protocols.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/registries.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/slap2_acquisition_type.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/species.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/specimen_procedure_types.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/models/stimulus_modality.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/atlas.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/brain_atlas.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/harp_types.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/modalities.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/mouse_anatomy.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/process_names.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/protocols.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/registries.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/slap2_acquisition_type.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/species.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/specimen_procedure_types.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/templates/stimulus_modality.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/_generators/update_harp_types.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/atlas.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/brain_atlas.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/coordinates.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/data_name_patterns.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/devices.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/gene.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/harp_types.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/licenses.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/mouse_anatomy.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/pid_names.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/process_names.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/protocols.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/reagent.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/registries.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/slap2_acquisition_type.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/species.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/specimen_procedure_types.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/stimulus_modality.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/system_architecture.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/units.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models.egg-info/dependency_links.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models.egg-info/requires.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models.egg-info/top_level.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/__init__.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/resources/genbank_response.txt +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/resources/harp_types.csv +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/resources/protocols_response.json +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_atlas.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_brain_atlas.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_coordinates.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_data_name_patterns.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_dev_utils.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_devices.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_gene.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_generator.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_licenses.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_modalities.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_models.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_mouse_anatomy.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_pid_names.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_process_names.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_protocols.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_reagent.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_registries.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_slap2_acquisition_type.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_specimen_procedure_types.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_stimulus_modality.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_system_architecture.py +0 -0
- {aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_units.py +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aind-data-schema-models
|
|
3
|
-
Version: 5.7.
|
|
3
|
+
Version: 5.7.4
|
|
4
4
|
Summary: Generated from aind-library-template
|
|
5
5
|
Author: Allen Institute for Neural Dynamics
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Requires-Python:
|
|
8
|
+
Requires-Python: <3.14,>=3.10
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: pydantic>=2.7
|
|
@@ -35,7 +35,7 @@ Dynamic: license-file
|
|
|
35
35
|
[](https://github.com/semantic-release/semantic-release)
|
|
36
36
|

|
|
37
37
|

|
|
38
|
-

|
|
38
|
+

|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/semantic-release/semantic-release)
|
|
6
6
|

|
|
7
7
|

|
|
8
|
-

|
|
8
|
+

|
|
9
9
|
|
|
10
10
|
## Installation
|
|
11
11
|
|
|
@@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
|
|
|
6
6
|
name = "aind-data-schema-models"
|
|
7
7
|
description = "Generated from aind-library-template"
|
|
8
8
|
license = {text = "MIT"}
|
|
9
|
-
requires-python = ">=3.10"
|
|
9
|
+
requires-python = ">=3.10,<3.14"
|
|
10
10
|
authors = [
|
|
11
11
|
{name = "Allen Institute for Neural Dynamics"}
|
|
12
12
|
]
|
|
@@ -14,6 +14,7 @@ Intrinsic signal imaging,ISI
|
|
|
14
14
|
Magnetic resonance imaging,MRI
|
|
15
15
|
Multiplexed analysis of projections by sequencing,MAPseq
|
|
16
16
|
Multiplexed error-robust fluorescence in situ hybridization,merfish
|
|
17
|
+
One-photon imaging,one-photon
|
|
17
18
|
Planar optical physiology,pophys
|
|
18
19
|
Random access projection microscopy,slap2
|
|
19
20
|
Selective plane illumination microscopy,SPIM
|
aind_data_schema_models-5.7.4/src/aind_data_schema_models/_generators/templates/organizations.txt
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"""Organizations"""
|
|
2
|
+
{% raw -%}
|
|
3
|
+
from pydantic import BaseModel, Field, ConfigDict
|
|
4
|
+
from typing import Literal, Union, Optional
|
|
5
|
+
from typing_extensions import Annotated
|
|
6
|
+
from aind_data_schema_models.registries import Registry
|
|
7
|
+
{% endraw %}
|
|
8
|
+
|
|
9
|
+
class OrganizationModel(BaseModel):
|
|
10
|
+
"""Base model for organizations"""
|
|
11
|
+
model_config = ConfigDict(frozen=True)
|
|
12
|
+
name: str
|
|
13
|
+
abbreviation: str
|
|
14
|
+
registry: Optional[Registry] = Field(default=None)
|
|
15
|
+
registry_identifier: Optional[str] = Field(default=None)
|
|
16
|
+
|
|
17
|
+
{% for _, row in data.iterrows() %}
|
|
18
|
+
class {{ row['name'] | to_class_name_underscored }}(OrganizationModel):
|
|
19
|
+
"""Model {{row['name']}}"""
|
|
20
|
+
name: Literal["{{ row['name'] }}"] = "{{ row['name'] }}"
|
|
21
|
+
{% set abbreviation = row['abbreviation'] -%}
|
|
22
|
+
{% set registry_abbreviation = row['registry_abbreviation'] -%}
|
|
23
|
+
{% set registry_identifier = row['registry_identifier'] -%}
|
|
24
|
+
abbreviation: Literal[{% if abbreviation == abbreviation %}"{{ abbreviation }}"{% else %}None{% endif %}] = {% if abbreviation == abbreviation %}"{{ abbreviation }}"{% else %}None{% endif %}
|
|
25
|
+
registry: Optional[Registry] = {% if registry_abbreviation == registry_abbreviation %}Field(default=Registry.{{ registry_abbreviation }}){% else %}Field(default=None){% endif %}
|
|
26
|
+
registry_identifier: Optional[str] = {% if registry_identifier == registry_identifier %}Field(default="{{ registry_identifier }}"){% else %}Field(default=None){% endif %}
|
|
27
|
+
|
|
28
|
+
{% endfor %}
|
|
29
|
+
class Organization:
|
|
30
|
+
"""Organization"""
|
|
31
|
+
{% for _, row in data.iterrows() -%}
|
|
32
|
+
{% set abbreviation = row['abbreviation'] %}
|
|
33
|
+
{{ (abbreviation if abbreviation == abbreviation else row['name']) | to_class_name | upper }} = {{ row['name'] | to_class_name_underscored }}()
|
|
34
|
+
{%- endfor %}
|
|
35
|
+
|
|
36
|
+
ALL = tuple(OrganizationModel.__subclasses__())
|
|
37
|
+
|
|
38
|
+
ONE_OF = Annotated[Union[{% for _, row in data.iterrows() %}{{ row['name'] | to_class_name_underscored }}{{ ", " if not loop.last else "" }}{% endfor %}], Field(discriminator="name")]
|
|
39
|
+
|
|
40
|
+
abbreviation_map = {m().abbreviation: m() for m in ALL if m().abbreviation is not None}
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def from_abbreviation(cls, abbreviation: str):
|
|
44
|
+
"""Get platform from abbreviation"""
|
|
45
|
+
return cls.abbreviation_map.get(abbreviation, None)
|
|
46
|
+
|
|
47
|
+
name_map = {m().name: m() for m in ALL}
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_name(cls, name: str):
|
|
51
|
+
"""Get platform from name"""
|
|
52
|
+
return cls.name_map.get(name, None)
|
|
@@ -127,6 +127,13 @@ class _Merfish(ModalityModel):
|
|
|
127
127
|
abbreviation: Literal["merfish"] = "merfish"
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
class _One_Photon(ModalityModel):
|
|
131
|
+
"""Model one-photon"""
|
|
132
|
+
|
|
133
|
+
name: Literal["One-photon imaging"] = "One-photon imaging"
|
|
134
|
+
abbreviation: Literal["one-photon"] = "one-photon"
|
|
135
|
+
|
|
136
|
+
|
|
130
137
|
class _Pophys(ModalityModel):
|
|
131
138
|
"""Model pophys"""
|
|
132
139
|
|
|
@@ -180,6 +187,7 @@ class Modality:
|
|
|
180
187
|
MRI = _Mri()
|
|
181
188
|
MAPSEQ = _Mapseq()
|
|
182
189
|
MERFISH = _Merfish()
|
|
190
|
+
ONE_PHOTON = _One_Photon()
|
|
183
191
|
POPHYS = _Pophys()
|
|
184
192
|
SLAP2 = _Slap2()
|
|
185
193
|
SPIM = _Spim()
|
|
@@ -205,6 +213,7 @@ class Modality:
|
|
|
205
213
|
_Mri,
|
|
206
214
|
_Mapseq,
|
|
207
215
|
_Merfish,
|
|
216
|
+
_One_Photon,
|
|
208
217
|
_Pophys,
|
|
209
218
|
_Slap2,
|
|
210
219
|
_Spim,
|
|
@@ -6,7 +6,6 @@ from pydantic import BaseModel, ConfigDict, Field
|
|
|
6
6
|
from typing_extensions import Annotated
|
|
7
7
|
|
|
8
8
|
from aind_data_schema_models.registries import Registry
|
|
9
|
-
from aind_data_schema_models.utils import one_of_instance
|
|
10
9
|
|
|
11
10
|
|
|
12
11
|
class OrganizationModel(BaseModel):
|
|
@@ -1403,161 +1402,3 @@ class Organization:
|
|
|
1403
1402
|
def from_name(cls, name: str):
|
|
1404
1403
|
"""Get platform from name"""
|
|
1405
1404
|
return cls.name_map.get(name, None)
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
Organization.DETECTOR_MANUFACTURERS = one_of_instance(
|
|
1409
|
-
[
|
|
1410
|
-
Organization.AILIPU,
|
|
1411
|
-
Organization.ALLIED,
|
|
1412
|
-
Organization.BASLER,
|
|
1413
|
-
Organization.DODOTRONIC,
|
|
1414
|
-
Organization.EDMUND_OPTICS,
|
|
1415
|
-
Organization.HAMAMATSU,
|
|
1416
|
-
Organization.SPINNAKER,
|
|
1417
|
-
Organization.FLIR,
|
|
1418
|
-
Organization.OXFORD_INSTRUMENTS,
|
|
1419
|
-
Organization.TELEDYNE_VISION_SOLUTIONS,
|
|
1420
|
-
Organization.THE_IMAGING_SOURCE,
|
|
1421
|
-
Organization.THORLABS,
|
|
1422
|
-
Organization.UNKNOWN,
|
|
1423
|
-
Organization.VIEWORKS,
|
|
1424
|
-
Organization.OTHER,
|
|
1425
|
-
]
|
|
1426
|
-
)
|
|
1427
|
-
|
|
1428
|
-
Organization.FILTER_MANUFACTURERS = one_of_instance(
|
|
1429
|
-
[
|
|
1430
|
-
Organization.CHROMA,
|
|
1431
|
-
Organization.EDMUND_OPTICS,
|
|
1432
|
-
Organization.MIDOPT,
|
|
1433
|
-
Organization.SEMROCK,
|
|
1434
|
-
Organization.THORLABS,
|
|
1435
|
-
Organization.OTHER,
|
|
1436
|
-
]
|
|
1437
|
-
)
|
|
1438
|
-
|
|
1439
|
-
Organization.LENS_MANUFACTURERS = one_of_instance(
|
|
1440
|
-
[
|
|
1441
|
-
Organization.COMPUTAR,
|
|
1442
|
-
Organization.EDMUND_OPTICS,
|
|
1443
|
-
Organization.FUJINON,
|
|
1444
|
-
Organization.HAMAMATSU,
|
|
1445
|
-
Organization.INFINITY_PHOTO_OPTICAL,
|
|
1446
|
-
Organization.KOWA,
|
|
1447
|
-
Organization.LEICA,
|
|
1448
|
-
Organization.MITUTUYO,
|
|
1449
|
-
Organization.NAVITAR,
|
|
1450
|
-
Organization.NIKON,
|
|
1451
|
-
Organization.OLYMPUS,
|
|
1452
|
-
Organization.SCHNEIDER_KREUZNACH,
|
|
1453
|
-
Organization.TAMRON,
|
|
1454
|
-
Organization.THORLABS,
|
|
1455
|
-
Organization.CARL_ZEISS,
|
|
1456
|
-
Organization.OTHER,
|
|
1457
|
-
]
|
|
1458
|
-
)
|
|
1459
|
-
|
|
1460
|
-
Organization.DAQ_DEVICE_MANUFACTURERS = one_of_instance(
|
|
1461
|
-
[
|
|
1462
|
-
Organization.AIND,
|
|
1463
|
-
Organization.ARDUINO,
|
|
1464
|
-
Organization.CHAMPALIMAUD,
|
|
1465
|
-
Organization.NATIONAL_INSTRUMENTS,
|
|
1466
|
-
Organization.NEURALYNX,
|
|
1467
|
-
Organization.IMEC,
|
|
1468
|
-
Organization.OEPS,
|
|
1469
|
-
Organization.SECOND_ORDER_EFFECTS,
|
|
1470
|
-
Organization.OTHER,
|
|
1471
|
-
]
|
|
1472
|
-
)
|
|
1473
|
-
|
|
1474
|
-
Organization.LASER_MANUFACTURERS = one_of_instance(
|
|
1475
|
-
[
|
|
1476
|
-
Organization.COHERENT_SCIENTIFIC,
|
|
1477
|
-
Organization.HAMAMATSU,
|
|
1478
|
-
Organization.LASOS,
|
|
1479
|
-
Organization.OXXIUS,
|
|
1480
|
-
Organization.QUANTIFI,
|
|
1481
|
-
Organization.SPECTRA_PHYSICS,
|
|
1482
|
-
Organization.THORLABS,
|
|
1483
|
-
Organization.VORTRAN,
|
|
1484
|
-
Organization.OTHER,
|
|
1485
|
-
Organization.LUMENCOR,
|
|
1486
|
-
]
|
|
1487
|
-
)
|
|
1488
|
-
|
|
1489
|
-
Organization.LED_MANUFACTURERS = one_of_instance(
|
|
1490
|
-
[
|
|
1491
|
-
Organization.AMS_OSRAM,
|
|
1492
|
-
Organization.DORIC,
|
|
1493
|
-
Organization.EXCELITAS_TECHNOLOGIES,
|
|
1494
|
-
Organization.PRIZMATIX,
|
|
1495
|
-
Organization.THORLABS,
|
|
1496
|
-
Organization.OTHER,
|
|
1497
|
-
]
|
|
1498
|
-
)
|
|
1499
|
-
|
|
1500
|
-
Organization.MANIPULATOR_MANUFACTURERS = one_of_instance([Organization.NEW_SCALE_TECHNOLOGIES, Organization.OTHER])
|
|
1501
|
-
|
|
1502
|
-
Organization.MONITOR_MANUFACTURERS = one_of_instance([Organization.ASUS, Organization.LG, Organization.OTHER])
|
|
1503
|
-
|
|
1504
|
-
Organization.SPEAKER_MANUFACTURERS = one_of_instance(
|
|
1505
|
-
[Organization.DIGIKEY, Organization.TYMPHANY, Organization.ISL, Organization.OTHER]
|
|
1506
|
-
)
|
|
1507
|
-
|
|
1508
|
-
Organization.FUNDERS = one_of_instance(
|
|
1509
|
-
[
|
|
1510
|
-
Organization.AI,
|
|
1511
|
-
Organization.CZI,
|
|
1512
|
-
Organization.MBF,
|
|
1513
|
-
Organization.MJFF,
|
|
1514
|
-
Organization.NCCIH,
|
|
1515
|
-
Organization.NIMH,
|
|
1516
|
-
Organization.NINDS,
|
|
1517
|
-
Organization.SIMONS_FOUNDATION,
|
|
1518
|
-
Organization.TWCF,
|
|
1519
|
-
]
|
|
1520
|
-
)
|
|
1521
|
-
|
|
1522
|
-
Organization.RESEARCH_INSTITUTIONS = one_of_instance(
|
|
1523
|
-
[
|
|
1524
|
-
Organization.AIBS,
|
|
1525
|
-
Organization.AIND,
|
|
1526
|
-
Organization.MIT_BCS,
|
|
1527
|
-
Organization.BU,
|
|
1528
|
-
Organization.COLUMBIA,
|
|
1529
|
-
Organization.HUST,
|
|
1530
|
-
Organization.JANELIA,
|
|
1531
|
-
Organization.JHU,
|
|
1532
|
-
Organization.MIBR,
|
|
1533
|
-
Organization.MIT,
|
|
1534
|
-
Organization.NYU,
|
|
1535
|
-
Organization.UCSD,
|
|
1536
|
-
Organization.UPENN,
|
|
1537
|
-
Organization.OTHER,
|
|
1538
|
-
]
|
|
1539
|
-
)
|
|
1540
|
-
|
|
1541
|
-
Organization.SUBJECT_SOURCES = one_of_instance(
|
|
1542
|
-
[
|
|
1543
|
-
Organization.AI,
|
|
1544
|
-
Organization.BCM,
|
|
1545
|
-
Organization.COLUMBIA,
|
|
1546
|
-
Organization.HUST,
|
|
1547
|
-
Organization.JANELIA,
|
|
1548
|
-
Organization.JAX,
|
|
1549
|
-
Organization.NYU,
|
|
1550
|
-
Organization.UPENN,
|
|
1551
|
-
Organization.OTHER,
|
|
1552
|
-
Organization.UNKNOWN,
|
|
1553
|
-
]
|
|
1554
|
-
)
|
|
1555
|
-
|
|
1556
|
-
Organization.CATHETER_IMPLANT_INSTITUTIONS = one_of_instance(
|
|
1557
|
-
[
|
|
1558
|
-
Organization.AIND,
|
|
1559
|
-
Organization.CRL,
|
|
1560
|
-
Organization.JAX,
|
|
1561
|
-
Organization.OTHER,
|
|
1562
|
-
]
|
|
1563
|
-
)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: aind-data-schema-models
|
|
3
|
-
Version: 5.7.
|
|
3
|
+
Version: 5.7.4
|
|
4
4
|
Summary: Generated from aind-library-template
|
|
5
5
|
Author: Allen Institute for Neural Dynamics
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
|
-
Requires-Python:
|
|
8
|
+
Requires-Python: <3.14,>=3.10
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: pydantic>=2.7
|
|
@@ -35,7 +35,7 @@ Dynamic: license-file
|
|
|
35
35
|
[](https://github.com/semantic-release/semantic-release)
|
|
36
36
|

|
|
37
37
|

|
|
38
|
-

|
|
38
|
+

|
|
39
39
|
|
|
40
40
|
## Installation
|
|
41
41
|
|
|
@@ -49,7 +49,6 @@ src/aind_data_schema_models/specimen_procedure_types.py
|
|
|
49
49
|
src/aind_data_schema_models/stimulus_modality.py
|
|
50
50
|
src/aind_data_schema_models/system_architecture.py
|
|
51
51
|
src/aind_data_schema_models/units.py
|
|
52
|
-
src/aind_data_schema_models/utils.py
|
|
53
52
|
src/aind_data_schema_models.egg-info/PKG-INFO
|
|
54
53
|
src/aind_data_schema_models.egg-info/SOURCES.txt
|
|
55
54
|
src/aind_data_schema_models.egg-info/dependency_links.txt
|
|
@@ -109,7 +108,6 @@ tests/test_specimen_procedure_types.py
|
|
|
109
108
|
tests/test_stimulus_modality.py
|
|
110
109
|
tests/test_system_architecture.py
|
|
111
110
|
tests/test_units.py
|
|
112
|
-
tests/test_utils.py
|
|
113
111
|
tests/resources/genbank_response.txt
|
|
114
112
|
tests/resources/harp_types.csv
|
|
115
113
|
tests/resources/protocols_response.json
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
import unittest
|
|
4
4
|
|
|
5
5
|
from aind_data_schema_models.organizations import Organization
|
|
6
|
-
from typing import get_args
|
|
7
6
|
|
|
8
7
|
|
|
9
8
|
class TestOrganization(unittest.TestCase):
|
|
@@ -24,15 +23,6 @@ class TestOrganization(unittest.TestCase):
|
|
|
24
23
|
|
|
25
24
|
self.assertEqual(Organization.from_abbreviation(None), None)
|
|
26
25
|
|
|
27
|
-
def test_groups(self):
|
|
28
|
-
"""Test that the organization groups are present"""
|
|
29
|
-
|
|
30
|
-
union_types = get_args(Organization.SUBJECT_SOURCES.__origin__)
|
|
31
|
-
self.assertTrue(any(isinstance(Organization.AI, t) for t in union_types))
|
|
32
|
-
|
|
33
|
-
union_types = get_args(Organization.RESEARCH_INSTITUTIONS.__origin__)
|
|
34
|
-
self.assertTrue(any(isinstance(Organization.AIBS, t) for t in union_types))
|
|
35
|
-
|
|
36
26
|
|
|
37
27
|
if __name__ == "__main__":
|
|
38
28
|
unittest.main()
|
aind_data_schema_models-5.7.2/src/aind_data_schema_models/_generators/templates/organizations.txt
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
"""Organizations"""
|
|
2
|
-
{% raw -%}
|
|
3
|
-
from pydantic import BaseModel, Field, ConfigDict
|
|
4
|
-
from typing import Literal, Union, Optional
|
|
5
|
-
from typing_extensions import Annotated
|
|
6
|
-
from aind_data_schema_models.registries import Registry
|
|
7
|
-
from aind_data_schema_models.utils import one_of_instance
|
|
8
|
-
{% endraw %}
|
|
9
|
-
|
|
10
|
-
class OrganizationModel(BaseModel):
|
|
11
|
-
"""Base model for organizations"""
|
|
12
|
-
model_config = ConfigDict(frozen=True)
|
|
13
|
-
name: str
|
|
14
|
-
abbreviation: str
|
|
15
|
-
registry: Optional[Registry] = Field(default=None)
|
|
16
|
-
registry_identifier: Optional[str] = Field(default=None)
|
|
17
|
-
|
|
18
|
-
{% for _, row in data.iterrows() %}
|
|
19
|
-
class {{ row['name'] | to_class_name_underscored }}(OrganizationModel):
|
|
20
|
-
"""Model {{row['name']}}"""
|
|
21
|
-
name: Literal["{{ row['name'] }}"] = "{{ row['name'] }}"
|
|
22
|
-
{% set abbreviation = row['abbreviation'] -%}
|
|
23
|
-
{% set registry_abbreviation = row['registry_abbreviation'] -%}
|
|
24
|
-
{% set registry_identifier = row['registry_identifier'] -%}
|
|
25
|
-
abbreviation: Literal[{% if abbreviation == abbreviation %}"{{ abbreviation }}"{% else %}None{% endif %}] = {% if abbreviation == abbreviation %}"{{ abbreviation }}"{% else %}None{% endif %}
|
|
26
|
-
registry: Optional[Registry] = {% if registry_abbreviation == registry_abbreviation %}Field(default=Registry.{{ registry_abbreviation }}){% else %}Field(default=None){% endif %}
|
|
27
|
-
registry_identifier: Optional[str] = {% if registry_identifier == registry_identifier %}Field(default="{{ registry_identifier }}"){% else %}Field(default=None){% endif %}
|
|
28
|
-
|
|
29
|
-
{% endfor %}
|
|
30
|
-
class Organization:
|
|
31
|
-
"""Organization"""
|
|
32
|
-
{% for _, row in data.iterrows() -%}
|
|
33
|
-
{% set abbreviation = row['abbreviation'] %}
|
|
34
|
-
{{ (abbreviation if abbreviation == abbreviation else row['name']) | to_class_name | upper }} = {{ row['name'] | to_class_name_underscored }}()
|
|
35
|
-
{%- endfor %}
|
|
36
|
-
|
|
37
|
-
ALL = tuple(OrganizationModel.__subclasses__())
|
|
38
|
-
|
|
39
|
-
ONE_OF = Annotated[Union[{% for _, row in data.iterrows() %}{{ row['name'] | to_class_name_underscored }}{{ ", " if not loop.last else "" }}{% endfor %}], Field(discriminator="name")]
|
|
40
|
-
|
|
41
|
-
abbreviation_map = {m().abbreviation: m() for m in ALL if m().abbreviation is not None}
|
|
42
|
-
|
|
43
|
-
@classmethod
|
|
44
|
-
def from_abbreviation(cls, abbreviation: str):
|
|
45
|
-
"""Get platform from abbreviation"""
|
|
46
|
-
return cls.abbreviation_map.get(abbreviation, None)
|
|
47
|
-
|
|
48
|
-
name_map = {m().name: m() for m in ALL}
|
|
49
|
-
|
|
50
|
-
@classmethod
|
|
51
|
-
def from_name(cls, name: str):
|
|
52
|
-
"""Get platform from name"""
|
|
53
|
-
return cls.name_map.get(name, None)
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
Organization.DETECTOR_MANUFACTURERS = one_of_instance(
|
|
57
|
-
[
|
|
58
|
-
Organization.AILIPU,
|
|
59
|
-
Organization.ALLIED,
|
|
60
|
-
Organization.BASLER,
|
|
61
|
-
Organization.DODOTRONIC,
|
|
62
|
-
Organization.EDMUND_OPTICS,
|
|
63
|
-
Organization.HAMAMATSU,
|
|
64
|
-
Organization.SPINNAKER,
|
|
65
|
-
Organization.FLIR,
|
|
66
|
-
Organization.OXFORD_INSTRUMENTS,
|
|
67
|
-
Organization.TELEDYNE_VISION_SOLUTIONS,
|
|
68
|
-
Organization.THE_IMAGING_SOURCE,
|
|
69
|
-
Organization.THORLABS,
|
|
70
|
-
Organization.UNKNOWN,
|
|
71
|
-
Organization.VIEWORKS,
|
|
72
|
-
Organization.OTHER,
|
|
73
|
-
]
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
Organization.FILTER_MANUFACTURERS = one_of_instance(
|
|
77
|
-
[
|
|
78
|
-
Organization.CHROMA,
|
|
79
|
-
Organization.EDMUND_OPTICS,
|
|
80
|
-
Organization.MIDOPT,
|
|
81
|
-
Organization.SEMROCK,
|
|
82
|
-
Organization.THORLABS,
|
|
83
|
-
Organization.OTHER,
|
|
84
|
-
]
|
|
85
|
-
)
|
|
86
|
-
|
|
87
|
-
Organization.LENS_MANUFACTURERS = one_of_instance(
|
|
88
|
-
[
|
|
89
|
-
Organization.COMPUTAR,
|
|
90
|
-
Organization.EDMUND_OPTICS,
|
|
91
|
-
Organization.FUJINON,
|
|
92
|
-
Organization.HAMAMATSU,
|
|
93
|
-
Organization.INFINITY_PHOTO_OPTICAL,
|
|
94
|
-
Organization.KOWA,
|
|
95
|
-
Organization.LEICA,
|
|
96
|
-
Organization.MITUTUYO,
|
|
97
|
-
Organization.NAVITAR,
|
|
98
|
-
Organization.NIKON,
|
|
99
|
-
Organization.OLYMPUS,
|
|
100
|
-
Organization.SCHNEIDER_KREUZNACH,
|
|
101
|
-
Organization.TAMRON,
|
|
102
|
-
Organization.THORLABS,
|
|
103
|
-
Organization.CARL_ZEISS,
|
|
104
|
-
Organization.OTHER,
|
|
105
|
-
]
|
|
106
|
-
)
|
|
107
|
-
|
|
108
|
-
Organization.DAQ_DEVICE_MANUFACTURERS = one_of_instance(
|
|
109
|
-
[
|
|
110
|
-
Organization.AIND,
|
|
111
|
-
Organization.ARDUINO,
|
|
112
|
-
Organization.CHAMPALIMAUD,
|
|
113
|
-
Organization.NATIONAL_INSTRUMENTS,
|
|
114
|
-
Organization.NEURALYNX,
|
|
115
|
-
Organization.IMEC,
|
|
116
|
-
Organization.OEPS,
|
|
117
|
-
Organization.SECOND_ORDER_EFFECTS,
|
|
118
|
-
Organization.OTHER,
|
|
119
|
-
]
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
Organization.LASER_MANUFACTURERS = one_of_instance(
|
|
123
|
-
[
|
|
124
|
-
Organization.COHERENT_SCIENTIFIC,
|
|
125
|
-
Organization.HAMAMATSU,
|
|
126
|
-
Organization.LASOS,
|
|
127
|
-
Organization.OXXIUS,
|
|
128
|
-
Organization.QUANTIFI,
|
|
129
|
-
Organization.SPECTRA_PHYSICS,
|
|
130
|
-
Organization.THORLABS,
|
|
131
|
-
Organization.VORTRAN,
|
|
132
|
-
Organization.OTHER,
|
|
133
|
-
Organization.LUMENCOR,
|
|
134
|
-
]
|
|
135
|
-
)
|
|
136
|
-
|
|
137
|
-
Organization.LED_MANUFACTURERS = one_of_instance(
|
|
138
|
-
[Organization.AMS_OSRAM, Organization.DORIC, Organization.EXCELITAS_TECHNOLOGIES, Organization.PRIZMATIX, Organization.THORLABS, Organization.OTHER]
|
|
139
|
-
)
|
|
140
|
-
|
|
141
|
-
Organization.MANIPULATOR_MANUFACTURERS = one_of_instance([Organization.NEW_SCALE_TECHNOLOGIES, Organization.OTHER])
|
|
142
|
-
|
|
143
|
-
Organization.MONITOR_MANUFACTURERS = one_of_instance([Organization.ASUS, Organization.LG, Organization.OTHER])
|
|
144
|
-
|
|
145
|
-
Organization.SPEAKER_MANUFACTURERS = one_of_instance(
|
|
146
|
-
[Organization.DIGIKEY, Organization.TYMPHANY, Organization.ISL, Organization.OTHER]
|
|
147
|
-
)
|
|
148
|
-
|
|
149
|
-
Organization.FUNDERS = one_of_instance(
|
|
150
|
-
[
|
|
151
|
-
Organization.AI,
|
|
152
|
-
Organization.CZI,
|
|
153
|
-
Organization.MBF,
|
|
154
|
-
Organization.MJFF,
|
|
155
|
-
Organization.NCCIH,
|
|
156
|
-
Organization.NIMH,
|
|
157
|
-
Organization.NINDS,
|
|
158
|
-
Organization.SIMONS_FOUNDATION,
|
|
159
|
-
Organization.TWCF,
|
|
160
|
-
]
|
|
161
|
-
)
|
|
162
|
-
|
|
163
|
-
Organization.RESEARCH_INSTITUTIONS = one_of_instance(
|
|
164
|
-
[
|
|
165
|
-
Organization.AIBS,
|
|
166
|
-
Organization.AIND,
|
|
167
|
-
Organization.MIT_BCS,
|
|
168
|
-
Organization.BU,
|
|
169
|
-
Organization.COLUMBIA,
|
|
170
|
-
Organization.HUST,
|
|
171
|
-
Organization.JANELIA,
|
|
172
|
-
Organization.JHU,
|
|
173
|
-
Organization.MIBR,
|
|
174
|
-
Organization.MIT,
|
|
175
|
-
Organization.NYU,
|
|
176
|
-
Organization.UCSD,
|
|
177
|
-
Organization.UPENN,
|
|
178
|
-
Organization.OTHER,
|
|
179
|
-
]
|
|
180
|
-
)
|
|
181
|
-
|
|
182
|
-
Organization.SUBJECT_SOURCES = one_of_instance(
|
|
183
|
-
[
|
|
184
|
-
Organization.AI,
|
|
185
|
-
Organization.BCM,
|
|
186
|
-
Organization.COLUMBIA,
|
|
187
|
-
Organization.HUST,
|
|
188
|
-
Organization.JANELIA,
|
|
189
|
-
Organization.JAX,
|
|
190
|
-
Organization.NYU,
|
|
191
|
-
Organization.UPENN,
|
|
192
|
-
Organization.OTHER,
|
|
193
|
-
Organization.UNKNOWN,
|
|
194
|
-
]
|
|
195
|
-
)
|
|
196
|
-
|
|
197
|
-
Organization.CATHETER_IMPLANT_INSTITUTIONS = one_of_instance(
|
|
198
|
-
[
|
|
199
|
-
Organization.AIND,
|
|
200
|
-
Organization.CRL,
|
|
201
|
-
Organization.JAX,
|
|
202
|
-
Organization.OTHER,
|
|
203
|
-
]
|
|
204
|
-
)
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"""General utilities for constructing models from CSV files"""
|
|
2
|
-
|
|
3
|
-
from pydantic import BaseModel, Field
|
|
4
|
-
from typing import Union, List, Type, Any
|
|
5
|
-
from typing_extensions import Annotated
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
def one_of_instance(instances: List[Type[BaseModel]], discriminator="name") -> Annotated[Union[Any], Field]:
|
|
9
|
-
"""
|
|
10
|
-
Make an annotated union of class instances
|
|
11
|
-
Parameters
|
|
12
|
-
----------
|
|
13
|
-
instances : List[Type[BaseModel]]
|
|
14
|
-
A list of class instances.
|
|
15
|
-
discriminator : str
|
|
16
|
-
Each model in instances should have a common field name where each item
|
|
17
|
-
is unique to the model. This will allow pydantic to know which class
|
|
18
|
-
should be deserialized. Default is 'name'.
|
|
19
|
-
|
|
20
|
-
Returns
|
|
21
|
-
-------
|
|
22
|
-
Annotated[Union[Any], Field]
|
|
23
|
-
An annotated field that can be used to define a type where a choice from a
|
|
24
|
-
possible set of classes can be selected.
|
|
25
|
-
|
|
26
|
-
"""
|
|
27
|
-
return Annotated[Union[tuple(type(i) for i in instances)], Field(discriminator=discriminator)]
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/ISSUE_TEMPLATE/bug_report.md
RENAMED
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/ISSUE_TEMPLATE/user-story.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/.github/workflows/test_and_lint.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/doc_template/source/index.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/scripts/test_genbank_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/atlas.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/gene.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/src/aind_data_schema_models/units.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/resources/genbank_response.txt
RENAMED
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/resources/harp_types.csv
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_data_name_patterns.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_slap2_acquisition_type.py
RENAMED
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_stimulus_modality.py
RENAMED
|
File without changes
|
{aind_data_schema_models-5.7.2 → aind_data_schema_models-5.7.4}/tests/test_system_architecture.py
RENAMED
|
File without changes
|
|
File without changes
|