diff --git a/backend/app/core/config.py b/backend/app/core/config.py index 8ac2e8bb..df9f80cf 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -2,13 +2,9 @@ from pydantic_settings import BaseSettings, SettingsConfigDict class Settings(BaseSettings): - model_config = SettingsConfigDict( - env_file=".env", env_file_encoding="utf-8", extra="ignore" - ) + model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore") - database_url: str = ( - "postgresql+psycopg://gendesign:gendesign@localhost:5432/gendesign" - ) + database_url: str = "postgresql+psycopg://gendesign:gendesign@localhost:5432/gendesign" redis_url: str = "redis://localhost:6379/0" cors_origins: list[str] = ["http://localhost:3000"] sentry_dsn: str | None = None diff --git a/backend/app/core/db.py b/backend/app/core/db.py index 525647a4..7853cad9 100644 --- a/backend/app/core/db.py +++ b/backend/app/core/db.py @@ -6,9 +6,7 @@ from sqlalchemy.orm import DeclarativeBase, Session, sessionmaker from app.core.config import settings engine = create_engine(settings.database_url, pool_pre_ping=True, future=True) -SessionLocal = sessionmaker( - autocommit=False, autoflush=False, bind=engine, expire_on_commit=False -) +SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine, expire_on_commit=False) class Base(DeclarativeBase): diff --git a/backend/app/schemas/concept.py b/backend/app/schemas/concept.py index abf88d66..4a00b50b 100644 --- a/backend/app/schemas/concept.py +++ b/backend/app/schemas/concept.py @@ -12,9 +12,7 @@ class ConceptInput(BaseModel): housing_class: Literal["econom", "comfort", "business"] = "comfort" target_floors: int = Field(9, ge=1, le=30) development_type: Literal["spot", "mid_rise", "high_rise"] = "mid_rise" - land_cost_rub: float | None = Field( - None, description="Optional land cost for financial model" - ) + land_cost_rub: float | None = Field(None, description="Optional land cost for financial model") class TEAP(BaseModel): diff --git a/backend/app/services/generative/geometry.py b/backend/app/services/generative/geometry.py index f53b027a..b1a5ec3a 100644 --- a/backend/app/services/generative/geometry.py +++ b/backend/app/services/generative/geometry.py @@ -21,9 +21,7 @@ def generate_stub(payload: ConceptInput) -> list[ConceptVariant]: density=0.0, parking_spaces=0, ) - empty_financial = FinancialModel( - revenue_rub=0.0, cost_rub=0.0, gross_margin_rub=0.0, irr=0.0 - ) + empty_financial = FinancialModel(revenue_rub=0.0, cost_rub=0.0, gross_margin_rub=0.0, irr=0.0) strategies: list[ConceptVariant] = [] for strategy in ("max_area", "max_insolation", "balanced"): strategies.append( diff --git a/backend/app/workers/celery_app.py b/backend/app/workers/celery_app.py index 63ad0b1b..cdb6ebb8 100644 --- a/backend/app/workers/celery_app.py +++ b/backend/app/workers/celery_app.py @@ -7,7 +7,5 @@ from celery import Celery from app.core.config import settings -celery_app = Celery( - "gendesign", broker=settings.redis_url, backend=settings.redis_url -) +celery_app = Celery("gendesign", broker=settings.redis_url, backend=settings.redis_url) celery_app.conf.timezone = "Europe/Moscow" diff --git a/frontend/src/app/concept/page.tsx b/frontend/src/app/concept/page.tsx index 4ab9b5aa..b92eebea 100644 --- a/frontend/src/app/concept/page.tsx +++ b/frontend/src/app/concept/page.tsx @@ -8,12 +8,10 @@ export default function ConceptPage() { ← Home
- TODO Stage 1a: polygon import (GeoJSON / Leaflet draw) + parameter form + - result tabs. -
-- TODO Stage 1b: render 3 variants on the map with colored buildings. + TODO Stage 1a: polygon import (GeoJSON / Leaflet draw) + parameter form + + result tabs.
+TODO Stage 1b: render 3 variants on the map with colored buildings.
TODO Stage 1c: TEAP table, financial form, PDF/Excel/DXF download buttons. diff --git a/frontend/src/app/site-finder/page.tsx b/frontend/src/app/site-finder/page.tsx index 6b74a4ce..1c19ed72 100644 --- a/frontend/src/app/site-finder/page.tsx +++ b/frontend/src/app/site-finder/page.tsx @@ -8,7 +8,10 @@ export default function SiteFinderPage() { ← Home
TODO Stage 2a: load 1000+ Sverdlovsk parcels into PostGIS.
-TODO Stage 2b: map (Mapbox) with color-graded parcels + filters + table + card.
++ TODO Stage 2b: map (Mapbox) with color-graded parcels + filters + table + + card. +
TODO Stage 2c: «Compute concept» button calling Generative module.
); diff --git a/frontend/src/lib/api.ts b/frontend/src/lib/api.ts index 90db3558..7a7f09f3 100644 --- a/frontend/src/lib/api.ts +++ b/frontend/src/lib/api.ts @@ -4,7 +4,7 @@ export const API_BASE_URL = process.env.NEXT_PUBLIC_API_BASE_URL ?? ""; export async function apiFetch