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

Function Scoping Fixes #1242

Merged
merged 12 commits into from
Aug 24, 2023
Merged

Function Scoping Fixes #1242

merged 12 commits into from
Aug 24, 2023

Conversation

dallan-keylogic
Copy link
Contributor

@dallan-keylogic dallan-keylogic commented Aug 16, 2023

Fixes

-- Fixes function closure issues outlined in #1240 and #1241 for the Separator and SOC.

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
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Patch coverage: 74.86% and no project coverage change.

Comparison is base (721f1f9) 76.84% compared to head (dc7934b) 76.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1242   +/-   ##
=======================================
  Coverage   76.84%   76.84%           
=======================================
  Files         390      390           
  Lines       61963    61981   +18     
  Branches    11398    11393    -5     
=======================================
+ Hits        47616    47630   +14     
- Misses      11878    11884    +6     
+ Partials     2469     2467    -2     
Files Changed Coverage Δ
idaes/models/unit_models/separator.py 72.92% <74.01%> (+0.38%) ⬆️
idaes/models/unit_models/mixer.py 86.86% <100.00%> (ø)
..._models/soc_submodels/solid_oxide_module_simple.py 94.81% <100.00%> (+0.78%) ⬆️

... and 1 file with indirect coverage changes

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

@andrewlee94 andrewlee94 added bug Something isn't working Priority:High High Priority Issue or PR unit models Issues dealing with the unit model libraries CI:run-integration triggers_workflow: Integration labels Aug 17, 2023
@idaes-build idaes-build removed the CI:run-integration triggers_workflow: Integration label Aug 17, 2023
@andrewlee94
Copy link
Member

@jsiirola Would you have time to take a quick look at this to double check that there aren't any other unexpected issues related to this (either ones that were already there or something added by this change)?

Copy link
Member

@andrewlee94 andrewlee94 left a comment

Choose a reason for hiding this comment

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

This looks good to me, pending the tests passing.

@andrewlee94 andrewlee94 added the CI:run-integration triggers_workflow: Integration label Aug 17, 2023
@idaes-build idaes-build removed the CI:run-integration triggers_workflow: Integration label Aug 17, 2023
@dallan-keylogic
Copy link
Contributor Author

The only remaining issue that I could see is mutation of the "list" (I think it's actually a dictionary) s_vars, however I don't think that occurs in the code as written. Maybe better to clean that up completely, though?

@dallan-keylogic
Copy link
Contributor Author

@andrewlee94 , I renamed some variables, which seems to have triggered CodeCov. Is there a way to just force the rest of the checks to run anyway?

@andrewlee94
Copy link
Member

@dallan-keylogic It looks like the CodeCov failure is due to coverage creep in the repo - our threshold for coverage is slowly creeping up as we force better coverage in the codebase which means that older sections can fall below the new threshold. In this case I am happy to bypass that check.

Copy link
Contributor

@bpaul4 bpaul4 left a comment

Choose a reason for hiding this comment

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

This looks good to me. Interesting idea placing repeated exceptions in callable methods, too.

@dallan-keylogic
Copy link
Contributor Author

This looks good to me. Interesting idea placing repeated exceptions in callable methods, too.

If I have to copy and paste once I cringe, if I have to do it twice it becomes a method. That way if you want to change something, you only need to change it one place rather than ten different places scattered throughout the code.

@lbianchi-lbl lbianchi-lbl merged commit d17e802 into IDAES:main Aug 24, 2023
35 of 36 checks passed
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:High High Priority Issue or PR unit models Issues dealing with the unit model libraries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants