Interact-ai's picture
Upload folder using huggingface_hub
267266e verified
|
Raw History Blame Contribute Delete
1.49 kB

Temporary backend replay and live test harness

This directory is intentionally isolated from the production application. Production modules do not import it, and no production app/ file needs to be changed to add or remove the harness.

One-time historical test setup

FastF1 requires Pandas 2 while the production LiveF1 dependency requires Pandas 3. Keep them in separate environments:

python -m venv testing_pipeline\.venv
testing_pipeline\.venv\Scripts\python -m pip install -r testing_pipeline\requirements.txt

Historical replay

python test_backend.py
python test_backend.py --year 2024 --gp Bahrain --max-laps 3
python test_backend.py --year 2024 --gp Bahrain

The launcher automatically delegates historical replay to the isolated test environment. Omit --max-laps to process the full race.

Existing live-provider probe

Run this from the normal production environment during an F1 session:

python test_backend.py --live --duration 120

The probe observes the existing LiveF1 provider, unchanged production pipeline, model path, race state, and frontend snapshot builder. It does not modify the production provider or routes.

Removal

The harness consists of test_backend.py, testing_pipeline/, and tests/test_testing_pipeline.py. Removing those paths removes the temporary testing feature. FastF1 is not added to the production requirements.txt.