Open aclum opened 2 weeks ago
nmdc-schema
v11.*
PyPI package versions newer than v11.0.0rc11
will allow consumers to specify which variant of the JSON Schema they want to load—either the default variant or the "materialized patterns" variant. This new capability was implemented via https://github.com/microbiomedata/berkeley-schema-fy24/pull/204.
Looks to me like the Runtime is already — at least to some extent — accessing the "materialized patterns" variant of the schema (pulling it directly from the nmdc-schema
package's file tree instead of accessing it via the nmdc_schema.nmdc_data
module).
I believe the runtime code is currently loading
nmdc.schema.json
, this does not have the regular expression patterns we need, those are innmdc_materialized_patterns.schema.json
which is also part of the pypi distribution.We discovered this when debugging migrators for Berkeley schema and didn't get errors I was expecting.
Eric said that
from nmdc_schema.nmdc_data import get_nmdc_jsonschema_dict
under the hood fetchesnmdc.schema.json
so we need to figure out how instead to loadnmdc_materialized_patterns.schema.json
cc @eecavanna @turbomam @shreddd
It would be great if this could be updated in the next few days so it can be tested next week for the june 2024 release on the 24th. cc @pkalita-lbl