Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Declare nmdc-schema as a Python dependency #297

Merged
merged 5 commits into from
Jan 31, 2025

Conversation

pkalita-lbl
Copy link
Collaborator

This is related to #258. Part of that task will be generating a new enum in submission-schema based on an enum in nmdc-schema plus some business logic. These changes will make it easier to accomplish that. Plus, they address the large number of places the nmdc-schema version number needs to be changed when upgrading currently.

The main idea here is to declare nmdc-schema as a normal Python dependency in the dev Poetry group. All build steps that require nmdc-schema as a YAML file on disk now use local/nmdc.yaml. This file in turn is extracted from the Python package by a small script instead of being fetched from GitHub.

Updating the version of nmdc-schema used by the build process is now a matter of doing a normal Python dependency update, as noted in the README.

Copy link
Contributor

@eecavanna eecavanna left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I left one comment, which was about adding a description to the click command's help text.

@pkalita-lbl
Copy link
Collaborator Author

pkalita-lbl commented Jan 28, 2025

I locally resolved the merge conflicts. However once they were resolved the project's virtual environment became uninstallable:

Because nmdc-schema (11.3.0) depends on mkdocs-mermaid2-plugin (>=0.6.0,<0.7.0)
 and nmdc-submission-schema depends on mkdocs-mermaid2-plugin (^1.1.0), nmdc-schema is forbidden.
So, because nmdc-submission-schema depends on nmdc-schema (11.3.0), version solving failed.

This project's mkdocs-mermaid2-plugin dependency got updated recently in #296. And that's fine. But there is no need for nmdc-schema to list mkdocs-mermaid2-plugin as a non-dev dependency. See: microbiomedata/nmdc-schema#2328

Copy link

PR Preview Action v1.6.0

🚀 View preview at
https://microbiomedata.github.io/submission-schema/pr-preview/pr-297/

Built to branch gh-pages at 2025-01-31 00:34 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Copy link
Member

@turbomam turbomam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good for your needs as well as just being easier to maintain. Thanks.

@pkalita-lbl pkalita-lbl merged commit b6db44e into main Jan 31, 2025
3 checks passed
@pkalita-lbl pkalita-lbl deleted the feat-nmdc-schema-python-dependency branch January 31, 2025 22:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants