Files
provenance/backend/pyproject.toml
T
justin 297cb797d6 Add core data model (12 tables) and initial Alembic migration
All core entities from ARCHITECTURE §5: tenancy (User, Tree, TreeMembership), people (Person, Name, Relationship), facts (Event, Place, PlaceName), provenance (Source, Citation), and the append-only AuditEntry. Cross-cutting mixins give every row a UUID key, timestamps, soft delete, and (where tree-owned) a tree_id for uniform tenant isolation.

Modeling choices: parentage as qualified edges (biological/adoptive/step/foster/donor/guardian) so non-traditional families are first-class; events keep both a verbatim date string and a normalized start/end range; closed sets are PG enums while GEDCOM-extensible vocabularies (event/name/source type) stay strings; CHECK constraints enforce single-subject events and single-target citations. Place is tree-scoped in Phase 0 (see ARCHITECTURE note). The migration is verified reversible (upgrade/downgrade drops tables and enum types) and matches the models (alembic check clean); applied on the deploy target. Dockerfile now ships migrations.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Justin Paul <justin@jpaul.me>
2026-06-06 10:40:00 -04:00

41 lines
949 B
TOML

[project]
name = "provenance-backend"
version = "0.0.0"
description = "Provenance backend — FastAPI service for family + land provenance."
requires-python = ">=3.13"
dependencies = [
"fastapi>=0.115",
"uvicorn[standard]>=0.34",
"pydantic>=2.9",
"pydantic-settings>=2.5",
"sqlalchemy[asyncio]>=2.0",
"asyncpg>=0.30",
"alembic>=1.14",
]
[dependency-groups]
dev = [
"ruff>=0.8",
"pytest>=8.3",
"pytest-asyncio>=0.24",
"httpx>=0.27",
]
# This is an application, not a library: install dependencies but do not build/
# install the project itself. Code runs from source via `uv run`.
[tool.uv]
package = false
[tool.ruff]
line-length = 100
target-version = "py313"
# Alembic writes the migration files; don't hold generated code to our style.
extend-exclude = ["migrations/versions"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
[tool.pytest.ini_options]
asyncio_mode = "auto"
pythonpath = ["."]