aind-data-schema-models 0.2.2__tar.gz → 0.2.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-0.2.2 → aind_data_schema_models-0.2.4}/PKG-INFO +2 -1
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/pyproject.toml +5 -1
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/__init__.py +3 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/harp_types.py +23 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/modalities.py +27 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/harp_types.csv +17 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/modalities.csv +15 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/organizations.csv +90 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/platforms.csv +17 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/process_names.csv +38 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/registries.csv +8 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/species.csv +6 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/models/specimen_procedure_types.csv +19 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/organizations.py +152 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/platforms.py +27 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/process_names.py +9 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/registries.py +40 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/species.py +27 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/specimen_procedure_types.py +10 -0
- aind_data_schema_models-0.2.4/src/aind_data_schema_models/utils.py +201 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models.egg-info/PKG-INFO +2 -1
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models.egg-info/SOURCES.txt +13 -2
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models.egg-info/requires.txt +1 -0
- aind_data_schema_models-0.2.4/tests/resources/harp_types.csv +4 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_models.py +6 -6
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_organizations.py +1 -1
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_specimen_procedure_types.py +4 -0
- aind_data_schema_models-0.2.4/tests/test_utils.py +134 -0
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/__init__.py +0 -3
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/harp_types.py +0 -150
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/modalities.py +0 -144
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/organizations.py +0 -1024
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/platforms.py +0 -157
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/process_names.py +0 -45
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/registry.py +0 -76
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/species.py +0 -77
- aind_data_schema_models-0.2.2/src/aind_data_schema_models/specimen_procedure_types.py +0 -26
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.flake8 +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.github/ISSUE_TEMPLATE/user-story.md +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.github/workflows/tag_and_publish.yml +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.github/workflows/test_and_lint.yml +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/.gitignore +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/LICENSE +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/README.md +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/Makefile +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/make.bat +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/source/_static/dark-logo.svg +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/source/_static/favicon.ico +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/source/_static/light-logo.svg +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/source/conf.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/doc_template/source/index.rst +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/setup.cfg +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/setup.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models/data_name_patterns.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models/pid_names.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models/units.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models.egg-info/dependency_links.txt +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/src/aind_data_schema_models.egg-info/top_level.txt +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/__init__.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_data_name_patterns.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_modalities.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_process_names.py +0 -0
- {aind_data_schema_models-0.2.2 → aind_data_schema_models-0.2.4}/tests/test_units.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: aind-data-schema-models
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4
|
|
4
4
|
Summary: Generated from aind-library-template
|
|
5
5
|
Author: Allen Institute for Neural Dynamics
|
|
6
6
|
License: MIT
|
|
@@ -9,6 +9,7 @@ Requires-Python: >=3.8
|
|
|
9
9
|
Description-Content-Type: text/markdown
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Dist: pydantic>=2.0
|
|
12
|
+
Requires-Dist: importlib-resources
|
|
12
13
|
Provides-Extra: dev
|
|
13
14
|
Requires-Dist: codespell; extra == "dev"
|
|
14
15
|
Requires-Dist: black; extra == "dev"
|
|
@@ -17,7 +17,8 @@ readme = "README.md"
|
|
|
17
17
|
dynamic = ["version"]
|
|
18
18
|
|
|
19
19
|
dependencies = [
|
|
20
|
-
"pydantic>=2.0"
|
|
20
|
+
"pydantic>=2.0",
|
|
21
|
+
"importlib-resources"
|
|
21
22
|
]
|
|
22
23
|
|
|
23
24
|
[project.optional-dependencies]
|
|
@@ -38,6 +39,9 @@ where = ["src"]
|
|
|
38
39
|
[tool.setuptools.dynamic]
|
|
39
40
|
version = {attr = "aind_data_schema_models.__version__"}
|
|
40
41
|
|
|
42
|
+
[tool.setuptools.package-data]
|
|
43
|
+
aind_data_schema_models = ["models/*.csv"]
|
|
44
|
+
|
|
41
45
|
[tool.black]
|
|
42
46
|
line-length = 120
|
|
43
47
|
target_version = ['py38']
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Module for Harp Device Types"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
5
|
+
|
|
6
|
+
from aind_data_schema_models.utils import create_literal_class, read_csv
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class HarpDeviceTypeModel(BaseModel):
|
|
10
|
+
"""Base model config"""
|
|
11
|
+
|
|
12
|
+
model_config = ConfigDict(frozen=True)
|
|
13
|
+
name: str = Field(..., title="Harp device type name")
|
|
14
|
+
whoami: int = Field(..., title="Harp whoami value")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
HarpDeviceType = create_literal_class(
|
|
18
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("harp_types.csv"))),
|
|
19
|
+
class_name="HarpDeviceType",
|
|
20
|
+
base_model=HarpDeviceTypeModel,
|
|
21
|
+
discriminator="name",
|
|
22
|
+
class_module=__name__,
|
|
23
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Module for Modality definitions"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
from pydantic import ConfigDict, Field
|
|
5
|
+
|
|
6
|
+
from aind_data_schema_models.pid_names import BaseName
|
|
7
|
+
from aind_data_schema_models.utils import create_literal_class, read_csv
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class ModalityModel(BaseName):
|
|
11
|
+
"""Base model config"""
|
|
12
|
+
|
|
13
|
+
model_config = ConfigDict(frozen=True)
|
|
14
|
+
name: str = Field(..., title="Modality name")
|
|
15
|
+
abbreviation: str = Field(..., title="Modality abbreviation")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Modality = create_literal_class(
|
|
19
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("modalities.csv"))),
|
|
20
|
+
class_name="Modality",
|
|
21
|
+
base_model=ModalityModel,
|
|
22
|
+
discriminator="abbreviation",
|
|
23
|
+
class_module=__name__,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
Modality.abbreviation_map = {m().abbreviation: m() for m in Modality.ALL}
|
|
27
|
+
Modality.from_abbreviation = lambda x: Modality.abbreviation_map.get(x)
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name,whoami
|
|
2
|
+
Behavior,1216
|
|
3
|
+
Camera Controller,1168
|
|
4
|
+
Clock Synchronizer,1152
|
|
5
|
+
Cuttlefish,1403
|
|
6
|
+
Generic Harp Device,0
|
|
7
|
+
Input Expander,1106
|
|
8
|
+
Lickety Split,1400
|
|
9
|
+
Load Cells,1232
|
|
10
|
+
Olfactometer,1140
|
|
11
|
+
Sniff Detector,1401
|
|
12
|
+
Sound Card,1280
|
|
13
|
+
Stepper Driver,1130
|
|
14
|
+
Synchronizer,1104
|
|
15
|
+
Timestamp Generator Gen 1,1154
|
|
16
|
+
Timestamp Generator Gen 3,1158
|
|
17
|
+
Treadmill,1402
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
name,abbreviation
|
|
2
|
+
Behavior,behavior
|
|
3
|
+
Behavior videos,behavior-videos
|
|
4
|
+
Confocal microscopy,confocal
|
|
5
|
+
Electromyography,EMG
|
|
6
|
+
Extracellular electrophysiology,ecephys
|
|
7
|
+
Fiber photometry,fib
|
|
8
|
+
Fluorescence micro-optical sectioning tomography,fMOST
|
|
9
|
+
Intracellular electrophysiology,icephys
|
|
10
|
+
Intrinsic signal imaging,ISI
|
|
11
|
+
Magnetic resonance imaging,MRI
|
|
12
|
+
Multiplexed error-robust fluorescence in situ hybridization,merfish
|
|
13
|
+
Planar optical physiology,pophys
|
|
14
|
+
Scanned line projection imaging,slap
|
|
15
|
+
Selective plane illumination microscopy,SPIM
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
name,abbreviation,registry_abbreviation,registry_identifier
|
|
2
|
+
AA Opto Electronic,,,
|
|
3
|
+
ASUS,,ROR,00bxkz165
|
|
4
|
+
Abcam,,ROR,02e1wjw63
|
|
5
|
+
Addgene,,ROR,01nn1pw54
|
|
6
|
+
Ailipu Technology Co,Ailipu,,
|
|
7
|
+
Allen Institute,AI,ROR,03cpe7c52
|
|
8
|
+
Allen Institute for Brain Science,AIBS,ROR,00dcv1019
|
|
9
|
+
Allen Institute for Neural Dynamics,AIND,ROR,04szwah67
|
|
10
|
+
Allied,,,
|
|
11
|
+
Applied Scientific Instrumentation,ASI,,
|
|
12
|
+
Arecont Vision Costar,,,
|
|
13
|
+
Basler,,,
|
|
14
|
+
Cambridge Technology,,,
|
|
15
|
+
Carl Zeiss,,ROR,01xk5xs43
|
|
16
|
+
Champalimaud Foundation,Champalimaud,ROR,03g001n57
|
|
17
|
+
Chan Zuckerberg Initiative,CZI,ROR,02qenvm24
|
|
18
|
+
Chroma,,,
|
|
19
|
+
Coherent Scientific,,ROR,031tysd23
|
|
20
|
+
Columbia University,Columbia,ROR,00hj8s172
|
|
21
|
+
Computar,,,
|
|
22
|
+
Conoptics,,,
|
|
23
|
+
Custom,,,
|
|
24
|
+
Dodotronic,,,
|
|
25
|
+
Doric,,ROR,059n53q30
|
|
26
|
+
Ealing,,,
|
|
27
|
+
Edmund Optics,,ROR,01j1gwp17
|
|
28
|
+
Emory University,Emory,ROR,03czfpz43
|
|
29
|
+
Euresys,,,
|
|
30
|
+
Fujinon,,,
|
|
31
|
+
Hamamatsu,,ROR,03natb733
|
|
32
|
+
Hamilton,,,
|
|
33
|
+
Huazhong University of Science and Technology,HUST,ROR,00p991c53
|
|
34
|
+
IR Robot Co,,,
|
|
35
|
+
ISL Products International,ISL,,
|
|
36
|
+
Infinity Photo-Optical,,,
|
|
37
|
+
Integrated DNA Technologies,IDT,ROR,009jvpf03
|
|
38
|
+
Interuniversity Microelectronics Center,IMEC,ROR,02kcbn207
|
|
39
|
+
Invitrogen,,ROR,03x1ewr52
|
|
40
|
+
Jackson Laboratory,JAX,ROR,021sy4w91
|
|
41
|
+
Janelia Research Campus,Janelia,ROR,013sk6x84
|
|
42
|
+
Julabo,,,
|
|
43
|
+
LG,,ROR,02b948n83
|
|
44
|
+
Leica,,,
|
|
45
|
+
Lumen Dynamics,,,
|
|
46
|
+
LifeCanvas,,,
|
|
47
|
+
MBF Bioscience,MBF,ROR,02zynam48
|
|
48
|
+
MKS Newport,,ROR,00k17f049
|
|
49
|
+
MPI,MPI,,
|
|
50
|
+
Meadowlark Optics,,ROR,00n8qbq54
|
|
51
|
+
Michael J. Fox Foundation for Parkinson's Research,MJFF,ROR,03arq3225
|
|
52
|
+
"Midwest Optical Systems, Inc.",MidOpt,,
|
|
53
|
+
Mitutuyo,,,
|
|
54
|
+
NResearch Inc,,,
|
|
55
|
+
National Center for Complementary and Integrative Health,NCCIH,ROR,00190t495
|
|
56
|
+
National Institute of Mental Health,NIMH,ROR,04xeg9z08
|
|
57
|
+
National Institute of Neurological Disorders and Stroke,NINDS,ROR,01s5ya894
|
|
58
|
+
National Instruments,,ROR,026exqw73
|
|
59
|
+
Navitar,,,
|
|
60
|
+
Neurophotometrics,,,
|
|
61
|
+
New Scale Technologies,,,
|
|
62
|
+
New York University,NYU,ROR,0190ak572
|
|
63
|
+
Nikon,,ROR,0280y9h11
|
|
64
|
+
Olympus,,ROR,02vcdte90
|
|
65
|
+
Open Ephys Production Site,OEPS,ROR,007rkz355
|
|
66
|
+
Optotune,,,
|
|
67
|
+
Other,,,
|
|
68
|
+
Oxxius,,,
|
|
69
|
+
Prizmatix,,,
|
|
70
|
+
Quantifi,,,
|
|
71
|
+
Raspberry Pi,,,
|
|
72
|
+
SICGEN,,,
|
|
73
|
+
Schneider-Kreuznach,,,
|
|
74
|
+
Second Order Effects,,,
|
|
75
|
+
Semrock,,,
|
|
76
|
+
Sigma-Aldritch,,,
|
|
77
|
+
Simons Foundation,,ROR,01cmst727
|
|
78
|
+
Spinnaker,,,
|
|
79
|
+
Tamron,,,
|
|
80
|
+
Technical Manufacturing Corporation,TMC,,
|
|
81
|
+
Teledyne FLIR,FLIR,ROR,01j1gwp17
|
|
82
|
+
Templeton World Charity Foundation,TWCF,ROR,00x0z1472
|
|
83
|
+
The Imaging Source,,,
|
|
84
|
+
The Lee Company,,,
|
|
85
|
+
Thermo Fisher Scientific,,ROR,03x1ewr52
|
|
86
|
+
Thorlabs,,ROR,04gsnvb07
|
|
87
|
+
Tymphany,,,
|
|
88
|
+
Vieworks,,,
|
|
89
|
+
Vortran,,,
|
|
90
|
+
ams OSRAM,,ROR,045d0h266
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
name,abbreviation
|
|
2
|
+
Behavior platform,behavior
|
|
3
|
+
Confocal microscopy platform,confocal
|
|
4
|
+
Electrophysiology platform,ecephys
|
|
5
|
+
ExaSPIM platform,exaSPIM
|
|
6
|
+
Frame-projected independent-fiber photometry platform,FIP
|
|
7
|
+
Hybridization chain reaction platform,HCR
|
|
8
|
+
Hyperspectral fiber photometry platform,HSFP
|
|
9
|
+
Intrinsic signal imaging platform,ISI
|
|
10
|
+
MERFISH platform,MERFISH
|
|
11
|
+
Magnetic resonance imaging platform,MRI
|
|
12
|
+
MesoSPIM platform,mesoSPIM
|
|
13
|
+
Motor observatory platform,motor-observatory
|
|
14
|
+
Multiplane optical physiology platform,multiplane-ophys
|
|
15
|
+
SLAP2 platform,SLAP2
|
|
16
|
+
Single-plane optical physiology platform,single-plane-ophys
|
|
17
|
+
SmartSPIM platform,SmartSPIM
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name
|
|
2
|
+
Analysis
|
|
3
|
+
Compression
|
|
4
|
+
Denoising
|
|
5
|
+
dF/F estimation
|
|
6
|
+
Ephys curation
|
|
7
|
+
Ephys postprocessing
|
|
8
|
+
Ephys preprocessing
|
|
9
|
+
Ephys visualization
|
|
10
|
+
Fiducial segmentation
|
|
11
|
+
File format conversion
|
|
12
|
+
Fluorescence event detection
|
|
13
|
+
Image atlas alignment
|
|
14
|
+
Image background subtraction
|
|
15
|
+
Image cell classification
|
|
16
|
+
Image cell quantification
|
|
17
|
+
Image cell segmentation
|
|
18
|
+
Image destriping
|
|
19
|
+
Image flat-field correction
|
|
20
|
+
Image importing
|
|
21
|
+
Image mip visualization
|
|
22
|
+
Image thresholding
|
|
23
|
+
Image tile alignment
|
|
24
|
+
Image tile fusing
|
|
25
|
+
Image tile projection
|
|
26
|
+
Manual annotation
|
|
27
|
+
Neuropil subtraction
|
|
28
|
+
Other
|
|
29
|
+
Quality control and assessment
|
|
30
|
+
Simulation
|
|
31
|
+
Skull stripping
|
|
32
|
+
Spatial timeseries demixing
|
|
33
|
+
Spike sorting
|
|
34
|
+
Video motion correction
|
|
35
|
+
Video plane decrosstalk
|
|
36
|
+
Video ROI classification
|
|
37
|
+
Video ROI segmentation
|
|
38
|
+
Video ROI timeseries extraction
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
name,abbreviation
|
|
2
|
+
Addgene,ADDGENE
|
|
3
|
+
Edinburgh Mouse Atlas Project,EMAPA
|
|
4
|
+
Mouse Genome Informatics,MGI
|
|
5
|
+
National Center for Biotechnology Information,NCBI
|
|
6
|
+
Open Researcher and Contributor ID,ORCID
|
|
7
|
+
Research Organization Registry,ROR
|
|
8
|
+
Research Resource Identifiers,RRID
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name
|
|
2
|
+
Clearing
|
|
3
|
+
Delipidation
|
|
4
|
+
Embedding
|
|
5
|
+
Expansion
|
|
6
|
+
Fixation
|
|
7
|
+
Fixation and permeabilization
|
|
8
|
+
Gelation
|
|
9
|
+
Hybridication and amplification
|
|
10
|
+
Hybridization Chain Reaction
|
|
11
|
+
Immunolabeling
|
|
12
|
+
Mounting
|
|
13
|
+
Other
|
|
14
|
+
Refractive index matching
|
|
15
|
+
Sectioning
|
|
16
|
+
Soak
|
|
17
|
+
Storage
|
|
18
|
+
Stripping
|
|
19
|
+
Tamoxifen induction
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"""Module for Organization definitions, including manufacturers, institutions, and vendors"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
from pydantic import BaseModel, ConfigDict
|
|
5
|
+
|
|
6
|
+
from aind_data_schema_models.registries import RegistryModel, map_registry
|
|
7
|
+
from aind_data_schema_models.utils import create_literal_class, one_of_instance, read_csv
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class OrganizationModel(BaseModel):
|
|
11
|
+
"""Base model config"""
|
|
12
|
+
|
|
13
|
+
model_config = ConfigDict(frozen=True)
|
|
14
|
+
|
|
15
|
+
name: str
|
|
16
|
+
abbreviation: str = None
|
|
17
|
+
registry: RegistryModel = None
|
|
18
|
+
registry_identifier: str = None
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
Organization = create_literal_class(
|
|
22
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("organizations.csv"))),
|
|
23
|
+
class_name="Organization",
|
|
24
|
+
base_model=OrganizationModel,
|
|
25
|
+
discriminator="name",
|
|
26
|
+
field_handlers={"registry_abbreviation": map_registry},
|
|
27
|
+
class_module=__name__,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
Organization.abbreviation_map = {m().abbreviation: m() for m in Organization.ALL}
|
|
31
|
+
Organization.name_map = {m().name: m() for m in Organization.ALL}
|
|
32
|
+
Organization.from_abbreviation = lambda x: Organization.abbreviation_map.get(x)
|
|
33
|
+
Organization.from_name = lambda x: Organization.name_map.get(x)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
Organization.DETECTOR_MANUFACTURERS = one_of_instance(
|
|
37
|
+
[
|
|
38
|
+
Organization.AILIPU,
|
|
39
|
+
Organization.ALLIED,
|
|
40
|
+
Organization.BASLER,
|
|
41
|
+
Organization.DODOTRONIC,
|
|
42
|
+
Organization.EDMUND_OPTICS,
|
|
43
|
+
Organization.HAMAMATSU,
|
|
44
|
+
Organization.SPINNAKER,
|
|
45
|
+
Organization.FLIR,
|
|
46
|
+
Organization.THE_IMAGING_SOURCE,
|
|
47
|
+
Organization.THORLABS,
|
|
48
|
+
Organization.VIEWORKS,
|
|
49
|
+
Organization.OTHER,
|
|
50
|
+
]
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
Organization.FILTER_MANUFACTURERS = one_of_instance(
|
|
54
|
+
[
|
|
55
|
+
Organization.CHROMA,
|
|
56
|
+
Organization.EDMUND_OPTICS,
|
|
57
|
+
Organization.MIDOPT,
|
|
58
|
+
Organization.SEMROCK,
|
|
59
|
+
Organization.THORLABS,
|
|
60
|
+
Organization.OTHER,
|
|
61
|
+
]
|
|
62
|
+
)
|
|
63
|
+
|
|
64
|
+
Organization.LENS_MANUFACTURERS = one_of_instance(
|
|
65
|
+
[
|
|
66
|
+
Organization.COMPUTAR,
|
|
67
|
+
Organization.EDMUND_OPTICS,
|
|
68
|
+
Organization.FUJINON,
|
|
69
|
+
Organization.HAMAMATSU,
|
|
70
|
+
Organization.INFINITY_PHOTO_OPTICAL,
|
|
71
|
+
Organization.LEICA,
|
|
72
|
+
Organization.MITUTUYO,
|
|
73
|
+
Organization.NAVITAR,
|
|
74
|
+
Organization.NIKON,
|
|
75
|
+
Organization.OLYMPUS,
|
|
76
|
+
Organization.SCHNEIDER_KREUZNACH,
|
|
77
|
+
Organization.THORLABS,
|
|
78
|
+
Organization.CARL_ZEISS,
|
|
79
|
+
Organization.OTHER,
|
|
80
|
+
]
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
Organization.DAQ_DEVICE_MANUFACTURERS = one_of_instance(
|
|
84
|
+
[
|
|
85
|
+
Organization.AIND,
|
|
86
|
+
Organization.CHAMPALIMAUD,
|
|
87
|
+
Organization.NATIONAL_INSTRUMENTS,
|
|
88
|
+
Organization.IMEC,
|
|
89
|
+
Organization.OEPS,
|
|
90
|
+
Organization.SECOND_ORDER_EFFECTS,
|
|
91
|
+
Organization.OTHER,
|
|
92
|
+
]
|
|
93
|
+
)
|
|
94
|
+
|
|
95
|
+
Organization.LASER_MANUFACTURERS = one_of_instance(
|
|
96
|
+
[
|
|
97
|
+
Organization.COHERENT_SCIENTIFIC,
|
|
98
|
+
Organization.HAMAMATSU,
|
|
99
|
+
Organization.OXXIUS,
|
|
100
|
+
Organization.QUANTIFI,
|
|
101
|
+
Organization.VORTRAN,
|
|
102
|
+
Organization.OTHER,
|
|
103
|
+
]
|
|
104
|
+
)
|
|
105
|
+
|
|
106
|
+
Organization.LED_MANUFACTURERS = one_of_instance(
|
|
107
|
+
[Organization.AMS_OSRAM, Organization.DORIC, Organization.PRIZMATIX, Organization.THORLABS, Organization.OTHER]
|
|
108
|
+
)
|
|
109
|
+
|
|
110
|
+
Organization.MANIPULATOR_MANUFACTURERS = one_of_instance([Organization.NEW_SCALE_TECHNOLOGIES, Organization.OTHER])
|
|
111
|
+
|
|
112
|
+
Organization.MONITOR_MANUFACTURERS = one_of_instance([Organization.ASUS, Organization.LG, Organization.OTHER])
|
|
113
|
+
|
|
114
|
+
Organization.SPEAKER_MANUFACTURERS = one_of_instance([Organization.TYMPHANY, Organization.ISL, Organization.OTHER])
|
|
115
|
+
|
|
116
|
+
Organization.FUNDERS = one_of_instance(
|
|
117
|
+
[
|
|
118
|
+
Organization.AI,
|
|
119
|
+
Organization.CZI,
|
|
120
|
+
Organization.MBF,
|
|
121
|
+
Organization.MJFF,
|
|
122
|
+
Organization.NCCIH,
|
|
123
|
+
Organization.NIMH,
|
|
124
|
+
Organization.NINDS,
|
|
125
|
+
Organization.SIMONS_FOUNDATION,
|
|
126
|
+
Organization.TWCF,
|
|
127
|
+
]
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
Organization.RESEARCH_INSTITUTIONS = one_of_instance(
|
|
131
|
+
[
|
|
132
|
+
Organization.AIBS,
|
|
133
|
+
Organization.AIND,
|
|
134
|
+
Organization.COLUMBIA,
|
|
135
|
+
Organization.HUST,
|
|
136
|
+
Organization.JANELIA,
|
|
137
|
+
Organization.NYU,
|
|
138
|
+
Organization.OTHER,
|
|
139
|
+
]
|
|
140
|
+
)
|
|
141
|
+
|
|
142
|
+
Organization.SUBJECT_SOURCES = one_of_instance(
|
|
143
|
+
[
|
|
144
|
+
Organization.AI,
|
|
145
|
+
Organization.COLUMBIA,
|
|
146
|
+
Organization.HUST,
|
|
147
|
+
Organization.JANELIA,
|
|
148
|
+
Organization.JAX,
|
|
149
|
+
Organization.NYU,
|
|
150
|
+
Organization.OTHER,
|
|
151
|
+
]
|
|
152
|
+
)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Module for Platform definitions"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
5
|
+
|
|
6
|
+
from aind_data_schema_models.utils import create_literal_class, read_csv
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class PlatformModel(BaseModel):
|
|
10
|
+
"""Base model config"""
|
|
11
|
+
|
|
12
|
+
model_config = ConfigDict(frozen=True)
|
|
13
|
+
|
|
14
|
+
name: str = Field(..., title="Platform name")
|
|
15
|
+
abbreviation: str = Field(..., title="Platform abbreviation")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
Platform = create_literal_class(
|
|
19
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("platforms.csv"))),
|
|
20
|
+
class_name="Platform",
|
|
21
|
+
base_model=PlatformModel,
|
|
22
|
+
discriminator="name",
|
|
23
|
+
class_module=__name__,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
Platform.abbreviation_map = {p().abbreviation: p() for p in Platform.ALL}
|
|
27
|
+
Platform.from_abbreviation = lambda x: Platform.abbreviation_map.get(x)
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"""Module for process names definitions"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
|
|
5
|
+
from aind_data_schema_models.utils import create_string_enum, read_csv
|
|
6
|
+
|
|
7
|
+
ProcessName = create_string_enum(
|
|
8
|
+
name="ProcessName", objects=read_csv(str(files("aind_data_schema_models.models").joinpath("process_names.csv")))
|
|
9
|
+
)
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"""Common registries"""
|
|
2
|
+
|
|
3
|
+
from typing import Union
|
|
4
|
+
|
|
5
|
+
from importlib_resources import files
|
|
6
|
+
from pydantic import ConfigDict, Field
|
|
7
|
+
from typing_extensions import Annotated
|
|
8
|
+
|
|
9
|
+
from aind_data_schema_models.pid_names import BaseName
|
|
10
|
+
from aind_data_schema_models.utils import create_literal_class, read_csv
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class RegistryModel(BaseName):
|
|
14
|
+
"""Base model config"""
|
|
15
|
+
|
|
16
|
+
model_config = ConfigDict(frozen=True)
|
|
17
|
+
|
|
18
|
+
name: str = Field(..., title="Registry name")
|
|
19
|
+
abbreviation: str = Field(..., title="Registry abbreviation")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
Registry = create_literal_class(
|
|
23
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("registries.csv"))),
|
|
24
|
+
class_name="Registry",
|
|
25
|
+
base_model=RegistryModel,
|
|
26
|
+
discriminator="abbreviation",
|
|
27
|
+
class_module=__name__,
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
Registry.abbreviation_map = {m().abbreviation: m() for m in Registry.ALL}
|
|
31
|
+
Registry.from_abbreviation = lambda x: Registry.abbreviation_map.get(x)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def map_registry(abbreviation: str, record: dict):
|
|
35
|
+
"""replace the "registry" key of a dictionary with a RegistryModel object"""
|
|
36
|
+
registry = Registry.from_abbreviation(abbreviation)
|
|
37
|
+
if registry:
|
|
38
|
+
record["registry"] = Annotated[Union[type(registry)], Field(default=registry, discriminator="name")]
|
|
39
|
+
else:
|
|
40
|
+
record["registry"] = Annotated[None, Field(None)]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"""Module for species definitions"""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
5
|
+
|
|
6
|
+
from aind_data_schema_models.registries import RegistryModel, map_registry
|
|
7
|
+
from aind_data_schema_models.utils import create_literal_class, read_csv
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class SpeciesModel(BaseModel):
|
|
11
|
+
"""base model for species, like Mus musculus"""
|
|
12
|
+
|
|
13
|
+
model_config = ConfigDict(frozen=True)
|
|
14
|
+
|
|
15
|
+
name: str = Field(..., title="Species name")
|
|
16
|
+
registry: RegistryModel = Field(..., title="Species registry")
|
|
17
|
+
registry_identifier: str = Field(..., title="Species registry identifier")
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
Species = create_literal_class(
|
|
21
|
+
objects=read_csv(str(files("aind_data_schema_models.models").joinpath("species.csv"))),
|
|
22
|
+
class_name="Species",
|
|
23
|
+
base_model=SpeciesModel,
|
|
24
|
+
discriminator="name",
|
|
25
|
+
field_handlers={"registry_abbreviation": map_registry},
|
|
26
|
+
class_module=__name__,
|
|
27
|
+
)
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Script for the SpecimenProcedureType enum class."""
|
|
2
|
+
|
|
3
|
+
from importlib_resources import files
|
|
4
|
+
|
|
5
|
+
from aind_data_schema_models.utils import create_string_enum, read_csv
|
|
6
|
+
|
|
7
|
+
SpecimenProcedureType = create_string_enum(
|
|
8
|
+
name="SpecimenProcedureType",
|
|
9
|
+
objects=read_csv(files("aind_data_schema_models.models").joinpath("specimen_procedure_types.csv")),
|
|
10
|
+
)
|