Commit Graph
11 Commits
Author SHA1 Message Date
TudorandClaude Fable 5 4a52735356 feat(sdlc): staging environment + automated staging→prod pipeline
PR Checks / Frontend Typecheck + Tests (pull_request) Successful in 10m0s
PR Checks / Backend Smoke (pull_request) Successful in 48s
PR Checks / Build Backend (no push) (pull_request) Successful in 17s
PR Checks / Build Frontend (no push) (pull_request) Successful in 41s
PR Checks / Build Pipeline (no push) (pull_request) Successful in 10s
PR Checks / AI Code Review (Claude) (pull_request) Successful in 24s
- pr-checks.yml: PR gate — frontend typecheck+jest, backend import smoke,
  image builds (no push), Claude AI review posted as PR comment (severe
  findings block merge)
- deploy.yml (replaces build-and-push.yml): merge to main builds+pushes
  images tagged sha-<sha>/staging, deploys the staging Portainer stack via
  webhook, runs Playwright E2E journeys against staging, then retags the
  verified images :prod (previous kept as :prod-previous) and deploys prod
- docker-compose.portainer.staging.yml: second Portainer stack — :staging
  images, sc_staging_* names, own macvlan IPs, Airflow on 8081; data
  bootstrapped from source via the staging Airflow DAGs
- prod compose now pins :prod instead of :latest (only the promotion step
  moves it; :latest is no longer published)
- e2e/: 6 Playwright journeys (search, postcode, detail, compare, rankings)
  driven by BASE_URL — the promotion gate
- scripts/ci/ai_review.py: Claude review with structured JSON findings
- docs/DEPLOY.md: full SDLC doc incl. one-time setup checklist and rollback
- replaced removed 'next lint' with tsc typecheck; fixed stale jest tests
  (slug URLs, N/A formatting, stable trend, fake-timer setup)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PqGhF93UrpDNvXBLMjJENL
2026-07-03 06:50:40 +01:00
TudorandClaude Opus 4.5 f4919db3b9 Add automatic schema versioning with startup migration
Build and Push Docker Image / build-and-push (push) Successful in 57s
On startup, the app now checks if the database schema version matches
the code. If there's a mismatch or no version exists, it automatically
runs a full data migration before starting.

- Add backend/version.py with SCHEMA_VERSION constant
- Add backend/migration.py with extracted migration logic
- Add SchemaVersion model to track DB version
- Add version check functions to database.py
- Update app.py lifespan to use check_and_migrate_if_needed()
- Simplify migrate_csv_to_db.py to use shared logic

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 10:23:02 +00:00
Tudor 40348cb1bd moving geocoding to a background task
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-08 15:30:33 +00:00
Tudor Sitaru e822513e03 Fix missing import for Base and engine in migration script
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-06 22:34:47 +00:00
Tudor Sitaru 409853e82e Fix syntax error - remove duplicate code at end of migration script
Build and Push Docker Image / build-and-push (push) Successful in 55s
2026-01-06 22:31:57 +00:00
Tudor Sitaru e2b2ddfb66 Fix migration script to handle percentage signs in CSV data
Build and Push Docker Image / build-and-push (push) Successful in 55s
- Updated parse_numeric() to strip percentage signs before parsing
- This fixes the issue where all percentage metrics were showing as NULL/empty
- School cards will now display actual performance data after re-running migration
2026-01-06 22:22:33 +00:00
Tudor Sitaru 35e661d732 fixing migration script
Build and Push Docker Image / build-and-push (push) Successful in 55s
2026-01-06 21:12:47 +00:00
Tudor Sitaru 822feaf494 fixing migration script
Build and Push Docker Image / build-and-push (push) Successful in 56s
2026-01-06 21:01:49 +00:00
Tudor Sitaru 491302d409 fixing migration script
Build and Push Docker Image / build-and-push (push) Successful in 57s
2026-01-06 20:56:09 +00:00
Tudor Sitaru 5efc4c6af0 database addition 2026-01-06 17:22:26 +00:00
Tudor Sitaru c65eb1a00f initial commit 2026-01-06 13:52:00 +00:00