Validate data packages on the commandline using datapackage-validate
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
LICENSE
Makefile
README.md
dpkg_validator.py
requirements.txt
setup.py

README.md

dpkg-validate

This is a simple wrapper script to validate data packages in the command line. It uses the excellent datapackage-validate-py library to do all the work.

Installation

Run make install. A virtualenv with all necessary dependencies will be created in the project directory.

Usage

Be sure to load the virtualenv before running the script. This is done after installation, but if you are opening a new shell or terminal, you need to activate the virtualenv prior to running dpkg-validate.py:

source .env/bin/activate

After this, to run the script just indicate the location of the data package -- either a datapackage.json file or a directory containing one:

validate-dpkg ~/datasets/cpi
# or pointing to the file itself
validate-dpkg ~/datasets/cpi/datapackage.json

If the JSON file is fine, there will be no output. Otherwise, a list with the errors will be printed to standard output.