Giter VIP home page Giter VIP logo

periodo-validation's Introduction

PeriodO validation

SHACL data shapes for validating PeriodO data, and a CLI for running the validation against the canonical or local development files.

Usage

Validate the current canonical PeriodO data set (http://n2t.net/ark:/99152/p0d.json) against the current published data shapes from the PeriodO vocabulary (http://n2t.net/ark:/99152/p0v):

./validate

Validate a local data set against the current published data shapes from the PeriodO vocabulary (http://n2t.net/ark:/99152/p0v):

./validate data.ttl moredata.jsonld

Validate the current canonical PeriodO data set (http://n2t.net/ark:/99152/p0d.json) against data shape files from a local directory:

./validate --shapes path/to/shapes_dir

Validate a local data set against data shape files from a local directory:

./validate --shapes path/to/shapes_dir data.ttl moredata.jsonld

Validate a remote data set against the current published data shapes from the PeriodO vocabulary (http://n2t.net/ark:/99152/p0v), but ignoring the constraints listed in removed.ttl:

curl -s -L 'http://example.org/periodo-data.json' | ./validate - --remove removed.ttl

You can get JSON output using the -json option and group constraint violations using jq and the report.jq script:

./validate --json | jq -f report.jq > report.json

Typical workflow

  1. Verify that the current dataset is valid with respect to the current shapes (in the periodo-server/shapes directory). The following should produce no output:

    ./validate --shapes ../periodo-server/shapes
  2. Add and/or remove some constraints to the current set. The following should produce a list of violations of the new constraints, if there are any:

    ./validate --shapes ../periodo-server/shapes --shapes added.ttl \
        --remove removed.ttl
  3. Modify the dataset so that it no longer violates the new constraints. The following will produce no output, if the violations have all been resolved in fixed-dataset.json:

    cat fixed-dataset.json \
        | ./validate - --shapes ../periodo-server/shapes --shapes added.ttl \
        --remove removed.ttl

Bash CLI

try is a Bash script for managing the canonical PeriodO data using the workflow described above: Usage: ./try {new|without-patch|with-patch|accept} <proposed change> <proposed change> should be one of the proposed changes.

periodo-validation's People

Contributors

dependabot[bot] avatar rybesh avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

periodo-validation's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.