Files
animaltrack/pyproject.toml
Petru Paler 61f704c68d feat: add config module with environment variable handling
Implements Step 1.1 config.py with Pydantic Settings:
- PORT (default 3366), DB_PATH, BASE_PATH
- AUTH_HEADER_NAME, TRUSTED_PROXY_IPS (comma-separated)
- CSRF_SECRET (required), CSRF_COOKIE_NAME
- SEED_ON_START, LOG_LEVEL (validated), METRICS_ENABLED

Includes 28 TDD tests covering defaults, overrides, and validation.
Also fixes pytest pythonpath configuration.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-27 17:54:21 +00:00

55 lines
1.1 KiB
TOML

[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "animaltrack"
version = "0.1.0"
description = "Event-sourced animal tracking for poultry farm management"
readme = "README.md"
requires-python = ">=3.11"
authors = [
{name = "ppetru"}
]
dependencies = [
"python-fasthtml>=0.12.0",
"monsterui>=1.0.0",
"uvicorn>=0.24.0",
"fastmigrate>=0.4.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"python-ulid>=2.0.0",
"xxhash>=3.0.0",
"python-multipart>=0.0.6",
]
[project.optional-dependencies]
dev = [
"pytest>=7.4.0",
"pytest-xdist>=3.5.0",
"ruff>=0.1.0",
]
[project.scripts]
animaltrack = "animaltrack.cli:main"
[tool.setuptools.packages.find]
where = ["src"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "I", "N", "W", "UP"]
ignore = ["E501"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
python_files = "test_*.py"
python_classes = "Test*"
python_functions = "test_*"
addopts = "--durations=20"