NicolasLM / spinach

Modern Redis task queue for Python 3
https://spinach.readthedocs.io
BSD 2-Clause "Simplified" License
63 stars 4 forks source link

Modernize Python tooling #36

Open 0xDEC0DE opened 6 months ago

0xDEC0DE commented 6 months ago

Move all configs into pyproject.toml, switch test/packaging to use Hatch, and do all the linting with Ruff.

Fix issues that Ruff turned up, and annotate/ignore the pieces that it got wrong.

Fixes: Issue #33

0xDEC0DE commented 6 months ago

I filed the ticket yesterday so I had something to work on today :(

This change is doing WAY too much all at once; the intention of the ticket was to only replace setup.py with pyproject.toml, and switch the build system to hatchling and setuptools_scm. I specifically did not want to remove tox (yet) nor change linters, the publisher action, or anything like that. (Side note: you have not updated any documentation.)

It's not really that much change, it just looks like it.

The twine publisher method should still work, and that piece is a separate commit, so it can be dropped and handled later.

Most of what looks like churn is simply copy+paste of discrete config files into the corresponding pyproject.toml section. It really does do it all!

The linter changes are similarly low-effort; my original approach was to drop in Ruff with a giant stack of ignores, and promise to peel them back later. I can do that instead, if it makes things easier.

0xDEC0DE commented 6 months ago

Downsized for the sake of sanity.