iolanta 2.0.7__tar.gz → 2.0.8__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.
Files changed (120) hide show
  1. {iolanta-2.0.7 → iolanta-2.0.8}/PKG-INFO +2 -2
  2. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/widgets.py +1 -1
  3. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/title/facets.py +1 -0
  4. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/title/sparql/title.sparql +6 -1
  5. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/parse_quads.py +2 -1
  6. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/processor.py +27 -4
  7. {iolanta-2.0.7 → iolanta-2.0.8}/pyproject.toml +2 -2
  8. {iolanta-2.0.7 → iolanta-2.0.8}/README.md +0 -0
  9. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/__init__.py +0 -0
  10. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/base_plugin.py +0 -0
  11. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/__init__.py +0 -0
  12. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/formatters/__init__.py +0 -0
  13. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/formatters/choose.py +0 -0
  14. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/formatters/csv.py +0 -0
  15. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/formatters/json.py +0 -0
  16. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/formatters/pretty.py +0 -0
  17. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/main.py +0 -0
  18. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/models.py +0 -0
  19. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/cli/pretty_print.py +0 -0
  20. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/context.py +0 -0
  21. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/conversions.py +0 -0
  22. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/cli.yaml +0 -0
  23. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/context.yaml +0 -0
  24. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/graph-triples.yamlld +0 -0
  25. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/html.yaml +0 -0
  26. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/iolanta.yaml +0 -0
  27. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/data/textual-browser.yaml +0 -0
  28. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/ensure_is_context.py +0 -0
  29. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/entry_points.py +0 -0
  30. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/errors.py +0 -0
  31. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/__init__.py +0 -0
  32. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/__init__.py +0 -0
  33. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/base.py +0 -0
  34. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/default.py +0 -0
  35. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/record.py +0 -0
  36. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/sparql/link.sparql +0 -0
  37. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/cli/sparql/record.sparql +0 -0
  38. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/errors.py +0 -0
  39. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/facet.py +0 -0
  40. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/foaf_person_title/__init__.py +0 -0
  41. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/foaf_person_title/facet.py +0 -0
  42. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/foaf_person_title/sparql/names.sparql +0 -0
  43. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/generic/__init__.py +0 -0
  44. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/generic/bool_literal.py +0 -0
  45. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/generic/date_literal.py +0 -0
  46. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/generic/default.py +0 -0
  47. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/generic/sparql/default.sparql +0 -0
  48. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/html/__init__.py +0 -0
  49. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/html/base.py +0 -0
  50. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/html/code_literal.py +0 -0
  51. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/html/default.py +0 -0
  52. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/icon.py +0 -0
  53. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/locator.py +0 -0
  54. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/page_title.py +0 -0
  55. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/qname.py +0 -0
  56. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/__init__.py +0 -0
  57. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/app.py +0 -0
  58. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/facet.py +0 -0
  59. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/history.py +0 -0
  60. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/home.py +0 -0
  61. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/location.py +0 -0
  62. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/models.py +0 -0
  63. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/page.py +0 -0
  64. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_browser/page_switcher.py +0 -0
  65. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_class/__init__.py +0 -0
  66. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_class/facets.py +0 -0
  67. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_class/sparql/instances.sparql +0 -0
  68. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/__init__.py +0 -0
  69. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/facets.py +0 -0
  70. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/sparql/inverse-properties.sparql +0 -0
  71. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/sparql/label.sparql +0 -0
  72. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/sparql/nodes-for-property.sparql +0 -0
  73. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/sparql/properties.sparql +0 -0
  74. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/tcss/default.tcss +0 -0
  75. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/templates/default.md +0 -0
  76. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_default/triple_uri_ref.py +0 -0
  77. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_graph/__init__.py +0 -0
  78. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_graph/facets.py +0 -0
  79. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_graph/sparql/triples.sparql +0 -0
  80. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_graph_triples.py +0 -0
  81. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_link/__init__.py +0 -0
  82. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_link/facet.py +0 -0
  83. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/__init__.py +0 -0
  84. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/facet.py +0 -0
  85. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/models.py +0 -0
  86. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/nanopublication_widget.py +0 -0
  87. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/term_list_widget.py +0 -0
  88. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_nanopublication/term_widget.py +0 -0
  89. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_no_facet_found.py +0 -0
  90. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_ontology/__init__.py +0 -0
  91. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_ontology/facets.py +0 -0
  92. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_ontology/sparql/terms.sparql +0 -0
  93. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_ontology/sparql/visualization-vocab.sparql +0 -0
  94. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_property_pairs_table.py +0 -0
  95. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_provenance/__init__.py +0 -0
  96. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_provenance/facets.py +0 -0
  97. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_provenance/sparql/graphs.sparql +0 -0
  98. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/textual_provenance/sparql/triples.sparql +0 -0
  99. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/title/__init__.py +0 -0
  100. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/wikibase_statement_title/__init__.py +0 -0
  101. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/wikibase_statement_title/facets.py +0 -0
  102. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/facets/wikibase_statement_title/sparql/statement-title.sparql +0 -0
  103. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/iolanta.py +0 -0
  104. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/models.py +0 -0
  105. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/namespaces.py +0 -0
  106. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/node_to_qname.py +0 -0
  107. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/plugin.py +0 -0
  108. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/query_result.py +0 -0
  109. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/reformat_blank_nodes.py +0 -0
  110. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/resolvers/__init__.py +0 -0
  111. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/resolvers/base.py +0 -0
  112. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/resolvers/python_import.py +0 -0
  113. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/__init__.py +0 -0
  114. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/cli.py +0 -0
  115. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/inference/wikibase-claim.sparql +0 -0
  116. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/inference/wikibase-statement-property.sparql +0 -0
  117. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/sparqlspace/sparqlspace.py +0 -0
  118. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/widgets/__init__.py +0 -0
  119. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/widgets/description.py +0 -0
  120. {iolanta-2.0.7 → iolanta-2.0.8}/iolanta/widgets/mixin.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: iolanta
