Add flight comparator web app with full scan pipeline
Full-stack flight price scanner built on fast-flights v3 (SOCS cookie bypass): Backend (FastAPI + SQLite): - REST API with rate limiting, Pydantic v2 validation, paginated responses - Scan pipeline: resolves airports, queries every day in the window, saves individual flights + aggregate route stats to SQLite - Background async scan processor with real-time progress tracking - Airport search endpoint backed by OpenFlights dataset - Daily scan window (all dates, not monthly samples) Frontend (React 19 + TypeScript + Tailwind CSS v4): - Dashboard with live scan status and recent scans - Create scan form: country mode or specific airports (searchable dropdown) - Scan detail page with expandable route rows showing individual flights (date, airline, departure, arrival, price) loaded on demand - AirportSearch component with debounced live search and multi-select Database: - scans → routes → flights schema with FK cascade and auto-update triggers - Migrations for schema evolution (relaxed country constraint) Tests: - 74 tests: unit + integration, isolated per-test SQLite DB - Confirmed flight fixtures in tests/confirmed_flights.json (50 real flights, BDS→FMM Ryanair + BDS→DUS Eurowings, scraped Feb 2026) - Integration tests parametrized from confirmed routes Docker: - Multi-stage builds, Compose orchestration, Nginx reverse proxy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
51
flight-comparator/pytest.ini
Normal file
51
flight-comparator/pytest.ini
Normal file
@@ -0,0 +1,51 @@
|
||||
[pytest]
|
||||
# Pytest configuration for Flight Radar Web App
|
||||
|
||||
# Test discovery patterns
|
||||
python_files = test_*.py
|
||||
python_classes = Test*
|
||||
python_functions = test_*
|
||||
|
||||
# Test directory
|
||||
testpaths = tests
|
||||
|
||||
# Output options
|
||||
addopts =
|
||||
# Verbose output
|
||||
-v
|
||||
# Show summary of all test outcomes
|
||||
-ra
|
||||
# Show local variables in tracebacks
|
||||
--showlocals
|
||||
# Strict markers (fail on unknown markers)
|
||||
--strict-markers
|
||||
# Capture output (show print statements only on failure)
|
||||
--capture=no
|
||||
# Disable warnings summary
|
||||
--disable-warnings
|
||||
# Coverage options (for pytest-cov)
|
||||
--cov=.
|
||||
--cov-report=term-missing
|
||||
--cov-report=html
|
||||
--cov-config=.coveragerc
|
||||
|
||||
# Asyncio mode
|
||||
asyncio_mode = auto
|
||||
|
||||
# Markers for categorizing tests
|
||||
markers =
|
||||
unit: Unit tests (fast, isolated)
|
||||
integration: Integration tests (slower, multiple components)
|
||||
slow: Slow tests (may take several seconds)
|
||||
database: Tests that interact with database
|
||||
api: Tests for API endpoints
|
||||
validation: Tests for input validation
|
||||
error_handling: Tests for error handling
|
||||
rate_limit: Tests for rate limiting
|
||||
pagination: Tests for pagination
|
||||
|
||||
# Ignore directories
|
||||
norecursedirs = .git .venv venv env __pycache__ *.egg-info dist build
|
||||
|
||||
# Test output
|
||||
console_output_style = progress
|
||||
Reference in New Issue
Block a user