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

Remove watertap from required dependencies #9

Merged
merged 7 commits into from
May 3, 2024

Conversation

lbianchi-lbl
Copy link
Contributor

  • Add back MPI compatibility code that was left over during migration
  • Modify parameter_sweep._compat so that get_solver() (from IDAES) is available even if watertap is not
    • The previous solution had an import watertap after the IDAES get_solver() import
    • This was to account for cases where watertap was available, but didn't have its own get_solver() implementation
    • However, this meant that the logic wouldn't work if only idaes, but not watertap, could be imported
    • The version proposed in this PR should now work in all cases:
      • If watertap.core.solvers exists: use get_solver() from WaterTAP
      • If watertap is not available, but IDAES is: use get_solver() from IDAES
      • If watertap is available, but doesn't have its own get_solver() (i.e. WaterTAP version preceeding Implement get_solver for WaterTAP watertap#1353): use get_solver() from IDAES, counting on the fact that the client code will import watertap, and therefore the global implicit WaterTAP solver settings will be applied to the solver returned by IDAES's get_solver()
  • Add pytest.importorskip() for tests that use other watertap imports

Copy link

codecov bot commented May 3, 2024

Codecov Report

Attention: Patch coverage is 97.01493% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 94.33%. Comparing base (e9afcb3) to head (09a1162).

Files Patch % Lines
src/parameter_sweep/parallel/MPI/dummy_mpi.py 96.77% 1 Missing ⚠️
src/parameter_sweep/parameter_sweep.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main       #9      +/-   ##
==========================================
+ Coverage   94.24%   94.33%   +0.08%     
==========================================
  Files          33       36       +3     
  Lines        3649     3705      +56     
==========================================
+ Hits         3439     3495      +56     
  Misses        210      210              

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

@lbianchi-lbl lbianchi-lbl self-assigned this May 3, 2024
@lbianchi-lbl lbianchi-lbl marked this pull request as ready for review May 3, 2024 14:20
@lbianchi-lbl lbianchi-lbl merged commit 7aa44dc into watertap-org:main May 3, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants