Closed mcarans closed 6 years ago
Released as datapackage@1.1.4
@roll This is fixed, but stepping through the code is confusing as the inferring part is still called but ignored when the format is passed in. IMHO, it would be better to avoid calling the inferring of format altogether for clarity. Perhaps this is something you could look into as you introduce Tabulator's inferring?
@mcarans It's intentionally for now. Concept is that there are two information sources:
It's independent things and descriptor's metadata have a precedence over source inspection.
@roll If the format is passed in, is there any circumstance in which the source inspection format would be used?
@mcarans
No. Output from _inspect_source
it's kind a fallback metadata (we get it on every resource build fully but just for connivence and because it's a cheap operation) and resource.descriptor
always has precedence.
The format is passed as csv in the below in add_resource but in resource.py line 468 it does this:
ie. it ignores the passed in format and effectively overwrites it.
eg.