aind-data-schema-models 2.4.0__tar.gz → 2.4.2__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-2.4.0/src/aind_data_schema_models.egg-info → aind_data_schema_models-2.4.2}/PKG-INFO +3 -2
- aind_data_schema_models-2.4.2/src/aind_data_schema_models/__init__.py +3 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/generator.py +18 -3
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/organizations.csv +1 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/organizations.txt +1 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/organizations.py +85 -74
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2/src/aind_data_schema_models.egg-info}/PKG-INFO +3 -2
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_generator.py +40 -1
- aind_data_schema_models-2.4.0/src/aind_data_schema_models/__init__.py +0 -3
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.flake8 +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/ISSUE_TEMPLATE/user-story.md +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/workflows/publish_models_dev.yml +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/workflows/publish_models_main.yml +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/workflows/tag_and_publish_main.yml +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/workflows/test_and_lint.yml +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.gitignore +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/LICENSE +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/README.md +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/Makefile +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/make.bat +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/_static/dark-logo.svg +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/_static/favicon.ico +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/_static/light-logo.svg +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/conf.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/index.rst +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/pyproject.toml +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/run_all.sh +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/scripts/__init__.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/scripts/write_to_docdb.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/setup.cfg +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/setup.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/__init__.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/dev_utils.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/brain_atlas.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/harp_types.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/modalities.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/mouse_anatomy.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/process_names.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/registries.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/species.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/models/specimen_procedure_types.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/brain_atlas.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/harp_types.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/modalities.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/mouse_anatomy.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/process_names.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/registries.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/species.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/_generators/templates/specimen_procedure_types.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/brain_atlas.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/data_name_patterns.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/harp_types.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/modalities.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/mouse_anatomy.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/pid_names.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/process_names.py +6 -6
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/registries.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/species.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/specimen_procedure_types.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/system_architecture.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/units.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/utils.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models.egg-info/SOURCES.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models.egg-info/dependency_links.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models.egg-info/requires.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models.egg-info/top_level.txt +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/__init__.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/resources/harp_types.csv +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_data_name_patterns.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_dev_utils.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_modalities.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_models.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_mouse_anatomy.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_organizations.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_pid_names.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_process_names.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_specimen_procedure_types.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_system_architecture.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_units.py +0 -0
- {aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aind-data-schema-models
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: Generated from aind-library-template
|
|
5
5
|
Author: Allen Institute for Neural Dynamics
|
|
6
6
|
License: MIT
|
|
@@ -25,6 +25,7 @@ Requires-Dist: jinja2; extra == "dev"
|
|
|
25
25
|
Requires-Dist: pandas; extra == "dev"
|
|
26
26
|
Provides-Extra: build
|
|
27
27
|
Requires-Dist: aind-data-access-api[docdb]; extra == "build"
|
|
28
|
+
Dynamic: license-file
|
|
28
29
|
|
|
29
30
|
# aind-data-schema-models
|
|
30
31
|
|
|
@@ -8,6 +8,9 @@ from pathlib import Path
|
|
|
8
8
|
import subprocess
|
|
9
9
|
|
|
10
10
|
|
|
11
|
+
SKIP_SORT = ["mouse_anatomy"]
|
|
12
|
+
|
|
13
|
+
|
|
11
14
|
def check_black_version():
|
|
12
15
|
"""Check that the version of the black package is >= 25.0.0"""
|
|
13
16
|
import black
|
|
@@ -17,6 +20,20 @@ def check_black_version():
|
|
|
17
20
|
raise AssertionError("Please upgrade the black package to version 25.0.0 or later.")
|
|
18
21
|
|
|
19
22
|
|
|
23
|
+
def load_data(data_type: str, root_path: str) -> pd.DataFrame:
|
|
24
|
+
"""Load the data for the given data type"""
|
|
25
|
+
|
|
26
|
+
ROOT_DIR = Path(root_path)
|
|
27
|
+
data_file = ROOT_DIR / "_generators" / "models" / f"{data_type}.csv"
|
|
28
|
+
data = pd.read_csv(data_file)
|
|
29
|
+
|
|
30
|
+
# If there's a name field, sort A->Z
|
|
31
|
+
if "name" in data.columns and data_type not in SKIP_SORT:
|
|
32
|
+
data = data.sort_values("name")
|
|
33
|
+
|
|
34
|
+
return data
|
|
35
|
+
|
|
36
|
+
|
|
20
37
|
def generate_code(data_type: str, root_path: str, isort: bool = True, black: bool = True):
|
|
21
38
|
"""Generate code from the template type
|
|
22
39
|
|
|
@@ -31,12 +48,10 @@ def generate_code(data_type: str, root_path: str, isort: bool = True, black: boo
|
|
|
31
48
|
"""
|
|
32
49
|
|
|
33
50
|
ROOT_DIR = Path(root_path)
|
|
34
|
-
data_file = ROOT_DIR / "_generators" / "models" / f"{data_type}.csv"
|
|
35
51
|
template_file = ROOT_DIR / "_generators" / "templates" / f"{data_type}.txt"
|
|
36
52
|
output_file = ROOT_DIR / f"{data_type}.py"
|
|
37
53
|
|
|
38
|
-
|
|
39
|
-
data = pd.read_csv(data_file)
|
|
54
|
+
data = load_data(data_type, root_path)
|
|
40
55
|
|
|
41
56
|
# Load template
|
|
42
57
|
with open(template_file) as f:
|
|
@@ -127,6 +127,24 @@ class _Basler(OrganizationModel):
|
|
|
127
127
|
registry_identifier: None = None
|
|
128
128
|
|
|
129
129
|
|
|
130
|
+
class _Baylor_College_Of_Medicine(OrganizationModel):
|
|
131
|
+
"""Model Baylor College of Medicine"""
|
|
132
|
+
|
|
133
|
+
name: Literal["Baylor College of Medicine"] = "Baylor College of Medicine"
|
|
134
|
+
abbreviation: Literal["BCM"] = "BCM"
|
|
135
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
136
|
+
registry_identifier: Literal["02pttbw34"] = "02pttbw34"
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
class _Boston_University(OrganizationModel):
|
|
140
|
+
"""Model Boston University"""
|
|
141
|
+
|
|
142
|
+
name: Literal["Boston University"] = "Boston University"
|
|
143
|
+
abbreviation: Literal["BU"] = "BU"
|
|
144
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
145
|
+
registry_identifier: Literal["05qwgg493"] = "05qwgg493"
|
|
146
|
+
|
|
147
|
+
|
|
130
148
|
class _Cambridge_Technology(OrganizationModel):
|
|
131
149
|
"""Model Cambridge Technology"""
|
|
132
150
|
|
|
@@ -406,6 +424,15 @@ class _Janelia_Research_Campus(OrganizationModel):
|
|
|
406
424
|
registry_identifier: Literal["013sk6x84"] = "013sk6x84"
|
|
407
425
|
|
|
408
426
|
|
|
427
|
+
class _Johns_Hopkins_University(OrganizationModel):
|
|
428
|
+
"""Model Johns Hopkins University"""
|
|
429
|
+
|
|
430
|
+
name: Literal["Johns Hopkins University"] = "Johns Hopkins University"
|
|
431
|
+
abbreviation: Literal["JHU"] = "JHU"
|
|
432
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
433
|
+
registry_identifier: Literal["00za53h95"] = "00za53h95"
|
|
434
|
+
|
|
435
|
+
|
|
409
436
|
class _Julabo(OrganizationModel):
|
|
410
437
|
"""Model Julabo"""
|
|
411
438
|
|
|
@@ -442,19 +469,19 @@ class _Leica(OrganizationModel):
|
|
|
442
469
|
registry_identifier: None = None
|
|
443
470
|
|
|
444
471
|
|
|
445
|
-
class
|
|
446
|
-
"""Model
|
|
472
|
+
class _Lifecanvas(OrganizationModel):
|
|
473
|
+
"""Model LifeCanvas"""
|
|
447
474
|
|
|
448
|
-
name: Literal["
|
|
475
|
+
name: Literal["LifeCanvas"] = "LifeCanvas"
|
|
449
476
|
abbreviation: Literal[None] = None
|
|
450
477
|
registry: None = None
|
|
451
478
|
registry_identifier: None = None
|
|
452
479
|
|
|
453
480
|
|
|
454
|
-
class
|
|
455
|
-
"""Model
|
|
481
|
+
class _Lumen_Dynamics(OrganizationModel):
|
|
482
|
+
"""Model Lumen Dynamics"""
|
|
456
483
|
|
|
457
|
-
name: Literal["
|
|
484
|
+
name: Literal["Lumen Dynamics"] = "Lumen Dynamics"
|
|
458
485
|
abbreviation: Literal[None] = None
|
|
459
486
|
registry: None = None
|
|
460
487
|
registry_identifier: None = None
|
|
@@ -469,6 +496,15 @@ class _Mbf_Bioscience(OrganizationModel):
|
|
|
469
496
|
registry_identifier: Literal["02zynam48"] = "02zynam48"
|
|
470
497
|
|
|
471
498
|
|
|
499
|
+
class _Mit_Department_Of_Brain_And_Cognitive_Sciences(OrganizationModel):
|
|
500
|
+
"""Model MIT Department of Brain and Cognitive Sciences"""
|
|
501
|
+
|
|
502
|
+
name: Literal["MIT Department of Brain and Cognitive Sciences"] = "MIT Department of Brain and Cognitive Sciences"
|
|
503
|
+
abbreviation: Literal["MIT-BCS"] = "MIT-BCS"
|
|
504
|
+
registry: None = None
|
|
505
|
+
registry_identifier: None = None
|
|
506
|
+
|
|
507
|
+
|
|
472
508
|
class _Mks_Newport(OrganizationModel):
|
|
473
509
|
"""Model MKS Newport"""
|
|
474
510
|
|
|
@@ -487,6 +523,24 @@ class _Mpi(OrganizationModel):
|
|
|
487
523
|
registry_identifier: None = None
|
|
488
524
|
|
|
489
525
|
|
|
526
|
+
class _Massachusetts_Institute_Of_Technology(OrganizationModel):
|
|
527
|
+
"""Model Massachusetts Institute of Technology"""
|
|
528
|
+
|
|
529
|
+
name: Literal["Massachusetts Institute of Technology"] = "Massachusetts Institute of Technology"
|
|
530
|
+
abbreviation: Literal["MIT"] = "MIT"
|
|
531
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
532
|
+
registry_identifier: Literal["042nb2s44"] = "042nb2s44"
|
|
533
|
+
|
|
534
|
+
|
|
535
|
+
class _Mcgovern_Institute_For_Brain_Research(OrganizationModel):
|
|
536
|
+
"""Model McGovern Institute for Brain Research"""
|
|
537
|
+
|
|
538
|
+
name: Literal["McGovern Institute for Brain Research"] = "McGovern Institute for Brain Research"
|
|
539
|
+
abbreviation: Literal["MIBR"] = "MIBR"
|
|
540
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
541
|
+
registry_identifier: Literal["05ymca674"] = "05ymca674"
|
|
542
|
+
|
|
543
|
+
|
|
490
544
|
class _Meadowlark_Optics(OrganizationModel):
|
|
491
545
|
"""Model Meadowlark Optics"""
|
|
492
546
|
|
|
@@ -700,19 +754,19 @@ class _Raspberry_Pi(OrganizationModel):
|
|
|
700
754
|
registry_identifier: None = None
|
|
701
755
|
|
|
702
756
|
|
|
703
|
-
class
|
|
704
|
-
"""Model
|
|
757
|
+
class _Sicgen(OrganizationModel):
|
|
758
|
+
"""Model SICGEN"""
|
|
705
759
|
|
|
706
|
-
name: Literal["
|
|
760
|
+
name: Literal["SICGEN"] = "SICGEN"
|
|
707
761
|
abbreviation: Literal[None] = None
|
|
708
762
|
registry: None = None
|
|
709
763
|
registry_identifier: None = None
|
|
710
764
|
|
|
711
765
|
|
|
712
|
-
class
|
|
713
|
-
"""Model
|
|
766
|
+
class _Same_Sky(OrganizationModel):
|
|
767
|
+
"""Model Same Sky"""
|
|
714
768
|
|
|
715
|
-
name: Literal["
|
|
769
|
+
name: Literal["Same Sky"] = "Same Sky"
|
|
716
770
|
abbreviation: Literal[None] = None
|
|
717
771
|
registry: None = None
|
|
718
772
|
registry_identifier: None = None
|
|
@@ -862,6 +916,15 @@ class _Tymphany(OrganizationModel):
|
|
|
862
916
|
registry_identifier: None = None
|
|
863
917
|
|
|
864
918
|
|
|
919
|
+
class _University_Of_California_San_Diego(OrganizationModel):
|
|
920
|
+
"""Model University of California, San Diego"""
|
|
921
|
+
|
|
922
|
+
name: Literal["University of California, San Diego"] = "University of California, San Diego"
|
|
923
|
+
abbreviation: Literal["UCSD"] = "UCSD"
|
|
924
|
+
registry: Registry.ONE_OF = Registry.ROR
|
|
925
|
+
registry_identifier: Literal["0168r3w48"] = "0168r3w48"
|
|
926
|
+
|
|
927
|
+
|
|
865
928
|
class _Vieworks(OrganizationModel):
|
|
866
929
|
"""Model Vieworks"""
|
|
867
930
|
|
|
@@ -889,60 +952,6 @@ class _Ams_Osram(OrganizationModel):
|
|
|
889
952
|
registry_identifier: Literal["045d0h266"] = "045d0h266"
|
|
890
953
|
|
|
891
954
|
|
|
892
|
-
class _Mcgovern_Institute_For_Brain_Research(OrganizationModel):
|
|
893
|
-
"""Model McGovern Institute for Brain Research"""
|
|
894
|
-
|
|
895
|
-
name: Literal["McGovern Institute for Brain Research"] = "McGovern Institute for Brain Research"
|
|
896
|
-
abbreviation: Literal["MIBR"] = "MIBR"
|
|
897
|
-
registry: Registry.ONE_OF = Registry.ROR
|
|
898
|
-
registry_identifier: Literal["05ymca674"] = "05ymca674"
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
class _Mit_Department_Of_Brain_And_Cognitive_Sciences(OrganizationModel):
|
|
902
|
-
"""Model MIT Department of Brain and Cognitive Sciences"""
|
|
903
|
-
|
|
904
|
-
name: Literal["MIT Department of Brain and Cognitive Sciences"] = "MIT Department of Brain and Cognitive Sciences"
|
|
905
|
-
abbreviation: Literal["MIT-BCS"] = "MIT-BCS"
|
|
906
|
-
registry: None = None
|
|
907
|
-
registry_identifier: None = None
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
class _Massachusetts_Institute_Of_Technology(OrganizationModel):
|
|
911
|
-
"""Model Massachusetts Institute of Technology"""
|
|
912
|
-
|
|
913
|
-
name: Literal["Massachusetts Institute of Technology"] = "Massachusetts Institute of Technology"
|
|
914
|
-
abbreviation: Literal["MIT"] = "MIT"
|
|
915
|
-
registry: Registry.ONE_OF = Registry.ROR
|
|
916
|
-
registry_identifier: Literal["042nb2s44"] = "042nb2s44"
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
class _University_Of_California_San_Diego(OrganizationModel):
|
|
920
|
-
"""Model University of California, San Diego"""
|
|
921
|
-
|
|
922
|
-
name: Literal["University of California, San Diego"] = "University of California, San Diego"
|
|
923
|
-
abbreviation: Literal["UCSD"] = "UCSD"
|
|
924
|
-
registry: Registry.ONE_OF = Registry.ROR
|
|
925
|
-
registry_identifier: Literal["0168r3w48"] = "0168r3w48"
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
class _Johns_Hopkins_University(OrganizationModel):
|
|
929
|
-
"""Model Johns Hopkins University"""
|
|
930
|
-
|
|
931
|
-
name: Literal["Johns Hopkins University"] = "Johns Hopkins University"
|
|
932
|
-
abbreviation: Literal["JHU"] = "JHU"
|
|
933
|
-
registry: Registry.ONE_OF = Registry.ROR
|
|
934
|
-
registry_identifier: Literal["00za53h95"] = "00za53h95"
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
class _Boston_University(OrganizationModel):
|
|
938
|
-
"""Model Boston University"""
|
|
939
|
-
|
|
940
|
-
name: Literal["Boston University"] = "Boston University"
|
|
941
|
-
abbreviation: Literal["BU"] = "BU"
|
|
942
|
-
registry: Registry.ONE_OF = Registry.ROR
|
|
943
|
-
registry_identifier: Literal["05qwgg493"] = "05qwgg493"
|
|
944
|
-
|
|
945
|
-
|
|
946
955
|
class Organization:
|
|
947
956
|
"""Organization"""
|
|
948
957
|
|
|
@@ -958,6 +967,8 @@ class Organization:
|
|
|
958
967
|
ASI = _Applied_Scientific_Instrumentation()
|
|
959
968
|
ARECONT_VISION_COSTAR = _Arecont_Vision_Costar()
|
|
960
969
|
BASLER = _Basler()
|
|
970
|
+
BCM = _Baylor_College_Of_Medicine()
|
|
971
|
+
BU = _Boston_University()
|
|
961
972
|
CAMBRIDGE_TECHNOLOGY = _Cambridge_Technology()
|
|
962
973
|
CARL_ZEISS = _Carl_Zeiss()
|
|
963
974
|
CHAMPALIMAUD = _Champalimaud_Foundation()
|
|
@@ -989,15 +1000,19 @@ class Organization:
|
|
|
989
1000
|
ITEM = _Item()
|
|
990
1001
|
JAX = _Jackson_Laboratory()
|
|
991
1002
|
JANELIA = _Janelia_Research_Campus()
|
|
1003
|
+
JHU = _Johns_Hopkins_University()
|
|
992
1004
|
JULABO = _Julabo()
|
|
993
1005
|
KOWA = _Kowa()
|
|
994
1006
|
LG = _Lg()
|
|
995
1007
|
LEICA = _Leica()
|
|
996
|
-
LUMEN_DYNAMICS = _Lumen_Dynamics()
|
|
997
1008
|
LIFECANVAS = _Lifecanvas()
|
|
1009
|
+
LUMEN_DYNAMICS = _Lumen_Dynamics()
|
|
998
1010
|
MBF = _Mbf_Bioscience()
|
|
1011
|
+
MIT_BCS = _Mit_Department_Of_Brain_And_Cognitive_Sciences()
|
|
999
1012
|
MKS_NEWPORT = _Mks_Newport()
|
|
1000
1013
|
MPI = _Mpi()
|
|
1014
|
+
MIT = _Massachusetts_Institute_Of_Technology()
|
|
1015
|
+
MIBR = _Mcgovern_Institute_For_Brain_Research()
|
|
1001
1016
|
MEADOWLARK_OPTICS = _Meadowlark_Optics()
|
|
1002
1017
|
MJFF = _Michael_J_Fox_Foundation_For_Parkinson_S_Research()
|
|
1003
1018
|
MIDOPT = _Midwest_Optical_Systems_Inc_()
|
|
@@ -1021,8 +1036,8 @@ class Organization:
|
|
|
1021
1036
|
PRIZMATIX = _Prizmatix()
|
|
1022
1037
|
QUANTIFI = _Quantifi()
|
|
1023
1038
|
RASPBERRY_PI = _Raspberry_Pi()
|
|
1024
|
-
SAME_SKY = _Same_Sky()
|
|
1025
1039
|
SICGEN = _Sicgen()
|
|
1040
|
+
SAME_SKY = _Same_Sky()
|
|
1026
1041
|
SCHNEIDER_KREUZNACH = _Schneider_Kreuznach()
|
|
1027
1042
|
SECOND_ORDER_EFFECTS = _Second_Order_Effects()
|
|
1028
1043
|
SEMROCK = _Semrock()
|
|
@@ -1039,15 +1054,10 @@ class Organization:
|
|
|
1039
1054
|
THORLABS = _Thorlabs()
|
|
1040
1055
|
TRANSDUCER_TECHNIQUES = _Transducer_Techniques()
|
|
1041
1056
|
TYMPHANY = _Tymphany()
|
|
1057
|
+
UCSD = _University_Of_California_San_Diego()
|
|
1042
1058
|
VIEWORKS = _Vieworks()
|
|
1043
1059
|
VORTRAN = _Vortran()
|
|
1044
1060
|
AMS_OSRAM = _Ams_Osram()
|
|
1045
|
-
MIBR = _Mcgovern_Institute_For_Brain_Research()
|
|
1046
|
-
MIT_BCS = _Mit_Department_Of_Brain_And_Cognitive_Sciences()
|
|
1047
|
-
MIT = _Massachusetts_Institute_Of_Technology()
|
|
1048
|
-
UCSD = _University_Of_California_San_Diego()
|
|
1049
|
-
JHU = _Johns_Hopkins_University()
|
|
1050
|
-
BU = _Boston_University()
|
|
1051
1061
|
|
|
1052
1062
|
ALL = tuple(OrganizationModel.__subclasses__())
|
|
1053
1063
|
|
|
@@ -1187,6 +1197,7 @@ Organization.RESEARCH_INSTITUTIONS = one_of_instance(
|
|
|
1187
1197
|
Organization.SUBJECT_SOURCES = one_of_instance(
|
|
1188
1198
|
[
|
|
1189
1199
|
Organization.AI,
|
|
1200
|
+
Organization.BCM,
|
|
1190
1201
|
Organization.COLUMBIA,
|
|
1191
1202
|
Organization.HUST,
|
|
1192
1203
|
Organization.JANELIA,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: aind-data-schema-models
|
|
3
|
-
Version: 2.4.
|
|
3
|
+
Version: 2.4.2
|
|
4
4
|
Summary: Generated from aind-library-template
|
|
5
5
|
Author: Allen Institute for Neural Dynamics
|
|
6
6
|
License: MIT
|
|
@@ -25,6 +25,7 @@ Requires-Dist: jinja2; extra == "dev"
|
|
|
25
25
|
Requires-Dist: pandas; extra == "dev"
|
|
26
26
|
Provides-Extra: build
|
|
27
27
|
Requires-Dist: aind-data-access-api[docdb]; extra == "build"
|
|
28
|
+
Dynamic: license-file
|
|
28
29
|
|
|
29
30
|
# aind-data-schema-models
|
|
30
31
|
|
|
@@ -4,7 +4,7 @@ import unittest
|
|
|
4
4
|
from unittest.mock import patch, mock_open, MagicMock
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
import pandas as pd
|
|
7
|
-
from aind_data_schema_models._generators.generator import generate_code, check_black_version
|
|
7
|
+
from aind_data_schema_models._generators.generator import generate_code, check_black_version, load_data
|
|
8
8
|
import os
|
|
9
9
|
|
|
10
10
|
|
|
@@ -103,6 +103,45 @@ class TestGenerateCode(unittest.TestCase):
|
|
|
103
103
|
with patch("black.__version__", "25.0.0"):
|
|
104
104
|
check_black_version()
|
|
105
105
|
|
|
106
|
+
@patch("pandas.read_csv")
|
|
107
|
+
def test_load_data(self, mock_read_csv):
|
|
108
|
+
"""Test load_data function"""
|
|
109
|
+
# Mock the CSV data
|
|
110
|
+
mock_data = pd.DataFrame({"name": ["value1", "value2"], "column": ["value1", "value2"]})
|
|
111
|
+
mock_read_csv.return_value = mock_data
|
|
112
|
+
|
|
113
|
+
# Call the function
|
|
114
|
+
data = load_data("test_data", root_path="root")
|
|
115
|
+
|
|
116
|
+
# Check if the CSV file was read correctly
|
|
117
|
+
mock_read_csv.assert_called_once_with(Path("root/_generators/models/test_data.csv"))
|
|
118
|
+
|
|
119
|
+
# Check if the data was returned correctly
|
|
120
|
+
pd.testing.assert_frame_equal(data, mock_data)
|
|
121
|
+
|
|
122
|
+
@patch("pandas.read_csv")
|
|
123
|
+
def test_load_data_with_sorting(self, mock_read_csv):
|
|
124
|
+
"""Test load_data function with sorting"""
|
|
125
|
+
# Mock the CSV data
|
|
126
|
+
mock_data = pd.DataFrame({"name": ["value2", "value1"], "column": ["value2", "value1"]})
|
|
127
|
+
sorted_data = mock_data.sort_values("name")
|
|
128
|
+
mock_read_csv.return_value = mock_data
|
|
129
|
+
|
|
130
|
+
# Call the function
|
|
131
|
+
data = load_data("test_data", root_path="root")
|
|
132
|
+
|
|
133
|
+
# Check if the CSV file was read correctly
|
|
134
|
+
mock_read_csv.assert_called_once_with(Path("root/_generators/models/test_data.csv"))
|
|
135
|
+
|
|
136
|
+
# Check if the data was sorted correctly
|
|
137
|
+
pd.testing.assert_frame_equal(data, sorted_data)
|
|
138
|
+
|
|
139
|
+
@patch("pandas.read_csv", side_effect=FileNotFoundError)
|
|
140
|
+
def test_load_data_missing_file(self, mock_read_csv):
|
|
141
|
+
"""Test load_data function when the file is missing"""
|
|
142
|
+
with self.assertRaises(FileNotFoundError):
|
|
143
|
+
load_data("missing_data", root_path="root")
|
|
144
|
+
|
|
106
145
|
|
|
107
146
|
if __name__ == "__main__":
|
|
108
147
|
unittest.main()
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/ISSUE_TEMPLATE/bug_report.md
RENAMED
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.github/ISSUE_TEMPLATE/user-story.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/.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
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/doc_template/source/index.rst
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
|
|
@@ -7,10 +7,8 @@ class ProcessName(str, Enum):
|
|
|
7
7
|
"""Process names"""
|
|
8
8
|
|
|
9
9
|
ANALYSIS = "Analysis"
|
|
10
|
-
PIPELINE = "Pipeline"
|
|
11
10
|
COMPRESSION = "Compression"
|
|
12
11
|
DENOISING = "Denoising"
|
|
13
|
-
DF_F_ESTIMATION = "dF/F estimation"
|
|
14
12
|
EPHYS_CURATION = "Ephys curation"
|
|
15
13
|
EPHYS_POSTPROCESSING = "Ephys postprocessing"
|
|
16
14
|
EPHYS_PREPROCESSING = "Ephys preprocessing"
|
|
@@ -28,23 +26,25 @@ class ProcessName(str, Enum):
|
|
|
28
26
|
IMAGE_FLAT_FIELD_CORRECTION = "Image flat-field correction"
|
|
29
27
|
IMAGE_IMPORTING = "Image importing"
|
|
30
28
|
IMAGE_MIP_VISUALIZATION = "Image mip visualization"
|
|
29
|
+
IMAGE_SPOT_DETECTION = "Image spot detection"
|
|
30
|
+
IMAGE_SPOT_SPECTRAL_UNMIXING = "Image spot spectral unmixing"
|
|
31
31
|
IMAGE_THRESHOLDING = "Image thresholding"
|
|
32
32
|
IMAGE_TILE_ALIGNMENT = "Image tile alignment"
|
|
33
33
|
IMAGE_TILE_FUSING = "Image tile fusing"
|
|
34
34
|
IMAGE_TILE_PROJECTION = "Image tile projection"
|
|
35
|
-
IMAGE_SPOT_DETECTION = "Image spot detection"
|
|
36
|
-
IMAGE_SPOT_SPECTRAL_UNMIXING = "Image spot spectral unmixing"
|
|
37
35
|
MODEL_EVALUATION = "Model evaluation"
|
|
38
36
|
MODEL_TRAINING = "Model training"
|
|
39
37
|
NEUROPIL_SUBTRACTION = "Neuropil subtraction"
|
|
40
38
|
OTHER = "Other"
|
|
39
|
+
PIPELINE = "Pipeline"
|
|
41
40
|
SIMULATION = "Simulation"
|
|
42
41
|
SKULL_STRIPPING = "Skull stripping"
|
|
43
42
|
SPATIAL_TIMESERIES_DEMIXING = "Spatial timeseries demixing"
|
|
44
43
|
SPIKE_SORTING = "Spike sorting"
|
|
45
|
-
VIDEO_MOTION_CORRECTION = "Video motion correction"
|
|
46
|
-
VIDEO_PLANE_DECROSSTALK = "Video plane decrosstalk"
|
|
47
44
|
VIDEO_ROI_CLASSIFICATION = "Video ROI classification"
|
|
48
45
|
VIDEO_ROI_CROSS_SESSION_MATCHING = "Video ROI cross session matching"
|
|
49
46
|
VIDEO_ROI_SEGMENTATION = "Video ROI segmentation"
|
|
50
47
|
VIDEO_ROI_TIMESERIES_EXTRACTION = "Video ROI timeseries extraction"
|
|
48
|
+
VIDEO_MOTION_CORRECTION = "Video motion correction"
|
|
49
|
+
VIDEO_PLANE_DECROSSTALK = "Video plane decrosstalk"
|
|
50
|
+
DF_F_ESTIMATION = "dF/F estimation"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/units.py
RENAMED
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/src/aind_data_schema_models/utils.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/resources/harp_types.csv
RENAMED
|
File without changes
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/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
|
{aind_data_schema_models-2.4.0 → aind_data_schema_models-2.4.2}/tests/test_system_architecture.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|