- backend/alembic/* — alembic infra (env.py, script.py.mako). versions/ empty for now; first migration goes in Stage 2a when models are finalized. - backend/Dockerfile: bake alembic.ini + alembic/ into the image so `docker compose exec backend alembic upgrade head` works in prod. - backend/db/init/99_drop_unused_extensions.sql + bind-mount in both compose files: drops postgis-image's TIGER/topology/fuzzystrmatch on fresh volumes. - .pre-commit-config.yaml + pre-commit in dev deps: ruff/prettier on commit to stop CI failures like UP035 from leaking out. - ops/backup.sh, ops/restore.sh: pg_dump cron script with optional Selectel S3 upload. 7-day local retention. Restore guard: requires RESTORE_CONFIRM=yes. - Makefile: new targets `make migration NAME=...`, `make pre-commit-install`. - backend/.env.example: SENTRY_DSN comment with sentry.io reference.
70 lines
1.7 KiB
TOML
70 lines
1.7 KiB
TOML
[project]
|
|
name = "gendesign-backend"
|
|
version = "0.1.0"
|
|
description = "Generative Design + Site Finder backend (FastAPI)"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115.0",
|
|
"uvicorn[standard]>=0.30.0",
|
|
"sqlalchemy>=2.0.30",
|
|
"geoalchemy2>=0.15.0",
|
|
"alembic>=1.13.0",
|
|
"pydantic>=2.7.0",
|
|
"pydantic-settings>=2.3.0",
|
|
"psycopg[binary]>=3.2.0",
|
|
"shapely>=2.0.0",
|
|
"geopandas>=1.0.0",
|
|
"pyproj>=3.6.0",
|
|
"httpx>=0.27.0",
|
|
"redis>=5.0.0",
|
|
"celery>=5.4.0",
|
|
"weasyprint>=62.0",
|
|
"ezdxf>=1.3.0",
|
|
"openpyxl>=3.1.0",
|
|
"pandas>=2.2.0",
|
|
"numpy>=2.0.0",
|
|
"scikit-learn>=1.5.0",
|
|
"sentry-sdk[fastapi]>=2.10.0",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
"ruff>=0.5.0",
|
|
"mypy>=1.10.0",
|
|
"types-redis>=4.6.0",
|
|
"pre-commit>=3.7.0",
|
|
]
|
|
|
|
[tool.uv]
|
|
package = true
|
|
|
|
[tool.ruff]
|
|
target-version = "py312"
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "B", "UP", "N", "RUF", "ASYNC"]
|
|
# RUF001/002/003 — ambiguous Unicode (Cyrillic vs Latin lookalikes).
|
|
# Off because the project is Russian-language; comments/docstrings legitimately use Cyrillic.
|
|
ignore = ["RUF001", "RUF002", "RUF003"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict_optional = true
|
|
warn_unused_ignores = true
|
|
|
|
# strict только для core-модулей (правило из памяти Validation_Findings_Apr25)
|
|
[[tool.mypy.overrides]]
|
|
module = [
|
|
"app.services.generative.geometry",
|
|
"app.services.generative.teap",
|
|
"app.services.generative.financial",
|
|
"app.services.site_finder.scorer",
|
|
]
|
|
strict = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
asyncio_mode = "auto"
|