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

ENH: lint incorrect distro names in os_version #2155

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

h-vetinari
Copy link
Member

This is for linting wrong distro values used in os_version (which becomes more important after conda-forge/conda-forge-pinning-feedstock#6626, as it might lead to zipping problems and thus rerender errors).

With this PR, a conda-forge.yml of

os_version:
  linux_64: wrong

would lead to

pydantic_core._pydantic_core.ValidationError: 1 validation error for ConfigModel
os_version.linux_64
  Input should be 'cos7', 'ubi8', 'alma8' or 'alma9' [type=literal_error, input_value='wrong', input_type=str]
    For further information visit https://errors.pydantic.dev/2.10/v/literal_error

We'll certainly want to polish this further (e.g. into a concrete hint/lint), hence this is a draft. It's also a draft because by themselves, the changes in dc74f55 do not work. It needs #1920 (or something similar) to actually work, see #2152. Currently it includes that PR, which should be merged first.

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.

2 participants