Files
praxis/pyproject.toml
T
kiskaadee d6f9103906 ci: set up quality control pipeline and automated git hooks
- Add toolchain configurations for Ruff, Pyright, and Pytest in pyproject.toml
- Implement pre-commit hook for fast linting/formatting and pre-push hook for strict typing and tests
- Document mandatory quality gates in AGENTS.md
- Include initial smoke test to ensure the test runner is functioning.
2026-09-24 16:30:52 -05:00

134 lines
3.3 KiB
TOML

[project]
name = "praxis"
version = "0.1.0"
description = "Self-hosted workout tracking and habit execution platform."
readme = "README.md"
authors = [
{ name = "kiskaadee", email = "fcortesbio@gmail.com" }
]
requires-python = ">=3.13"
dependencies = [
"fastapi[standard]>=0.141.1",
"pydantic-settings>=2.15.0",
"sqlalchemy[asyncio]>=2.0.54",
"sqlmodel>=0.0.47",
]
[dependency-groups]
dev = [
"mypy>=2.3.1",
"pyright>=1.1.414",
"pytest>=9.1.1",
"pytest-cov>=6.0.0",
"ruff>=0.16.9",
]
[project.scripts]
praxis = "praxis:main"
[build-system]
requires = ["uv_build>=0.12.16,<0.13.0"]
build-backend = "uv_build"
# =============================================================================
# Ruff
# =============================================================================
[tool.ruff]
target-version = "py313"
line-length = 100
src = ["src", "tests"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"SIM", # flake8-simplify
"RUF", # ruff-native rules
"N", # pep8-naming
"ANN", # flake8-annotations (type hint coverage)
"PT", # flake8-pytest-style
"TCH", # flake8-type-checking (TYPE_CHECKING guard suggestions)
]
ignore = []
[tool.ruff.lint.per-file-ignores]
"tests/**" = [
"ANN", # don't require type annotations in test files
"S101", # allow assert in tests
]
[tool.ruff.lint.isort]
known-first-party = ["praxis"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
# =============================================================================
# Pyright
# =============================================================================
[tool.pyright]
pythonVersion = "3.13"
pythonPlatform = "Linux"
venvPath = "."
venv = ".venv"
# Strict mode — explicitly listed so deviations are intentional overrides
typeCheckingMode = "strict"
# Strict checks (all on)
reportMissingImports = true
reportMissingTypeStubs = false # third-party stubs are often incomplete
reportUnknownVariableType = true
reportUnknownMemberType = true
reportUnknownParameterType = true
reportUnknownArgumentType = true
reportReturnType = true
reportGeneralTypeIssues = true
reportPrivateUsage = true
reportUntypedFunctionDecorator = false # FastAPI decorators are untyped
# Source roots
include = ["src", "tests"]
exclude = [".venv", "dist", "build"]
# =============================================================================
# Pytest
# =============================================================================
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers",
"--tb=short",
"-q",
]
markers = [
"unit: pure domain tests, no I/O",
"integration: requires database or external services",
]
[tool.coverage.run]
source = ["src/praxis"]
branch = true
omit = ["tests/*"]
[tool.coverage.report]
show_missing = true
skip_covered = false
fail_under = 90
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
]