-
Notifications
You must be signed in to change notification settings - Fork 0
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
Tag and pypi release don't match #8
Comments
PyPI releases (Python version numbers) do not contain leading 0's. >>> import packaging.version
>>> packaging.version.Version("1.01")
<Version('1.1')> |
I see. Unfortunately, that's causing a bit of confusion, since pre-commit uses the git tag in some places, and in other places the PyPi version:
vs.
I haven't done further research on how other date-based projects solve this. Maybe giving up the sortability of the tags? If nothing else, a bit of documentation will help. |
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
hooks:
- id: validate-pyproject
additional_dependencies:
- validate-pyproject[all]
- validate-pyproject-schema-store==2024.01.29 Works, I think. You can always add leading zeros. I’ll check some other CalVer projects to see how they tag. |
Also, we are fully date-based CalVer, unlike say black which is year.month.version. Not sure there are many fully CalVer projects, most are hybrid. But this is an automated (mostly) update of something where really only the date matters. ¯_(ツ)_/¯ |
Thanks for looking into that! I guess another option to avoid the whole issue would be a version number like I tend to look up the latest version on PyPi, and used the version number showed there in my pre-commit configuration (where it expected a git tag), which didn't work. That's what caused me filing this issue in the first place. |
Nox does the same thing FYI - tags include 0's, but some places (like PyPI) normalize them out. |
The latest tag is
2024.01.29
, but the PyPi release is named2024.1.29
(note the missing0
). Looks like something with the release scripts is wrong?The text was updated successfully, but these errors were encountered: