ShEx implementation in Haskell
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
src
test
.gitignore
LICENSE
README.md
Setup.hs
Shexkell.cabal
stack.yaml
testConfigSchema.json

README.md

shexkell

ShEx implementation in Haskell

Environment

Clone the repo and cd to it. In order to build the development environment:

$ stack setup
$ stack build

This will download all the necessary dependencies for the project

Running Shexkell

Shexkell comes with a Command Line Interface to validate nodes of a given graph agains a given schema, with a given Shape Map. To run it, pass the folowing arguments to the executable:

$ shexkell -map <Shape Map path> -rdf <graph path> -shex <ShEx schema path>

The following flags can be added to specify the format of the files:

  • --compact Parse the ShEx schema as ShExC
  • --json Parse the ShEx schema as JSONLD (ShExJ)

Test suite

Unit tests

To run the unit tests:

$ stack test

Compatibility tests

To run the compatibility tests you must download the test suite and reference it in a configuration file with the format:

{
  "basePath": "/home/sergio/foo/shexTest",
  "manifestPath": "manifest.jsonld",
  "casesToRun": [
    "#1dot_fail-missing"
  ]
}
  • The field "basePath" specifies the base path of the test suite
  • The field "manifestPath" specifies the name of the manifest file to load
  • The field "casesToRun" specifies the IDs of the test cases to run as referenced in the manifest. If the field is not present, all cases are run

After saving the configuration file, run:

$ stack test --test-arguments='--compat testsConfig.json'