openclimatefix / pv-site-api

Site specific API for PV forecasting
5 stars 8 forks source link

Add Enode authentication class #81

Closed jackypark9852 closed 1 year ago

jackypark9852 commented 1 year ago

Pull Request

Description

Adds httpx auth class for enode api requests in enode_auth.py

Please delete the italicised instruction text! Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #73, #74

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

If your changes affect data processing, have you plotted any changes? i.e. have you done a quick sanity check?

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Merging #81 (c931e79) into h4i/enode (c8bf403) will decrease coverage by 6.82%. The diff coverage is 0.00%.

@@              Coverage Diff              @@
##           h4i/enode      #81      +/-   ##
=============================================
- Coverage      91.63%   84.82%   -6.82%     
=============================================
  Files              8        9       +1     
  Lines            311      336      +25     
=============================================
  Hits             285      285              
- Misses            26       51      +25     
Impacted Files Coverage Δ
pv_site_api/enode_auth.py 0.00% <0.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

AndrewLester commented 1 year ago

Also, I think we may want to add tests for this logic...

Here's a library that allows you to mock HTTPX requests: https://github.com/Colin-b/pytest_httpx

Feel free to look into this, I will also. We can work on adding tests to this before merging.