https://github.com/weso/shexkell
ShEx implementation in Haskell
https://github.com/weso/shexkell
shape-expressions shex
Last synced: about 1 month ago
JSON representation
ShEx implementation in Haskell
- Host: GitHub
- URL: https://github.com/weso/shexkell
- Owner: weso
- License: mit
- Created: 2017-02-15T21:20:50.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-21T21:40:43.000Z (almost 8 years ago)
- Last Synced: 2025-02-16T21:46:46.489Z (4 months ago)
- Topics: shape-expressions, shex
- Language: Haskell
- Size: 96.7 KB
- Stars: 2
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shexkell
ShEx implementation in Haskell## Environment ##
Clone the repo and cd to it. In order to build the development environment:
``` sh
$ 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:
```sh
$ shexkell -map -rdf -shex
```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:
``` sh
$ stack test
```### Compatibility tests ###
To run the compatibility tests you must download the [test suite](https://github.com/shexSpec/shexTest/) and reference it in a configuration file with the format:
``` json
{
"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](https://github.com/shexSpec/shexTest/blob/master/validation/manifest.jsonld) file to load
* The field `"casesToRun"` specifies the IDs of the test cases to run as referenced in the [manifest](https://github.com/shexSpec/shexTest/blob/master/validation/manifest.jsonld). If the field is not present, all cases are runAfter saving the configuration file, run:
``` sh
$ stack test --test-arguments='--compat testsConfig.json'
```