-
Notifications
You must be signed in to change notification settings - Fork 11
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
Update release tests for new framework #336
Conversation
Ok, the only PyPI test failing now is the windows source build. It's something to do with build_utils/version.py https://github.com/pace-neutrons/Euphonic/actions/runs/12207029014/job/34057691946 @oerc0122 any thoughts on how to get more information about where this is going wrong? The main difference between this environment and the cibuildwheel test is that this environment is likely conda-based (using tox-conda). |
Is it anything to do with:
The error isn't too helpful:
But as it's an abort the only things that might fail are version_file.read_text
version_file.write_text with dist_version_file.parent.mkdir(parents=True, exist_ok=True) with permissions issues? |
Maybe a local path issue where build_utils isn't in CWD, so version.py isn't found? That wouls explain the lack of Python stacktrace |
Hang on, should a source build even be running version.py? Where would it find build_utils? |
I don't think this is the Windows source build issue; we also see it on the successful ubuntu run. This error is appearing on the Conda tests, where it tries to conda-install from a requirements.txt what has mostly been tested for pip. It looks like there isn't a conda-forge build for this version (but there are 71.0 and 72.0). Another reason to separate pypi and conda tests, perhaps. |
Hmm, I don't like the answer to this question: the new builds are including everything in the source distribution, including tests, github workflows and test data. It unzips to 170MB. |
We can exclude those. I do believe that for a source dist the build-tools should be included. |
Including version.py makes sense, including release_tox and release.py is a bit odd. Maybe "local" build tools and CI build tools should be separated. But it's not urgent. Anyway, I suggest that we first try to fix the test to work on all platforms, and if that goes smoothly then follow up with a smaller build as a "bugfix" version. |
So:
I think this is ready to go? |
v1.4.1.post1 release should have fixed sdist problems 🤞 Tests running on that release here: https://github.com/pace-neutrons/Euphonic/actions/runs/12301522384 |
93e9ed5
to
79f4d45
Compare
And after rebase: https://github.com/pace-neutrons/Euphonic/actions/runs/12301569044 |
This had slipped behind the minimum version in pyproject.toml The dep is probably still needed in order to get spglib built; once our minimum spglib version is using pyproject.toml isolated builds we should be able to drop this "deps" section and rely on the minimum-requirements file to do everything.
Thanks to changedir we _should_ be in the right place already...
This reverts commit 8f10c4d.
Source builds are allowed a little help finding dependencies via standard compiler environment variables Try also pre-installing spglib from wheel; this can be a nuisance to build from source but that isn't our problem.
On Mac we only have access to slightly newer wheels for spglib and h5py.
79f4d45
to
d140a93
Compare
PyPI source tests look good now, and unit tests are still passing. Conda tests will probably fail but let's examine that once the new conda release is out. Something funny is going on with duplicate unit test runs for push and pull_request, maybe I'll look at that separately. |
commands_pre = | ||
python -m pip install --force-reinstall \ | ||
-r{toxinidir}/tests_and_analysis/minimum_euphonic_requirements.txt | ||
-r{[testenv]requirements_dir}/minimum_euphonic_requirements.txt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one question is whether to make this a constraints rather than a requirements file. Constraints may (should?) affect the resolver of the setup-requires in the pyproject.toml meaning you don't need to pre-install numpy.
I think though that this becomes a later problem after e.g. #332
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That does seem like a better match to what we are trying to do, yes. It still requires things to be update in two places, though. I wonder if the cleanest option is to replace the pip install with uv pip install --resolution=lowest
and automatically detect the lowest supported version.
It might be worth bumping the minimum supported h5py to get rid of the platform-dependent complication...
Ah, I see the problem: tests are triggered on push to a branch with "release" in the name. Release branches shouldn't always be PRs, so this is handy. (And in this case the name was incidental.) Ok, no need to take action at this moment. We could make the pattern a bit stricter, such as |
Current status:
ModuleNotFoundError: No module named 'distutils.msvccompiler'
error seems to be related to numpy/distutils versions.