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

Merged
merged 26 commits into from
Nov 27, 2024

Conversation

tannerpolley
Copy link
Contributor

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.06%. Comparing base (b032b22) to head (89e326b).
Report is 1 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.06%   77.06%   -0.01%     
==========================================
  Files         386      387       +1     
  Lines       62418    62486      +68     
  Branches    10230    10236       +6     
==========================================
+ Hits        48101    48153      +52     
- Misses      11884    11900      +16     
  Partials     2433     2433              

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

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
@lbianchi-lbl lbianchi-lbl added the CI:run-integration triggers_workflow: Integration label Nov 27, 2024
@idaes-build idaes-build removed the CI:run-integration triggers_workflow: Integration label Nov 27, 2024
@lbianchi-lbl lbianchi-lbl merged commit e8c9712 into IDAES:main Nov 27, 2024
42 checks passed
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.

8 participants