openclimatefix / pv-site-api

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

Create multiple clearsky endpoint #84

Closed ericcccsliu closed 1 year ago

ericcccsliu commented 1 year ago

Pull Request

Description

For our UI, we occasionally need to get multiple clearsky forecasts at once. This pull request adds an endpoint to get clearsky estimates over many sites, which also brings the clearsky endpoints in line with the endpoints for forecasts and actuals

How Has This Been Tested?

The data processing shouldn't be changed at all—doing the same processing, just with multiple sites

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Merging #84 (5eecace) into main (d8ee3ef) will increase coverage by 0.87%. The diff coverage is 95.58%.

@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
+ Coverage   92.95%   93.82%   +0.87%     
==========================================
  Files           9       10       +1     
  Lines         369      405      +36     
==========================================
+ Hits          343      380      +37     
+ Misses         26       25       -1     
Impacted Files Coverage Δ
pv_site_api/session.py 37.50% <0.00%> (ø)
pv_site_api/auth.py 90.47% <90.47%> (ø)
pv_site_api/__init__.py 100.00% <100.00%> (ø)
pv_site_api/_db_helpers.py 100.00% <100.00%> (ø)
pv_site_api/cache.py 97.14% <100.00%> (ø)
pv_site_api/main.py 92.85% <100.00%> (+2.41%) :arrow_up:

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

ericcccsliu commented 1 year ago

For some reason, a check regarding the forecast is failing (length of forecast values is 17 instead of 20) and I can't seem to figure out why

peterdudfield commented 1 year ago

@simlmx would you mind deploying this?