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

Contribution to OLI documentation efforts #1259

Closed
wants to merge 61 commits into from
Closed

Contribution to OLI documentation efforts #1259

wants to merge 61 commits into from

Conversation

veccp
Copy link
Contributor

@veccp veccp commented Dec 22, 2023

Fixes/Resolves:

Improves documentation #1206

Summary/Motivation:

Improved demonstrations for core functionality of OLI-related features

Changes proposed in this PR:

  • Tutorial for OLI credential and access key management
  • Tutorial for WaterTAP -> OLI helper functions

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.

@veccp veccp self-assigned this Dec 22, 2023
@veccp veccp added documentation Improvements or additions to documentation oli labels Dec 22, 2023
@veccp veccp requested review from adam-a-a and bknueven December 22, 2023 17:59
Copy link

codecov bot commented Dec 22, 2023

Codecov Report

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

Comparison is base (97c15f4) 94.24% compared to head (7c0d684) 94.19%.
Report is 2 commits behind head on main.

Files Patch % Lines
watertap/tools/oli_api/flash.py 12.88% 142 Missing ⚠️
watertap/tools/oli_api/client.py 13.33% 26 Missing ⚠️
watertap/tools/oli_api/credentials.py 18.18% 18 Missing ⚠️
watertap/tools/oli_api/conftest.py 66.66% 3 Missing ⚠️
...s/oli_api/util/watertap_to_oli_helper_functions.py 83.33% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1259      +/-   ##
==========================================
- Coverage   94.24%   94.19%   -0.06%     
==========================================
  Files         360      360              
  Lines       36280    36336      +56     
==========================================
+ Hits        34191    34225      +34     
- Misses       2089     2111      +22     

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

Comment on lines +72 to +74
exclude_items = ["temperature", "pressure", "volume"]
if watertap_name.lower() in exclude_items:
return watertap_name
Copy link
Contributor

Choose a reason for hiding this comment

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

What made you add this? Just wondering what popped up that triggered a need for this since I figured one would only provide a solute name as input (imagining that you tried automatically looping through state vars or something like that but not sure).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this because of how build_survey works: https://github.com/watertap-org/watertap/blob/7c0d684ee36ecee360513601942d54b289fa2bd3/watertap/tools/oli_api/flash.py#L100C5-L125C22

It does loop through each survey parameter and try to get an oli_name from it

"source": [
"try:\n",
" credential_manager = CredentialManager(\n",
" #encryption_key=\"\",\n",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to include encryption_key=""? Can I just not include the argument, resulting in either the default being set to empty string or, if a local file with keys is found, prompt user for encryption key? My main question is do I have to include the line encryption_key="" or did you just include for clarity?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not necessary to include encryption_key="" in the arguments. Each argument is listed for all login scenarios in the example, and when an argument is not required for a scenario I've commented it out.

@ksbeattie ksbeattie added the Priority:Normal Normal Priority Issue or PR label Jan 4, 2024
@ksbeattie
Copy link
Contributor

Is this still needed after #1237 is merged?

@veccp
Copy link
Contributor Author

veccp commented Jan 26, 2024

This can be closed. I'll revise documentation/tutorials from a clean branch once #1237 is merged.

@bknueven bknueven closed this Jan 27, 2024
@veccp veccp deleted the tutorials branch February 2, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation oli Priority:Normal Normal Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants