-
Notifications
You must be signed in to change notification settings - Fork 7
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
Move package metadata and tool configuration to pyproject.toml
#1158
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
matt-graham
force-pushed
the
mmg/modernize-packaging
branch
from
October 11, 2023 13:33
a192c8d
to
34de588
Compare
matt-graham
commented
Oct 11, 2023
matt-graham
commented
Oct 11, 2023
matt-graham
commented
Oct 11, 2023
matt-graham
force-pushed
the
mmg/modernize-packaging
branch
from
November 6, 2023 17:10
8295703
to
ff0e70e
Compare
Thanks for this one @matt-graham. Just noting that this one is the critical one for the first release with the paper submission |
tamuri
approved these changes
Nov 6, 2023
This was referenced Nov 7, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1126 and fixes #1156
Moves from
setup.py
/setup.cfg
based approach of specifying package metadata and tool configuration to more modernpyproject.toml
based approach.This allows getting rid of various separate configuration / metadata files (
.coveragerc
,requirements/*.in
,setup.cfg
,setup.py
) in favour having all configuration centralized inpyproject.toml
.This PR also removes the previous
.bumpversion.cfg
file in favour of moving tosetuptools-scm
to automatically set package version based on Git metadata / tags (default versioning scheme is described here).The
tox
check
environment is updated to use Ruff in place offlake8
as Ruff is a lot quicker and supportspyproject.toml
whichflake8
currently doesn't. For now to keep the changes minimal here, I've added a series of rules to ignore that cause the Ruff check to fail. In a separate PR we probably want to either move to adding specific# noqa: ...
overrides at the relevant places if we think what we have in the code is correct or fix the violations.I've also removed the previous
requirements/Makefile
in favour of adding a newrequirements
tox
environment that updates the requirements files usingpip-compile
(with input requirements now sourced from dependencies specified inpyproject.toml
, including optionaldev
dependencies). I've also regenerated the requirements files so that the commented sources / generation command align with new structure but as far as I can see from a quick check this hasn't led to any changes in resolved packages. (EDIT: Beyond a few changes from addingruff
to development dependencies).EDIT: Now also adds
pylint
to checks, as forruff
disabling rules that currently cause checks to fail with intention of fixing actual violations in separate PRs and/or adding specific# noqa: ...
overrides.