Add a simpler way to wrap existing flowsheets for FlowsheetRunner#1772
Open
dangunter wants to merge 17 commits intoIDAES:mainfrom
Open
Add a simpler way to wrap existing flowsheets for FlowsheetRunner#1772dangunter wants to merge 17 commits intoIDAES:mainfrom
dangunter wants to merge 17 commits intoIDAES:mainfrom
Conversation
Member
Author
|
This is the simplified wrapper code. It pretty much does what we talked about. Sheng, note that there are a few new functions at the bottom of fsrunner.py that can be used to detect whether the module has a global flowsheet object (like previously), or uses this simplified wrapper function, or neither. See the tests with the word "wrapped" in their names in test_fsrunner.py |
Member
Author
|
Example usage (from the docs) |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1772 +/- ##
==========================================
- Coverage 73.82% 73.82% -0.01%
==========================================
Files 419 421 +2
Lines 66274 66331 +57
Branches 11133 11139 +6
==========================================
+ Hits 48927 48968 +41
- Misses 14810 14818 +8
- Partials 2537 2545 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1771
Summary/Motivation:
See issue
Changes proposed in this PR:
simple_wrap.pywith a decorator functionfi_mainfrom idaes.core.util.structfs import fi_mainwill workfsrunnerto find and run the wrapped methods (as well as find the older-style global flowsheet objects)Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: