-
Notifications
You must be signed in to change notification settings - Fork 723
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
Restructure project to use pyproject.toml #712
Restructure project to use pyproject.toml #712
Conversation
Note to maintainers: I've tested this pyproject.toml build and deployment framework against the existing PyPi v1.6.1 codebase and it builds, deploys and runs successfully. You can try for yourself using:
I note, however, that the source code in the repo's master branch has moved on from the source currently deployed in PyPi, though the former's version is still marked as Just a suggestion, but it might be worth keeping the master branch in line with the corresponding release in PyPi and putting any intervening changes in a different 'release candidate' branch? Also, I believe PEP518 pedants will argue that the application should take its version number from the |
My suggestion would be to replace all the linters (flake8, pylint, pylama, bandit, pyupgrade) with a single, fast (<10 sec) GitHub Action which runs Then a separate GHA can focus on formatting (psf/black) and testing (pytest) and possibly add type hints (mypy). Did you use tools to convert |
Another day, another linter ;-) I noticed that the existing project workflow has references to a variety of linters - I'm guessing that may reflect the historical predilections of the individual maintainers. I agree that it would probably be sensible to settle on one, but I'm happy to leave this to the discretion of the maintainers - it's not the main focus of this PR. Having said that, I can't help but think the maintainers' precious time might be better spent addressing more urgent issues (like moving off setup.py asap) than beta-testing a new (though doubtless very capable) linter. In the meantime, pylint and flake are mature, proven, capable, robust and natively supported by all popular IDEs, and the ≈3.9 seconds it takes to run pylint against this library on a moderately capable laptop may not be such a big deal.
Manual - I already had a template I've used for other Python projects. |
I wrote that before ruff existed. |
Re. the failed merge checks - I've not touched the source code or the existing GitHub Actions so these are presumably pre-existing issues. I've amended tox.yml to remove reference to python 3.6 (which is now end-of-life) and update the checkout and setup-python actions to the latest node.js 16 versions (as per the deprecation warnings), but the Who are the maintainers expecting to resolve this issue? |
Please add the failing bandit code to the skip list like: It is a newer code added since that GitHub Action was created. |
Not at all. This PR makes the tests pass. #719 |
Co-authored-by: Christian Clauss <cclauss@me.com>
What happened here?!? These fixes were vital for getting the tests green again. |
PR reinstated as #729 |
setup.py
is now deprecated and is scheduled to be dropped altogether in pip 23.This PR makes a number of changes to update the project build framework:
pyproject.toml
, while retaining setuptools as a back-end build platform.Build
task will produce wheel (*.whl
) and sdist (*.tar.gz
) install packages in the dist folder which can be uploaded to PyPi using twine.Install Locally
task will install this wheel using pip.NB: this PR only changes the build setup - no changes have been made to existing application code or test cases, so some existing CI workflows may still fail if they were failing previously.
Fixes #706