nmdc-schema 11.12.1__tar.gz → 11.13.0__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.
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/PKG-INFO +2 -3
- nmdc_schema-11.12.1/nmdc_schema/migrators/migrator_from_11_11_0_to_11_12_0.py → nmdc_schema-11.13.0/nmdc_schema/migrators/migrator_from_11_11_0_to_11_13_0.py +3 -3
- {nmdc_schema-11.12.1/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_0 → nmdc_schema-11.13.0/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0}/__init__.py +7 -5
- nmdc_schema-11.12.1/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_0/migrator_from_11_11_0_to_11_12_0_part_1.py → nmdc_schema-11.13.0/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_1.py +1 -1
- nmdc_schema-11.12.1/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_12_0/migrator_from_11_11_0_to_11_12_0_part_2.py → nmdc_schema-11.13.0/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_2.py +2 -2
- nmdc_schema-11.13.0/nmdc_schema/migrators/partials/migrator_from_11_11_0_to_11_13_0/migrator_from_11_11_0_to_11_13_0_part_3.py +47 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc-pydantic.py +274 -641
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc.py +150 -80
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc.schema.json +105 -113
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.json +247 -1624
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.schema.json +115 -113
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.yaml +210 -1116
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/pyproject.toml +2 -2
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/LICENSE +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/README.md +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/README.md +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/anyuri_strings_to_iris.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/dump_single_modality.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/get_json_schema.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/get_nmdc_view.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/gold-to-mixs.sssom.tsv +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/id_helpers.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migration_recursion.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/.env.example +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/docker-compose.yaml +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/mongoKeyFile +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/mongo_init/initialize_replica_set.sh +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/wait-for-it.sh +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/README.md +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/adapter_base.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/dictionary_adapter.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/mongo_adapter.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/test_dictionary_adapter.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/test_mongo_adapter.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/assets/migrator_from_10_2_0_to_11_0_0_part_08/instrument_set.yaml +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/assets/migrator_from_11_7_to_11_8/data_category_map.yaml +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/assets/migrator_from_8_1_to_9_0/study_dois_changes.yaml +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/assets/migrator_from_9_1_to_9_2/websites_dois.yaml +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/README.md +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/create_migrator.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/migrator.py.template +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/run_migrator.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/helpers.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migration_reporter.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_base.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_0_0_to_10_1_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_2_0_to_11_0_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_3_0_to_10_4_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_4_0_to_10_5_4.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_5_4_to_10_5_5.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_5_5_to_10_5_6.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_5_6_to_10_6_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_10_6_0_to_10_7_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_0_3_to_11_1_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_10_0_to_11_11_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_1_0_to_11_2_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_3_0_to_11_4_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_4_0_to_11_5_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_5_0_to_11_5_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_5_1_to_11_6_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_6_0_to_11_6_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_6_1_to_11_7_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_7_0_to_11_8_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_8_0_to_11_9_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_11_9_1_to_11_10_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_1_0_0_to_EXAMPLE.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_7_7_2_to_7_8_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_7_8_0_to_8_0_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_8_0_to_8_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_8_1_to_9_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_9_1_to_9_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_9_3_to_10_0.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/README.md +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_01.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_02.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_03.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_04.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_05.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_06.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_07.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_08.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_09.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_10.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_11.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_12.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_13.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_14.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_15.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_10_2_0_to_11_0_0/migrator_from_10_2_0_to_11_0_0_part_16.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_0_3_to_11_1_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_0_3_to_11_1_0/migrator_from_11_0_3_to_11_1_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_0_3_to_11_1_0/migrator_from_11_0_3_to_11_1_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_0_3_to_11_1_0/migrator_from_11_0_3_to_11_1_0_part_3.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_10_0_to_11_11_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_10_0_to_11_11_0/migrator_from_11_10_0_to_11_11_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_10_0_to_11_11_0/migrator_from_11_10_0_to_11_11_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_1_0_to_11_2_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_1_0_to_11_2_0/migrator_from_11_1_0_to_11_2_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_1_0_to_11_2_0/migrator_from_11_1_0_to_11_2_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_5_1_to_11_6_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_5_1_to_11_6_0/migrator_from_11_5_1_to_11_6_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_5_1_to_11_6_0/migrator_from_11_5_1_to_11_6_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/migrator_from_11_7_0_to_11_8_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/migrator_from_11_7_0_to_11_8_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/migrator_from_11_7_0_to_11_8_0_part_3.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/migrator_from_11_7_0_to_11_8_0_part_4.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_7_0_to_11_8_0/migrator_from_11_7_0_to_11_8_0_part_5.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_8_0_to_11_9_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_8_0_to_11_9_0/migrator_from_11_8_0_to_11_9_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_8_0_to_11_9_0/migrator_from_11_8_0_to_11_9_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_9_1_to_11_10_0/__init__.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_9_1_to_11_10_0/migrator_from_11_9_1_to_11_10_0_part_1.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_9_1_to_11_10_0/migrator_from_11_9_1_to_11_10_0_part_2.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/migrator_from_11_9_1_to_11_10_0/migrator_from_11_9_1_to_11_10_0_part_3.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_data.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_schema_validation_plugin.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_version.py +0 -0
- {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/validate_nmdc_json.py +0 -0
|
@@ -1,19 +1,18 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nmdc_schema
|
|
3
|
-
Version: 11.
|
|
3
|
+
Version: 11.13.0
|
|
4
4
|
Summary: Schema resources for the National Microbiome Data Collaborative (NMDC)
|
|
5
5
|
License: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Keywords: NMDC,schema,metadata,microbiome
|
|
8
8
|
Author: Bill Duncan
|
|
9
9
|
Author-email: wdduncan@gmail.com
|
|
10
|
-
Requires-Python: >=3.
|
|
10
|
+
Requires-Python: >=3.10,<4.0
|
|
11
11
|
Classifier: Development Status :: 5 - Production/Stable
|
|
12
12
|
Classifier: Intended Audience :: Developers
|
|
13
13
|
Classifier: Intended Audience :: Science/Research
|
|
14
14
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
15
|
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
from nmdc_schema.migrators.migrator_base import MigratorBase
|
|
2
|
-
from nmdc_schema.migrators.partials.
|
|
2
|
+
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_13_0 import (
|
|
3
3
|
get_migrator_classes,
|
|
4
4
|
)
|
|
5
5
|
|
|
@@ -10,7 +10,7 @@ class Migrator(MigratorBase):
|
|
|
10
10
|
"""
|
|
11
11
|
|
|
12
12
|
_from_version = "11.11.0"
|
|
13
|
-
_to_version = "11.
|
|
13
|
+
_to_version = "11.13.0"
|
|
14
14
|
|
|
15
15
|
def upgrade(self, commit_changes: bool = False) -> None:
|
|
16
16
|
r"""
|
|
@@ -32,4 +32,4 @@ class Migrator(MigratorBase):
|
|
|
32
32
|
f"to {migrator_class.get_destination_version()}"
|
|
33
33
|
)
|
|
34
34
|
migrator = migrator_class(adapter=self.adapter, logger=self.logger)
|
|
35
|
-
migrator.upgrade(commit_changes=commit_changes)
|
|
35
|
+
migrator.upgrade(commit_changes=commit_changes)
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
from typing import List, Type
|
|
2
2
|
|
|
3
3
|
from nmdc_schema.migrators.migrator_base import MigratorBase
|
|
4
|
-
from nmdc_schema.migrators.partials.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
from nmdc_schema.migrators.partials.migrator_from_11_11_0_to_11_13_0 import (
|
|
5
|
+
migrator_from_11_11_0_to_11_13_0_part_1,
|
|
6
|
+
migrator_from_11_11_0_to_11_13_0_part_2,
|
|
7
|
+
migrator_from_11_11_0_to_11_13_0_part_3
|
|
7
8
|
)
|
|
8
9
|
|
|
9
10
|
|
|
@@ -23,6 +24,7 @@ def get_migrator_classes() -> List[Type[MigratorBase]]:
|
|
|
23
24
|
"""
|
|
24
25
|
|
|
25
26
|
return [
|
|
26
|
-
|
|
27
|
-
|
|
27
|
+
migrator_from_11_11_0_to_11_13_0_part_1.Migrator,
|
|
28
|
+
migrator_from_11_11_0_to_11_13_0_part_2.Migrator,
|
|
29
|
+
migrator_from_11_11_0_to_11_13_0_part_3.Migrator
|
|
28
30
|
]
|
|
@@ -15,8 +15,8 @@ class Migrator(MigratorBase):
|
|
|
15
15
|
r"""A check-only migrator that raises an exception if any QuantityValue's has_unit slot
|
|
16
16
|
is not valid against the slot's storage_unit or UnitEnum constraints."""
|
|
17
17
|
|
|
18
|
-
_from_version = '11.
|
|
19
|
-
_to_version = '11.
|
|
18
|
+
_from_version = '11.13.0.part_1'
|
|
19
|
+
_to_version = '11.13.0.part_2'
|
|
20
20
|
|
|
21
21
|
def __init__(self, *args, **kwargs):
|
|
22
22
|
super().__init__(*args, **kwargs)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from nmdc_schema.migrators.migrator_base import MigratorBase
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Migrator(MigratorBase):
|
|
5
|
+
r"""
|
|
6
|
+
Migrates a database between two schemas.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
_from_version = "11.13.0.part_2"
|
|
10
|
+
_to_version = "11.13.0.part_3"
|
|
11
|
+
|
|
12
|
+
def upgrade(self, commit_changes: bool = False) -> None:
|
|
13
|
+
r"""
|
|
14
|
+
Migrates the database from conforming to the original schema, to conforming to the new schema.
|
|
15
|
+
"""
|
|
16
|
+
self.adapter.do_for_each_document("biosample_set", self.confirm_igsn_prefix)
|
|
17
|
+
|
|
18
|
+
def confirm_igsn_prefix(self, biosample: dict) -> None:
|
|
19
|
+
r"""
|
|
20
|
+
If a biosample has a igsn_biosample_identifiers prefix of 'IGSN' raise an exception.
|
|
21
|
+
|
|
22
|
+
>>> m = Migrator()
|
|
23
|
+
|
|
24
|
+
# Test: igsn_biosample_identifiers matching "IGSN:"
|
|
25
|
+
>>> m.confirm_igsn_prefix({"id": 1, "type": "nmdc:Biosample", "igsn_biosample_identifiers": ["IGSN:AU124"]})
|
|
26
|
+
Traceback (most recent call last):
|
|
27
|
+
...
|
|
28
|
+
ValueError: Biosample 1 'igsn_biosample_identifiers' list includes: IGSN:AU124
|
|
29
|
+
|
|
30
|
+
# Test: igsn_biosample_identifiers with another non-confirming prefix
|
|
31
|
+
>>> m.confirm_igsn_prefix({"id": 1, "type": "nmdc:Biosample", "igsn_biosample_identifiers": ["isng:AU124"]})
|
|
32
|
+
Traceback (most recent call last):
|
|
33
|
+
...
|
|
34
|
+
ValueError: Biosample 1 'igsn_biosample_identifiers' list includes: isng:AU124
|
|
35
|
+
|
|
36
|
+
# Test: valid Biosample
|
|
37
|
+
>>> m.confirm_igsn_prefix({"id": 3, "type": "nmdc:Biosample", "igsn_biosample_identifiers": ["igsn:AU124"]}) is None
|
|
38
|
+
True
|
|
39
|
+
"""
|
|
40
|
+
prefix = "igsn:"
|
|
41
|
+
igsn_values = biosample.get("igsn_biosample_identifiers", [])
|
|
42
|
+
biosample_id = biosample.get("id")
|
|
43
|
+
for record in igsn_values:
|
|
44
|
+
if not record.startswith(prefix):
|
|
45
|
+
raise ValueError(
|
|
46
|
+
f"Biosample {biosample_id} 'igsn_biosample_identifiers' list includes: {record}"
|
|
47
|
+
)
|