iolanta 2.1.6__tar.gz → 2.1.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 (151) hide show
  1. {iolanta-2.1.6 → iolanta-2.1.8}/PKG-INFO +4 -3
  2. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/main.py +1 -1
  3. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/data/context.yaml +7 -7
  4. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/data/iolanta.yaml +2 -2
  5. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/data/textual-browser.yaml +7 -27
  6. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/declension/data/declension.yamlld +7 -7
  7. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/facet.py +4 -0
  8. iolanta-2.1.8/iolanta/facets/mkdocs_material_insiders_markdown/__init__.py +6 -0
  9. iolanta-2.1.8/iolanta/facets/mkdocs_material_insiders_markdown/data/mkdocs_material_insiders_markdown.yamlld +20 -0
  10. iolanta-2.1.8/iolanta/facets/mkdocs_material_insiders_markdown/facet.py +86 -0
  11. iolanta-2.1.8/iolanta/facets/mkdocs_material_insiders_markdown/templates/datatype.jinja2.md +24 -0
  12. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/location.py +3 -1
  13. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/page_switcher.py +10 -0
  14. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_class/facets.py +3 -0
  15. iolanta-2.1.8/iolanta/facets/textual_class/textual-class.yamlld +25 -0
  16. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/facets.py +50 -15
  17. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/sparql/inverse-properties.sparql +1 -1
  18. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/sparql/properties.sparql +2 -2
  19. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/widgets.py +14 -6
  20. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/iolanta.py +4 -41
  21. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/labeled_triple_set/data/labeled_triple_set.yamlld +7 -7
  22. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mcp/cli.py +3 -2
  23. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/models.py +0 -3
  24. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/namespaces.py +2 -2
  25. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/parse_quads.py +2 -2
  26. iolanta-2.1.8/iolanta/sparqlspace/inference/wikidata-prop-label.sparql +10 -0
  27. iolanta-2.1.8/iolanta/sparqlspace/inference/wikidata-statement-label.sparql +27 -0
  28. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/sparqlspace/processor.py +78 -76
  29. {iolanta-2.1.6 → iolanta-2.1.8}/pyproject.toml +3 -4
  30. iolanta-2.1.6/iolanta/sparqlspace/inference/wikibase-claim.sparql +0 -9
  31. iolanta-2.1.6/iolanta/sparqlspace/inference/wikibase-statement-property.sparql +0 -9
  32. {iolanta-2.1.6 → iolanta-2.1.8}/README.md +0 -0
  33. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/__init__.py +0 -0
  34. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/base_plugin.py +0 -0
  35. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/__init__.py +0 -0
  36. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/formatters/__init__.py +0 -0
  37. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/formatters/choose.py +0 -0
  38. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/formatters/csv.py +0 -0
  39. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/formatters/json.py +0 -0
  40. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/formatters/pretty.py +0 -0
  41. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/models.py +0 -0
  42. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/cli/pretty_print.py +0 -0
  43. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/context.py +0 -0
  44. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/conversions.py +0 -0
  45. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/data/graph-triples.yamlld +0 -0
  46. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/declension/__init__.py +0 -0
  47. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/declension/facet.py +0 -0
  48. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/declension/sparql/declension.sparql +0 -0
  49. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/ensure_is_context.py +0 -0
  50. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/entry_points.py +0 -0
  51. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/errors.py +0 -0
  52. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/__init__.py +0 -0
  53. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/__init__.py +0 -0
  54. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/base.py +0 -0
  55. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/default.py +0 -0
  56. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/record.py +0 -0
  57. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/sparql/link.sparql +0 -0
  58. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/cli/sparql/record.sparql +0 -0
  59. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/errors.py +0 -0
  60. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/foaf_person_title/__init__.py +0 -0
  61. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/foaf_person_title/facet.py +0 -0
  62. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/foaf_person_title/sparql/names.sparql +0 -0
  63. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/generic/__init__.py +0 -0
  64. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/generic/bool_literal.py +0 -0
  65. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/generic/date_literal.py +0 -0
  66. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/generic/default.py +0 -0
  67. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/generic/sparql/default.sparql +0 -0
  68. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/html/__init__.py +0 -0
  69. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/html/base.py +0 -0
  70. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/html/code_literal.py +0 -0
  71. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/html/default.py +0 -0
  72. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/icon.py +0 -0
  73. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/locator/sparql/get-query-to-facet.sparql +0 -0
  74. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/locator.py +0 -0
  75. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/page_title.py +0 -0
  76. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/qname.py +0 -0
  77. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/__init__.py +0 -0
  78. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/app.py +0 -0
  79. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/facet.py +0 -0
  80. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/history.py +0 -0
  81. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/home.py +0 -0
  82. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/models.py +0 -0
  83. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_browser/page.py +0 -0
  84. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_class/__init__.py +0 -0
  85. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_class/sparql/instances.sparql +0 -0
  86. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/__init__.py +0 -0
  87. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/sparql/label.sparql +0 -0
  88. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/sparql/nodes-for-property.sparql +0 -0
  89. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/tcss/default.tcss +0 -0
  90. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/templates/default.md +0 -0
  91. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_default/triple_uri_ref.py +0 -0
  92. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graph/__init__.py +0 -0
  93. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graph/facets.py +0 -0
  94. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graph/sparql/triples.sparql +0 -0
  95. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graph_triples.py +0 -0
  96. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graphs/__init__.py +0 -0
  97. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graphs/data/textual_graphs.yamlld +0 -0
  98. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graphs/facets.py +0 -0
  99. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_graphs/sparql/graphs.sparql +0 -0
  100. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_link/__init__.py +0 -0
  101. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_link/facet.py +0 -0
  102. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/__init__.py +0 -0
  103. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/facet.py +0 -0
  104. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/models.py +0 -0
  105. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/nanopublication_widget.py +0 -0
  106. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/term_list_widget.py +0 -0
  107. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_nanopublication/term_widget.py +0 -0
  108. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_no_facet_found.py +0 -0
  109. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_ontology/__init__.py +0 -0
  110. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_ontology/facets.py +0 -0
  111. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_ontology/sparql/terms.sparql +0 -0
  112. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_ontology/sparql/visualization-vocab.sparql +0 -0
  113. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_property_pairs_table.py +0 -0
  114. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_provenance/__init__.py +0 -0
  115. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_provenance/facets.py +0 -0
  116. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_provenance/sparql/graphs.sparql +0 -0
  117. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/textual_provenance/sparql/triples.sparql +0 -0
  118. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/title/__init__.py +0 -0
  119. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/title/facets.py +0 -0
  120. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/title/sparql/title.sparql +0 -0
  121. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/wikibase_statement_title/__init__.py +0 -0
  122. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/wikibase_statement_title/facets.py +0 -0
  123. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/facets/wikibase_statement_title/sparql/statement-title.sparql +0 -0
  124. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/labeled_triple_set/__init__.py +0 -0
  125. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/labeled_triple_set/labeled_triple_set.py +0 -0
  126. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/labeled_triple_set/sparql/triples.sparql +0 -0
  127. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mcp/__init__.py +0 -0
  128. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mcp/prompts/nanopublication_assertion_authoring_rules.md +0 -0
  129. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mcp/prompts/rules.md +0 -0
  130. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/__init__.py +0 -0
  131. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/facet.py +0 -0
  132. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/mermaid.yamlld +0 -0
  133. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/models.py +0 -0
  134. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/sparql/ask-has-triples.sparql +0 -0
  135. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/sparql/graph.sparql +0 -0
  136. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/mermaid/sparql/subgraphs.sparql +0 -0
  137. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/node_to_qname.py +0 -0
  138. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/plugin.py +0 -0
  139. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/query_result.py +0 -0
  140. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/reformat_blank_nodes.py +0 -0
  141. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/resolvers/__init__.py +0 -0
  142. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/resolvers/base.py +0 -0
  143. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/resolvers/dispatch.py +0 -0
  144. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/resolvers/pypi.py +0 -0
  145. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/resolvers/python_import.py +0 -0
  146. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/sparqlspace/__init__.py +0 -0
  147. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/sparqlspace/cli.py +0 -0
  148. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/sparqlspace/sparqlspace.py +0 -0
  149. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/widgets/__init__.py +0 -0
  150. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/widgets/description.py +0 -0
  151. {iolanta-2.1.6 → iolanta-2.1.8}/iolanta/widgets/mixin.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: iolanta
