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

CSV-driven variable exports #1232

Merged
merged 19 commits into from
Dec 14, 2023
Merged

Conversation

dangunter
Copy link
Collaborator

@dangunter dangunter commented Dec 2, 2023

Fixes/Resolves:

(replace this with the issue # fixed or resolved, if no issue exists then a brief statement of what this PR does)

Summary/Motivation:

Allow variable exports to be listed in a CSV file instead of (or in addition to) Python API calls.
This is a more compact way to export a lot of variables.
Does not alter or invalidate the existing Python API export method.

Changes proposed in this PR:

  • Changes in watertap.ui.fsapi
    • FlowsheetExports: new methods from_csv() and to_csv()
  • Changes in docs
    • Added the from_csv() to the how-to on the API. Streamlined the page too.
  • Changes in configuration
    • in setup.py, added importlib-resources for Python < 3.11 support for the features that "find" the CSV datafiles in the package directory

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

codecov bot commented Dec 5, 2023

Codecov Report

Attention: 8 lines in your changes are missing coverage. Please review.

Comparison is base (17d9679) 94.27% compared to head (30633b5) 94.27%.

Files Patch % Lines
watertap/ui/fsapi.py 91.48% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1232      +/-   ##
==========================================
- Coverage   94.27%   94.27%   -0.01%     
==========================================
  Files         357      357              
  Lines       35918    36011      +93     
==========================================
+ Hits        33863    33950      +87     
- Misses       2055     2061       +6     

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

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Dec 7, 2023
Copy link
Contributor

@bknueven bknueven left a comment

Choose a reason for hiding this comment

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

One method is completely uncovered.

@lbianchi-lbl lbianchi-lbl enabled auto-merge (squash) December 14, 2023 22:18
@lbianchi-lbl lbianchi-lbl merged commit 2ddc831 into watertap-org:main Dec 14, 2023
23 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