Open
Description
Current issues:
- No way to do post processing of information
- Pre-processing is wrapped up in prompting and is sort of hacky
- loading and writing of datapackage.json is not separate from the creation of datapackage.json
Proposal
Steps we need to perform (not necessarily in order)
- Generate defaults (possibly given a directory)
- Definition of things to ask (interactive)
- Use current values (defaults or load of current dp.json)
- initial values (given directory or some other info)
- Output: array of questions [ ... ]
- Use current values (defaults or load of current dp.json)
- Post-processing (e.g. analyse urls to look at it)
- dp.json plus some context (e.g. path to the directory, data files to add ...)
- Final confirmation and write of the file (e.g. to disk)
- This is probably outside of this library
In more complex scenario would loop steps 2 + 3 (e.g. answer to one item, would result in post-processing (e.g. analysis of data file that could alter what we ask ...)
Note: simplest possible right now would just be to have defaults function (ignore prompting etc etc ...)
Use cases
- Create - no datapackage.json exists
- Update existing datapackage.json
- should we add defaults ??
- specifically to add data resources