3
- Version: 2.1.6
3
+ Version: 2.1.8
4
4
  Summary: Semantic Web browser
5
5
  License: MIT
6
6
  Author: Anatoly Scherbakov
@@ -10,6 +10,7 @@ Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.12
12
12
  Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Programming Language :: Python :: 3.14
13
14
  Provides-Extra: all
14
15
  Requires-Dist: boltons (>=24.0.0)
15
16
  Requires-Dist: classes (>=0.4.0)
@@ -33,7 +34,7 @@ Requires-Dist: rich (>=13.3.1)
33
34
  Requires-Dist: textual (>=0.83.0)
34
35
  Requires-Dist: typer (>=0.9.0)
35
36
  Requires-Dist: watchfiles (>=1.0.4)
36
- Requires-Dist: yaml-ld (>=1.1.14,<2.0.0)
37
+ Requires-Dist: yaml-ld (>=1.1.15)
37
38
  Requires-Dist: yarl (>=1.9.4)
38
39
  Description-Content-Type: text/markdown
39
40
 
@@ -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, Context
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
@@ -1,13 +1,13 @@
1
1
  "@context":
2
- rdfs: "https://www.w3.org/2000/01/rdf-schema#"
3
- rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
2
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
3
+ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
4
4
  iolanta: https://iolanta.tech/
