Open MarkusH opened 1 year ago
@justinmayer Here's my proposal for a "milestone", trying to, IMO (yes, highly opinionated), reduce the complexity of tooling:
setup.py
/pyproject.toml
with pip install
twisted
to upload to PyPI from the CI. Essentially leveraging PyPI's Trusted Publisherrequirements/dev.txt
and requirements/docs.txt
(which we could, if we want, extend with pip-tools/pip-compiletox
to support test matrices with different Python/Django/webauthn versionsI noticed that error yesterday, which is related to an incompatibility between Invoke 1.x and Python 3.11. The easiest resolution is to bump Invoke to 2.0+ in the pyproject
file.
Thanks for the suggestions. I also have some significantly opinionated thoughts on tooling, so I’ll respond to these ideas as soon as I get back to my desk. 😊
Many thanks for the thoughtful suggestions, Markus. Regarding the original genesis for this issue, I see that you have already resolved the problem by upgrading to Invoke 2.x via https://github.com/justinmayer/kagi/commit/4a7f3a7b0fd5c5718f787fbc5c4b5de70097c418. You mentioned that running pytest
manually fails, but I can't reproduce that, and at least in theory that should not have had anything to do with the incompatibility between Invoke 1.x and Python 3.11.
Some quick thoughts about the suggestions…
Poetry is currently used in conjunction with AutoPub to handle the release automation, so in order to retain the benefits provided by AutoPub, before dropping Poetry from this project I'd prefer to add support to AutoPub for alternative tool-chains such as Hatch/Hatchling, PDM, etc. That said, I am not attached to Poetry and am open to switching to alternative tooling that supports pyproject.toml
.
Since AutoPub already uploads Kagi packages to PyPI via CI, I think it would be great to add support to AutoPub for PyPI’s new Trusted Publisher feature.
I have personally enjoyed the transition from listing dependencies in requirements.txt
files to instead specifying them in pyproject.toml
, but we can certainly talk about the relative pros & cons of those approaches.
I am not sure what issues pytest
might present, but I haven't encountered any problems with it, and I quite appreciate its modular design and rich plugin ecosystem.
I normally rely on CI to test the full range of version matrices, running tests locally on a sub-set of all those version combinations. That said, I have no objection to adding tox
to the project, provided we also retain the current easy way to run tests locally on a single Python+Django version combination.
In short, I think it might make sense to elaborate regarding the perceived complexity and about what actual, current problems it may pose here.
The contribution guide says, one should run
poetry install
,poetry shell
and theninvoke setup
. However, the last command fails on Python 3.11I'd like to suggest to move away and drop
invoke
in favor of tools liketox
for test matrices as well as a hand-full documented commands, that work independently of the Python version.The fact, that the
tasks.py
fails with the above error also means, runningpytest
manually fails.