3
- Version: 2.0.7
3
+ Version: 2.0.8
4
4
  Summary: Semantic Web browser
5
5
  License: MIT
6
6
  Author: Anatoly Scherbakov
@@ -32,7 +32,7 @@ Requires-Dist: rich (>=13.3.1)
32
32
  Requires-Dist: textual (>=0.83.0)
33
33
  Requires-Dist: typer (>=0.9.0)
34
34
  Requires-Dist: watchfiles (>=1.0.4,<2.0.0)
35
- Requires-Dist: yaml-ld (>=1.1.9)
35
+ Requires-Dist: yaml-ld (>=1.1.10)
36
36
  Requires-Dist: yarl (>=1.9.4)
37
37
  Description-Content-Type: text/markdown
38
38
 
@@ -291,7 +291,7 @@ class LiteralPropertyValue(Widget, can_focus=True, inherit_bindings=False):
291
291
  self.property_iri = property_iri
292
292
  super().__init__()
293
293
  self.renderable = Text( # noqa: WPS601
294
- str(property_value.value),
294
+ str(property_value),
295
295
  style='#696969',
296
296
  )
297
297
 
@@ -9,6 +9,7 @@ PRIORITIES = [ # noqa: WPS407
9
9
  'schema_name',
10
10
  'rdfs_label',
11
11
  'foaf_name',
12
+ 'literal_form',
12
13
  ]
13
14
 
14
15
 
@@ -23,4 +23,9 @@ SELECT * WHERE {
23
23
  $iri <https://xmlns.com/foaf/0.1/name> ?foaf_name .
24
24
  FILTER (!lang(?foaf_name) || lang(?foaf_name) = $language)
25
25
  }
26
- }
26
+
27
+ OPTIONAL {
28
+ $iri <https://www.w3.org/2008/05/skos-xl#literalForm> ?literal_form .
29
+ FILTER (!lang(?literal_form) || lang(?literal_form) = $language)
30
+ }
31
+ }
@@ -2,6 +2,7 @@ import dataclasses
2
2
  import hashlib
3
3
  from types import MappingProxyType
4
4
  from typing import Iterable, Optional
5
+ from urllib.parse import unquote
5
6
 
6
7
  from documented import DocumentedError
7
8
  from rdflib import BNode, Literal, URIRef
@@ -29,7 +30,7 @@ def parse_term( # noqa: C901
29
30
  term_value = term['value']
30
31
 
31
32
  if term_type == 'IRI':
32
- return URIRef(term_value)
33
+ return URIRef(unquote(term_value))
33
34
 
34
35
  if term_type == 'literal':
35
36
  language = term.get('language')
@@ -72,6 +72,10 @@ REDIRECTS = MappingProxyType({
72
72
  'https://nanopub.net/nschema#',
73
73
  ),
74
74
  URIRef(PROV): URIRef('https://www.w3.org/ns/prov-o'),
75
+
76
+ # Convert lexvo.org/id URLs to lexvo.org/data URLs
77
+ r'https://lexvo\.org/id/(.+)': r'http://lexvo.org/data/\1',
78
+ r'https://www\.lexinfo\.net/(.+)': r'http://www.lexinfo.net/\1',
75
79
  })
76
80
 
77
81
 
@@ -281,11 +285,30 @@ def _extract_nanopublication_uris(
281
285
  )
282
286
 
283
287
 
284
- def apply_redirect(source: URIRef) -> URIRef:
285
- """Rewrite the URL."""
288
+ def apply_redirect(source: URIRef) -> URIRef: # noqa: WPS210
289
+ """
290
+ Rewrite the URL using regex patterns and group substitutions.
291
+
292
+ For each pattern in REDIRECTS:
293
+ - If the pattern matches the source URI
294
+ - Replace the source with the destination, substituting any regex groups
295
+ """
296
+ source_str = str(source)
297
+
286
298
  for pattern, destination in REDIRECTS.items():
287
- if source.startswith(pattern):
288
- return destination
299
+ pattern_str = str(pattern)
300
+ destination_str = str(destination)
301
+
302
+ match = re.match(pattern_str, source_str)
303
+ if match:
304
+ # Replace any group references in the destination
305
+ # (like \1, \2, etc.)
306
+ redirected_uri = re.sub(
307
+ pattern_str,
308
+ destination_str,
309
+ source_str,
310
+ )
311
+ return URIRef(redirected_uri)
289
312
 
290
313
  return source
291
314
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "iolanta"
3
- version = "2.0.7"
3
+ version = "2.0.8"
4
4
  description = "Semantic Web browser"
5
5
  authors = ["Anatoly Scherbakov <altaisoft@gmail.com>"]
6
6
  license = "MIT"
@@ -23,7 +23,7 @@ rich = ">=13.3.1"
23
23
  textual = ">=0.83.0"
24
24
  yarl = ">=1.9.4"
25
25
  boltons = ">=24.0.0"
26
- yaml-ld = ">=1.1.9"
26
+ yaml-ld = ">=1.1.10"
27
27
  reasonable = ">=0.2.6"
28
28
  oxrdflib = ">=0.4.0"
29
29
  loguru = ">=0.7.3"
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