IDAES / idaes-pse

The IDAES Process Systems Engineering Framework
https://idaes-pse.readthedocs.io/
Other
216 stars 232 forks source link

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

Closed jasonmbray-p66 closed 5 months ago

jasonmbray-p66 commented 5 months ago

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:

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 commented 5 months ago

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

codecov-commenter commented 5 months ago

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 :warning:
Additional details and impacted files ```diff @@ 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 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.