-
Notifications
You must be signed in to change notification settings - Fork 0
Modernize packaging, linting, and CI quality gates #1
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "uv" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| dependencies: | ||
| patterns: | ||
| - "*" | ||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| groups: | ||
| actions: | ||
| patterns: | ||
| - "*" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,8 +14,8 @@ dependencies = [] | |
| fgcz-reference = "fgcz_reference_project.cli:main" | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling>=1.28,<2"] | ||
| build-backend = "hatchling.build" | ||
| requires = ["uv_build>=0.11.7,<0.12"] | ||
| build-backend = "uv_build" | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
|
|
@@ -26,14 +26,14 @@ dev = [ | |
| "pyright>=1.1.408,<2", | ||
| "pytest>=9,<10", | ||
| "pytest-cov>=7,<8", | ||
| "ruff==0.15.11", | ||
| "ruff==0.16.0", | ||
| ] | ||
| docs = [ | ||
| "mkdocs-material>=9.7,<10", | ||
| ] | ||
|
|
||
| [tool.hatch.build.targets.wheel] | ||
| packages = ["src/fgcz_reference_project"] | ||
| [tool.uv.build-backend] | ||
| module-name = "fgcz_reference_project" | ||
|
|
||
| [tool.pytest.ini_options] | ||
| addopts = "-ra --strict-config --strict-markers" | ||
|
|
@@ -45,27 +45,45 @@ target-version = "py312" | |
|
|
||
| [tool.ruff.lint] | ||
| select = [ | ||
| "A", | ||
| "B", | ||
| "C4", | ||
| "C901", | ||
| "E", | ||
| "F", | ||
| "I", | ||
| "PLR0911", | ||
| "PLR0912", | ||
| "PLR0913", | ||
| "PLR0915", | ||
| "UP", | ||
| "W", | ||
| "F", # pyflakes | ||
| "E", # pycodestyle errors | ||
| "W", # pycodestyle warnings | ||
| "I", # isort | ||
| "N", # pep8-naming | ||
| "UP", # pyupgrade | ||
| "B", # flake8-bugbear | ||
| "A", # flake8-builtins | ||
| "C4", # flake8-comprehensions | ||
| "RUF", # ruff-specific | ||
| "C90", # mccabe complexity | ||
| "PL", # pylint (convention/error/warning/refactor) | ||
| "SIM", # flake8-simplify | ||
| "RET", # flake8-return | ||
| "PTH", # flake8-use-pathlib | ||
| "PT", # flake8-pytest-style | ||
| "TID", # flake8-tidy-imports | ||
| "TC", # flake8-type-checking | ||
| "ARG", # flake8-unused-arguments | ||
| "EM", # flake8-errmsg | ||
| "D", # pydocstyle | ||
| "ANN", # flake8-annotations | ||
| "S", # flake8-bandit (security) | ||
| ] | ||
| ignore = ["ANN401"] | ||
|
|
||
| [tool.ruff.lint.mccabe] | ||
| max-complexity = 10 | ||
|
|
||
| [tool.ruff.lint.pylint] | ||
| max-args = 7 | ||
|
|
||
| [tool.ruff.lint.pydocstyle] | ||
| convention = "google" | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not using any of the supported conventions at the moment, since I still use ReST style docstrings... Type: "google" | "numpy" | "pep257" |
||
|
|
||
| [tool.ruff.lint.per-file-ignores] | ||
| "tests/**" = ["S101", "D", "ANN", "PLR2004", "ARG"] | ||
| "scripts/**" = ["S603", "S607", "D", "PLR2004", "EM"] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "double" | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
|
|
||
| # Intentionally empty package marker; import from concrete modules (see AGENTS.md). | ||
| # ruff: noqa: D104 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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 think the choice of the ideal ruff rules is extremely subjective. Not even sure if I agree with this. What you can also do is start with the minimum, and then run
uv run ruff check --select ALL --statisticsto get a rough idea of the problems which might be present.