-
Notifications
You must be signed in to change notification settings - Fork 6
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
Introduce run.optimization.remove_solution()
#139
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #139 +/- ##
=====================================
Coverage 86.9% 86.9%
=====================================
Files 230 230
Lines 8156 8162 +6
=====================================
+ Hits 7094 7100 +6
Misses 1062 1062
|
50d6fae
to
79b2c14
Compare
aece6a0
to
6ebef60
Compare
run.optimization.remove_ solution()
run.optimization.remove_solution()
79b2c14
to
bc61725
Compare
6ebef60
to
ba074b7
Compare
ba074b7
to
b0201c6
Compare
b0201c6
to
48e1d4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few suggestions but good all in all.
data=data_to_validate, | ||
columns=self.columns, | ||
) | ||
if data_to_validate != {}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if data_to_validate != {}: | |
if data_to_validate: |
or more explicit:
if data_to_validate != {}: | |
if bool(data_to_validate): |
ditto above in the same function.
Why? Because None != {}
is True
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to admit: I don't know how data_to_validate
could be None
, but I added these suggestions and will merge the PR :)
This PR is the first part of cleaning up #101. It introduces the
run.optimization.remove_solution()
in the core layer, which removes all data of all equations and variables belonging to the run.It also includes various small clean-ups that arose from the reviews of #101.