Closed nailend closed 1 year ago
I like the idea, but cannot test it - do you have an example? Maybe even add a minimal test?
For a minimal test, I would need to add a false datapackage to examples. This might be confusing.
The easiest way to check is by modifying an existing example e.g
investment_multi_period/datapackage.json
. Change type
of field name
to integer
for the bus.csv
and then run the `test_example_datapackage_readability``
The new error message will look like this:
E tableschema.exceptions.CastError:
E Metadata structure of resource `bus` does not match data structure. Check the column names, types and their order.
E Field "name" can't cast value "bus0" for type "integer" with format "default"
Can't think of a test without creating an example datapackage. Anyway, I am basically just appending the original error message to the tabular internal one. I will just merge this
Description
Just adds further information about which why the reading of the datapackage might not have worked. E.g which column could not be casted.
Type of change
New feature (non-breaking change which adds functionality)
Checklist:
Please tick or delete options that are not relevant.
pre-commit
hooks