openclimatefix / nowcasting_datamodel

Datamodel for the nowcasting project
6 stars 6 forks source link

add convert function and tests #145

Closed peterdudfield closed 1 year ago

peterdudfield commented 1 year ago

Pull Request

Description

add function to convert ForecastValueSevenDaysSQL to Forecast objects

Fixes #144

How Has This Been Tested?

added a test

Checklist:

codecov-commenter commented 1 year ago

Codecov Report

Merging #145 (4f33c11) into main (840ea86) will increase coverage by 0.11%. The diff coverage is 100.00%.

:exclamation: Current head 4f33c11 differs from pull request most recent head 7059227. Consider uploading reports for the commit 7059227 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@            Coverage Diff             @@
##             main     #145      +/-   ##
==========================================
+ Coverage   95.67%   95.79%   +0.11%     
==========================================
  Files          20       21       +1     
  Lines        1156     1188      +32     
==========================================
+ Hits         1106     1138      +32     
  Misses         50       50              
Impacted Files Coverage Δ
nowcasting_datamodel/__init__.py 100.00% <100.00%> (ø)
nowcasting_datamodel/fake.py 100.00% <100.00%> (ø)
nowcasting_datamodel/models/convert.py 100.00% <100.00%> (ø)
nowcasting_datamodel/models/forecast.py 82.55% <100.00%> (+0.35%) :arrow_up:
nowcasting_datamodel/read/read.py 97.00% <100.00%> (+0.19%) :arrow_up:
nowcasting_datamodel/update.py 98.96% <100.00%> (+0.02%) :arrow_up:

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

braddf commented 1 year ago

Not a change from this PR @peterdudfield, but should this have an array param type if it's plural ids? image