{% extends "layout.html" %} {#- The report page. `view` is a ProfileDocument (model/fingerprint_views.yaml); every value comes ready as text from fingerprint/service_layer/generators/document.py, so this template only lays it out. -#} {%- macro tree(nodes) -%} {%- endmacro -%} {%- macro term(label, iri) -%} {%- set parts = label.split(':', 1) if label != iri else [] -%} {%- if iri.startswith('http://') or iri.startswith('https://') -%}{%- else -%}{%- endif -%} {%- if parts|length == 2 -%}{{ parts[0] }}:{{ parts[1] }}{%- else -%}{{ label }}{%- endif -%} {%- if iri.startswith('http://') or iri.startswith('https://') -%}{%- else -%}{%- endif -%} {%- endmacro -%} {%- set totals = namespace(classes=0, prefixes=[]) -%} {%- for g in view.graphs or [] -%}{%- for c in g.classes or [] -%} {%- set totals.classes = totals.classes + 1 -%} {%- if c.prefix not in totals.prefixes -%}{%- set totals.prefixes = totals.prefixes + [c.prefix] -%}{%- endif -%} {%- endfor -%}{%- endfor -%} {% block style %} {%- for p in view.namespaces or [] %} [data-ns="{{ p.prefix }}"] { --h: {{ (loop.index0 * 137 + 190) % 360 }}; } {%- endfor %} {% endblock %} {% block content %}

{{ conf.title }} {{ view.overview.endpoint or '' }}

{{ totals.classes }} classes

Overview

Endpoint
{{ view.overview.endpoint or '—' }}
Graphs
{{ (view.graphs or [])|length }}
Classes shown
{{ totals.classes }}
Namespaces
{{ (view.namespaces or [])|length }}
Started
{{ view.overview.started_at or '—' }}
Finished
{{ view.overview.finished_at or '—' }}
rdf-fingerprinter
{{ view.overview.tool_version or '—' }}

Each class states its precision: exact when every instance was read, or first N of M when only the first N instances the store returned were read. Absent values are shown as —.

Namespaces

{%- set several = (view.namespaces or [])|map(attribute='source')|unique|list|length > 1 %} {%- for p in view.namespaces or [] %} {%- if several and loop.changed(p.source) %} {%- endif %} {%- endfor %}
PrefixNamespaceSourceUses
{{ (p.source or '')|replace('_', '.') }}
{{ p.prefix }}{{ p.namespace }}{{ (p.source or '')|replace('_', '.') }}{{ p.uses if p.uses is not none else '—' }}

Taxonomy

The class hierarchy of each graph, from declared and implied parents. The bar shows how many instances a class has, against the graph's most popular class; grey names are parents not profiled here.

{%- for g in view.graphs or [] %} {%- if g.taxonomy %}

{% if g.iri %}{{ term(g.label, g.iri) }}{% else %}{{ g.label|capitalize }}{% endif %}

{{ tree(g.taxonomy) }} {%- endif %} {%- endfor %}
{%- for g in view.graphs or [] %}

{% if g.iri %}{{ term(g.label, g.iri) }}{% else %}{{ g.label|capitalize }}{% endif %}

{%- if g.empty %}

This graph has no typed instances.

{%- elif not g.classes %}

Every class of this graph is in a hidden namespace (see caveats).

{%- endif %} {%- for c in g.classes or [] %}

{{ term(c.label, c.iri) }}

{{ c.instances }} instances, {{ c.precision }}{% if c.sample_note %} {{ c.sample_note }}{% endif %} {{ c.data_properties }} data and {{ c.object_properties }} object properties {%- for b in c.badges or [] %} {{ b.check_id }} {%- endfor %} {%- if c.parents %} parents: {% for p in c.parents %}{{ term(p.label, p.iri) }} ({{ p.source }}){{ ", " if not loop.last }}{% endfor %} {%- endif %}
{%- for g in c.property_groups or [] %} {%- if (c.property_groups or [])|length > 1 %} {%- endif %} {%- for p in g.properties or [] %} {%- endfor %} {%- endfor %}
PropertySubjectsMinMaxAvgKindDistinct values Value typesConfidenceCardinalityInheritanceLanguage coverage
{{ g.name }}
{{ term(p.label, p.iri) }}{{ p.subjects }}{{ p.min }}{{ p.max }} {{ p.avg }}{{ p.kind }}{{ p.distinct }} {% for t in p.types or [] %}{{ term(t.label, t.iri) }}{{ ", " if not loop.last }}{% else %}—{% endfor %} {{ p.confidence }}{{ p.cardinality }}{{ p.inheritance }}{{ p.language_coverage }}
{%- endfor %}
{%- endfor %}

Collection

{%- if view.collection.failures %}
{%- for f in view.collection.failures %} {%- endfor %}
These measurements failed and are missing from the report.
GraphClassPropertyMeasurementAttemptsMessage
{{ f.graph }}{{ f.class_label }}{{ f.property_label or '—' }}{{ f.measurement }}{{ f.attempts or '—' }}{{ f.message or '' }}
{%- else %}

Every measurement succeeded.

{%- endif %}
Settings used
{%- for s in view.collection.settings or [] %} {%- endfor %}
SettingValue
{{ s.name }}{{ s.value }}

Caveats{% if view.pitfalls %} and pitfalls{% endif %}

{%- set cv = view.caveats %} {%- if not (cv.sampled or cv.untyped or cv.hidden or cv.skipped or cv.unjoined_default) %}

Nothing to flag: every class was read exactly and every IRI is shown.

{%- endif %} {%- if cv.sampled %}

Classes read from a sample

    {% for s in cv.sampled %}
  • {{ s.class_label }} in {{ s.graph }}: {{ s.precision }}
  • {% endfor %}
{%- endif %} {%- if cv.untyped %}

Subjects without a type

    {% for u in cv.untyped %}
  • {{ u.graph }}: {{ u.count }} subjects have no rdf:type, so no class section covers them.
  • {% endfor %}
{%- endif %} {%- if cv.hidden %}

Hidden namespaces

Their classes are left out of this page; show them with --include-namespace.

    {% for h in cv.hidden %}
  • {{ h.prefix }}: {{ h.classes }} classes
  • {% endfor %}
{%- endif %} {%- if cv.skipped %}

IRIs that cannot be written

    {% for s in cv.skipped %}
  • {{ s }}
  • {% endfor %}
{%- endif %} {%- if cv.unjoined_default %}

Default graph scanned without the schema

The default graph's data checks ran without the schema graphs: a store cannot join them to it, so domain and range findings there may be missing.

{%- endif %} {%- if view.pitfalls %}

Pitfalls

Modelling pitfalls found by SPARQL checks, most of them after the OOPS! catalogue. Each check shows how many rows it found and its first examples; heuristic checks are hints, not errors.

{%- for s in view.pitfalls.summary %}
{{ s.importance|capitalize }}
{{ s.checks }} checks with findings
{%- endfor %}
{%- for g in view.pitfalls.graphs %}

{{ g.label }}

{%- if not g.checks %}

No check found anything in this graph.

{% endif %} {%- for k in g.checks %}
{{ k.importance }} {{ k.title }} {{ k.count }} found · {{ k.check_id }} · {{ k.source }}{% if k.heuristic %} · heuristic{% endif %}
{%- if k.description %}

{{ k.description }}

{% endif %} {%- for e in k.examples or [] %} {%- for v in [e.entity, e.property, e.value] %} {%- endfor %} {%- endfor %}
EntityPropertyValue
{% if v.iri %}{{ term(v.label, v.iri) }}{% else %}{{ v.label }}{% endif %}
{%- if k.count > (k.examples or [])|length %}

First {{ (k.examples or [])|length }} of {{ k.count }}.

{% endif %}
{%- endfor %} {%- if g.clean %}

Nothing found by: {{ g.clean|join(", ") }}.

{%- endif %} {%- endfor %}
{%- endif %}
{% endblock %} {% block script %} {% endblock %}