-
Notifications
You must be signed in to change notification settings - Fork 94
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
Sort ref ordering within components #623
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #623 +/- ##
==========================================
- Coverage 95.85% 95.34% -0.52%
==========================================
Files 24 24
Lines 3619 3650 +31
Branches 788 734 -54
==========================================
+ Hits 3469 3480 +11
+ Misses 86 82 -4
- Partials 64 88 +24
|
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.
Few comments on the tests.
tests/test_backend_pyomo.py
Outdated
caplog.set_level(logging.DEBUG) | ||
simple_supply.backend.verbose_strings() | ||
|
||
def _check_components(true_or_false: bool): |
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 tad verbose... I'd say the stages before update_parameter
are not needed (or a separate test?).
Suggestions:
- I'd keep the docstring to a short sentence, like "Check that parameter re-definition propagates to constraints and obj. function"
- re-arrange so that asserts are done once, not inside
for
loops. - avoid defining functions inside the test.
- Change 0 (which could be a default) to something rare. I like
0xDEADBEEF
, a common debug integer.
Thanks for the comments @irm-codebase - updated! |
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.
Great changes! Approved.
#update
Fixes #616
Summary of changes in this pull request
Reviewer checklist