Config (src/config.py): - pydantic-settings Settings class: OLLAMA_URL, OLLAMA_MODEL, DEBUG - Reads from .env (gitignored) with sane defaults - settings singleton imported by health.py and agent.py Removes two hardcodes: - health.py: OLLAMA_URL="http://localhost:11434" → settings.ollama_url - agent.py: Ollama(id="llama3.2") → settings.ollama_model app.py: - logging.basicConfig at INFO — requests/errors now visible in terminal - docs_url/redoc_url gated on settings.debug (off by default) pyproject.toml: - pydantic-settings>=2.0.0 added to main dependencies - hatch wheel config updated to include src/config.py .env.example: documents all three env vars with inline comments .gitignore: add !.env.example negation so the template gets committed .github/workflows/tests.yml: runs pytest --cov on every push/PR (ubuntu-latest, Python 3.11, pip cache) All 27 tests pass. https://claude.ai/code/session_01M4L3R98N5fgXFZRvV8X9b6
48 lines
975 B
TOML
48 lines
975 B
TOML
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[project]
|
|
name = "timmy-time"
|
|
version = "1.0.0"
|
|
description = "Mission Control for sovereign AI agents"
|
|
readme = "README.md"
|
|
requires-python = ">=3.11"
|
|
license = { text = "MIT" }
|
|
dependencies = [
|
|
"agno>=1.4.0",
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.32.0",
|
|
"jinja2>=3.1.0",
|
|
"httpx>=0.27.0",
|
|
"python-multipart>=0.0.12",
|
|
"aiofiles>=24.0.0",
|
|
"typer>=0.12.0",
|
|
"rich>=13.0.0",
|
|
"pydantic-settings>=2.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.24.0",
|
|
"pytest-cov>=5.0.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
timmy = "timmy.cli:main"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
sources = {"src" = ""}
|
|
include = ["src/timmy", "src/dashboard", "src/config.py"]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
pythonpath = ["src"]
|
|
asyncio_mode = "auto"
|
|
addopts = "-v --tb=short"
|
|
|
|
[tool.coverage.run]
|
|
source = ["src"]
|
|
omit = ["*/tests/*"]
|