openclimatefix / pv-site-api

Site specific API for PV forecasting
6 stars 11 forks source link

Remove the `>=0` constraint for PV forecasts. #58

Closed simlmx closed 1 year ago

simlmx commented 1 year ago

Best reviewed one commit at a time

The first commits are small fixes here and there that I made while fixing this. The last commit fixes #56 .

I ended up not adding any warnings for simplicity, since it's not really an issue in the end. In practice we have a few very small values (like -0.001) that will probably look like 0 in the front end anyway. Also it would probably make more sense to clip or warn about values in the model and/or in the front end directly.

codecov[bot] commented 1 year ago

Codecov Report

Merging #58 (d8109ee) into main (e5246fd) will decrease coverage by 0.07%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #58      +/-   ##
==========================================
- Coverage   90.77%   90.70%   -0.07%     
==========================================
  Files           8        8              
  Lines         271      269       -2     
==========================================
- Hits          246      244       -2     
  Misses         25       25              
Impacted Files Coverage Δ
pv_site_api/main.py 87.50% <ø> (-0.21%) :arrow_down:
pv_site_api/pydantic_models.py 100.00% <100.00%> (ø)

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