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

bug fix for issue #1364: catch AttributeError in set_scaling_from_default #1400

Merged
merged 2 commits into from
Apr 25, 2024

Conversation

jasonmbray-p66
Copy link
Contributor

Fixes

#1364 Incompatibility between set_scaling_from_default() and generic reaction parameter data

Summary/Motivation:

Currently set_scaling_from_default assumes all blocks have a get_default_scaling() method, but this is not guaranteed.

Changes proposed in this PR:

  • Add try/except around call to get_default_scaling()
  • Log warning

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.

@andrewlee94 andrewlee94 added bug Something isn't working Priority:Normal Normal Priority Issue or PR labels Apr 24, 2024
@andrewlee94
Copy link
Member

@jasonmbray-p66 Thank you for taking the time to fix this for us. Contributions from users are always appreciated.

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 40.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 77.69%. Comparing base (b3d55b7) to head (fb605bb).

Files Patch % Lines
idaes/core/util/scaling.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1400      +/-   ##
==========================================
- Coverage   77.70%   77.69%   -0.01%     
==========================================
  Files         394      394              
  Lines       65033    65037       +4     
  Branches    14380    14380              
==========================================
- Hits        50533    50531       -2     
- Misses      11899    11906       +7     
+ Partials     2601     2600       -1     

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

@lbianchi-lbl lbianchi-lbl disabled auto-merge April 25, 2024 14:50
@lbianchi-lbl lbianchi-lbl merged commit 5cf975f into IDAES:main Apr 25, 2024
43 checks passed
@jasonmbray-p66 jasonmbray-p66 deleted the issue-1364 branch April 25, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility between set_scaling_from_default() and generic reaction parameter data
5 participants