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

CI and Build: Updated setup.py and continuous integration configuration #298

Merged
merged 21 commits into from
Apr 15, 2024

Conversation

t20100
Copy link
Member

@t20100 t20100 commented Feb 9, 2024

This PR aims at updating/simplifying the setuptools and CI configs and removing unnecessary code.

The main breaking change is the removal of setup.py build command line arguments that was deprecated in favor of environment variables.
Another change is the requirement of setuptools>62.4.0 and py-cpuinfo==9.0.0, but that won't be visible when installing with pip.
I would include this in a major release.

Details of the changes:

  • Requires setuptools>62.4.0: allow using pyproject.toml and removing fallbacks to distutils
  • Move project metadata from setup.py to pyproject.toml
  • Simplify CI test workflow and remove ci/info_platform.py
  • Rename extras_require [dev] to [doc] and use it instead of requirements.txt to avoid duplicating the list of dependencies
  • Remove local copy of cpuinfo.py: This is only needed when building with python setup.py build (as is setuptools). In this case, a log indicates to install py-cpuinfo.
  • Remove supports for setup.py build command line arguments since this is a deprecated feature of setuptools.
  • Rework some code in setup.py

@t20100 t20100 added this to the 4.4.0 milestone Feb 9, 2024
@t20100 t20100 marked this pull request as ready for review April 12, 2024 08:07
@t20100
Copy link
Member Author

t20100 commented Apr 12, 2024

This PR also fixes support of numpy v2 in tests and in CI config.

Ready for review.

@kif
Copy link
Member

kif commented Apr 12, 2024

Indeed a tough one ...

pyproject.toml Outdated Show resolved Hide resolved
@@ -122,8 +122,7 @@ def testFcidecomp(self):
self.assertTrue(data.shape[0] == 60, "Incorrect shape")
self.assertTrue(data.shape[1] == 30, "Incorrect shape")
self.assertTrue(data.dtype == expected_data.dtype, "Incorrect type")
self.assertTrue(numpy.alltrue(data == expected_data),
"Incorrect values read")
self.assertTrue(numpy.all(data == expected_data), "Incorrect values read")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the one hand, you specify numpy2 is not supported (in .github/workflows/release.yml), and here you make it compatible ...
Is there a list of plugins which are not yet numpy2-compatible ? Such a list should be made and updated when the compatibility is validated.

Copy link
Member Author

@t20100 t20100 Apr 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests are run twice each time:

  • a first time with the latest versions of h5py & numpy, so as of today, numpy2 if installed with --pre
  • a second time with the "oldest supported" version of h5py for the given version of Python, and in this case I added numpy<2 because those versions of h5py do not support numpy2.

The numpy<2 in the CI configuration files are for the later case.

@kif
Copy link
Member

kif commented Apr 12, 2024

Beside the 2 comments LGTM

Copy link
Member

@kif kif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@t20100
Copy link
Member Author

t20100 commented Apr 15, 2024

Thanks for the review!

@t20100 t20100 merged commit dc05973 into silx-kit:main Apr 15, 2024
7 checks passed
@t20100 t20100 deleted the update-setup branch April 15, 2024 13:22
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.

3 participants