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

Apply UnitTestHarness to IonExchange0D #1401

Merged
merged 12 commits into from
May 22, 2024

Conversation

kurbansitterley
Copy link
Contributor

Fixes/Resolves:

part of #1302

Summary/Motivation:

Changes proposed in this PR:

  • apply unit test harness to IX model

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.

@kurbansitterley kurbansitterley self-assigned this May 20, 2024
@kurbansitterley kurbansitterley added 1.0 Hard requirement for the 1.0 release Priority:High High Priority Issue or PR labels May 20, 2024
Comment on lines -247 to -250
@pytest.mark.requires_idaes_solver
@pytest.mark.component
def test_mass_balance(self, IX_lang):
m = IX_lang
Copy link
Contributor

Choose a reason for hiding this comment

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

We should try to keep at least one of these conservation checks in the testing. See #1372 for examples

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes agreed, but wasn't sure how to do so with the test harness without just keeping the existing test, thanks for the direction

Copy link
Contributor

Choose a reason for hiding this comment

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

Eventually conservation checks will work their way into the test harness, but it's not a high priority atm.

Copy link

codecov bot commented May 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.02%. Comparing base (09d6964) to head (880ef70).
Report is 59 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1401      +/-   ##
==========================================
+ Coverage   93.92%   94.02%   +0.09%     
==========================================
  Files         335      335              
  Lines       35620    35620              
==========================================
+ Hits        33456    33491      +35     
+ Misses       2164     2129      -35     

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

Copy link
Contributor

@hunterbarber hunterbarber left a comment

Choose a reason for hiding this comment

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

Coverage and implementation seem fine. I do see you're removing asserting the resulting costing variables because of how the unit model test harness works. The PR for the costing test harness is planned for after the 1.0 overhaul, so you may want to keep the _cost_results assertions in a test after the normal harness tests just so they're easy to grab in the future.

Copy link
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

LGTM

@kurbansitterley
Copy link
Contributor Author

Coverage and implementation seem fine. I do see you're removing asserting the resulting costing variables because of how the unit model test harness works. The PR for the costing test harness is planned for after the 1.0 overhaul, so you may want to keep the _cost_results assertions in a test after the normal harness tests just so they're easy to grab in the future.

Great idea, just added the costing tests back.

@bknueven bknueven enabled auto-merge (squash) May 22, 2024 03:11
@bknueven bknueven merged commit f8a9e29 into watertap-org:main May 22, 2024
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 Hard requirement for the 1.0 release Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants