Skip to content

Cleanup Deprecations - #1825

Open
dallan-keylogic wants to merge 2 commits into
IDAES:mainfrom
dallan-keylogic:cleanup
Open

Cleanup Deprecations#1825
dallan-keylogic wants to merge 2 commits into
IDAES:mainfrom
dallan-keylogic:cleanup

Conversation

@dallan-keylogic

Copy link
Copy Markdown
Contributor

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:

  • Change deprecations from 3.0.0 to 2.14.0
  • Add hard cast to float for old scaling tools to catch garbage input.

Legal Acknowledgement

By contributing to this software project, I agree to the following terms and conditions for my contribution:

  1. I agree my contributions are submitted under the license terms described in the LICENSE.txt file at the top level of this directory.
  2. I represent I am authorized to make the contributions and grant the license. If my employer has rights to intellectual property that includes these contributions, I represent that I have received permission to make contributions and grant the required license on behalf of that employer.

@codecov

codecov Bot commented Jul 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 77.57%. Comparing base (a60fbf8) to head (11b0455).

Files with missing lines Patch % Lines
idaes/core/base/property_meta.py 0.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dallan-keylogic
dallan-keylogic marked this pull request as ready for review July 28, 2026 15:28
@dallan-keylogic

Copy link
Copy Markdown
Contributor Author

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.

@dallan-keylogic
dallan-keylogic requested a review from bpaul4 July 28, 2026 15:28
return 1

# Cast scaling factor to float to catch garbage input
v = float(v)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What is v supposed to be?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The scaling factor. This is in the old tools, I tried to use more descriptive variable names in the new tools.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jul 30, 2026
@dallan-keylogic
dallan-keylogic requested a review from sufikaur July 30, 2026 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Priority:Normal Normal Priority Issue or PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants