pylhc / tfs

Python package to handle TFS files
https://pylhc.github.io/tfs/
MIT License
9 stars 4 forks source link

Migrate to pyproject.toml #131

Closed fsoubelet closed 2 months ago

fsoubelet commented 2 months ago

Next in the wave of PRs transitioning our packages to using the standard pyproject.toml file.

Important

The setup.py file is gone. A pyproject.toml file now centralises everything, including metadata conformly to PEP621.

I have put down hatchling as a build backend, as it is the one developped by PyPA, the Python Packaging Authority, as they publish the authoritative user guide. This has little impact though, as any PEP518-compliant backend would work there instead.

Like for all other packages, this moves the minimum supported Python version to 3.9.

Details

I have put Hatch as a packaging tool as it is also the one from PyPA, but it is strictly optional. One does not need Hatch, because standards. The new common workflows (PR upcoming) don't even use it.

I have taken upon me to up some minimum required versions (numpy for instance), for uniformity with the rest of the packages.

fsoubelet commented 2 months ago

Note: tests are failing here as pytables still does not have a release compatible with numpy 2.x. Setting in your environments numpy<2.0 will let you pass the tests without issue.

@JoschD what do you think is a good course of action? I say we can merge this as it does not yield a release, and changes nothing to the status of tfs-pandas on master: package is fine, numpy 2-compatible, but pytables is a bottleneck.

fsoubelet commented 2 months ago

Status

@JoschD

A new version of pytables was released today with compatibility for numpy 2.x. This is great.

However, they failed declaring numpy 2.x as accepted in their config: https://github.com/PyTables/PyTables/issues/1200. It still runs fine with numpy 2.0 though. Additionnally, this new release dropped support for Python 3.9, which we do still support.

I have then put some conditionals in our required versions for the hdf5 extra, as follows:

I have added TODOs in the pyproject.toml. As soon as we drop support for Python 3.9, ideally pytables 3.10.1 is out and we require it. We can also then relax the numpy constraint.

I would suggest a patch release with this new configuration, so that users encounter less dependency issues.