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.
Files changed (123) hide show
  1. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/PKG-INFO +2 -3
  2. 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
  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
  4. 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
  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_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
  6. 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
  7. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc-pydantic.py +274 -641
  8. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc.py +150 -80
  9. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc.schema.json +105 -113
  10. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.json +247 -1624
  11. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.schema.json +115 -113
  12. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_materialized_patterns.yaml +210 -1116
  13. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/pyproject.toml +2 -2
  14. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/LICENSE +0 -0
  15. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/README.md +0 -0
  16. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/README.md +0 -0
  17. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/__init__.py +0 -0
  18. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/anyuri_strings_to_iris.py +0 -0
  19. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/dump_single_modality.py +0 -0
  20. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/get_json_schema.py +0 -0
  21. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/get_nmdc_view.py +0 -0
  22. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/gold-to-mixs.sssom.tsv +0 -0
  23. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/id_helpers.py +0 -0
  24. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migration_recursion.py +0 -0
  25. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/.env.example +0 -0
  26. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/docker-compose.yaml +0 -0
  27. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/mongoKeyFile +0 -0
  28. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/mongo_init/initialize_replica_set.sh +0 -0
  29. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/.docker/wait-for-it.sh +0 -0
  30. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/README.md +0 -0
  31. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/__init__.py +0 -0
  32. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/adapter_base.py +0 -0
  33. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/dictionary_adapter.py +0 -0
  34. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/mongo_adapter.py +0 -0
  35. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/test_dictionary_adapter.py +0 -0
  36. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/adapters/test_mongo_adapter.py +0 -0
  37. {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
  38. {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
  39. {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
  40. {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
  41. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/README.md +0 -0
  42. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/__init__.py +0 -0
  43. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/create_migrator.py +0 -0
  44. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/migrator.py.template +0 -0
  45. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/cli/run_migrator.py +0 -0
  46. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/helpers.py +0 -0
  47. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migration_reporter.py +0 -0
  48. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_base.py +0 -0
  49. {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
  50. {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
  51. {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
  52. {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
  53. {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
  54. {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
  55. {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
  56. {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
  57. {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
  58. {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
  59. {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
  60. {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
  61. {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
  62. {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
  63. {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
  64. {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
  65. {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
  66. {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
  67. {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
  68. {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
  69. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_1_0_0_to_EXAMPLE.py +0 -0
  70. {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
  71. {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
  72. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_8_0_to_8_1.py +0 -0
  73. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_8_1_to_9_0.py +0 -0
  74. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_9_1_to_9_2.py +0 -0
  75. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/migrator_from_9_3_to_10_0.py +0 -0
  76. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/migrators/partials/README.md +0 -0
  77. {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
  78. {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
  79. {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
  80. {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
  81. {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
  82. {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
  83. {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
  84. {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
  85. {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
  86. {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
  87. {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
  88. {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
  89. {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
  90. {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
  91. {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
  92. {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
  93. {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
  94. {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
  95. {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
  96. {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
  97. {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
  98. {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
  99. {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
  100. {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
  101. {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
  102. {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
  103. {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
  104. {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
  105. {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
  106. {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
  107. {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
  108. {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
  109. {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
  110. {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
  111. {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
  112. {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
  113. {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
  114. {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
  115. {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
  116. {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
  117. {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
  118. {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
  119. {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
  120. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_data.py +0 -0
  121. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_schema_validation_plugin.py +0 -0
  122. {nmdc_schema-11.12.1 → nmdc_schema-11.13.0}/nmdc_schema/nmdc_version.py +0 -0
  123. {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.12.1
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.9,<4.0
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.migrator_from_11_11_0_to_11_12_0 import (
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.12.0"
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.migrator_from_11_11_0_to_11_12_0 import (
5
- migrator_from_11_11_0_to_11_12_0_part_1,
6
- migrator_from_11_11_0_to_11_12_0_part_2,
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
- migrator_from_11_11_0_to_11_12_0_part_1.Migrator,
27
- migrator_from_11_11_0_to_11_12_0_part_2.Migrator,
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
  ]
@@ -13,7 +13,7 @@ class Migrator(MigratorBase):
13
13
  '''
14
14
 
15
15
  _from_version = '11.11.0'
16
- _to_version = '11.12.0.part_1'
16
+ _to_version = '11.13.0.part_1'
17
17
 
18
18
  def upgrade(self, commit_changes: bool = False) -> None:
19
19
  r'''
@@ -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.11.0'
19
- _to_version = '11.12.0.part_2'
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
+ )