The NMDC submission schema.
Note that the while this repo is named submission-schema, the generated artifacts are named nmdc_submission_schema for disambiguation purposes when publishing to PyPI.
- examples/ - example data
- project/ - project files (do not edit these)
- src/ - source files (edit these)
- nmdc_submission_schema
- schema -- LinkML schema (edit this)
- nmdc_submission_schema
- datamodel -- Generated python datamodel
- tests - python tests
The version of nmdc-schema used as a basis when building the submission schema is controlled by a dependency in the dev group, specified in pyproject.toml. You can update the version used by running:
uv add --group dev "nmdc-schema==X.Y.Z" # replace X.Y.Z with the desired versionNote
It is important to use the == version constraint to ensure the exact version is installed.
Here's how you can generate the submission schema release artifacts:
- Docker is installed on your computer
- You are in the root directory of the repository
- Build the container image you will later use to build the submission schema:
docker build -t submission-schema-builder -f builder.Dockerfile . - If you haven't already done so (see the "Updating the submission schema" section above), use that container image to update the
nmdc-schemadependency of the submission schema:Then, rebuild the container image (so it has that new version ofdocker run --rm -it -v ${PWD}:/submission-schema submission-schema-builder \ uv add --group dev "nmdc-schema==X.Y.Z" # replace X.Y.Z
nmdc-schemainstalled):docker build -t submission-schema-builder -f builder.Dockerfile . - Use the container image to build the submission schema:
docker run --rm -it -v ${PWD}:/submission-schema submission-schema-builder - Commit the changes, using the new
nmdc-schemaversion number as the commit message; like this:git add . git commit -m "X.Y.Z" # replace X.Y.Z with the nmdc-schema version
- (Optional) Delete the container image:
docker image rm submission-schema-builder
- Install Python dependencies:
uv sync
- Generate the release artifacts:
make clean all
- Commit the changes, using the new
nmdc-schemaversion number as the commit message; like this:git add . git commit -m "X.Y.Z" # replace X.Y.Z with the nmdc-schema version
this project was made with linkml-project-cookiecutter