Cleanup Deprecations - #1825
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1825 +/- ##
==========================================
+ Coverage 77.56% 77.57% +0.01%
==========================================
Files 423 423
Lines 67529 67530 +1
Branches 11420 11420
==========================================
+ Hits 52379 52388 +9
+ Misses 12531 12527 -4
+ Partials 2619 2615 -4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
We can ignore CodeCov here---it's flagging the deprecated property as uncovered, but that's because it's deprecated and we're not using it anymore. |
| return 1 | ||
|
|
||
| # Cast scaling factor to float to catch garbage input | ||
| v = float(v) |
There was a problem hiding this comment.
The scaling factor. This is in the old tools, I tried to use more descriptive variable names in the new tools.
There was a problem hiding this comment.
But why do we need to cast it to a float? I'd expect it to either already be one, or fail at some point because it's not in which case we should catch it and have a custom error message.
There was a problem hiding this comment.
Pyomo Suffixes allow pretty much anything as values. I've ended up assigning a Pyomo Var or Expression as a scaling factor before due to errors in my code. What happens is that set_scaling_factor allows it to be put on the Suffix, but then an error gets raised when it comes time to write the .nl file. This later error is hard to trace back to the original point where the mistake was made.
Summary/Motivation:
There is no prospect of a 3.0.0 version of IDAES in the foreseeable future. Therefore, we should change deprecations that were supposed to happen in 3.0.0 to instead happen in 2.14.0.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: