iolanta 2.1.7__py3-none-any.whl → 2.1.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- iolanta/cli/main.py +1 -1
- iolanta/data/context.yaml +6 -6
- iolanta/data/iolanta.yaml +4 -4
- iolanta/data/textual-browser.yaml +6 -20
- iolanta/declension/data/declension.yamlld +6 -6
- iolanta/facets/facet.py +4 -0
- iolanta/facets/mkdocs_material_insiders_markdown/__init__.py +3 -1
- iolanta/facets/mkdocs_material_insiders_markdown/data/mkdocs_material_insiders_markdown.yamlld +1 -1
- iolanta/facets/textual_browser/location.py +3 -1
- iolanta/facets/textual_browser/page_switcher.py +10 -0
- iolanta/facets/textual_class/facets.py +3 -0
- iolanta/facets/textual_class/textual-class.yamlld +25 -0
- iolanta/facets/textual_default/facets.py +50 -15
- iolanta/facets/textual_default/sparql/inverse-properties.sparql +1 -1
- iolanta/facets/textual_default/sparql/properties.sparql +2 -2
- iolanta/facets/textual_default/widgets.py +14 -6
- iolanta/iolanta.py +0 -38
- iolanta/labeled_triple_set/data/labeled_triple_set.yamlld +6 -6
- iolanta/mcp/cli.py +3 -2
- iolanta/namespaces.py +2 -2
- iolanta/sparqlspace/processor.py +5 -3
- {iolanta-2.1.7.dist-info → iolanta-2.1.9.dist-info}/METADATA +1 -1
- {iolanta-2.1.7.dist-info → iolanta-2.1.9.dist-info}/RECORD +25 -24
- {iolanta-2.1.7.dist-info → iolanta-2.1.9.dist-info}/WHEEL +0 -0
- {iolanta-2.1.7.dist-info → iolanta-2.1.9.dist-info}/entry_points.txt +0 -0
iolanta/cli/main.py
CHANGED
|
@@ -11,7 +11,7 @@ from rdflib import Literal, URIRef
|
|
|
11
11
|
from rich.console import Console
|
|
12
12
|
from rich.markdown import Markdown
|
|
13
13
|
from rich.table import Table
|
|
14
|
-
from typer import Argument, Exit, Option, Typer
|
|
14
|
+
from typer import Argument, Context, Exit, Option, Typer
|
|
15
15
|
from yarl import URL
|
|
16
16
|
|
|
17
17
|
from iolanta.cli.models import LogLevel
|
iolanta/data/context.yaml
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
3
|
-
rdf:
|
|
3
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
4
4
|
iolanta: https://iolanta.tech/
|
|
5
|
-
owl:
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
6
|
schema: https://schema.org/
|
|
7
|
-
xsd:
|
|
8
|
-
skos:
|
|
9
|
-
foaf:
|
|
10
|
-
vann:
|
|
7
|
+
xsd: http://www.w3.org/2001/XMLSchema#
|
|
8
|
+
skos: http://www.w3.org/2004/02/skos/core#
|
|
9
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
10
|
+
vann: http://purl.org/vocab/vann/
|
|
11
11
|
|
|
12
12
|
"@vocab": "local:"
|
|
13
13
|
"@base": "local:"
|
iolanta/data/iolanta.yaml
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
|
-
vann:
|
|
4
|
-
foaf:
|
|
5
|
-
owl:
|
|
3
|
+
vann: http://purl.org/vocab/vann/
|
|
4
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
6
|
iolanta: https://iolanta.tech/
|
|
7
7
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
8
|
-
rdf:
|
|
8
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
9
9
|
|
|
10
10
|
$included:
|
|
11
11
|
- $id: iolanta:Facet
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
|
-
vann:
|
|
4
|
-
foaf:
|
|
5
|
-
owl:
|
|
3
|
+
vann: http://purl.org/vocab/vann/
|
|
4
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
6
|
iolanta: https://iolanta.tech/
|
|
7
7
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
8
|
-
rdf:
|
|
8
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
9
9
|
np: https://www.nanopub.org/nschema#
|
|
10
|
-
dcterms:
|
|
11
|
-
xsd:
|
|
10
|
+
dcterms: http://purl.org/dc/terms/
|
|
11
|
+
xsd: http://www.w3.org/2001/XMLSchema#
|
|
12
12
|
|
|
13
13
|
iolanta:outputs:
|
|
14
14
|
"@type": "@id"
|
|
@@ -88,15 +88,6 @@
|
|
|
88
88
|
iolanta:hasDefaultFacet:
|
|
89
89
|
$id: pkg:pypi/iolanta#textual-link
|
|
90
90
|
|
|
91
|
-
- $id: rdfs:Class
|
|
92
|
-
iolanta:hasInstanceFacet:
|
|
93
|
-
$id: pkg:pypi/iolanta#textual-class
|
|
94
|
-
$: Instances
|
|
95
|
-
→: https://iolanta.tech/cli/textual
|
|
96
|
-
⪯:
|
|
97
|
-
- pkg:pypi/iolanta#textual-browser
|
|
98
|
-
- pkg:pypi/iolanta#textual-inverse-properties
|
|
99
|
-
|
|
100
91
|
- $id: owl:Ontology
|
|
101
92
|
iolanta:hasInstanceFacet:
|
|
102
93
|
$id: pkg:pypi/iolanta#textual-ontology
|
|
@@ -119,10 +110,5 @@
|
|
|
119
110
|
→: https://iolanta.tech/cli/textual
|
|
120
111
|
↦: ASK WHERE { ?subject $this ?object }
|
|
121
112
|
|
|
122
|
-
- $id: pkg:pypi/iolanta#textual-class
|
|
123
|
-
↦:
|
|
124
|
-
- ASK WHERE { ?instance a $this }
|
|
125
|
-
- ASK WHERE { $this rdfs:subClassOf ?superclass }
|
|
126
|
-
|
|
127
113
|
- $id: https://iolanta.tech/cli/textual
|
|
128
114
|
iolanta:when-no-facet-found: pkg:pypi/iolanta#textual-no-facet-found
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
|
-
vann:
|
|
4
|
-
foaf:
|
|
5
|
-
owl:
|
|
3
|
+
vann: http://purl.org/vocab/vann/
|
|
4
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
6
|
iolanta: https://iolanta.tech/
|
|
7
7
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
8
|
-
rdf:
|
|
9
|
-
dcterms:
|
|
10
|
-
dcam:
|
|
8
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
9
|
+
dcterms: http://purl.org/dc/terms/
|
|
10
|
+
dcam: http://purl.org/dc/dcam/
|
|
11
11
|
|
|
12
12
|
iolanta:outputs:
|
|
13
13
|
"@type": "@id"
|
iolanta/facets/facet.py
CHANGED
|
@@ -20,6 +20,10 @@ class Facet(Generic[FacetOutput]):
|
|
|
20
20
|
iolanta: 'iolanta.Iolanta' = field(repr=False)
|
|
21
21
|
as_datatype: Optional[NotLiteralNode] = None
|
|
22
22
|
|
|
23
|
+
def __post_init__(self):
|
|
24
|
+
if type(self.this) == str:
|
|
25
|
+
raise ValueError(f'Facet {self.__class__.__name__} received a string as this: {self.this}')
|
|
26
|
+
|
|
23
27
|
@property
|
|
24
28
|
def stored_queries_path(self) -> Path:
|
|
25
29
|
"""Construct directory for stored queries for this facet."""
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
from iolanta.facets.mkdocs_material_insiders_markdown.facet import
|
|
1
|
+
from iolanta.facets.mkdocs_material_insiders_markdown.facet import (
|
|
2
|
+
MkDocsMaterialInsidersMarkdownFacet,
|
|
3
|
+
)
|
|
2
4
|
|
|
3
5
|
__all__ = ['MkDocsMaterialInsidersMarkdownFacet']
|
|
4
6
|
|
iolanta/facets/mkdocs_material_insiders_markdown/data/mkdocs_material_insiders_markdown.yamlld
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
3
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
4
|
-
rdf:
|
|
4
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
5
5
|
iolanta: https://iolanta.tech/
|
|
6
6
|
|
|
7
7
|
$: rdfs:label
|
|
@@ -2,11 +2,13 @@ from dataclasses import dataclass
|
|
|
2
2
|
|
|
3
3
|
from rdflib import URIRef
|
|
4
4
|
|
|
5
|
+
from iolanta.models import NotLiteralNode
|
|
6
|
+
|
|
5
7
|
|
|
6
8
|
@dataclass
|
|
7
9
|
class Location:
|
|
8
10
|
"""Unique ID and IRI associated with it."""
|
|
9
11
|
|
|
10
12
|
page_id: str
|
|
11
|
-
url:
|
|
13
|
+
url: NotLiteralNode
|
|
12
14
|
facet_iri: URIRef | None = None
|
|
@@ -217,6 +217,9 @@ class PageSwitcher(IolantaWidgetMixin, ContentSwitcher): # noqa: WPS214
|
|
|
217
217
|
|
|
218
218
|
def action_reload(self):
|
|
219
219
|
"""Reset Iolanta graph and re-render current view."""
|
|
220
|
+
if self.history.current is None:
|
|
221
|
+
return
|
|
222
|
+
|
|
220
223
|
self.iolanta.reset()
|
|
221
224
|
|
|
222
225
|
self.run_worker(
|
|
@@ -271,6 +274,13 @@ class PageSwitcher(IolantaWidgetMixin, ContentSwitcher): # noqa: WPS214
|
|
|
271
274
|
facet_iri: str | None = None,
|
|
272
275
|
):
|
|
273
276
|
"""Go to an IRI."""
|
|
277
|
+
# Convert string to URIRef if needed.
|
|
278
|
+
# This happens when called via Textual action strings (from keyboard bindings
|
|
279
|
+
# in page.py line 24), which serialize URIRefs to strings in f-strings.
|
|
280
|
+
# Direct calls (like line 77) pass URIRef objects directly.
|
|
281
|
+
if isinstance(this, str):
|
|
282
|
+
this = URIRef(this)
|
|
283
|
+
|
|
274
284
|
self.run_worker(
|
|
275
285
|
functools.partial(
|
|
276
286
|
self.render_iri,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
import itertools
|
|
3
|
+
from pathlib import Path
|
|
3
4
|
from typing import ClassVar, Iterable
|
|
4
5
|
|
|
5
6
|
import funcy
|
|
@@ -186,6 +187,8 @@ class InstancesBody(Vertical):
|
|
|
186
187
|
class Class(Facet[Widget]):
|
|
187
188
|
"""Render instances of a class."""
|
|
188
189
|
|
|
190
|
+
META = Path(__file__).parent / 'textual-class.yamlld'
|
|
191
|
+
|
|
189
192
|
def stream_instances(self) -> Iterable[NotLiteralNode]:
|
|
190
193
|
"""
|
|
191
194
|
Query and stream class instances lazily.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"@context":
|
|
2
|
+
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
|
+
iolanta: https://iolanta.tech/
|
|
4
|
+
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
5
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
6
|
+
|
|
7
|
+
$: rdfs:label
|
|
8
|
+
→:
|
|
9
|
+
"@type": "@id"
|
|
10
|
+
"@id": iolanta:outputs
|
|
11
|
+
⪯:
|
|
12
|
+
"@type": "@id"
|
|
13
|
+
"@id": iolanta:is-preferred-over
|
|
14
|
+
↦: iolanta:matches
|
|
15
|
+
|
|
16
|
+
$id: pkg:pypi/iolanta#textual-class
|
|
17
|
+
|
|
18
|
+
$: Instances
|
|
19
|
+
→: https://iolanta.tech/cli/textual
|
|
20
|
+
|
|
21
|
+
⪯:
|
|
22
|
+
- pkg:pypi/iolanta#textual-browser
|
|
23
|
+
- pkg:pypi/iolanta#textual-inverse-properties
|
|
24
|
+
|
|
25
|
+
↦: ASK WHERE { ?instance a $this }
|
|
@@ -4,7 +4,7 @@ from xml.dom import minidom # noqa: S408
|
|
|
4
4
|
import funcy
|
|
5
5
|
from rdflib.term import Literal, Node
|
|
6
6
|
from rich.syntax import Syntax
|
|
7
|
-
from textual.containers import VerticalScroll
|
|
7
|
+
from textual.containers import Vertical, VerticalScroll
|
|
8
8
|
from textual.widget import Widget
|
|
9
9
|
from textual.widgets import Static
|
|
10
10
|
|
|
@@ -22,17 +22,28 @@ from iolanta.models import NotLiteralNode
|
|
|
22
22
|
from iolanta.namespaces import DC, RDFS, SDO
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
class Description(Static):
|
|
26
|
+
"""Static widget with padding for descriptions."""
|
|
27
|
+
|
|
28
|
+
DEFAULT_CSS = """
|
|
29
|
+
Description {
|
|
30
|
+
padding: 1;
|
|
31
|
+
}
|
|
32
|
+
"""
|
|
33
|
+
|
|
34
|
+
|
|
25
35
|
class TextualDefaultFacet(Facet[Widget]): # noqa: WPS214
|
|
26
36
|
"""Default rendering engine."""
|
|
27
37
|
|
|
28
38
|
query_file_name = 'properties.sparql'
|
|
39
|
+
properties_on_the_right = False
|
|
29
40
|
|
|
30
41
|
@functools.cached_property
|
|
31
42
|
def grouped_properties(self) -> dict[NotLiteralNode, list[Node]]:
|
|
32
43
|
"""Properties of current node & their values."""
|
|
33
44
|
property_rows = self.stored_query(
|
|
34
45
|
self.query_file_name,
|
|
35
|
-
|
|
46
|
+
this=self.this,
|
|
36
47
|
)
|
|
37
48
|
|
|
38
49
|
property_pairs = [
|
|
@@ -75,10 +86,18 @@ class TextualDefaultFacet(Facet[Widget]): # noqa: WPS214
|
|
|
75
86
|
for property_value in property_values
|
|
76
87
|
]
|
|
77
88
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
89
|
+
if self.properties_on_the_right:
|
|
90
|
+
# Property name on the right (last column), values on the left (first column)
|
|
91
|
+
yield PropertyRow(
|
|
92
|
+
PropertyValues(*property_values),
|
|
93
|
+
property_name,
|
|
94
|
+
)
|
|
95
|
+
else:
|
|
96
|
+
# Property name on the left (first column), values on the right (last column)
|
|
97
|
+
yield PropertyRow(
|
|
98
|
+
property_name,
|
|
99
|
+
PropertyValues(*property_values),
|
|
100
|
+
)
|
|
82
101
|
|
|
83
102
|
@functools.cached_property
|
|
84
103
|
def description(self) -> str | Syntax | None:
|
|
@@ -134,22 +153,38 @@ class TextualDefaultFacet(Facet[Widget]): # noqa: WPS214
|
|
|
134
153
|
|
|
135
154
|
def show(self) -> Widget:
|
|
136
155
|
"""Render the content."""
|
|
137
|
-
return VerticalScroll(
|
|
138
|
-
PageTitle(self.this),
|
|
139
|
-
Static(self.description or ''),
|
|
140
|
-
self.properties,
|
|
141
|
-
)
|
|
142
156
|
|
|
157
|
+
widgets = [PageTitle(self.this)]
|
|
158
|
+
|
|
159
|
+
if self.description:
|
|
160
|
+
widgets.append(Description(self.description))
|
|
161
|
+
|
|
162
|
+
widgets.append(self.properties)
|
|
163
|
+
|
|
164
|
+
return VerticalScroll(*widgets)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
class PageFooter(PageTitle):
|
|
168
|
+
"""Page footer."""
|
|
169
|
+
|
|
170
|
+
DEFAULT_CSS = """
|
|
171
|
+
PageFooter {
|
|
172
|
+
dock: bottom;
|
|
173
|
+
background: darkmagenta;
|
|
174
|
+
}
|
|
175
|
+
"""
|
|
143
176
|
|
|
144
177
|
class InverseProperties(TextualDefaultFacet):
|
|
145
178
|
"""Inverse properties view."""
|
|
146
179
|
|
|
147
180
|
query_file_name = 'inverse-properties.sparql'
|
|
181
|
+
properties_on_the_right = True
|
|
148
182
|
|
|
149
183
|
def show(self) -> Widget:
|
|
150
184
|
"""Render the content."""
|
|
151
|
-
return
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
185
|
+
return Vertical(
|
|
186
|
+
VerticalScroll(
|
|
187
|
+
self.properties,
|
|
188
|
+
),
|
|
189
|
+
PageFooter(self.this, extra='[i]& its inverse RDF properties[/i]'),
|
|
155
190
|
)
|
|
@@ -25,6 +25,7 @@ class PropertyName(Widget, can_focus=True, inherit_bindings=False):
|
|
|
25
25
|
width: 15%;
|
|
26
26
|
height: auto;
|
|
27
27
|
margin-right: 1;
|
|
28
|
+
text-style: bold;
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
PropertyName:hover {
|
|
@@ -60,7 +61,8 @@ class PropertyName(Widget, can_focus=True, inherit_bindings=False):
|
|
|
60
61
|
|
|
61
62
|
def render_title(self):
|
|
62
63
|
"""Render title in a separate thread."""
|
|
63
|
-
|
|
64
|
+
title = self.app.iolanta.render(self.iri, DATATYPES.title)
|
|
65
|
+
return f'⤚{title}→'
|
|
64
66
|
|
|
65
67
|
def render(self) -> RenderResult:
|
|
66
68
|
"""Render node title."""
|
|
@@ -147,6 +149,13 @@ class PropertyValue(Widget, can_focus=True, inherit_bindings=False):
|
|
|
147
149
|
"""Return the property IRI for compatibility."""
|
|
148
150
|
return self.property_value
|
|
149
151
|
|
|
152
|
+
def render_title(self):
|
|
153
|
+
"""Render title in a separate thread."""
|
|
154
|
+
return self.app.iolanta.render(
|
|
155
|
+
self.iri,
|
|
156
|
+
as_datatype=DATATYPES.title,
|
|
157
|
+
)
|
|
158
|
+
|
|
150
159
|
def on_worker_state_changed(self, event: Worker.StateChanged):
|
|
151
160
|
"""Show the title after it has been rendered."""
|
|
152
161
|
match event.state:
|
|
@@ -191,7 +200,9 @@ class PropertiesContainer(Vertical):
|
|
|
191
200
|
DEFAULT_CSS = """
|
|
192
201
|
PropertiesContainer {
|
|
193
202
|
height: auto;
|
|
194
|
-
|
|
203
|
+
padding: 1;
|
|
204
|
+
}
|
|
205
|
+
"""
|
|
195
206
|
|
|
196
207
|
def render_all_properties(self):
|
|
197
208
|
"""Render all property names & values."""
|
|
@@ -199,10 +210,7 @@ class PropertiesContainer(Vertical):
|
|
|
199
210
|
|
|
200
211
|
widget: PropertyName | PropertyValue
|
|
201
212
|
for widget in widgets:
|
|
202
|
-
widget.renderable =
|
|
203
|
-
widget.iri,
|
|
204
|
-
as_datatype=DATATYPES.title,
|
|
205
|
-
)
|
|
213
|
+
widget.renderable = widget.render_title()
|
|
206
214
|
|
|
207
215
|
def on_mount(self):
|
|
208
216
|
"""Initiate rendering in the background."""
|
iolanta/iolanta.py
CHANGED
|
@@ -308,44 +308,6 @@ class Iolanta: # noqa: WPS214
|
|
|
308
308
|
error=err,
|
|
309
309
|
) from err
|
|
310
310
|
|
|
311
|
-
def render_all(
|
|
312
|
-
self,
|
|
313
|
-
node: Node,
|
|
314
|
-
as_datatype: NotLiteralNode,
|
|
315
|
-
) -> Iterable[Any]:
|
|
316
|
-
"""Find all possible Iolanta facets for a node and render them."""
|
|
317
|
-
choices = list(
|
|
318
|
-
FacetFinder(
|
|
319
|
-
iolanta=self,
|
|
320
|
-
node=node,
|
|
321
|
-
as_datatype=as_datatype,
|
|
322
|
-
).choices(),
|
|
323
|
-
)
|
|
324
|
-
|
|
325
|
-
pairs = [
|
|
326
|
-
(self.facet_resolver[row['facet']], row['output_datatype'])
|
|
327
|
-
for row in choices
|
|
328
|
-
]
|
|
329
|
-
|
|
330
|
-
facet_instances = [
|
|
331
|
-
facet_class(
|
|
332
|
-
this=node,
|
|
333
|
-
iolanta=self,
|
|
334
|
-
as_datatype=output_datatype,
|
|
335
|
-
)
|
|
336
|
-
for facet_class, output_datatype in pairs
|
|
337
|
-
]
|
|
338
|
-
|
|
339
|
-
for facet in facet_instances:
|
|
340
|
-
try:
|
|
341
|
-
yield facet.show()
|
|
342
|
-
except Exception as err:
|
|
343
|
-
raise FacetError(
|
|
344
|
-
node=node,
|
|
345
|
-
facet_iri=None,
|
|
346
|
-
error=err,
|
|
347
|
-
) from err
|
|
348
|
-
|
|
349
311
|
def node_as_qname(self, node: Node):
|
|
350
312
|
"""Render node as a QName if possible."""
|
|
351
313
|
qname = node_to_qname(node, self.graph)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"@context":
|
|
2
2
|
"@import": https://json-ld.org/contexts/dollar-convenience.jsonld
|
|
3
|
-
vann:
|
|
4
|
-
foaf:
|
|
5
|
-
owl:
|
|
3
|
+
vann: http://purl.org/vocab/vann/
|
|
4
|
+
foaf: http://xmlns.com/foaf/0.1/
|
|
5
|
+
owl: http://www.w3.org/2002/07/owl#
|
|
6
6
|
iolanta: https://iolanta.tech/
|
|
7
7
|
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
|
|
8
|
-
rdf:
|
|
9
|
-
dcterms:
|
|
10
|
-
dcam:
|
|
8
|
+
rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
|
|
9
|
+
dcterms: http://purl.org/dc/terms/
|
|
10
|
+
dcam: http://purl.org/dc/dcam/
|
|
11
11
|
|
|
12
12
|
iolanta:outputs:
|
|
13
13
|
"@type": "@id"
|
iolanta/mcp/cli.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
from pathlib import Path
|
|
1
2
|
from typing import Annotated
|
|
3
|
+
|
|
2
4
|
from fastmcp import FastMCP
|
|
3
|
-
from pathlib import Path
|
|
4
5
|
|
|
5
6
|
from iolanta.cli.main import render_and_return
|
|
6
7
|
|
|
@@ -10,7 +11,7 @@ mcp = FastMCP("Iolanta MCP Server")
|
|
|
10
11
|
@mcp.tool()
|
|
11
12
|
def render_uri(
|
|
12
13
|
uri: Annotated[str, 'URL, or file system path, to render'],
|
|
13
|
-
as_format: Annotated[str, 'Format to render as. Examples: `labeled-triple-set`, `mermaid`']
|
|
14
|
+
as_format: Annotated[str, 'Format to render as. Examples: `labeled-triple-set`, `mermaid`'],
|
|
14
15
|
) -> str:
|
|
15
16
|
"""Render a URI."""
|
|
16
17
|
result = render_and_return(uri, as_format)
|
iolanta/namespaces.py
CHANGED
|
@@ -32,11 +32,11 @@ class DCTERMS(rdflib.DCTERMS):
|
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
class VANN(rdflib.VANN):
|
|
35
|
-
|
|
35
|
+
...
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
class FOAF(rdflib.FOAF):
|
|
39
|
-
|
|
39
|
+
...
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
class XSD(rdflib.XSD):
|
iolanta/sparqlspace/processor.py
CHANGED
|
@@ -58,7 +58,7 @@ REDIRECTS = MappingProxyType({
|
|
|
58
58
|
# FIXME This is presently hardcoded; we need to
|
|
59
59
|
# - either find a way to resolve these URLs automatically,
|
|
60
60
|
# - or create a repository of those redirects online.
|
|
61
|
-
'
|
|
61
|
+
'http://purl.org/vocab/vann/': URIRef(
|
|
62
62
|
'https://vocab.org/vann/vann-vocab-20100607.rdf',
|
|
63
63
|
),
|
|
64
64
|
URIRef(DC): URIRef(DCTERMS),
|
|
@@ -66,8 +66,10 @@ REDIRECTS = MappingProxyType({
|
|
|
66
66
|
URIRef(RDFS): URIRef(RDFS),
|
|
67
67
|
URIRef(OWL): URIRef(OWL),
|
|
68
68
|
|
|
69
|
-
#
|
|
70
|
-
URIRef('https
|
|
69
|
+
# Redirect FOAF namespace to GitHub mirror
|
|
70
|
+
URIRef('https?://xmlns.com/foaf/0.1/.+'): URIRef(
|
|
71
|
+
'https://raw.githubusercontent.com/foaf/foaf/refs/heads/master/xmlns.com/htdocs/foaf/0.1/index.rdf',
|
|
72
|
+
),
|
|
71
73
|
URIRef('https://www.nanopub.org/nschema'): URIRef(
|
|
72
74
|
'https://www.nanopub.net/nschema#',
|
|
73
75
|
),
|
|
@@ -6,17 +6,17 @@ iolanta/cli/formatters/choose.py,sha256=LWzsO_9IBSSgYNIyLlItkp8TNvpW3v6YCQ8-6kbI
|
|
|
6
6
|
iolanta/cli/formatters/csv.py,sha256=ceJ_DTz0beqeK-d6FPBQqqjXrziEfF0FRSLoGZCt_fs,760
|
|
7
7
|
iolanta/cli/formatters/json.py,sha256=Og5B9UrSM_0NWqW5Afpsy6WH8ZfYgPMVXYvT3i-43Jc,748
|
|
8
8
|
iolanta/cli/formatters/pretty.py,sha256=IypZRAr2vNqcXFY6NOIc75mpyfpFWh56aCBlOPDDieQ,2901
|
|
9
|
-
iolanta/cli/main.py,sha256=
|
|
9
|
+
iolanta/cli/main.py,sha256=CZ22-DQY3xHvvUiq1o9XDrpC2an4429yQNOE8LytDkg,4524
|
|
10
10
|
iolanta/cli/models.py,sha256=cjbpowdzI4wAP0DUk3qoVHyimk6AZwlXi9CGmusZTuM,159
|
|
11
11
|
iolanta/cli/pretty_print.py,sha256=M6E3TmhzA6JY5GeUVmDZLmOh5u70-393PVit4voFKDI,977
|
|
12
12
|
iolanta/context.py,sha256=bZR-tbZIrDQ-Vby01PMDZ6ifxM-0YMK68RJvAsyqCTs,507
|
|
13
13
|
iolanta/conversions.py,sha256=hbLwRF1bAbOxy17eMWLHhYksbdCWN-v4-0y0wn3XSSg,1185
|
|
14
|
-
iolanta/data/context.yaml,sha256=
|
|
14
|
+
iolanta/data/context.yaml,sha256=U7qs7fb8YRJWTbvKuubsQ_lIltIbWJDEDjLoy53k_Ck,1629
|
|
15
15
|
iolanta/data/graph-triples.yamlld,sha256=rtn-HfbijaqbmjCrKv-2pVV_aaJhB_9_OqXA_yLznCs,209
|
|
16
|
-
iolanta/data/iolanta.yaml,sha256=
|
|
17
|
-
iolanta/data/textual-browser.yaml,sha256=
|
|
16
|
+
iolanta/data/iolanta.yaml,sha256=jPNIM8BdQCmvETrImYnEyo7PMeJVh01RPwxwhtIIC5w,1428
|
|
17
|
+
iolanta/data/textual-browser.yaml,sha256=arGPFQMtKK-LkWcDB50fC0jpztkS4T9B4prCDx_WTMo,3090
|
|
18
18
|
iolanta/declension/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
iolanta/declension/data/declension.yamlld,sha256=
|
|
19
|
+
iolanta/declension/data/declension.yamlld,sha256=xpHW458GS6Q2NQJxOzGxqeX-awvtlk6WjAAQUjBmiMw,968
|
|
20
20
|
iolanta/declension/facet.py,sha256=7SsPACjeIGnONLhfjB4KBjqt-FRISVpZenshJzqC0A8,1349
|
|
21
21
|
iolanta/declension/sparql/declension.sparql,sha256=T84bfCNDXodmFEH26S45DyOJHoWz3T4cC7hSwtAcFSw,185
|
|
22
22
|
iolanta/ensure_is_context.py,sha256=9aok8asyEx7KPesOR28VBDb3Ch9kfc3eoCpQSJwj07U,717
|
|
@@ -30,7 +30,7 @@ iolanta/facets/cli/record.py,sha256=-nIhe6hXkoI5LJtZhqBoT8ZkYGxlLwMDbPc-xmwNhrE,
|
|
|
30
30
|
iolanta/facets/cli/sparql/link.sparql,sha256=WtWEfLAvdGc2gP0IhZil6Vglkydc3VO24vk4GwRnR5I,163
|
|
31
31
|
iolanta/facets/cli/sparql/record.sparql,sha256=GBWkmNelvaSDbvl7v0-LsJHdjFPbsSAW49kNFOUeoGQ,63
|
|
32
32
|
iolanta/facets/errors.py,sha256=sEBmnzhFcRIgOT18hfNwyMMjry0waa6IB-jC2NVTA50,4124
|
|
33
|
-
iolanta/facets/facet.py,sha256=
|
|
33
|
+
iolanta/facets/facet.py,sha256=s9XmH-t0tkkVW2wwTdgv7mIW_gaW18rYVfnYgelkUtc,2239
|
|
34
34
|
iolanta/facets/foaf_person_title/__init__.py,sha256=oj4MNVQvv8Dysb27xiWjtZCii8-nT7-WFa3WMWUwbtU,67
|
|
35
35
|
iolanta/facets/foaf_person_title/facet.py,sha256=_lKtRosZWuKpjKZ3Ssdq79jVhiLE53jaf22Rnq4HCxs,634
|
|
36
36
|
iolanta/facets/foaf_person_title/sparql/names.sparql,sha256=p_2hHZXhEaJ8IwGlvLoN0vb0vhGqo44uAVRpDyTzflU,107
|
|
@@ -46,8 +46,8 @@ iolanta/facets/html/default.py,sha256=Dmf_kYiL2M954iigyYsiWrMstwZ1nvxKetuR6aW3xY
|
|
|
46
46
|
iolanta/facets/icon.py,sha256=Dubh9eCvb4kj-ppEJsTno_mn78og8YIRnDrmcefOsgs,495
|
|
47
47
|
iolanta/facets/locator/sparql/get-query-to-facet.sparql,sha256=ZoXrclgZPy0FpPhVVMb6VnIXLIUgIc-Q7Pa5ySsNSSU,114
|
|
48
48
|
iolanta/facets/locator.py,sha256=swDkDqo_N8GEPtkDRh-Tp7npyLuPUaZpZDHZPUc2Om4,9089
|
|
49
|
-
iolanta/facets/mkdocs_material_insiders_markdown/__init__.py,sha256=
|
|
50
|
-
iolanta/facets/mkdocs_material_insiders_markdown/data/mkdocs_material_insiders_markdown.yamlld,sha256=
|
|
49
|
+
iolanta/facets/mkdocs_material_insiders_markdown/__init__.py,sha256=v5vnYeWJDYIZhXDbuKdhwjkq2Y13dPHNiQuBMAwzEgI,164
|
|
50
|
+
iolanta/facets/mkdocs_material_insiders_markdown/data/mkdocs_material_insiders_markdown.yamlld,sha256=_eTa2_Hqd-QqufBrKD8-wWv1XnKs3QCJar4ONGXH3Nk,549
|
|
51
51
|
iolanta/facets/mkdocs_material_insiders_markdown/facet.py,sha256=EY-H4gR5YgiDVt2pFbhXDuuDlAdo43vuwOvfhqFuRr4,2504
|
|
52
52
|
iolanta/facets/mkdocs_material_insiders_markdown/templates/datatype.jinja2.md,sha256=k9GSdy27mAY3eRL899pk6ZCYr4ZpEY1EuM5RY-OApYM,551
|
|
53
53
|
iolanta/facets/page_title.py,sha256=TwgZK2g_e5UoWYjKNgDzzkmq1EI3cY58680iC8N9kZI,1407
|
|
@@ -57,23 +57,24 @@ iolanta/facets/textual_browser/app.py,sha256=rF34KbWi0L-Mozwzm-wzBS-3OqCcwbaXl0G
|
|
|
57
57
|
iolanta/facets/textual_browser/facet.py,sha256=5mX1l6P-Ga7buzXmItxSpta6G_D4Fvwv8H6mU8-3g80,742
|
|
58
58
|
iolanta/facets/textual_browser/history.py,sha256=b3jTwVkVe0ZBcYkHGJ_zKIV4MSMScDdabmLQIjOZfes,1087
|
|
59
59
|
iolanta/facets/textual_browser/home.py,sha256=GfDD1G2HiwdLkPkNdcYRqVIxDl5tWH9fewh_FJb8G-I,384
|
|
60
|
-
iolanta/facets/textual_browser/location.py,sha256=
|
|
60
|
+
iolanta/facets/textual_browser/location.py,sha256=qWa7xUgaWKYOmiQuwI1TbyvujpKRb1pxJJZ8lFDcjKk,259
|
|
61
61
|
iolanta/facets/textual_browser/models.py,sha256=DqTBjhkkTt5mNwqr4DzNbPSqzV-QtNqfKj7wpn6T3ao,173
|
|
62
62
|
iolanta/facets/textual_browser/page.py,sha256=NkcQ5rSKZRbp63C8ozgsR_iVhcKHGv_SytUCQyGa7ss,786
|
|
63
|
-
iolanta/facets/textual_browser/page_switcher.py,sha256=
|
|
63
|
+
iolanta/facets/textual_browser/page_switcher.py,sha256=2hKDqygVRaf092V3X99gnGLIk044XKKKkA0sFttrc-I,10218
|
|
64
64
|
iolanta/facets/textual_class/__init__.py,sha256=tiL0p-3JspGcBRj4qa3rmoBFAuadk71l2ja2lJN6CEs,75
|
|
65
|
-
iolanta/facets/textual_class/facets.py,sha256=
|
|
65
|
+
iolanta/facets/textual_class/facets.py,sha256=MiGTapgt30ME2fapwdrD_yQj4mhkdmyMAjzxaoLW5Dk,6087
|
|
66
66
|
iolanta/facets/textual_class/sparql/instances.sparql,sha256=v0rHyr0Ha-ioZ2ssv0ytqeO8-Qt1xnX9FKfwSstttzI,230
|
|
67
|
+
iolanta/facets/textual_class/textual-class.yamlld,sha256=HBQCC3Kg41rFfPne9Gx1CXsQ3nQPXmwUXh9hr3AQU5A,586
|
|
67
68
|
iolanta/facets/textual_default/__init__.py,sha256=snxA0FEY9qfAxNv3MlZLrJsXugD4dvs5hLStZWV7soM,158
|
|
68
|
-
iolanta/facets/textual_default/facets.py,sha256=
|
|
69
|
-
iolanta/facets/textual_default/sparql/inverse-properties.sparql,sha256=
|
|
69
|
+
iolanta/facets/textual_default/facets.py,sha256=7rzF8jpu0TSX1uDTEUAKodST12Pd7bbDyDrt_Kk1u3g,5625
|
|
70
|
+
iolanta/facets/textual_default/sparql/inverse-properties.sparql,sha256=2m2q3C6jMQ_8o-0cPgIYrT77l6UnY3oqI37-Ed7p4-c,65
|
|
70
71
|
iolanta/facets/textual_default/sparql/label.sparql,sha256=IWAkkgMKtIZ7Zpg8LUJ5fDZ9tiI8fiRYZo-zT61Fong,121
|
|
71
72
|
iolanta/facets/textual_default/sparql/nodes-for-property.sparql,sha256=J9vg0Pz2HXDlPCeZ6IS2C0wODrpYDuNeD6DYT6UdNsU,68
|
|
72
|
-
iolanta/facets/textual_default/sparql/properties.sparql,sha256=
|
|
73
|
+
iolanta/facets/textual_default/sparql/properties.sparql,sha256=fr33KZ4OiwR5PK5QVibcO5azkZYNC2Ollq2FXIb-TTc,334
|
|
73
74
|
iolanta/facets/textual_default/tcss/default.tcss,sha256=v6k6LvZMndRW4t9Iq-7QF59U_LJTdohRsyavwTY5ruI,69
|
|
74
75
|
iolanta/facets/textual_default/templates/default.md,sha256=CuD5lISsE2eAVnm2z6kfNff-vEgrNG95Wi5LTgkieWY,21
|
|
75
76
|
iolanta/facets/textual_default/triple_uri_ref.py,sha256=XfuNPaAe-YxH8IyrdrHQ641aWh5zVMVs0L0WC3D6A4M,1279
|
|
76
|
-
iolanta/facets/textual_default/widgets.py,sha256=
|
|
77
|
+
iolanta/facets/textual_default/widgets.py,sha256=uusHQzIERESBEyYI0k0bnYirLVZvFtsxikonh195bjw,9362
|
|
77
78
|
iolanta/facets/textual_graph/__init__.py,sha256=DWd2gljzL8SiyYKQdBH78HouF1EMqgCH-w0K5OEmL2I,59
|
|
78
79
|
iolanta/facets/textual_graph/facets.py,sha256=ed6zt7DnAlwWkOB2D3MDQrtKB3tNiegPpZbRKIoz5Zg,876
|
|
79
80
|
iolanta/facets/textual_graph/sparql/triples.sparql,sha256=5rFVGcvZzEHZj2opQQp0YlxJLpEdl-r1RjkPwo8j7t0,145
|
|
@@ -106,13 +107,13 @@ iolanta/facets/title/sparql/title.sparql,sha256=VKHeE9NvV6sFgVGvsLQD9z__J4APj8TD
|
|
|
106
107
|
iolanta/facets/wikibase_statement_title/__init__.py,sha256=_yk1akxgSJOiUBJIc8QGrD2vovvmx_iw_vJDuv1rD7M,91
|
|
107
108
|
iolanta/facets/wikibase_statement_title/facets.py,sha256=gNRqiwOTMxyyHYvb_vIrfd-4ipb8wfyJ4GgPcQdyy9E,726
|
|
108
109
|
iolanta/facets/wikibase_statement_title/sparql/statement-title.sparql,sha256=n07DQWxKqB5c3CA4kacq2HSN0R0dLgnMnLP1AxMo5YA,320
|
|
109
|
-
iolanta/iolanta.py,sha256=
|
|
110
|
+
iolanta/iolanta.py,sha256=7w1Hcq8O1unNs6fmMqOD94kdLWd4XlRISEDiEukJ33c,10127
|
|
110
111
|
iolanta/labeled_triple_set/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
111
|
-
iolanta/labeled_triple_set/data/labeled_triple_set.yamlld,sha256=
|
|
112
|
+
iolanta/labeled_triple_set/data/labeled_triple_set.yamlld,sha256=P3oAPSPsirpbcRXej-VekuYFTpWqrkysYsxghZc3bTk,1008
|
|
112
113
|
iolanta/labeled_triple_set/labeled_triple_set.py,sha256=o4IgvTvPd0mzBtpgHYd4n1xpujYdAvWBr6gIYwp5vnA,4061
|
|
113
114
|
iolanta/labeled_triple_set/sparql/triples.sparql,sha256=VsCmYN5AX7jSIiFm-SqLcRcOvUVj8yyZI4PSzKROtQw,82
|
|
114
115
|
iolanta/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
115
|
-
iolanta/mcp/cli.py,sha256=
|
|
116
|
+
iolanta/mcp/cli.py,sha256=wmtJgeTijIoDe0C-3uGekVfYlhj2jqL30p_u_NuJzR0,1116
|
|
116
117
|
iolanta/mcp/prompts/nanopublication_assertion_authoring_rules.md,sha256=Z5YL9YwcLHCqA4zQK2ziSQYgyR4SlhUO9LV_zHGf0JQ,2643
|
|
117
118
|
iolanta/mcp/prompts/rules.md,sha256=LddpoNfUACfvWBNJ_ArAyJfP2zlQstlXS2QA6GCl9QI,4651
|
|
118
119
|
iolanta/mermaid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -123,7 +124,7 @@ iolanta/mermaid/sparql/ask-has-triples.sparql,sha256=mOYJ_rutEG_15PKTCHSv2GqzbkA
|
|
|
123
124
|
iolanta/mermaid/sparql/graph.sparql,sha256=mDGf05od3CUFhzI6rcqt5ZMVy-gSKDu-WxmV_zpIsVI,62
|
|
124
125
|
iolanta/mermaid/sparql/subgraphs.sparql,sha256=VuoOYr_ZtKXXRrBpAEJek0mBRzR9EV-KnKENgAbkzCs,71
|
|
125
126
|
iolanta/models.py,sha256=2VrJGQE1YXbbVB1K5McCXe2CLAlzOUhA8FvbRI10nCc,3131
|
|
126
|
-
iolanta/namespaces.py,sha256=
|
|
127
|
+
iolanta/namespaces.py,sha256=S4fSjWrL33jylItDf6y2_CIJ4B-RQXDhBsZkB-SV9mw,1107
|
|
127
128
|
iolanta/node_to_qname.py,sha256=a82_qpgT87cbekY_76tTkl4Z-6Rz6am4UGIQChUf9Y0,794
|
|
128
129
|
iolanta/parse_quads.py,sha256=X-3hQAFzRD9U8KCuZMQTVOAapJR4OHkPoRbgJYiVbnk,4539
|
|
129
130
|
iolanta/plugin.py,sha256=MSxpuOIx93AgBahfS8bYh31MEgcwtUSQhj4Js7fgdSI,1096
|
|
@@ -138,12 +139,12 @@ iolanta/sparqlspace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
|
|
|
138
139
|
iolanta/sparqlspace/cli.py,sha256=pb6q03lzrU8OaZ4A3QAQEmaFYcQ_-sHUrPhRs6GE88w,1590
|
|
139
140
|
iolanta/sparqlspace/inference/wikidata-prop-label.sparql,sha256=JYLAs28Z3a77cMcv44aZplwwrdqB-yshZn1dDZmRFAU,250
|
|
140
141
|
iolanta/sparqlspace/inference/wikidata-statement-label.sparql,sha256=_Dp9jKCpCp2pLk0uacNUhUvvQ2Hov-WiMFprtuYTRyY,759
|
|
141
|
-
iolanta/sparqlspace/processor.py,sha256=
|
|
142
|
+
iolanta/sparqlspace/processor.py,sha256=PJ5j3EU8jdYqoxO_Xhh-Z_uvODhT5wcCm82XnnykrYQ,25132
|
|
142
143
|
iolanta/sparqlspace/sparqlspace.py,sha256=Y8_ZPXwuGEXbEes6XQjaQWA2Zv9y8SWxMPDFdqVBGFo,796
|
|
143
144
|
iolanta/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
144
145
|
iolanta/widgets/description.py,sha256=98Qd3FwT9r8sYqKjl9ZEptaVX9jJ2ULWf0uy3j52p5o,800
|
|
145
146
|
iolanta/widgets/mixin.py,sha256=nDRCOc-gizCf1a5DAcYs4hW8eZEd6pHBPFsfm0ncv7E,251
|
|
146
|
-
iolanta-2.1.
|
|
147
|
-
iolanta-2.1.
|
|
148
|
-
iolanta-2.1.
|
|
149
|
-
iolanta-2.1.
|
|
147
|
+
iolanta-2.1.9.dist-info/METADATA,sha256=VdD0R_nL0cepcuhxXj3mRMTPvRAZwE4FW-mYjnFgcmY,2316
|
|
148
|
+
iolanta-2.1.9.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
149
|
+
iolanta-2.1.9.dist-info/entry_points.txt,sha256=Vu0W4D6H74HsTICvD8CDB1wYs6XNSyu55EZVXMo4H84,1718
|
|
150
|
+
iolanta-2.1.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|