5
- owl: https://www.w3.org/2002/07/owl#
5
+ owl: http://www.w3.org/2002/07/owl#
6
6
  schema: https://schema.org/
7
- xsd: https://www.w3.org/2001/XMLSchema#
8
- skos: https://www.w3.org/2004/02/skos/core#
9
- foaf: https://xmlns.com/foaf/0.1/
10
- vann: https://purl.org/vocab/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:"
@@ -4,8 +4,8 @@
4
4
  foaf: https://xmlns.com/foaf/0.1/
5
5
  owl: https://www.w3.org/2002/07/owl#
6
6
  iolanta: https://iolanta.tech/
7
- rdfs: "https://www.w3.org/2000/01/rdf-schema#"
8
- rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
7
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
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: https://purl.org/vocab/vann/
4
- foaf: https://xmlns.com/foaf/0.1/
5
- owl: https://www.w3.org/2002/07/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
- rdfs: "https://www.w3.org/2000/01/rdf-schema#"
8
- rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
7
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
8
+ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
9
9
  np: https://www.nanopub.org/nschema#
10
- dcterms: https://purl.org/dc/terms/
11
- xsd: https://www.w3.org/2001/XMLSchema#
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,21 +88,6 @@
88
88
  iolanta:hasDefaultFacet:
89
89
  $id: pkg:pypi/iolanta#textual-link
90
90
 
91
- - $id: https://wikiba.se/ontology#Statement
92
- iolanta:hasInstanceFacet:
93
- $id: pkg:pypi/iolanta#wikibase-statement-title
94
- $: Title
95
- →: https://iolanta.tech/datatypes/title
96
-
97
- - $id: rdfs:Class
98
- iolanta:hasInstanceFacet:
99
- $id: pkg:pypi/iolanta#textual-class
100
- $: Instances
101
- →: https://iolanta.tech/cli/textual
102
- ⪯:
103
- - pkg:pypi/iolanta#textual-browser
104
- - pkg:pypi/iolanta#textual-inverse-properties
105
-
106
91
  - $id: owl:Ontology
107
92
  iolanta:hasInstanceFacet:
108
93
  $id: pkg:pypi/iolanta#textual-ontology
@@ -125,10 +110,5 @@
125
110
  →: https://iolanta.tech/cli/textual
126
111
  ↦: ASK WHERE { ?subject $this ?object }
127
112
 
128
- - $id: pkg:pypi/iolanta#textual-class
129
- ↦:
130
- - ASK WHERE { ?instance a $this }
131
- - ASK WHERE { $this rdfs:subClassOf ?superclass }
132
-
133
113
  - $id: https://iolanta.tech/cli/textual
