calliope-project / calliope

A multi-scale energy systems modelling framework
https://www.callio.pe
Apache License 2.0
276 stars 89 forks source link

Fix: Update operate mode and associated tests #628

Open brynpickering opened 3 days ago

brynpickering commented 3 days ago

Fixes confusion from the tests as to whether operate mode works in v0.7 or not (it does).

I've also made some fixes to the code to deal with edge cases that appeared while I was cleaning up the tests.

Reviewer checklist

codecov[bot] commented 3 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.35%. Comparing base (b087580) to head (7bd052a).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #628 +/- ## ======================================= Coverage 95.35% 95.35% ======================================= Files 24 24 Lines 3656 3656 Branches 801 733 -68 ======================================= Hits 3486 3486 Misses 82 82 Partials 88 88 ``` | [Files](https://app.codecov.io/gh/calliope-project/calliope/pull/628?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project) | Coverage Δ | | |---|---|---| | [src/calliope/model.py](https://app.codecov.io/gh/calliope-project/calliope/pull/628?src=pr&el=tree&filepath=src%2Fcalliope%2Fmodel.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=calliope-project#diff-c3JjL2NhbGxpb3BlL21vZGVsLnB5) | `94.86% <100.00%> (ø)` | |