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

Allow and validate schema_version key in v1 recipes #2207

Merged
merged 4 commits into from
Jan 6, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jan 6, 2025

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python conda_smithy/schema.py)

Allow the schema_version key in v1 recipes, and validate that it has a value of 1.

For testing:

  • lack of schema_version is covered by most of the existing tests
  • for schema_version: 1, I've modified our torchvision.recipe
  • for invalid schema_version, I've added an explicit test

mgorny added 2 commits January 6, 2025 20:09
Allow the v1 recipes to contain a top-level `schema_version` key,
and expect it to be ordered first.  The key is defined in CEP 14:
https://conda.org/learn/ceps/cep-0014#schema-version

Fixes conda-forge#2201
For the time being, just verify that `schema_version` is 1 when using
`recipe.yaml` format, and refuse to lint if it is not.  In the future,
the code will probably need to be adapted to change `recipe_version`
based on `schema_version`.
@mgorny mgorny requested a review from a team as a code owner January 6, 2025 19:11
Copy link
Member

@wolfv wolfv left a comment

Choose a reason for hiding this comment

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

Excellent work!

@lucascolley
Copy link
Member

thanks! Once this is in, I'll try transitioning the rest of the feedstocks I maintain to rattler build with conda-recipe-manager and see if there are any other hiccups

@beckermr beckermr enabled auto-merge (squash) January 6, 2025 22:01
@beckermr beckermr merged commit 4af390e into conda-forge:main Jan 6, 2025
2 checks passed
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.

4 participants