134
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: https://purl.org/vocab/vann/
4
- foaf: https://xmlns.com/foaf/0.1/
5
- owl: https://www.w3.org/2002/07/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
- rdfs: "https://www.w3.org/2000/01/rdf-schema#"
8
- rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
9
- dcterms: https://purl.org/dc/terms/
10
- dcam: https://purl.org/dc/dcam/
7
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
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"
@@ -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."""
@@ -0,0 +1,6 @@
1
+ from iolanta.facets.mkdocs_material_insiders_markdown.facet import (
2
+ MkDocsMaterialInsidersMarkdownFacet,
3
+ )
4
+
5
+ __all__ = ['MkDocsMaterialInsidersMarkdownFacet']
6
+
@@ -0,0 +1,20 @@
1
+ "@context":
2
+ "@import": https://json-ld.org/contexts/dollar-convenience.jsonld
3
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
4
+ rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns#
5
+ iolanta: https://iolanta.tech/
6
+
7
+ $: rdfs:label
8
+
9
+ →:
10
+ "@type": "@id"
11
+ "@id": iolanta:outputs
12
+
13
+ ↦: iolanta:matches
14
+
15
+ $id: pkg:pypi/iolanta#mkdocs-material-insiders-markdown-datatype
16
+ $: OutputDatatype (mkdocs-material-insiders-markdown)
17
+
18
+ →: https://iolanta.tech/datatypes/mkdocs-material-insiders-markdown
19
+
20
+ ↦: ASK WHERE { $this a iolanta:OutputDatatype }
@@ -0,0 +1,86 @@
1
+ from pathlib import Path
2
+
3
+ from jinja2 import Environment, FileSystemLoader
4
+ from rdflib import URIRef
5
+
6
+ from iolanta.facets.facet import Facet
7
+ from iolanta.namespaces import DATATYPES, IOLANTA, RDF, RDFS
8
+
9
+
10
+ class MkDocsMaterialInsidersMarkdownFacet(Facet[str]):
11
+ """Render rdfs:Datatype nodes as mkdocs-material-insiders-markdown."""
12
+
13
+ META = Path(__file__).parent / 'data' / 'mkdocs_material_insiders_markdown.yamlld'
14
+ """Render rdfs:Datatype nodes as mkdocs-material-insiders-markdown."""
15
+
16
+ @property
17
+ def _template_env(self) -> Environment:
18
+ """Jinja2 template environment."""
19
+ template_path = Path(__file__).parent / 'templates'
20
+ return Environment(
21
+ loader=FileSystemLoader(str(template_path)),
22
+ autoescape=False,
23
+ )
24
+
25
+ def show(self) -> str:
26
+ """Render the datatype as markdown."""
27
+ # Get the label using title facet
28
+ label = self.render(
29
+ self.this,
30
+ as_datatype=DATATYPES.title,
31
+ )
32
+
33
+ # Get the comment/description
34
+ comment_rows = self.query(
35
+ """
36
+ SELECT ?comment WHERE {
37
+ $this rdfs:comment ?comment .
38
+ }
39
+ LIMIT 1
40
+ """,
41
+ this=self.this,
42
+ )
43
+ comment = str(comment_rows[0]['comment']) if comment_rows else None
44
+
45
+ # Get all types (rdf:type)
46
+ type_rows = self.query(
47
+ """
48
+ SELECT ?type WHERE {
49
+ $this rdf:type ?type .
50
+ }
51
+ """,
52
+ this=self.this,
53
+ )
54
+ types = [
55
+ {
56
+ 'uri': row['type'],
57
+ 'title': self.render(row['type'], as_datatype=DATATYPES.title),
58
+ }
59
+ for row in type_rows
60
+ ]
61
+
62
+ # Get all superclasses (rdfs:subClassOf)
63
+ superclass_rows = self.query(
64
+ """
65
+ SELECT ?superclass WHERE {
66
+ $this rdfs:subClassOf ?superclass .
67
+ }
68
+ """,
69
+ this=self.this,
70
+ )
71
+ superclasses = [
72
+ {
73
+ 'uri': row['superclass'],
74
+ 'title': self.render(row['superclass'], as_datatype=DATATYPES.title),
75
+ }
76
+ for row in superclass_rows
77
+ ]
78
+
79
+ template = self._template_env.get_template('datatype.jinja2.md')
80
+ return template.render(
81
+ label=label,
82
+ comment=comment,
83
+ types=types,
84
+ superclasses=superclasses,
85
+ )
86
+
@@ -0,0 +1,24 @@
1
+ # {{ label }}
2
+
3
+ <table>
4
+ <thead>
5
+ </thead>
6
+ <tbody>
7
+ {% if types %}
8
+ <tr>
9
+ <td>∈ Instance Of</td>
10
+ <td>{% for type in types %}<code><a href="{{ type.uri }}">{{ type.title }}</a></code>{% if not loop.last %}, {% endif %}{% endfor %}</td>
11
+ </tr>
12
+ {% endif %}
13
+ {% if superclasses %}
14
+ <tr>
15
+ <td>⊊ Subclass Of</td>
16
+ <td>{% for superclass in superclasses %}<code><a href="{{ superclass.uri }}">{{ superclass.title }}</a></code>{% if not loop.last %}, {% endif %}{% endfor %}</td>
17
+ </tr>
18
+ {% endif %}
19
+ </tbody>
20
+ </table>
21
+
22
+ {% if comment %}
23
+ {{ comment | safe }}
24
+ {% endif %}
@@ -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: str
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
- iri=self.this,
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
- yield PropertyRow(
79
- property_name,
80
- PropertyValues(*property_values),
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 VerticalScroll(
152
- PageTitle(self.this, extra='[i]& its inverse RDF properties[/i]'),
153
- Static(self.description or ''),
154
- self.properties,
185
+ return Vertical(
186
+ VerticalScroll(
187
+ self.properties,
188
+ ),
189
+ PageFooter(self.this, extra='[i]& its inverse RDF properties[/i]'),
155
190
  )
@@ -1,3 +1,3 @@
1
1
  SELECT ?object ?property WHERE {
2
- ?object ?property $iri .
2
+ ?object ?property $this .
3
3
  }
@@ -1,9 +1,9 @@
1
1
  SELECT ?property ?object WHERE {
2
- $iri ?property ?object .
2
+ $this ?property ?object .
3
3
 
4
4
  # Exclude non-informative tautologies.
5
5
  FILTER (!(
6
- ?object = $iri
6
+ ?object = $this
7
7
  && ?property IN (
8
8
  owl:sameAs,
9
9
  owl:equivalentClass,
@@ -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
- return self.app.iolanta.render(self.iri, DATATYPES.title)
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 = self.app.iolanta.render(
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."""
@@ -119,7 +119,7 @@ class Iolanta: # noqa: WPS214
119
119
  processor='sparqlspace',
