User stories:
- As a publisher I want to simply and quickly build a data package for my dataset
- so I don't need to know about data packages. [completely new to Data Packages]
- so I don't need to build it by myself [Data Package experts]
- As a publisher I want to add a resource to an existing data package so that it is included
Stuff to look at: https://github.com/frictionlessdata/datapackage-read-js/blob/master/datapackage-read.js#L15
Proposal
We can have a $ data init command that builds a datapackage.json file
Acceptance criteria
Tasks
Analysis
$ data init -h prints out nice descriptions about the command + about dp properties we are going to generate.
Algorithm:
Publisher runs data init:
- check if datapackage.json exists in cwd
- YES - ask if we should overwrite (not overwrite but extend)
- NO - create new one
- prompt for dp name, title
- provided
- valid -> proceed
- invalid -> warn publisher and prompt again
- not provided
- already exists -> proceed with old one
- does not exist -> warn publisher and prompt again
- starting from current directory for each file or directory ask: (for file) shall we add? For directory: shall we search?
- generate/update a datapackage.json file
- print a success message
shall we add following file "filename.ext"?
shall we scan following directory "foldername"?
shall we add ...?
...
ident = parseIdentifier(...)
// check it exists ...
dp = DataPackage.load(identifier.dataPackageJsonUrl || {})
inquirer work using the existing data for prompts
- Error out if exists and create from nothing
- Allow for existing and update appropriately
- Allow for explicit adding of resources
User stories:
Stuff to look at: https://github.com/frictionlessdata/datapackage-read-js/blob/master/datapackage-read.js#L15
Proposal
We can have a
$ data initcommand that builds a datapackage.json fileAcceptance criteria
$ data initand get a Data Package initializeddatapackage.jsoncreated with minimal properties + selected resourcesTasks
promptFunction+ tests [1h]scanDirfunction + tests [1h]addResourcefunction + tests [2h]initfunction + tests [2h]Analysis
$ data init -hprints out nice descriptions about the command + about dp properties we are going to generate.Algorithm:
Publisher runs
data init:shall we add following file "filename.ext"?
shall we scan following directory "foldername"?
shall we add ...?
...