Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
labra committed Jun 9, 2024
1 parent e40155e commit 5159ed5
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 16 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ concurrency:

jobs:
binary_linux:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Allow the workflow to access the files of the repository
uses: actions/checkout@v3
Expand All @@ -26,6 +26,9 @@ jobs:
run: |
sudo apt update && sudo apt install -y g++-aarch64-linux-gnu
echo -e "\n\n[target.aarch64-unknown-linux-gnu]\nlinker = \"aarch64-linux-gnu-gcc\"" >> .cargo/config.toml
- name: Install libssl
run: |
sudo apt install libssl-dev
- name: Use an intelligent Rust cache for building the project
uses: Swatinem/rust-cache@v2
- name: Build the release version of `shapes-rs` for the x86 architecture
Expand Down Expand Up @@ -131,7 +134,7 @@ jobs:
if: github.event_name == 'release'

deb:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Allow the workflow to access the files of the repository
uses: actions/checkout@v3
Expand Down
63 changes: 49 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

# SHAPES-rs

This repo contains an RDF data shapes library implemented in Rust.
The implementation supports both [ShEx](http://shex.io/) and [SHACL](https://www.w3.org/TR/shacl/).
This repo contains an RDF data shapes library implemented in Rust.
The implementation supports both [ShEx](http://shex.io/) and [SHACL](https://www.w3.org/TR/shacl/).

We provide binaries for Linux, Windows, Mac and Docker (see [releases](https://github.com/weso/shapes-rs/releases)).

Expand All @@ -15,27 +15,60 @@ We provide binaries for Linux, Windows, Mac and Docker (see [releases](https://g

### Installation

<details markdown="block">
<summary>Instructions</summary>

#### Official releases

You can download a binary from the [latest release](https://github.com/weso/shapes-rs/releases/latest) page. There you will also find the compiled packages for the installation on
your system using a package manager.
You can download a binary from the [latest release](https://github.com/weso/shapes-rs/releases/latest) page. There you will also find the compiled packages for the installation on your system using a package manager.

##### Ubuntu

Note that the example below is for version 0.0.2. For any other version, please change the X.X.X values accordingly:
Download the binary from [https://github.com/weso/shapes-rs/releases] and install the `.deb` package running the following commands after replacing X.X.X by the latest version:

```
wget https://github.com/weso/shapes-rs/releases/download/0.0.2/sx_0.0.2_amd64.deb
sudo dpkg -i sx_0.0.2_amd64.deb
wget https://github.com/weso/shapes-rs/releases/download/X.X.X/sx_vX.X.X_amd64.deb
sudo dpkg -i sx_vX.X.X_amd64.deb
```

##### Windows

The binary can be downloaded from [https://github.com/weso/shapes-rs/releases]

##### Mac

The binary is available at: [https://github.com/weso/shapes-rs/releases]

<details markdown="block">
<summary>Compiling from source</summary>

#### Compiling from source

`shapes-rs` has been implemented in Rust and is compiled using [cargo](https://doc.rust-lang.org/cargo/). The command `cargo run` can be used to compile and run locally the code.

For example:

```
cargo run -- validate --data examples/user.ttl --schema examples/user.shex --shapemap examples/user.sm
```

#### Compiling from source and installing the binary (Debian)

Install `cargo deb` (only the first time)

```
cargo install cargo-deb
```

Create the `.deb` package by:

```
cargo deb
```

And run:

```
sudo dpkg -i target/debian/shapes-rs_0.0.11-1_amd64.deb
```

#### Docker

TBD
Expand All @@ -44,16 +77,18 @@ TBD

### Usage

#### Validate an example
#### Some examples

The folder `examples` contains several example files with ShEx schemas and RDF data.

Validate a specific node with a shape:
##### Validate a simple RDF file with a ShEx schema using a ShapeMap

```
sx validate --data examples/user.ttl --schema examples/user.jsonld --node :a --shape http://example.org/User
sx validate --data examples/user.ttl --schema examples/user.shex --shapemap examples/user.sm
```

We maintain a Wiki page with some common [Usage scenarios and How-to guides](https://github.com/weso/shapes-rs/wiki/Howto-guides).

#### Debugging information

It is possible to change the debug level information with:
Expand Down Expand Up @@ -107,7 +142,7 @@ Options:

### Obtaining information about a node in RDF data

This command can be useful to obtain the neighbourhood of a node.
This command can be useful to obtain the neighbourhood of a node.

```
Usage: sx node [OPTIONS] --node <NODE>
Expand Down

0 comments on commit 5159ed5

Please sign in to comment.