-
Notifications
You must be signed in to change notification settings - Fork 2
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
Packaging and linting updates? #8
Comments
Oh, wow! First, I'm super appreciative of the offer! Some initial thoughts:
I want to look at this report though, it's super-interesting and at least one of these is something I didn't know about at all -- that GitHub option to cancel concurrent matching workflows. |
There's also moving the tox config to TOML, but I haven't learned the TOML interface for it yet. |
Depends. I'm really enjoying |
Just curious, would you like me to modernize the packaging a bit? I think flit-core makes more sense for a very simple package like this (we are using it for all our foundational libraries to minimize bootstrapping requires), ruff could replace most of the slow individual checks, and the CI probably could be sped up with tox-uv (or nox, I'm a big fan of nox), things like that. But that's up to you, don't know if you started from an old template, or if you like certain things, etc. Everyone's a bit different in their preferences. :)
You can see my preferences at https://learn.scientific-python.org/development/guides/, and this is the current sp-repo-review report (live WASM version):
General
setuptools.build_meta
PyProject
Must have a
[tool.pytest.ini_options]
configuration section in pyproject.toml. If you must have it somewhere else (such as to supportpytest<6
), ignore this check.GitHub Actions
At least one workflow should auto-cancel.
All projects should have a
.github/dependabot.yml
file to support at least GitHub Actions regular updates. Something like this:Pre-commit
Must have
https://github.com/adamchainz/blacken-docs
in.pre-commit-config.yaml
Must have
https://github.com/pre-commit/mirrors-mypy
in.pre-commit-config.yaml
Must have
https://github.com/pre-commit/pygrep-hooks
in.pre-commit-config.yaml
Must have one of
https://github.com/executablebooks/mdformat
,https://github.com/rbubley/mirrors-prettier
in.pre-commit-config.yaml
Must have
https://github.com/astral-sh/ruff-pre-commit
in.pre-commit-config.yaml
Should have something like this in
.pre-commit-config.yaml
:MyPy
Must have
warn_unreachable
(true/false) to pass this check. There are occasionally false positives (often due to platform or Python version static checks), so it's okay to set it to false if you need to. But try it first - it can catch real bugs too.Must have
"ignore-without-code"
inenable_error_code = [...]
. This will force all skips in your project to include the error code, which makes them more readable, and avoids skipping something unintended.Must have
"redundant-expr"
inenable_error_code = [...]
. This helps catch useless lines of code, like checking the same condition twice.Must have
"truthy-bool"
inenable_error_code = []
. This catches mistakes in using a value as truthy if it cannot be falsy.Ruff
Must have
[tool.ruff]
section inpyproject.toml
orruff.toml
/.ruff.toml
.Documentation
The text was updated successfully, but these errors were encountered: