Closed eecavanna closed 2 days ago
PR Preview Action v1.4.7
:---:
:rocket: Deployed preview to https://microbiomedata.github.io/nmdc-schema/pr-preview/pr-2091/
on branch gh-pages
at 2024-06-28 06:59 UTC
Approved during berk-schema meeting check in. Only change, default should include/ require materialized patterns & you have the option to say no but we will split that out from this PR.
Summary of changes
In this branch, I updated
nmdc_data.py
so that the fuctions that provide access to the JSON Schema version of the schema, allow the caller to specify which variant of the schema they want (they currently only support the default variant and thenmdc_materialized_patterns
variant).That will allow callers (such as the Runtime and the migration notebooks) to access the
nmdc_materialized_patterns.schema.json
JSON Schema (which they can use to perform data validation).I also added doctests to all modified functions to demonstrate that they return values of the types I expect. The doctests can be run via
$ poetry run python -m doctest nmdc_schema/nmdc_data.py
(or, now,$ make test-python
).Note for reviewers
git cherry-pick
-ed directly from the branch in that PR). This PR is thenmdc-schema
equivalent of thatberkeley-schema-fy24
PR.berkeley-schema-fy24
PR, as reviewers of this PR. I also tagged someone else that has worked on thenmdc_data.py
file in the past.Note regarding schema freeze
import
thenmdc_data.py
script (e.g. the Runtime), but it doesn't break any existing functionality. It is "opt in" functionality.