Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/mojzis/python-template.
Something went wrong. Try again.
python-template pyproject.toml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157[project]name = "python-template"version = "0.1.0"description = "A Python project template"requires-python = ">=3.11"
[build-system]requires = ["hatchling"]build-backend = "hatchling.build"
[dependency-groups]dev = [ # aesop toolbox "madoqua", "gerenuk", "biston", "zorilla", "pycoati", "ty-find", # core "ruff", "ty", "pytest", "pytest-cov", "vulture", "deptry", "interrogate", "poethepoet",]
[tool.ruff]line-length = 88target-version = "py311"
[tool.ruff.lint]select = ["E", "F", "W", "I", "UP", "B", "S", "SIM", "C4", "DTZ", "T20", "PTH", "ERA", "PL", "TRY", "RUF"]
[tool.ruff.lint.per-file-ignores]"tests/**" = ["S101", "S105", "S106", "PLR2004"]
[tool.ruff.format]
[tool.ty]
[tool.pytest.ini_options]testpaths = ["tests"]addopts = "--cov=src --cov-report=term-missing"
[tool.coverage.run]source = ["src"]
[tool.coverage.report]show_missing = true
[tool.vulture]paths = ["src"]
[tool.deptry]
[tool.interrogate]fail_under = 0
[tool.madoqua]# fix phase keeps the defaults: ruff check --fix, ruff format (re-staged).# check phase keeps the defaults (ruff check, ty check) and adds:extend_check = [ # madoqua appends the staged .py files. biston reads them as --focus-args focus files # (only clone pairs touching a staged file); zorilla lints exactly those files. { name = "biston", cmd = "biston scan --focus-args", timeout_s = 60, max_output_lines = 80 }, { name = "zorilla", cmd = "zorilla check", timeout_s = 30, max_output_lines = 80 }, # gerenuk scopes itself from the git diff, so no file list. # -o addopts= drops the --cov from [tool.pytest.ini_options]; the hook never reads coverage. { name = "gerenuk", cmd = "gerenuk run -- -q -o addopts=", pass_files = false, timeout_s = 120, max_output_lines = 120 },]
[tool.biston.scan]exclude = ["**/tests/**"]
[tool.poe]verbosity = -1
[tool.poe.tasks.fix]sequence = [ { cmd = "ruff format --quiet ." }, { cmd = "ruff check --fix --quiet ." },]help = "Auto-fix: format and lint"
[tool.poe.tasks.lint]cmd = "ruff check ."help = "Run linter (no fix)"
[tool.poe.tasks.typecheck]cmd = "ty check"help = "Run type checker"
[tool.poe.tasks.test]cmd = "pytest -q --tb=short"help = "Run tests"
[tool.poe.tasks.vulns]shell = "uvx pysentry-rs . || true"interpreter = "bash"help = "Dependency vulnerability scan"
[tool.poe.tasks.test-lint]cmd = "zorilla check ."help = "Lint tests for smells (zorilla)"
[tool.poe.tasks.clones]cmd = "biston scan ."help = "Clone detection (biston)"
[tool.poe.tasks.dead-code]cmd = "vulture src"help = "Dead code detection"
[tool.poe.tasks.unused-deps]cmd = "deptry ."help = "Unused dependency check"
[tool.poe.tasks._check-parallel]shell = """ ruff check . & ty check & zorilla check . & biston scan . & (uvx pysentry-rs . || true) & wait"""interpreter = "bash"
[tool.poe.tasks.check]sequence = [ { ref = "_check-parallel" }, { ref = "test" },]help = "Run all checks (parallel where possible)"
[tool.poe.tasks.check-all]sequence = [ { ref = "lint" }, { ref = "typecheck" }, { ref = "vulns" }, { ref = "test-lint" }, { ref = "clones" }, { ref = "dead-code" }, { ref = "unused-deps" }, { ref = "test" },]ignore_fail = truehelp = "Run all checks (report all failures)"
[tool.poe.tasks.setup]cmd = "madoqua install"help = "Install the madoqua commit hook (sets core.hooksPath)"