openclimatefix / pv-site-api

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

Caching #78

Closed peterdudfield closed 1 year ago

peterdudfield commented 1 year ago

Pull Request

Description

Add caching to forecast and actual routes. Didnt want to do the other routes, as they dont take long. Also dont want to cache sites route, as we might add a sight, and the user would like to see that instantly

Fixes #70

How Has This Been Tested?

Tested it locally

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Merging #78 (d8ee3ef) into main (cc4037a) will increase coverage by 0.52%. The diff coverage is 97.61%.

:exclamation: Current head d8ee3ef differs from pull request most recent head 38a4e2f. Consider uploading reports for the commit 38a4e2f to get more accurate results

@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   92.42%   92.95%   +0.52%     
==========================================
  Files           8        9       +1     
  Lines         330      369      +39     
==========================================
+ Hits          305      343      +38     
- Misses         25       26       +1     
Impacted Files Coverage Δ
pv_site_api/cache.py 97.14% <97.14%> (ø)
pv_site_api/__init__.py 100.00% <100.00%> (ø)
pv_site_api/main.py 90.44% <100.00%> (+0.24%) :arrow_up:

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