Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,37 @@ dynamic = [
dependencies = [
"sphinx>=9.0.4",
]
optional-dependencies.testing = [
"covdefaults>=2.3",
"defusedxml>=0.7.1", # needed for sphinx.testing
"pytest>=9.0.2",
"pytest-cov>=7",
]
urls.Documentation = "https://github.com/tox-dev/sphinx-argparse-cli#sphinx-argparse-cli"
urls.Homepage = "https://github.com/tox-dev/sphinx-argparse-cli"
urls.Source = "https://github.com/tox-dev/sphinx-argparse-cli"
urls.Tracker = "https://github.com/tox-dev/sphinx-argparse-cli/issues"

[dependency-groups]
dev = [
{ include-group = "lint" },
{ include-group = "pkg-meta" },
{ include-group = "test" },
{ include-group = "type" },
]
test = [
"covdefaults>=2.3",
"defusedxml>=0.7.1",
"pytest>=9.0.2",
"pytest-cov>=7",
]
type = [
"ty>=0.0.17",
{ include-group = "test" },
]
lint = [
"pre-commit-uv>=4.2",
]
pkg-meta = [
"check-wheel-contents>=0.6.3",
"twine>=6.2",
"uv>=0.9.16",
]

[tool.hatch]
build.hooks.vcs.version-file = "src/sphinx_argparse_cli/version.py"
build.targets.sdist.include = [
Expand Down
9 changes: 5 additions & 4 deletions tox.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ skip_missing_interpreters = true
description = "run the unit tests with pytest under {env_name}"
package = "wheel"
wheel_build_env = ".pkg"
extras = [ "testing" ]
dependency_groups = [ "test" ]
pass_env = [ "PYTEST_*" ]
set_env.COVERAGE_FILE = { replace = "env", name = "COVERAGE_FILE", default = "{work_dir}{/}.coverage.{env_name}" }
commands = [
Expand Down Expand Up @@ -38,13 +38,13 @@ commands = [
[env.fix]
description = "format the code base to adhere to our styles, and complain about what we cannot do automatically"
skip_install = true
deps = [ "pre-commit-uv>=4.2" ]
dependency_groups = [ "lint" ]
commands = [ [ "pre-commit", "run", "--all-files", "--show-diff-on-failure" ] ]

[env.pkg_meta]
description = "check that the long description is valid"
skip_install = true
deps = [ "check-wheel-contents>=0.6.3", "twine>=6.2", "uv>=0.9.16" ]
dependency_groups = [ "pkg-meta" ]
commands = [
[ "uv", "build", "--sdist", "--wheel", "--out-dir", "{env_tmp_dir}", "." ],
[ "twine", "check", "{env_tmp_dir}{/}*" ],
Expand All @@ -53,12 +53,13 @@ commands = [

[env.type]
description = "run type check on code base"
deps = [ "ty>=0.0.17" ]
dependency_groups = [ "type" ]
commands = [ [ "ty", "check", "--output-format", "concise", "--error-on-warning", "." ] ]

[env.dev]
description = "generate a DEV environment"
package = "editable"
dependency_groups = [ "dev" ]
commands = [
[ "uv", "pip", "tree" ],
[ "python", "-c", "import sys; print(sys.executable)" ],
Expand Down