-
Notifications
You must be signed in to change notification settings - Fork 56
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
Migrate setup.cfg
to pyproject.toml
and refactor pyproject.toml
#685
Migrate setup.cfg
to pyproject.toml
and refactor pyproject.toml
#685
Conversation
FYI: This PR is probably best reviewed commit by commit |
"any", | ||
] | ||
zip-safe = false | ||
packages = ["probnum"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I specified probnum
here manually instead of collecting it magically using the [tool.setuptools.packages.find]
directive. This way, we need less configuration lines and we avoid weird artifacts if stuff that we don't want installed gets collected. "Explicit is better than implicit" 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that any additional packages under src
that we want installed must also be listed here in the future, which gives a very nice overview of the package contents.
13d47df
to
3c0f9d7
Compare
"any", | ||
] | ||
zip-safe = false | ||
packages = ["probnum"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that any additional packages under src
that we want installed must also be listed here in the future, which gives a very nice overview of the package contents.
use_parentheses = true | ||
line_length = 88 | ||
# see https://pycqa.github.io/isort/docs/configuration/profiles.html#black | ||
profile = "black" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This combines all deleted options, but it will be kept up-to-date with black
s behavior
b1dc17f
to
a3d7651
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I like the consolidation of config files. The only change I'd suggest is to not explicitly specify authors and maintainers.
pyproject.toml
Outdated
readme = "README.md" | ||
requires-python = ">=3.8,<3.11" | ||
license = {file = "LICENSE.txt"} | ||
authors = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realize having specific names and e-mail addresses here is probably part of the PyPI specification, but I am not a huge fan, since it will cause PRs when maintainers change and may not stay up-to-date. (I realize similar issues exist with the docs). I somewhat prefer the option to just specify this on GitHub and let the contributors list show who creates this package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case we should create a joint mail address for all ProbNum maintainers soon, since this is the only piece of contact information listed on PyPI. It also seems to be quite common in other open source project (see NumPy, SciPy, PyTorch)
* Remove line-to-long for _problems * Remove * Remove line-too-long for _scaling * - * Remove line-too-long from /linops and add to/problems * Update _kronecker.py * Fix trailing-whitespace * Fix trailing whitespace for kroneker * Fix trailing-whitespaces for _linear_operator
…probabilistic-numerics#685) * Migrate `setup.cfg` to PEP 621 Project Metadata in `pyproject.toml` * Add URLs in `pyproject.toml` testing config * Update `black` configuration * Update `isort` configuration * Add headers for formatting and linting configuration * Move formatting configuration section * Rearrange linting configuration * Add maintainers and authors * Bugfix in `tool.setuptools.platforms` * Bugfix in package collection * Bugfix in `project.optional-dependencies` * Don't need requirements.txt anymore * One line per package dependency * Bugfix in `[project.version]` * Remove authors and maintainers * Bugfix: `optional-dependencies` is generated dynamically * Fix warning in build process: Add `homepage` URL * Update sphinx requirement from <4.5,>=3.0 to >=3.0,<4.6 (probabilistic-numerics#688) * Resolve pylint line-too-long for linops (probabilistic-numerics#682) * Remove line-to-long for _problems * Remove * Remove line-too-long for _scaling * - * Remove line-too-long from /linops and add to/problems * Update _kronecker.py * Fix trailing-whitespace * Fix trailing whitespace for kroneker * Fix trailing-whitespaces for _linear_operator Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: PrSh27 <102277860+PrSh27@users.noreply.github.com>
In a Nutshell
This PR migrates
setuptools
configuration fromsetup.cfg
topyproject.toml
and refactorspyproject.toml
Detailed Description
setuptools
configuration fromsetup.cfg
topyproject.toml
black
configurationisort
configurationrequirements.txt
Related Issues
None