Conversation
|
This looks good! I don't think there's anything else that needs to be checked I've realised I don't actually know what the In theory #312 is done, but I'll leave it up until after the standup tomorrow in case anyone else wants to review it. It would also be easy just to pin the numpy version in this PR or a separate one. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #346 +/- ##
========================================
Coverage 71.36% 71.36%
========================================
Files 44 44
Lines 5887 5887
Branches 1162 1162
========================================
Hits 4201 4201
Misses 1365 1365
Partials 321 321 ☔ View full report in Codecov by Sentry. |
536567d to
88b8285
Compare
|
This PR attempts attempts a comprehensive pass at the reader functions in an attempt to more rigourously define the data model used within Muse. Where possible reader functions are tested against the default example model using a single example data file. Other models are used where necessary. Some functions it was not possible/necessary to test for the reason given. Reader functions tested against default model (and the data file used):
Reader functions tested against other models:
Reader funtions not tested:
Potentially these last may need to be reviewed as to whether they are still relevant or could be removed. |
|
This looks great, although I do worry the type checks might be a bit restrictive. I guess all the types are inferred based on the input data, and what you've got here is correct for the datasets you're testing. However, for example, all of the variables with Similar thing with the string fields, as we've got a mix of |
|
Thanks @tsmbland. You make a good point. I think for your current purposes recording the tightest possible type makes sense particularly as it's hard to know how interchangeable e.g. ints and floats are in the code. But we should think carefully about how we tightly we specify types when writing tests for the planned changes. |
tsmbland
left a comment
There was a problem hiding this comment.
Looks good! I think we can merge what you've got here and create a separate branch for the new inputs
Description
As prepatory work for #332 this PR expands the tests for the reader functions in
readers/csv.pyto more strictly codify the expected output. So far I've only looked attests/test_readers.py::test_read_trade_technodataand wanted to get initial feedback before working on others. Particularly interested on anything else about the structure of the dataset that could be checked.Type of change
Please add a line in the relevant section of
CHANGELOG.md to
document the change (include PR #) - note reverse order of PR #s.
Key checklist
$ python -m pytest$ python -m sphinx -b html docs docs/buildFurther checks