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

Version convention should fit PEP400 #252

Closed
tai271828 opened this issue Jan 17, 2022 · 6 comments
Closed

Version convention should fit PEP400 #252

tai271828 opened this issue Jan 17, 2022 · 6 comments
Labels

Comments

@tai271828
Copy link
Collaborator

When working on #249 and solvcon/devenv#98 , I realized that one of the CI failure of test_from_package https://github.com/solvcon/devenv/runs/4594808783?check_suite_focus=true is essentially caused by pypa/setuptools#2497 , and raising the following error message in the CI runs:

/home/ubuntu/devenv/flavors/solvcon-01/usr/lib/python3.8/site-packages/setuptools/dist.py:507: UserWarning: The versi
on specified ('0.1.4+') is an invalid version, this may not work as expected with newer versions of setuptools, pip, 
and PyPI. Please see PEP 440 for more details. 

The inconsistent and unexpected behavior of python3 setup.py sdist before/after the release of pypa/setuptools#2497 to make our CI handle the distribution tarball of SOLVCON confused with SOLVCON-0.1.4- and SOLVCON-0.1.4+.

I would say 0.1.5 is fair since we did not bump the version for many years but the codebase changed a bit : )

Additional Information

If we looked into the log of the CI failure https://github.com/solvcon/devenv/runs/4594808783?check_suite_focus=true#step:5:48147 , we would see that the build and function test of gas dynamic (Sodtube example) is runnable, but the test_from_package step failed. It means the build itself should be good, and the issue happens when making distributing.

@yungyuc
Copy link
Member

yungyuc commented Jan 17, 2022

The + is used to indicate that it is not a release. Even if we bump the version to 0.1.5, we will need to immediately check in a change to make it "0.1.5+" and the issue reappears. I think a more conforming way is to recode the dev version that setuptools is happy. Perhaps we can adopt part of the numpy versioning like "0.1.4.dev0". The numpy version works like:

$ python3 -c 'import numpy as np; print(np.__version__)'
1.22.0.dev0+679.g261a769dd

@tai271828
Copy link
Collaborator Author

.dev style looks good to me, especially it is used by a popular and powerful project (so people will get the meaning of version convention easily).

@tai271828
Copy link
Collaborator Author

Is this version style 1.22.0.dev0+679.g261a769dd adopted by conda rather than a numpy official version style?[1] Both https://github.com/numpy/numpy/tags and https://pypi.org/project/numpy/#history show the oldie but goodie rc style. Linux project also uses rc style. Maybe we should also consider it as well?

[1] I randomly google and get this https://pypi.anaconda.org/scipy-wheels-nightly/simple/numpy/

@yungyuc
Copy link
Member

yungyuc commented Jan 18, 2022

1.22.0.dev0+679.g261a769dd is what I got when building numpy from git. Building (solvcon) from git will be the primary use case for us.

tai271828 added a commit to tai271828/solvcon that referenced this issue Jan 29, 2022
0.1.4+ does not fit PEP400, and mess up python dist release.

This commit resolves the following warning message:
    /home/ubuntu/devenv/flavors/solvcon-01/usr/lib/python3.8/site-packages/setuptools/dist.py:507:
    UserWarning: The version specified ('0.1.4+') is an invalid version,
    this may not work as expected with newer versions of setuptools, pip,
    and PyPI. Please see PEP 440 for more details.

Additionally, the naming convention style of `0.1.4.dev0` (using dot) is
better than `0.1.4-dev0` (using dash).

`0.1.4-dev0` is more consistent with `debian/changelog` we currently
have. However, `0.1.4-dev0` will be normalized by `setuptools`to
`0.1.4.dev0` and make our `test_from_package` confused about unexpected
and inconsistent`${PKGNAME}`.

Issue: solvcon#252
@tai271828
Copy link
Collaborator Author

Please note pull request #253 does not fully fixes #249 , and simply one of the step to fix #249 in the first place. If we build SOLVCON build pull request #253 with devenv which FIXED the version 1.21.4 of numpy, we will resume and pass the CI run with Ubuntu [1].

[1] For example, https://github.com/tai271828/devenv/runs/4990806688?check_suite_focus=true

@yungyuc
Copy link
Member

yungyuc commented Jan 31, 2022

This issue seems to be resolved by #253. Please reopen if I am wrong.

@yungyuc yungyuc closed this as completed Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants