Skip to content
rudof-projectPublic

Latest commit

 

History

30 Commits

Folders and files

Repository files navigation

rudof tutorials

Source for Shaping Knowledge Graphs, a Jupyter Book that introduces RDF, SPARQL, ShEx, SHACL, DCTAP and property graphs through runnable examples built with rudof.

Each chapter is a notebook under rudof/ and can be run as you read, either locally or in Google Colab via the launch button at the top of each page.

Chapters

Notebook Topic
rudof.ipynb the Rudof session, errors, configuration, prefixes
rdf.ipynb the RDF data model, formats, visualization, node neighbourhoods
sparql.ipynb querying local graphs and remote endpoints
shex.ipynb shape expressions, shape maps, validation reports
shacl.ipynb shapes as RDF, targets, validation reports
dctap.ipynb modelling in a spreadsheet, converting to ShEx
rdf12.ipynb RDF 1.2 triple terms and annotations
sparql12.ipynb querying those annotations with SPARQL 1.2
compare.ipynb structural comparison of two schemas
service_description.ipynb what a SPARQL endpoint says about itself
property_graphs.ipynb PG schemas, validation and Cypher
rudof_generate.ipynb generating synthetic data from a schema

Requirements

The notebooks target pyrudof 0.3.22 or later, and need Python 3.10 or newer. Several chapters reach the network: public SPARQL endpoints (Wikidata, DBpedia, UniProt) and the PlantUML server used to render diagrams.

Quick start

1. Clone and install

git clone https://github.com/rudof-project/tutorials.git
cd tutorials
pip install -r requirements.txt

2. Build the book

jupyter-book build rudof

Every notebook is re-executed on each build (execute_notebooks: force in rudof/_config.yml), so a build failure means a chapter no longer runs against the current pyrudof — which is the point.

The result lands in rudof/_build/html.

3. Publish

Publishing happens automatically through the deploy-book GitHub Action on every push to main that touches rudof/.

Cleaning build files and cache

New versions of the libraries sometimes need a clean build:

jupyter-book clean rudof          # the build directory
jupyter-book clean rudof --all    # also the jupyter_cache

Links

Releases

Packages

Contributors

Languages