Add system test for KPI integration in simulator workflow#175
Conversation
107ce00 to
9eccd6f
Compare
c0e145e to
4a46805
Compare
a7d52f7 to
487ce99
Compare
487ce99 to
9093540
Compare
- Add test__simulator__kpis_present_in_output asserting KPIs are present in instance[0].area after a full pipeline run, with CAPEX verified against the ESDL costInformation and system_lifetime exercised with a non-default value (25 years) - Update docker-compose.yml to use simulator-worker 0.0.30beta2 (kpi-calculator 0.4.2 integration; 0.0.29 was never released as stable) - Add EXCLUDE_KPIS path set and pass it to compare_esdl in existing simulator tests so KPI churn does not break snapshot comparisons - Increase simulator test timeouts to 120s to account for KPI calculation time added after simulation
b8f1bf2 to
9c3b6d3
Compare
MarkTNO
left a comment
There was a problem hiding this comment.
Tnx for adding the test! I added a couple of comments.
I am surprised that the timeout needs to be increased by that much. KPI's calculations should be very quick?
9c3b6d3 to
a8b4d45
Compare
Thanks for your review, @MarkTNO! You're right that KPI calculation itself is fast. After investigating the logs, the extra time is mainly due to overhead from verbose logging in both the simulator core and the kpi-calculator, as well as multiple database queries per job in the kpi-calculator. We will address this in future releases. For now the increased timeout gives us enough headroom to run the tests. |
- Replace simulator_ates_short_run.esdl with test_ates.esdl from simulator-worker to fix negative mass flow caused by reversed ATES pipe directions - Update snapshot test__simulator__multiple_ates_run.esdl to match new ESDL output - Improve KPI assertions in test__simulator__kpis_present_in_output: check exact KPI name set, assert CAPEX/OPEX values against ESDL cost data, and verify Production/Demand energy entries are positive - Update docker-compose.yml to use simulator-worker 0.0.30
a8b4d45 to
19d0df1
Compare
Uh oh!
There was an error while loading. Please reload this page.