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

Repair OLIAPI #1512

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Conversation

adam-a-a
Copy link
Contributor

@adam-a-a adam-a-a commented Oct 30, 2024

Fixes/Resolves:

OLI API stopped working.

Summary/Motivation:

Users were no longer able to get back OLI calculations. We were able to log in, generate a DBS file, and that was about it. The issue came down to an additional forward slash used in one of the URLs, which previously worked.

EDIT: Subsequently, CI checks were failing as well, while local tests were passing. This PR also addresses those issues.

Changes proposed in this PR:

  • revise url
  • one other catch for handling results
  • revise test code to prevent CI check failure, including use of refresh token after oli login, and running checks sequentially in ci repo (thanks @lbianchi-lbl for editing the workflow)

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.

@lbianchi-lbl
Copy link
Contributor

The OLI API CI failures are not entirely reproducible. @adam-a-a will reach out to OLI to investigate this.

@lbianchi-lbl lbianchi-lbl added Priority:Normal Normal Priority Issue or PR Priority:High High Priority Issue or PR and removed Priority:Normal Normal Priority Issue or PR labels Oct 31, 2024
Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 54.54545% with 10 lines in your changes missing coverage. Please review.

Project coverage is 94.26%. Comparing base (53bd64e) to head (faf0d10).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
watertap/tools/oli_api/client.py 52.94% 8 Missing ⚠️
watertap/tools/oli_api/credentials.py 75.00% 1 Missing ⚠️
watertap/tools/oli_api/flash.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1512      +/-   ##
==========================================
+ Coverage   93.56%   94.26%   +0.70%     
==========================================
  Files         281      283       +2     
  Lines       30111    30920     +809     
==========================================
+ Hits        28173    29148     +975     
+ Misses       1938     1772     -166     

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

Copy link
Contributor

@ElmiraShamlou ElmiraShamlou left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

LGTM, but CodeCov is failing mostly as a result of the new logger and error messages being untested

watertap/tools/oli_api/credentials.py Show resolved Hide resolved
…sponse when shifting to alternate version of OLI used for NAWI
Copy link
Contributor

@MarcusHolly MarcusHolly left a comment

Choose a reason for hiding this comment

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

LGTM - the tutorial runs fine on my end now. I just have one small comment...

Comment on lines 115 to 117
if self.interactive_mode:
msg = msg + "Enter [y]/n to proceed."
return input(msg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Does the interactive mode functionality work in Jupyter? It doesn't seem to be the case, and, if so, perhaps it should be set to False in the tutorial

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:High High Priority Issue or PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants