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

Update release tests for new framework #336

Merged
merged 9 commits into from
Dec 13, 2024
Merged

Update release tests for new framework #336

merged 9 commits into from
Dec 13, 2024

Conversation

ajjackson
Copy link
Collaborator

Current status:

  • All conda tests failing (this is fine, the conda-forge package is not done yet)
  • Ubuntu pypi-py310-min fails because it can't build spglib. The ModuleNotFoundError: No module named 'distutils.msvccompiler' error seems to be related to numpy/distutils versions.
  • Windows pypisource-py310 and pypisource-py312 fail to build the Euphonic package, probably an environment/Meson issue
  • macos-latest pypi-py310-min fails because it can't build spglib or h5py. I think there are no ARM wheels for the old versions and we haven't set up an appropriate environment to build them (e.g. with libhdf5 an old C compiler)
  • macos-13 pypi-py310-min fails because it can't build spglib

Copy link
Contributor

github-actions bot commented Dec 6, 2024

Test Results

    31 files  +    3      31 suites  +3   1h 56m 36s ⏱️ + 5m 16s
 1 066 tests ±    0   1 060 ✅ ±    0   6 💤 ± 0  0 ❌ ±0 
17 722 runs  +4 091  17 626 ✅ +4 072  96 💤 +19  0 ❌ ±0 

Results for commit d140a93. ± Comparison against base commit baa304c.

♻️ This comment has been updated with latest results.

@ajjackson
Copy link
Collaborator Author

ajjackson commented Dec 6, 2024

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).

@oerc0122
Copy link
Collaborator

oerc0122 commented Dec 6, 2024

Is it anything to do with:

ERROR: could not install deps [--file=D:\a\Euphonic\Euphonic\build_utils/../tests_and_analysis/tox_requirements.txt]; v = InvocationError("C:/Miniconda/Scripts/conda.exe install --quiet --yes -p conda-py310-old-np --channel conda-forge --channel default python=3.10 '--file=D:\\a\\Euphonic\\Euphonic\\build_utils/../tests_and_analysis/tox_requirements.txt'", 1)

[...]

Solving environment: ...working... failed

PackagesNotFoundError: The following packages are not available from current channels:

  - setuptools==71.1.0

The error isn't too helpful:

`D:\a\Euphonic\Euphonic\build_utils\.tox\pypisource-py312\python.EXE build_utils/version.py` failed with status 1.

But as it's an abort the only things that might fail are

version_file.read_text
version_file.write_text

with FileNotFound
or

        dist_version_file.parent.mkdir(parents=True, exist_ok=True)

with permissions issues?

@ajjackson
Copy link
Collaborator Author

ajjackson commented Dec 7, 2024

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

@ajjackson
Copy link
Collaborator Author

Hang on, should a source build even be running version.py? Where would it find build_utils?

@ajjackson
Copy link
Collaborator Author

Is it anything to do with:

ERROR: could not install deps [--file=D:\a\Euphonic\Euphonic\build_utils/../tests_and_analysis/tox_requirements.txt]; v = InvocationError("C:/Miniconda/Scripts/conda.exe install --quiet --yes -p conda-py310-old-np --channel conda-forge --channel default python=3.10 '--file=D:\\a\\Euphonic\\Euphonic\\build_utils/../tests_and_analysis/tox_requirements.txt'", 1)

[...]

Solving environment: ...working... failed

PackagesNotFoundError: The following packages are not available from current channels:

  - setuptools==71.1.0

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.

@ajjackson
Copy link
Collaborator Author

ajjackson commented Dec 7, 2024

Hang on, should a source build even be running version.py? Where would it find build_utils?

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.

@oerc0122
Copy link
Collaborator

oerc0122 commented Dec 7, 2024

Hang on, should a source build even be running version.py? Where would it find build_utils?

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.

@ajjackson
Copy link
Collaborator Author

ajjackson commented Dec 9, 2024

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.

@ajjackson ajjackson added this to the v1.4.1 milestone Dec 10, 2024
@ajjackson ajjackson marked this pull request as ready for review December 10, 2024 15:29
@ajjackson ajjackson requested a review from oerc0122 December 10, 2024 15:29
@ajjackson
Copy link
Collaborator Author

So:

  • the Windows sdist failure is genuine
  • some other stuff is fixed here
  • Conda tests will likely need more work but I don't see the point in making a 1.4.0 Conda release

I think this is ready to go?

@ajjackson ajjackson modified the milestones: v1.4.1, v1.4.2 Dec 10, 2024
@ajjackson
Copy link
Collaborator Author

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

@ajjackson
Copy link
Collaborator Author

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...
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.
@ajjackson
Copy link
Collaborator Author

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.

@ajjackson ajjackson merged commit fb4549d into master Dec 13, 2024
12 of 21 checks passed
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
Copy link
Collaborator

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

Copy link
Collaborator Author

@ajjackson ajjackson Dec 13, 2024

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...

@ajjackson
Copy link
Collaborator Author

ajjackson commented Dec 13, 2024

Something funny is going on with duplicate unit test runs for push and pull_request, maybe I'll look at that separately.

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 release** instead of **release**, so that a branch like this one doesn't trigger it.

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