FAIRmat-NFDI / readers-xrd

A package containg file readers for various XRD file formats.
https://pypi.org/project/fairmat-readers-xrd/
Apache License 2.0
2 stars 1 forks source link

Issue with Numpy and Python>=11 #6

Closed sherjeelshabih closed 2 weeks ago

sherjeelshabih commented 4 weeks ago

This version of numpy seems to be failing for newer Python versions. Our CI tests fail at importing this numpy version. Is there a reason to have an approx limitation to this or will it be fine to let this free? We test on Python3.9-3.12 usually to see all errors. We could add those to the CI here as well.

https://github.com/FAIRmat-NFDI/readers-xrd/blob/23a0eb06c2d7062be55174bacb8daa54d8a8e56c/pyproject.toml#L28C5-L28C20

The failing test: https://github.com/FAIRmat-NFDI/pynxtools-xrd/actions/runs/9399588169/job/25887327552

@lukaspie @RubelMozumder adding you guys for reference.

ka-sarthak commented 2 weeks ago

@sherjeelshabih I tried removing the version restrictions for numpy, but it seems that for Python3.9, pip installs numpy==2.0.0 which is not compatible with pint==0.23. Possibly, pint==0.24 is compatible with the latest numpy, but it requires Python>3.10, which is something NOMAD does not officially support currently. I guess we have to table this issue for a while.

sherjeelshabih commented 2 weeks ago

We are resolving a similar issue for another package. What we are trying now is having a different set of pint and numpy for py3.9 and below. For everything else we use the latest pint and numpy. For py>=3.10 we can also not limit the version as this package more or less should work with the basic features of the two libs.