Web server for RDF data validation, wrapping the TopBraid Shacl API tool. Based on https://github.com/SDSC-ORD/shacl
The easiest way to use tha API is to run the docker image:
# Only REST API
docker run -it --rm -p 8000:8000 --env-file .env ghcr.io/sdsc-ordes/shacl-api:latest
# REST API + web server
docker run -it --rm -p 8000:8000 -p 8501:8501 --env-file .env ghcr.io/sdsc-ordes/shacl-api:latest-webapp- just: This repository contains a justfile, and we use
justas a command runner. - nix: We provide all the tools you need to work on this project in a nix development shell. See here to install nix: https://determinate.systems/nix-installer/
- docker: Only required to build and run the containerized api.
The nix dev-shell contains all dependencies to run the project. Once you're inside, you can run just serve to start the server, or just watch to automatically reload it on file changes.
This is recommended for development.
Note
Alternatively, if just is not installed, you may enter the devshell directly with:
nix develop ./tools/nix#default --accept-flake-config --command "zsh"
First, enter the dev-shell:
just devThen fetch the third party shacl tool:
just fetchFinally, start the server:
just serve ./tests/data/val_ok_shapes.ttlWe build two docker images, a small "headless" version with only the REST server, and a larger image that bundles the REST server and a streamlit web application. These two images are differentiated by their tag: <version> vs <version>-webapp.
Note
Containers use the .env file in the repository, before running them, you should copy .env.dist to .env and set desired values for your shapes.
just image build
just image runFor development, it may be more convenient to use our docker compose stack.
just image compose-upWe provide manifests to deploy the service on kubernetes. The manifest templates in tools/deploy are managed with ytt and can be rendered using:
just manifests renderOr deployed directly with:
just manifests deploy