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

auth grant flow #117

Merged
merged 11 commits into from
May 30, 2024
Merged

auth grant flow #117

merged 11 commits into from
May 30, 2024

Conversation

aryanbhosale
Copy link
Member

Pull Request

Description

This code is an extension of #106 and implements the authorization grant flow as required by enphase v4

Fixes #

Before it was client credentials grant flow, now it is authorization grant flow

Checklist:

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have checked my code and corrected any misspellings

@aryanbhosale
Copy link
Member Author

aryanbhosale commented Apr 25, 2024

Hi @peterdudfield , this code follows the auth grant flow as required for enphase v4, can you please review this then we can proceed with the testing, Ive made it modular so that you can test it too!

@peterdudfield
Copy link
Contributor

Have you tested this?

@aryanbhosale
Copy link
Member Author

Have you tested this?

I will in a bit, ill need some info like enphase system id etc, will be asking you through email for those info

@aryanbhosale
Copy link
Member Author

Hi @peterdudfield , this commit successfully generates access token for the api to fetch the summary of a site, next steps would be to utilize these tokens and fetch the summary

Copy link

codecov bot commented May 19, 2024

Codecov Report

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

Project coverage is 73.94%. Comparing base (05ae555) to head (33be330).
Report is 62 commits behind head on main.

Current head 33be330 differs from pull request most recent head 1294b2e

Please upload reports for the commit 1294b2e to get more accurate results.

Files Patch % Lines
quartz_solar_forecast/inverters/enphase.py 25.00% 12 Missing ⚠️
quartz_solar_forecast/data.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #117      +/-   ##
==========================================
- Coverage   79.94%   73.94%   -6.00%     
==========================================
  Files          12       13       +1     
  Lines         354      426      +72     
==========================================
+ Hits          283      315      +32     
- Misses         71      111      +40     

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

@aryanbhosale
Copy link
Member Author

Hi @peterdudfield , this commit successfully generates access token for the api to fetch the summary of a site, next steps would be to utilize these tokens and fetch the summary

What are these failures in codecov? are they about the test coverages? or is it something else

@aryanbhosale
Copy link
Member Author

Hi @Sukh-P , I have made some changes here that ensures the auth grant flow works and made the example code more modular to keep it as it was before creating the enphase directory to function normally until we thoroughly test the enphase files, this can be merged , if you could review it that would be great

examples/example.py Outdated Show resolved Hide resolved
Copy link
Member

@Sukh-P Sukh-P left a comment

Choose a reason for hiding this comment

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

Nice work on getting some power production data back from the Enhpase inverter API! Have a small few comments, mostly about removing some commented out prints but nothing major

@aryanbhosale
Copy link
Member Author

Nice work on getting some power production data back from the Enhpase inverter API! Have a small few comments, mostly about removing some commented out prints but nothing major

Thanks a lot! Ill make the changes and get them merged

@aryanbhosale aryanbhosale merged commit 7be527d into openclimatefix:main May 30, 2024
2 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.

None yet

3 participants