gendesign/backend/tests/api/v1
Light1YT 8da1c00138
All checks were successful
CI / changes (push) Successful in 6s
CI / frontend-tests (push) Has been skipped
CI / changes (pull_request) Successful in 6s
Deploy / changes (push) Successful in 6s
CI / frontend-tests (pull_request) Has been skipped
Deploy / build-backend (push) Successful in 1m29s
Deploy / build-frontend (push) Has been skipped
Deploy / build-worker (push) Successful in 2m42s
Deploy / deploy (push) Successful in 1m11s
CI / backend-tests (push) Successful in 6m27s
CI / backend-tests (pull_request) Successful in 6m22s
feat(location): district-level Location entity + indices (#948 part B)
Promote district to a first-class `location` entity (ТЗ §8.2), ADDITIVE — no
district->FK refactor. New `location` table keyed by district_name (joinable by
string), carrying 4 normalized [0,1] indices (NULL when no data, never 0):
- infra: _district_poi_score / _city_avg_poi_score (per-district POI aggregate)
- competition: market_metrics.overstock_index (available/stuck competing supply
  — orthogonal to demand; NOT sell-through, which is market-heat correlated w/ demand)
- demand: market_metrics.unit_velocity (saturating /50)
- future_supply: future_supply_pressure.index (passthrough, already 0..1)

- data/sql/146_location.sql: idempotent table + UNIQUE(district_name) + range
  CHECK + centroid GIST
- services/site_finder/locations.py: compute_location_indices (reuses forecast
  per-district fns) + refresh_locations (SAVEPOINT per-row, CAST, ON CONFLICT)
- workers/tasks/location_refresh.py + beat (Mon 07:00 MSK, after supply-layers)
- api/v1/locations.py: read-only GET list + GET by name (analyst+admin via rbac,
  frontend pilot-gated)
- tests: 34 (normalization 0..1/null, competition⊥demand orthogonality, idempotent
  upsert, read API list/by-name/404)

Part of #948 (Part A insight shipped #1164).
2026-06-08 13:28:19 +05:00
..
__init__.py feat(cadastre): bulk_harvest worker + grid-walker + admin API (#168 PR3/5) (#171) 2026-05-15 13:31:32 +03:00
test_admin_cadastre.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_admin_ekburg_permits.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_analyze_competitors_status.py fix(sf-02): добавить site_status/ready_dt в /analyze competitors + sort строящиеся first 2026-05-17 13:29:59 +03:00
test_analyze_inline_weights.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_market_price.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_parcel_meta.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_analyze_recent_permits.py feat(sf): включить enable_ird_analyze + latency-hardening (#1115) 2026-06-07 10:00:48 +00:00
test_custom_pois.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_insights.py feat(insights): manual-entry Insight entity CRUD + §19 audit (#948 part A) 2026-06-08 12:41:39 +05:00
test_locations.py feat(location): district-level Location entity + indices (#948 part B) 2026-06-08 13:28:19 +05:00
test_parcel_best_layouts.py test(suite): re-align drifted tests with current code (CI-rehab 2/3) 2026-06-03 19:05:43 +05:00
test_parcel_by_bbox.py fix(analyze): district KeyError 500 in #994 persist + revive by-bbox tests 2026-06-03 18:04:37 +05:00
test_parcel_competitors.py fix(competitors): size-weight avg velocity by flats_total (#949 audit, option B) 2026-06-04 14:05:20 +05:00
test_parcel_connection_points.py feat(parcels): connection-points endpoint (Forgejo #115 Phase 1 backend) (#190) 2026-05-16 05:58:27 +00:00
test_parcels_forecast.py feat(export): add PPTX presentation export of §22 forecast report (#959) 2026-06-07 14:09:35 +05:00
test_run_history_and_response_contract.py feat(parcels): typed AnalyzeResponse + run-history read endpoints (#961) 2026-06-06 18:13:34 +00:00