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

Pressure Changer and Coag & Floc Test Harness #1363

Merged
merged 8 commits into from
Apr 26, 2024

Conversation

MarcusHolly
Copy link
Contributor

Fixes/Resolves:

#1302

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.

@MarcusHolly MarcusHolly self-assigned this Apr 22, 2024
@MarcusHolly MarcusHolly added the Priority:Normal Normal Priority Issue or PR label Apr 22, 2024
@MarcusHolly MarcusHolly mentioned this pull request Apr 22, 2024
22 tasks
@MarcusHolly MarcusHolly marked this pull request as ready for review April 22, 2024 15:08
Comment on lines 576 to 581
with pytest.raises(ConfigurationError, match=re.escape(error_msg)):
model.fs.properties = NaClParameterBlock()
model.fs.unit = CoagulationFlocculation(
property_package=model.fs.properties
)

Copy link
Contributor

Choose a reason for hiding this comment

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

Where are we maintaining the checks on ConfigurationError and other expected exception handling? Is that part of the test harness?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yea, my comment was also going to be to re-add this in. I just appended mine at the end of GAC after the harness. Thoughts if that is the best implementation?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems like a good implementation to me. I've addressed this in the latest commit.

@adam-a-a
Copy link
Contributor

@lbianchi-lbl Maybe I am missing it, but I am not seeing the codecov checks here. Do codecov checks not run if the only changed files are test files? I wanted to check to see if test coverage decreased or not with this PR.

@lbianchi-lbl
Copy link
Contributor

lbianchi-lbl commented Apr 23, 2024

@lbianchi-lbl Maybe I am missing it, but I am not seeing the codecov checks here. Do codecov checks not run if the only changed files are test files? I wanted to check to see if test coverage decreased or not with this PR.

@adam-a-a thanks for bringing this up.

  • It looks like the Codecov step in the CI jobs is failing (which is consistent with the coverage reports not showing up as comments on this PR), but without causing the entire job to fail because the fail_ci_if_error option in codecov/codecov-action is not set to true
  • I've restarted the two Python 3.8 jobs where the coverage report is generated and uploaded, which might fix the issue for this specific instance
  • A more permanent fix requires a change to the CI configuration. I'm currently working on the same issue for IDAES so I might have something ready to use here as well

EDIT it looks like restarting the job didn't help. I'll try to have a PR up first thing tomorrow.

@lbianchi-lbl lbianchi-lbl mentioned this pull request Apr 23, 2024
2 tasks
@hunterbarber
Copy link
Contributor

I'd prefer to review this with the codecov for context (since largely this is minor change assuming the coverage is equivalent). Maybe @lbianchi-lbl can you just update the team when that gets resolved?

@lbianchi-lbl
Copy link
Contributor

I'd prefer to review this with the codecov for context (since largely this is minor change assuming the coverage is equivalent). Maybe @lbianchi-lbl can you just update the team when that gets resolved?

#1365 should address this, so feel free to leave a review to get it merged.

Copy link

codecov bot commented Apr 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.82%. Comparing base (b22f995) to head (21d6ede).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1363      +/-   ##
==========================================
- Coverage   93.83%   93.82%   -0.01%     
==========================================
  Files         338      338              
  Lines       35354    35354              
==========================================
- Hits        33174    33172       -2     
- Misses       2180     2182       +2     

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

@lbianchi-lbl
Copy link
Contributor

lbianchi-lbl commented Apr 23, 2024

@adam-a-a @hunterbarber FYI: I realized I've made a mistake in the Codecov configuration in #1365, which causes the Codecov comment to erroneously report a 50% drop in coverage because the comment is created before all uploading jobs have run. This should be fixed by #1366.

EDIT the Codecov comment now seems to be working properly:

image

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.

LGTM after re-adding the logging coverage. Maybe we want to add a way to test error and warning logs in the test harness, but lets save that for when I also add the costing checks into the harness (not 1.0).

Copy link
Contributor

@luohezhiming luohezhiming left a comment

Choose a reason for hiding this comment

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

LGTM

@lbianchi-lbl lbianchi-lbl enabled auto-merge (squash) April 26, 2024 01:18
@lbianchi-lbl lbianchi-lbl merged commit 989e08e into watertap-org:main Apr 26, 2024
24 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.

5 participants