-
Notifications
You must be signed in to change notification settings - Fork 59
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 more unused imports #995
Conversation
The |
Codecov Report
@@ Coverage Diff @@
## main #995 +/- ##
==========================================
- Coverage 95.83% 95.82% -0.01%
==========================================
Files 301 301
Lines 28801 28767 -34
==========================================
- Hits 27601 27567 -34
Misses 1200 1200
|
The |
@wigging This was probably an oversight from when the RO 0D and 1D models were refactored with the new creation of the membrane_channel control volumes. I think you can alter the import to take straight from membrane_channel_base |
I would not be in favor of doing this -- I think the correct API has these things imported from the RO module. Users using the RO module don't need to know about |
@bknueven The |
Hmmm.. I see @bknueven 's point though. So in that case, it wasn't an oversight. For the user's sake, it would make more sense for a user to import |
Yes, the current behavior is intentional. All the "option types" for the RO unit should be imported from a single location, IMHO. |
a6b0709
to
29e849e
Compare
@bknueven The enums |
Let's do the following
Then the API will be reasonably consistent between our various unit models. I would also be happy to leave the unused imports alone in these modules -- they do serve a specific purpose. |
@bknueven I reverted the last two commits since the purpose of this pull request is to fix unused imports (not the API). To appease the linter and keep the original API, I added a few lines to the reverse osmosis unit models. See the latest commit. The use of the enum types and where they are located in the package should be handled better in watertap but I don't want to tackle that in this pull request. |
1b9d8db
to
212059f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…TransferCoefficient
@lbianchi-lbl Is anything else needed for this pull request? |
Nope, thanks for bringing this over the finish line! |
* Remove unused imports from core subdirectories * Remove unused imports from core * Undo CONFIG_Template removal * Remove unused imports from edb and property_models * Remove unused imports in tools * Remove unused imports in top-level of unit_models * Re-add the ConcentrationPolarizationType * Remove more unused imports in unit_models * Fix CONFIG_Template imports * Use Base_CONFIG_Template in membrane_channel0d * Remove unused imports in tests for chemistry examples * Remove unused imports in custom_model_demo examples * Remove unused imports from edb examples * Remove imports from flowsheets case_studies wastewater_resource_recovery examples * Remove unused imports from wastewastewater_resource_recovery examples * Remove some imports from electrodialysis examples * Remove imports from ion_exchange examples * Remove imports from oaro examples * Remove imports from RO_with_energy_recovery examples * Remove unused imports from full_treatment_train examples * Define build_components as variable in flowsheet_two_stage * Fix unused import warnings for ConcentrationPolarizationType and MassTransferCoefficient * Add instruction to ignore unused import warning * Enable unused-import Pylint check * Remove some more unused imports --------- Co-authored-by: Ludovico Bianchi <[email protected]>
Fixes/Resolves:
Resolves issue #994.
Summary/Motivation:
Remove unused imports throughout the watertap package. After this pull request is merged, the GitHub Actions should be updated to check future pull requests for unused imports.
Changes proposed in this PR:
Legal Acknowledgement
By contributing to this software project, I agree to the following terms and conditions for my contribution: