data init command works only from cwd - you don't need to provide any arguments
Options:
-i or --interactive - Run init in interactive mode
-h or --help - Output usage information
Name/title of a dataset
By default it uses the name of the cwd as dataset's name and uses the unslugified version of the name as a title, eg, cwd's name is my-dataset:
dp.json:
{
"name": "my-dataset",
"title": "My dataset"
}
In the interactive mode, it will ask for confirmation.
Adding resources and scanning dirs
Without interactive mode, the command will scan all files and nested directories in the cwd and generate datapackage.json from every file it has found. In the interactive mode it would ask before adding a file into resources and before scanning any nested directory.
dp.json already exists
This will work only in interactive mode as we don't want to break anything, e.g., overwrite existing properties.
other work to be done
We want to rewrite old functions in an OOP way so we can emit events and print out statuses for better UX + for reusability from other libraries.
Tasks
Analysis
data init
command works only from cwd - you don't need to provide any argumentsOptions:
-i
or--interactive
- Run init in interactive mode-h
or--help
- Output usage informationName/title of a dataset
By default it uses the name of the cwd as dataset's name and uses the unslugified version of the name as a title, eg, cwd's name is
my-dataset
:dp.json:
In the interactive mode, it will ask for confirmation.
Adding resources and scanning dirs
Without interactive mode, the command will scan all files and nested directories in the cwd and generate
datapackage.json
from every file it has found. In the interactive mode it would ask before adding a file into resources and before scanning any nested directory.dp.json already exists
This will work only in interactive mode as we don't want to break anything, e.g., overwrite existing properties.
other work to be done
We want to rewrite old functions in an OOP way so we can emit events and print out statuses for better UX + for reusability from other libraries.
Created by: @anuveyatsu