120
120
  initBindings=kwargs,
121
121
  )
122
- except ParseException as err:
122
+ except SyntaxError as err:
123
123
  raise SPARQLParseException(
124
124
  error=err,
125
125
  query=query_text,
@@ -171,8 +171,9 @@ class Iolanta: # noqa: WPS214
171
171
  self.logger.error(f'{source} | {parser_not_found}')
172
172
  continue
173
173
  except YAMLLDError as yaml_ld_error:
174
- self.logger.error(f'{source} | {yaml_ld_error}')
175
- continue
174
+ # .add() only processes local files, so errors should be raised
175
+ self.logger.error(f'{source_file} | {yaml_ld_error}')
176
+ raise
176
177
  except ValueError as value_error:
177
178
  self.logger.error(f'{source} | {value_error}')
178
179
  continue
@@ -307,44 +308,6 @@ class Iolanta: # noqa: WPS214
307
308
  error=err,
308
309
  ) from err
309
310
 
310
- def render_all(
311
- self,
312
- node: Node,
313
- as_datatype: NotLiteralNode,
314
- ) -> Iterable[Any]:
315
- """Find all possible Iolanta facets for a node and render them."""
316
- choices = list(
317
- FacetFinder(
318
- iolanta=self,
319
- node=node,
320
- as_datatype=as_datatype,
321
- ).choices(),
322
- )
323
-
324
- pairs = [
325
- (self.facet_resolver[row['facet']], row['output_datatype'])
326
- for row in choices
327
- ]
328
-
329
- facet_instances = [
330
- facet_class(
331
- this=node,
332
- iolanta=self,
333
- as_datatype=output_datatype,
334
- )
335
- for facet_class, output_datatype in pairs
336
- ]
337
-
338
- for facet in facet_instances:
339
- try:
340
- yield facet.show()
341
- except Exception as err:
342
- raise FacetError(
343
- node=node,
344
- facet_iri=None,
345
- error=err,
346
- ) from err
347
-
348
311
  def node_as_qname(self, node: Node):
349
312
  """Render node as a QName if possible."""
350
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: https://purl.org/vocab/vann/
4
- foaf: https://xmlns.com/foaf/0.1/
5
- owl: https://www.w3.org/2002/07/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
- rdfs: "https://www.w3.org/2000/01/rdf-schema#"
8
- rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
9
- dcterms: https://purl.org/dc/terms/
10
- dcam: https://purl.org/dc/dcam/
7
+ rdfs: "http://www.w3.org/2000/01/rdf-schema#"
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"
@@ -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)