Skip to content

Commit

Permalink
Upgrade dev-cmd and document commands & tasks. (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsirois authored Jan 27, 2025
1 parent 3f97ff3 commit 9dc8176
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
15 changes: 11 additions & 4 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@ check-fmt = ["ruff", "format", "--diff"]
lint = ["ruff", "check", "--fix"]
check-lint = ["ruff", "check"]

type-check = [
[tool.dev-cmd.commands.type-check.factors]
py = "The Python version to type check in <major>.<minor> form; i.e.: 3.13."
[tool.dev-cmd.commands.type-check]
args = [
"mypy",
"--python-version", "{-py:{markers.python_version}}",
"--cache-dir", ".mypy_cache_{markers.python_version}",
Expand All @@ -119,14 +122,18 @@ args = ["pytest", "-n", "auto"]
cwd = "tests"
accepts-extra-args = true

[tool.dev-cmd.tasks]
checks = [
[tool.dev-cmd.tasks.checks]
description = "Runs all development checks, including auto-formatting code."
steps = [
"fmt",
"lint",
["type-check-py3.{8..13}"],
"test",
]
ci = [["check-fmt", "check-lint", "type-check"], "test"]

[tool.dev-cmd.tasks.ci]
description = "Runs all checks used for CI."
steps = [["check-fmt", "check-lint", "type-check"], "test"]

[tool.dev-cmd]
default = "checks"
Expand Down
7 changes: 4 additions & 3 deletions python/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9dc8176

Please sign in to comment.