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

Adding StreamScaler unit model, along with the test and rst file. #1517

Open
wants to merge 25 commits into
base: main
Choose a base branch
from

Conversation

tannerpolley
Copy link

Fixes

Adding a python file that contains a new unit model "StreamScaler" along with a test file and a rst file.

Summary/Motivation:

Adding a useful unit model build by Douglas Allen. This pull request was a task for me to learn and practice the skills necessary to become proficient and code/software management

Changes proposed in this PR:

  • Changing the default timeout timer in the build.py file when building the docs. It always times out for me at the default 180 seconds

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.

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.

A few comments fro ma first pass - the main thing is that the docs need to tell the user more about what this model does.

However, I think we should consider a different name for this model as including Scaler in the name will probably cause confusion with the new Scaler classes for numerical scaling.

docs/build.py Show resolved Hide resolved
idaes/models/unit_models/__init__.py Outdated Show resolved Hide resolved
idaes/models/unit_models/stream_scaler.py Show resolved Hide resolved
idaes/models/unit_models/stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
@lbianchi-lbl lbianchi-lbl added the Priority:Normal Normal Priority Issue or PR label Oct 31, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 80.88235% with 13 lines in your changes missing coverage. Please review.

Project coverage is 77.05%. Comparing base (7eac461) to head (779296e).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
idaes/models/unit_models/stream_scaler.py 80.59% 12 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1517   +/-   ##
=======================================
  Coverage   77.05%   77.05%           
=======================================
  Files         384      385    +1     
  Lines       62335    62406   +71     
  Branches    10222    10228    +6     
=======================================
+ Hits        48031    48086   +55     
- Misses      11875    11891   +16     
  Partials     2429     2429           

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


🚨 Try these New Features:

idaes/models/unit_models/stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/stream_scaler.py Show resolved Hide resolved
Copy link
Contributor

@dallan-keylogic dallan-keylogic left a comment

Choose a reason for hiding this comment

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

Looks good now.

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.

Besides my minor comments below, I think a test with a multiplier value greater than 1 would be useful to confirm the unit behavior. For example, if feed has a flow of 1 and the multiplier value is 2, does the outlet stream have a flow of 0.5 or is just the scaling factor 0.5? Also a check on a multiplier value of 0, whether values less than 1 should be allowed, or if only integer values should be allowed.

idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
idaes/models/unit_models/tests/test_stream_scaler.py Outdated Show resolved Hide resolved
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.

7 participants