Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fh/fix 266 #290

Merged
merged 4 commits into from
May 22, 2024
Merged

Fh/fix 266 #290

merged 4 commits into from
May 22, 2024

Conversation

apfelix
Copy link
Contributor

@apfelix apfelix commented May 16, 2024

fix #266

cached properties of the model's MatrixAccessor are cleared (if existent) at the start of solve, to avoid using old cached data on resolving the model after modification.

I also added a pytest for this, which failed before and works now.

@apfelix
Copy link
Contributor Author

apfelix commented May 16, 2024

code coverage upload failed for some reason, could you have a look at this @FabianHofmann ?

@FabianHofmann
Copy link
Collaborator

@apfelix thanks for your PR! I retriggered the CI, don't know where that came from.

Copy link

codecov bot commented May 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.70%. Comparing base (f0c8457) to head (55c0bb4).
Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #290      +/-   ##
==========================================
- Coverage   89.69%   86.70%   -3.00%     
==========================================
  Files          16       16              
  Lines        4019     4024       +5     
  Branches      939      941       +2     
==========================================
- Hits         3605     3489     -116     
- Misses        281      411     +130     
+ Partials      133      124       -9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

linopy/model.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@FabianHofmann FabianHofmann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! thanks @apfelix

@FabianHofmann FabianHofmann enabled auto-merge May 21, 2024 12:52
@FabianHofmann FabianHofmann disabled auto-merge May 22, 2024 10:19
@FabianHofmann FabianHofmann merged commit a6f2c3e into PyPSA:master May 22, 2024
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-solving a changed model with "direct" api results in wrong model being solved
2 participants