Skip to content

Commit

Permalink
Docs built for commit 202a7d0
Browse files Browse the repository at this point in the history
  • Loading branch information
prohde committed Nov 23, 2023
1 parent 2f627a1 commit 5cfbed4
Show file tree
Hide file tree
Showing 12 changed files with 58 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 3fe2daa40cf62ad6db9d0aeb536f5a71
config: 00cb10c030169cfb9b1adad41ab58db1
tags: 645f666f9bcd5a90fca523b33c5a78b7
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: '1.6.0',
VERSION: '1.7.0',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
10 changes: 8 additions & 2 deletions changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Changelog &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Changelog &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -34,7 +34,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -84,6 +84,12 @@
<h1>Changelog<a class="headerlink" href="#changelog" title="Permalink to this heading"></a></h1>
<div class="toctree-wrapper compound">
</div>
<section id="v1-7-0-23-nov-2023">
<h2>v1.7.0 - 23 Nov 2023<a class="headerlink" href="#v1-7-0-23-nov-2023" title="Permalink to this heading"></a></h2>
<ul class="simple">
<li><p>Add feature to pass an <code class="docutils literal notranslate"><span class="pre">rdflib.Graph</span></code> instead of a schema directory</p></li>
</ul>
</section>
<section id="v1-6-0-14-nov-2023">
<h2>v1.6.0 - 14 Nov 2023<a class="headerlink" href="#v1-6-0-14-nov-2023" title="Permalink to this heading"></a></h2>
<ul class="simple">
Expand Down
4 changes: 2 additions & 2 deletions feature.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Features and Limitations &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Features and Limitations &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -34,7 +34,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
4 changes: 2 additions & 2 deletions genindex.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Index-Template &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Index-Template &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -31,7 +31,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Trav-SHACL &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Trav-SHACL &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -33,7 +33,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
37 changes: 34 additions & 3 deletions library.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Trav-SHACL as a Library &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Trav-SHACL as a Library &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -34,7 +34,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down Expand Up @@ -199,12 +199,43 @@ <h3>Code<a class="headerlink" href="#code" title="Permalink to this heading">
<p class="admonition-title">Note</p>
<p>All parameters of <code class="docutils literal notranslate"><span class="pre">ShapeSchema</span></code> are keyword-only. The only required parameters are <code class="docutils literal notranslate"><span class="pre">schema_dir</span></code> and <code class="docutils literal notranslate"><span class="pre">endpoint</span></code>.</p>
</div>
<p>Instead of passing a directory containing the shapes, Trav-SHACL also accepts instances of <code class="docutils literal notranslate"><span class="pre">rdflib.Graph</span></code>.
The following code executes the example from above by passing an <code class="docutils literal notranslate"><span class="pre">rdflib.Graph</span></code>.</p>
<div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">os</span>
<span class="kn">from</span> <span class="nn">rdflib</span> <span class="kn">import</span> <span class="n">Graph</span>
<span class="kn">from</span> <span class="nn">TravSHACL</span> <span class="kn">import</span> <span class="n">parse_heuristics</span><span class="p">,</span> <span class="n">GraphTraversal</span><span class="p">,</span> <span class="n">ShapeSchema</span>

<span class="n">prio_target</span> <span class="o">=</span> <span class="s1">&#39;TARGET&#39;</span> <span class="c1"># shapes with target definition are preferred, alternative value: &#39;&#39;</span>
<span class="n">prio_degree</span> <span class="o">=</span> <span class="s1">&#39;IN&#39;</span> <span class="c1"># shapes with a higher in-degree are prioritized, alternative value &#39;OUT&#39;</span>
<span class="n">prio_number</span> <span class="o">=</span> <span class="s1">&#39;BIG&#39;</span> <span class="c1"># shapes with many constraints are evaluated first, alternative value &#39;SMALL&#39;</span>

