nismod / smif

Simulation Modelling Integration Framework
http://www.itrc.org.uk
MIT License
22 stars 6 forks source link

Fix missing method on datahandle for read and write coefficients #313

Closed willu47 closed 5 years ago

willu47 commented 5 years ago

Fixes #310

codecov[bot] commented 5 years ago

Codecov Report

Merging #313 into master will increase coverage by 0.08%. The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #313      +/-   ##
==========================================
+ Coverage   69.59%   69.68%   +0.08%     
==========================================
  Files          59       59              
  Lines        5023     5034      +11     
  Branches      605      605              
==========================================
+ Hits         3496     3508      +12     
+ Misses       1432     1431       -1     
  Partials       95       95
Flag Coverage Δ
#javascript 69.68% <100%> (+0.08%) :arrow_up:
#python 77.68% <100%> (+0.08%) :arrow_up:
Impacted Files Coverage Δ
src/smif/data_layer/data_handle.py 82.53% <100%> (+0.46%) :arrow_up:
src/smif/data_layer/memory_interface.py 88.15% <100%> (+0.21%) :arrow_up:
src/smif/metadata/spec.py 99.09% <0%> (-0.91%) :arrow_down:
src/smif/data_layer/file/file_data_store.py 86.85% <0%> (+0.69%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 03e0ab8...84ab350. Read the comment docs.

willu47 commented 5 years ago

Looks good, especially testing for errors 👍

Could add a quick read_coefficients_raises test around the data store, to insist on consistency.. https://github.com/nismod/smif/blob/master/tests/data_layer/test_data_store.py#L144

Added this.

I decided not to raise an error upon overwriting existing coefficient pairs. Overwriting should be intentional and handled elsewhere - anyway its more of a performance issue rather than an error.