DaemonConfig.from_env() now best-effort loads a .env file (find_dotenv usecwd, load_dotenv override=False) so operators can manage daemon env vars via .env, with real OS env taking precedence. Add python-dotenv dependency, gitignore .env, ship .env.example, and add config tests (load / OS-env precedence / absence regression / missing-DSN guard). Verification: 78 passed, ruff clean, .env ignored + .env.example tracked, and a .env-only DaemonConfig smoke. Processed via the minor-change fast path: REQ-010 (Configuration) -> Implemented, BAT-003 (batch-lite, no design) -> release-candidate. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
736 B
TOML
37 lines
736 B
TOML
[project]
|
|
name = "trex-core"
|
|
version = "0.1.0"
|
|
description = "Shared core for the trex product family; first domain: slot lifecycle (storage-agnostic pure domain)"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.110",
|
|
"uvicorn>=0.29",
|
|
"psycopg[binary]>=3.1",
|
|
"python-dotenv>=1.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8",
|
|
"ruff>=0.4",
|
|
"httpx>=0.27",
|
|
]
|
|
|
|
[project.scripts]
|
|
trex-core-daemon = "trex_core.runtime.daemon:main"
|
|
|
|
[build-system]
|
|
requires = ["setuptools>=68"]
|
|
build-backend = "setuptools.build_meta"
|
|
|
|
[tool.setuptools.packages.find]
|
|
where = ["."]
|
|
include = ["trex_core*"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 100
|