iolanta 1.2.5__tar.gz → 1.2.6__tar.gz
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-1.2.5 → iolanta-1.2.6}/PKG-INFO +3 -1
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cyberspace/processor.py +104 -7
- {iolanta-1.2.5 → iolanta-1.2.6}/pyproject.toml +3 -1
- {iolanta-1.2.5 → iolanta-1.2.6}/README.md +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/base_plugin.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/formatters/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/formatters/choose.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/formatters/csv.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/formatters/json.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/formatters/pretty.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/main.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/models.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cli/pretty_print.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/context.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/conversions.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cyberspace/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cyberspace/inference/wikibase-claim.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cyberspace/inference/wikibase-statement-property.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/cli.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/context.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/foaf-meta.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/html.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/iolanta.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/ontologies-meta.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/data/textual-browser.yaml +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/ensure_is_context.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/entry_points.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/errors.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/base.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/default.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/record.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/sparql/link.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/cli/sparql/record.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/errors.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/facet.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/foaf_person_title/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/foaf_person_title/facet.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/foaf_person_title/sparql/names.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/generic/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/generic/bool_literal.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/generic/date_literal.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/generic/default.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/generic/sparql/default.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/html/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/html/base.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/html/code_literal.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/html/default.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/icon.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/locator.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/page_title.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/qname.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/app.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/facet.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/history.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/home.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/location.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/models.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/page.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_browser/page_switcher.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_class/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_class/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_class/sparql/instances.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/inverse-properties.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/label.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/nodes-for-property.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/properties.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/tcss/default.tcss +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/templates/default.md +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/triple_uri_ref.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/widgets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_graph/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_graph/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_graph/sparql/triples.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_graph_triples.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_link/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_link/facet.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/facet.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/models.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/nanopublication_widget.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/term_list_widget.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/term_widget.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_ontology/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_ontology/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_ontology/sparql/terms.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_ontology/sparql/visualization-vocab.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_provenance/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_provenance/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_provenance/sparql/graphs.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_provenance/sparql/triples.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/title/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/title/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/title/sparql/title.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/wikibase_statement_title/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/wikibase_statement_title/facets.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/wikibase_statement_title/sparql/statement-title.sparql +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/iolanta.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/base.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/data_type_choice.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/dict_loader.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/errors.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/http.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/local_directory.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/local_file.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/loaders/scheme_choice.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/models.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/namespaces.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/node_to_qname.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parse_quads.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/base.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/dict_parser.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/errors.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/json.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/markdown.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/parsers/yaml.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/plugin.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/reformat_blank_nodes.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/resolvers/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/resolvers/base.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/resolvers/python_import.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/shortcuts.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/stack.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/widgets/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/iolanta/widgets/mixin.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/ldflex/__init__.py +0 -0
- {iolanta-1.2.5 → iolanta-1.2.6}/ldflex/ldflex.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: iolanta
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.6
|
|
4
4
|
Summary: Semantic Web browser
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: Anatoly Scherbakov
|
|
@@ -15,12 +15,14 @@ Provides-Extra: all
|
|
|
15
15
|
Requires-Dist: boltons (>=24.0.0)
|
|
16
16
|
Requires-Dist: classes (>=0.4.0)
|
|
17
17
|
Requires-Dist: deepmerge (>=0.1.1)
|
|
18
|
+
Requires-Dist: diskcache (>=5.6.3)
|
|
18
19
|
Requires-Dist: documented (>=0.1.1)
|
|
19
20
|
Requires-Dist: dominate (>=2.6.0)
|
|
20
21
|
Requires-Dist: funcy (>=2.0)
|
|
21
22
|
Requires-Dist: iolanta-tables (>=0.1.7,<0.2.0) ; extra == "all"
|
|
22
23
|
Requires-Dist: loguru (>=0.7.3)
|
|
23
24
|
Requires-Dist: more-itertools (>=9.0.0)
|
|
25
|
+
Requires-Dist: nanopub (>=2.0.1)
|
|
24
26
|
Requires-Dist: owlrl (>=6.0.2)
|
|
25
27
|
Requires-Dist: oxrdflib (>=0.4.0)
|
|
26
28
|
Requires-Dist: python-frontmatter (>=0.5.0)
|
|
@@ -8,14 +8,18 @@ from threading import Lock
|
|
|
8
8
|
from types import MappingProxyType
|
|
9
9
|
from typing import Any, Iterable, Mapping
|
|
10
10
|
|
|
11
|
+
import diskcache
|
|
11
12
|
import funcy
|
|
12
13
|
import loguru
|
|
14
|
+
import platformdirs
|
|
13
15
|
import reasonable
|
|
14
16
|
import yaml_ld
|
|
17
|
+
from nanopub import NanopubClient
|
|
15
18
|
from rdflib import ConjunctiveGraph, Namespace, URIRef, Variable
|
|
16
19
|
from rdflib.plugins.sparql.algebra import translateQuery
|
|
17
20
|
from rdflib.plugins.sparql.evaluate import evalQuery
|
|
18
21
|
from rdflib.plugins.sparql.parser import parseQuery
|
|
22
|
+
from rdflib.plugins.sparql.parserutils import CompValue
|
|
19
23
|
from rdflib.plugins.sparql.sparql import Query
|
|
20
24
|
from rdflib.query import Processor
|
|
21
25
|
from rdflib.term import BNode, Literal, Node
|
|
@@ -53,7 +57,7 @@ REDIRECTS = MappingProxyType({
|
|
|
53
57
|
# - either find a way to resolve these URLs automatically,
|
|
54
58
|
# - or create a repository of those redirects online.
|
|
55
59
|
'https://purl.org/vocab/vann/': URIRef(
|
|
56
|
-
'https://vocab.org/vann/vann-vocab-20100607.rdf'
|
|
60
|
+
'https://vocab.org/vann/vann-vocab-20100607.rdf',
|
|
57
61
|
),
|
|
58
62
|
URIRef(DC): URIRef(DCTERMS),
|
|
59
63
|
URIRef(RDF): URIRef(RDF),
|
|
@@ -69,6 +73,34 @@ REDIRECTS = MappingProxyType({
|
|
|
69
73
|
})
|
|
70
74
|
|
|
71
75
|
|
|
76
|
+
@diskcache.Cache(
|
|
77
|
+
directory=str(
|
|
78
|
+
platformdirs.user_cache_path(
|
|
79
|
+
appname='iolanta',
|
|
80
|
+
) / 'find_retractions_for',
|
|
81
|
+
),
|
|
82
|
+
).memoize(expire=datetime.timedelta(days=8).total_seconds())
|
|
83
|
+
def find_retractions_for(nanopublication: URIRef) -> set[URIRef]:
|
|
84
|
+
"""Find nanopublications that retract the given one."""
|
|
85
|
+
# See https://github.com/fair-workflows/nanopub/issues/168 for
|
|
86
|
+
# context of this dirty hack.
|
|
87
|
+
use_server = 'http://grlc.nanopubs.lod.labs.vu.nl/api/local/local/'
|
|
88
|
+
|
|
89
|
+
client = NanopubClient(
|
|
90
|
+
use_server=use_server,
|
|
91
|
+
)
|
|
92
|
+
client.grlc_urls = [use_server]
|
|
93
|
+
|
|
94
|
+
retractions = client.find_retractions_of(
|
|
95
|
+
str(nanopublication).replace(
|
|
96
|
+
'https://',
|
|
97
|
+
'http://',
|
|
98
|
+
),
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
return {URIRef(retraction) for retraction in retractions}
|
|
102
|
+
|
|
103
|
+
|
|
72
104
|
def _extract_from_mapping( # noqa: WPS213
|
|
73
105
|
algebra: Mapping[str, Any],
|
|
74
106
|
) -> Iterable[URIRef | Variable]:
|
|
@@ -188,15 +220,12 @@ def resolve_variables(
|
|
|
188
220
|
|
|
189
221
|
|
|
190
222
|
def extract_mentioned_urls_from_query(
|
|
191
|
-
query:
|
|
223
|
+
query: Query,
|
|
192
224
|
bindings: dict[str, Node],
|
|
193
225
|
base: str | None,
|
|
194
226
|
namespaces: dict[str, Namespace],
|
|
195
227
|
) -> tuple[Query, set[URIRef]]:
|
|
196
228
|
"""Extract URLs that a SPARQL query somehow mentions."""
|
|
197
|
-
parse_tree = parseQuery(query)
|
|
198
|
-
query = translateQuery(parse_tree, base, namespaces)
|
|
199
|
-
|
|
200
229
|
return query, set(
|
|
201
230
|
resolve_variables(
|
|
202
231
|
extract_mentioned_urls(query.algebra),
|
|
@@ -218,6 +247,35 @@ class Skipped:
|
|
|
218
247
|
LoadResult = Loaded | Skipped
|
|
219
248
|
|
|
220
249
|
|
|
250
|
+
def _extract_nanopublication_uris(
|
|
251
|
+
algebra: CompValue,
|
|
252
|
+
) -> Iterable[URIRef]:
|
|
253
|
+
"""Extract nanopublications to get retracting information for."""
|
|
254
|
+
match algebra.name:
|
|
255
|
+
case 'SelectQuery' | 'Project' | 'Distinct' | 'Graph':
|
|
256
|
+
yield from _extract_nanopublication_uris(algebra['p'])
|
|
257
|
+
|
|
258
|
+
case 'BGP':
|
|
259
|
+
for retractor, retracts, retractee in algebra['triples']:
|
|
260
|
+
if retracts == URIRef(
|
|
261
|
+
'https://purl.org/nanopub/x/retracts',
|
|
262
|
+
) and isinstance(retractor, Variable):
|
|
263
|
+
yield retractee
|
|
264
|
+
|
|
265
|
+
case 'LeftJoin' | 'Join':
|
|
266
|
+
yield from _extract_nanopublication_uris(algebra['p1'])
|
|
267
|
+
yield from _extract_nanopublication_uris(algebra['p2'])
|
|
268
|
+
|
|
269
|
+
case 'Filter' | 'OrderBy':
|
|
270
|
+
return
|
|
271
|
+
|
|
272
|
+
case unknown_name:
|
|
273
|
+
raise ValueError(
|
|
274
|
+
f'Unknown algebra name: {unknown_name}, '
|
|
275
|
+
f'content: {algebra}',
|
|
276
|
+
)
|
|
277
|
+
|
|
278
|
+
|
|
221
279
|
@dataclasses.dataclass(frozen=True)
|
|
222
280
|
class GlobalSPARQLProcessor(Processor): # noqa: WPS338, WPS214
|
|
223
281
|
"""
|
|
@@ -325,8 +383,18 @@ class GlobalSPARQLProcessor(Processor): # noqa: WPS338, WPS214
|
|
|
325
383
|
query = strOrQuery
|
|
326
384
|
|
|
327
385
|
else:
|
|
386
|
+
parse_tree = parseQuery(strOrQuery)
|
|
387
|
+
query = translateQuery(parse_tree, base, initNs)
|
|
388
|
+
|
|
389
|
+
self.load_retracting_nanopublications_by_query(
|
|
390
|
+
query=query,
|
|
391
|
+
bindings=initBindings,
|
|
392
|
+
base=base,
|
|
393
|
+
namespaces=initNs,
|
|
394
|
+
)
|
|
395
|
+
|
|
328
396
|
query, urls = extract_mentioned_urls_from_query(
|
|
329
|
-
query=
|
|
397
|
+
query=query,
|
|
330
398
|
bindings=initBindings,
|
|
331
399
|
base=base,
|
|
332
400
|
namespaces=initNs,
|
|
@@ -441,7 +509,7 @@ class GlobalSPARQLProcessor(Processor): # noqa: WPS338, WPS214
|
|
|
441
509
|
return Loaded()
|
|
442
510
|
|
|
443
511
|
except Exception as err:
|
|
444
|
-
self.logger.info('
|
|
512
|
+
self.logger.info(f'{source} | Failed: {err}')
|
|
445
513
|
|
|
446
514
|
self.graph.add((
|
|
447
515
|
source_uri,
|
|
@@ -573,3 +641,32 @@ class GlobalSPARQLProcessor(Processor): # noqa: WPS338, WPS214
|
|
|
573
641
|
)
|
|
574
642
|
|
|
575
643
|
return term
|
|
644
|
+
|
|
645
|
+
def load_retracting_nanopublications_by_query( # noqa: WPS231
|
|
646
|
+
self,
|
|
647
|
+
query: Query,
|
|
648
|
+
bindings: dict[str, Node],
|
|
649
|
+
base: str | None,
|
|
650
|
+
namespaces: dict[str, Namespace],
|
|
651
|
+
):
|
|
652
|
+
"""
|
|
653
|
+
If the query requires information about retracting nanopubs, load them.
|
|
654
|
+
|
|
655
|
+
FIXME: This function presently does nothing because `nanopub` library
|
|
656
|
+
has problems: https://github.com/fair-workflows/nanopub/issues/168
|
|
657
|
+
|
|
658
|
+
TODO: Generalize this mechanism to allow for plugins which analyze
|
|
659
|
+
SPARQL queries and load information into the graph based on their
|
|
660
|
+
content.
|
|
661
|
+
"""
|
|
662
|
+
nanopublications = list(
|
|
663
|
+
resolve_variables(
|
|
664
|
+
terms=_extract_nanopublication_uris(query.algebra),
|
|
665
|
+
bindings=bindings,
|
|
666
|
+
),
|
|
667
|
+
)
|
|
668
|
+
|
|
669
|
+
for nanopublication in nanopublications:
|
|
670
|
+
retractions = find_retractions_for(nanopublication)
|
|
671
|
+
for retraction in retractions:
|
|
672
|
+
self.load(retraction)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "iolanta"
|
|
3
|
-
version = "1.2.
|
|
3
|
+
version = "1.2.6"
|
|
4
4
|
description = "Semantic Web browser"
|
|
5
5
|
authors = ["Anatoly Scherbakov <altaisoft@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -33,6 +33,8 @@ yaml-ld = ">=1.1.3"
|
|
|
33
33
|
reasonable = ">=0.2.6"
|
|
34
34
|
oxrdflib = ">=0.4.0"
|
|
35
35
|
loguru = ">=0.7.3"
|
|
36
|
+
nanopub = ">=2.0.1"
|
|
37
|
+
diskcache = ">=5.6.3"
|
|
36
38
|
|
|
37
39
|
[tool.poetry.scripts]
|
|
38
40
|
iolanta = "iolanta.cli:app"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iolanta-1.2.5 → iolanta-1.2.6}/iolanta/cyberspace/inference/wikibase-statement-property.sparql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/inverse-properties.sparql
RENAMED
|
File without changes
|
|
File without changes
|
{iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_default/sparql/nodes-for-property.sparql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_nanopublication/nanopublication_widget.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{iolanta-1.2.5 → iolanta-1.2.6}/iolanta/facets/textual_ontology/sparql/visualization-vocab.sparql
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|