openclimatefix / PVConsumer

Consumer PV data from various sources
Apache License 2.0
3 stars 1 forks source link

add a method to save to a pv site database #47

Closed peterdudfield closed 1 year ago

peterdudfield commented 1 year ago

Pull Request

Description

I have a general feeling this is a bit complicated for what it is. Might be worth in the future thinking about making this a lot simpler.

(slight reason this is complicated is, the consumer checks what the last data is, and then only pull and saves new data. Essentially this could be done with a different sql upload function)

46

How Has This Been Tested?

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #47 (bbde4da) into main (a3b476b) will decrease coverage by 4.07%. The diff coverage is 76.59%.

@@            Coverage Diff             @@
##             main      #47      +/-   ##
==========================================
- Coverage   97.26%   93.19%   -4.07%     
==========================================
  Files           5        6       +1     
  Lines         256      294      +38     
==========================================
+ Hits          249      274      +25     
- Misses          7       20      +13     
Impacted Files Coverage Δ
pvconsumer/utils.py 76.08% <30.76%> (-17.86%) :arrow_down:
pvconsumer/app.py 92.85% <91.66%> (-3.40%) :arrow_down:
pvconsumer/save.py 95.23% <95.23%> (ø)
pvconsumer/__init__.py 100.00% <100.00%> (ø)

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