<span class="n">schema_dir</span> <span class="o">=</span> <span class="s1">&#39;./shapes/LUBM&#39;</span>
<span class="n">shapes_graph</span> <span class="o">=</span> <span class="n">Graph</span><span class="p">()</span>
<span class="k">for</span> <span class="n">shape_file</span> <span class="ow">in</span> <span class="n">os</span><span class="o">.</span><span class="n">listdir</span><span class="p">(</span><span class="n">schema_dir</span><span class="p">):</span>
<span class="n">shapes_graph</span><span class="o">.</span><span class="n">parse</span><span class="p">(</span><span class="n">os</span><span class="o">.</span><span class="n">path</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">schema_dir</span><span class="p">,</span> <span class="n">shape_file</span><span class="p">))</span> <span class="c1"># reading all shape files into the shapes graph</span>

<span class="n">shape_schema</span> <span class="o">=</span> <span class="n">ShapeSchema</span><span class="p">(</span>
<span class="n">schema_dir</span><span class="o">=</span><span class="n">shapes_graph</span><span class="p">,</span> <span class="c1"># passing an RDFlib graph containing the shapes</span>
<span class="n">endpoint</span><span class="o">=</span><span class="s1">&#39;http://localhost:9090/sparql&#39;</span><span class="p">,</span>
<span class="n">graph_traversal</span><span class="o">=</span><span class="n">GraphTraversal</span><span class="o">.</span><span class="n">DFS</span><span class="p">,</span>
<span class="n">heuristics</span><span class="o">=</span><span class="n">parse_heuristics</span><span class="p">(</span><span class="n">prio_target</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span> <span class="o">+</span> <span class="n">prio_degree</span> <span class="o">+</span> <span class="s1">&#39; &#39;</span> <span class="o">+</span> <span class="n">prio_number</span><span class="p">),</span>
<span class="n">use_selective_queries</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="n">max_split_size</span><span class="o">=</span><span class="mi">256</span><span class="p">,</span>
<span class="n">output_dir</span><span class="o">=</span><span class="s1">&#39;./result/&#39;</span><span class="p">,</span> <span class="c1"># directory where the output files will be stored</span>
<span class="n">order_by_in_queries</span><span class="o">=</span><span class="kc">False</span><span class="p">,</span> <span class="c1"># sort the results of SPARQL queries in order to ensure the same order across several runs</span>
<span class="n">save_outputs</span><span class="o">=</span><span class="kc">True</span> <span class="c1"># save outputs to output_dir, alternative value: False</span>
<span class="p">)</span>

<span class="n">result</span> <span class="o">=</span> <span class="n">shape_schema</span><span class="o">.</span><span class="n">validate</span><span class="p">()</span> <span class="c1"># validate the SHACL shape schema</span>
<span class="nb">print</span><span class="p">(</span><span class="n">result</span><span class="p">)</span>
</pre></div>
</div>
</section>
<section id="parameters">
<h3>Parameters<a class="headerlink" href="#parameters" title="Permalink to this heading"></a></h3>
<p>Before executing the above script, let us have a look at the different parameters.</p>
<ul>
<li><p><code class="docutils literal notranslate"><span class="pre">schema_dir</span></code> path to the directory containing the shape files</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">schema_dir</span></code> path to the directory containing the shape files (or an RDFlib graph)</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">endpoint</span></code> URL of the endpoint to evaluated; alternatively, an RDFLib graph can be passed</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">endpoint_user</span></code> (optional) username if validating a private endpoint; default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">endpoint_password</span></code> (optional) password if validating a private endpoint; default: <code class="docutils literal notranslate"><span class="pre">None</span></code></p></li>
Expand Down
2 changes: 1 addition & 1 deletion objects.inv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Sphinx inventory version 2
# Project: Trav-SHACL
# Version: 1.6.0
# Version: 1.7.0
# The remainder of this file is compressed using zlib.
xڅR�j�0��+��=�49�BK �8?��ֲ@� �&��*��*ƽyggwfG�J���!�<�PpEE�������Z==�K��������@wө��YM )jt�}�n^ +�TVt+�e���-���$x}Sk���i�L��a�! &(�}Ţ�`8=H-=xiME�Nk.ߣq���IFZ�0�p��W����J!� f�&і/��Y߈�G��A����Mw�Jz�DZp"�S�� 83�@����'w�h�<5��O4W�X������fo���D��$�n6�!
Expand Down
4 changes: 2 additions & 2 deletions references.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>References &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>References &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -33,7 +33,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
Expand Down
4 changes: 2 additions & 2 deletions search.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Search &mdash; Trav-SHACL 1.6.0 documentation</title>
<title>Search &mdash; Trav-SHACL 1.7.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/css/custom.css" type="text/css" />
Expand Down Expand Up @@ -34,7 +34,7 @@
<img src="_static/logo.png" class="logo" alt="Logo"/>
</a>
<div class="version">
1.6.0
1.7.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="#" method="get">
Expand Down
Loading

0 comments on commit 5cfbed4

Please sign in to comment.