openreferral / hsds-transformer

Convert data into valid Human Service Data Specification (HSDS) datapackages. (Produced by the Open Referral Initiative.)
MIT License
11 stars 5 forks source link

Infer datapackage.json from transformed data files #48

Closed switzersc closed 4 years ago

switzersc commented 4 years ago

Addresses #40

Use the datapackage ruby gem to infer the json schema for the resulting CSV files. There may be additional fields or some HSDS fields may not all be present, so we can't just use a static example datapackage.json file. This PR leaves the default as a fall-back in case the source data has path issues (still figuring out what's necessary for path management with this as a gem).

This PR also makes it so that the datapackage.json is present in the output regardless of whether the files have been zipped. Previously, the json schema was only generated if the files were zipped.

This also closes #46.