ECMWFCode4Earth / vAirify

code repository for 2024 Code for Earth project #16
MIT License
1 stars 0 forks source link

Test setup to verify ECMWF produced forecast against our ETL output in database #65

Closed mwalker-scottlogic closed 1 month ago

mwalker-scottlogic commented 1 month ago

Description

This test is not fully automated yet - the process of running the main application and actually getting the ECMWF files is currently manual and requires another ticket to produce. However this can be run locally to check the divergence of cities for a specified forecast valid time from the ECMWF forecast. This is a method to indicate if we are calibrated with the current output. The tolerated divergence is set arbitrarily to 3% as present.

To run this test, you will need to download from the below links the list of CNN countries, and the desired forecast, and save the files within air-quality-backend. You then specify their path within air-quality-backend/system_tests/forecast_calibration_tests.py.

You then need to specify a matching base date for the forecast and a desired valid time to check against.

air-quality-backend/system_tests/cities_data.py

air-quality-backend/system_tests/forecast_calibration_tests.py

air-quality-backend/system_tests/utils/helper_methods.py

Verification

image

image

github-actions[bot] commented 1 month ago

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
361 249 69% 65% 🟢

New Files

No new covered files...

Modified Files

No covered modified files...

updated for commit: 159876c by action🐍

mwalker-scottlogic commented 1 month ago

Added changes, retested at a 1% threshold and compared to doing the check manually and the results matched