-
Notifications
You must be signed in to change notification settings - Fork 3
Description
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
- Detected build backend:
setuptools.build_meta
| ? | Name | Description |
|---|---|---|
| ✅ | PY001 | Has a pyproject.toml |
| ✅ | PY002 | Has a README.(md|rst) file |
| ✅ | PY003 | Has a LICENSE* file |
| ✅ | PY004 | Has docs folder |
| ✅ | PY005 | Has tests folder |
| ✅ | PY006 | Has pre-commit config |
| ✅ | PY007 | Supports an easy task runner (nox or tox) |
PyProject
| ? | Name | Description |
|---|---|---|
| ✅ | PP002 | Has a proper build-system table |
| ✅ | PP003 | Does not list wheel as a build-dep |
| ❌ | PP301 |
Has pytest in pyproject
Must have a |
| PP302 | Sets a minimum pytest to at least 6 | |
| PP303 | Sets the test paths | |
| PP304 | Sets the log level in pytest | |
| PP305 | Specifies xfail_strict | |
| PP306 | Specifies strict config | |
| PP307 | Specifies strict markers | |
| PP308 | Specifies useful pytest summary | |
| PP309 | Filter warnings specified |
GitHub Actions
| ? | Name | Description |
|---|---|---|
| ✅ | GH100 | Has GitHub Actions config |
| ✅ | GH101 | Has nice names |
| ❌ | GH102 |
Auto-cancel on repeated PRs
At least one workflow should auto-cancel. |
| ✅ | GH103 | At least one workflow with manual dispatch trigger |
| ✅ | GH104 | Use unique names for upload-artifact |
| ❌ | GH200 |
Maintained by Dependabot
All projects should have a |
| GH210 | Maintains the GitHub action versions with Dependabot | |
| GH211 | Do not pin core actions as major versions | |
| GH212 | Require GHA update grouping |
Pre-commit
| ? | Name | Description |
|---|---|---|
| ✅ | PC100 | Has pre-commit-hooks |
| ✅ | PC110 | Uses black or ruff-format |
| ❌ | PC111 |
Uses blacken-docs
Must have |
| ❌ | PC140 |
Uses a type checker
Must have |
| ✅ | PC160 | Uses a spell checker |
| ❌ | PC170 |
Uses PyGrep hooks (only needed if rST present)
Must have |
| ❌ | PC180 |
Uses a markdown formatter
Must have one of |
| ❌ | PC190 |
Uses Ruff
Must have |
| PC191 | Ruff show fixes if fixes enabled | |
| ❌ | PC901 |
Custom pre-commit CI message
Should have something like this in |
MyPy
| ? | Name | Description |
|---|---|---|
| ✅ | MY100 | Uses MyPy (pyproject config) |
| ✅ | MY101 | MyPy strict mode |
| ✅ | MY102 | MyPy show_error_codes deprecated |
| ❌ | MY103 |
MyPy warn unreachable
Must have |
| ❌ | MY104 |
MyPy enables ignore-without-code
Must have |
| ❌ | MY105 |
MyPy enables redundant-expr
Must have |
| ❌ | MY106 |
MyPy enables truthy-bool
Must have |
Ruff
| ? | Name | Description |
|---|---|---|
| ❌ | RF001 |
Has Ruff config
Must have |
| RF002 | Target version must be set | |
| RF003 | src directory doesn't need to be specified anymore (0.6+) | |
| RF101 | Bugbear must be selected | |
| RF102 | isort must be selected | |
| RF103 | pyupgrade must be selected | |
| RF201 | Avoid using deprecated config settings | |
| RF202 | Use (new) lint config section |
Documentation
| ? | Name | Description |
|---|---|---|
| ✅ | RTD100 | Uses ReadTheDocs (pyproject config) |
| ✅ | RTD101 | You have to set the RTD version number to 2 |
| ✅ | RTD102 | You have to set the RTD build image |
| ✅ | RTD103 | You have to set the RTD python version |