Skip to content

Better factored workflow #2

Open
@rufuspollock

Description

@rufuspollock

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 [ ... ]
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions