iolanta 2.1.12__py3-none-any.whl → 2.1.14__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.
@@ -3,55 +3,36 @@ from types import MappingProxyType
3
3
 
4
4
  from rdflib import URIRef
5
5
 
6
- from iolanta.namespaces import (
7
- DC,
8
- DCTERMS,
9
- FOAF,
10
- OWL,
11
- PROV,
12
- RDF,
13
- RDFS,
14
- VANN,
6
+ # All entries are (pattern, replacement) strings; pattern may be regex with $ for exact match.
7
+ REDIRECTS = MappingProxyType(
8
+ {
9
+ # FIXME This is presently hardcoded; we need to
10
+ # - either find a way to resolve these URLs automatically,
11
+ # - or create a repository of those redirects online.
12
+ r"http://purl\.org/vocab/vann/$": "https://vocab.org/vann/vann-vocab-20100607.rdf",
13
+ r"https://purl\.org/dc/elements/1\.1/$": "https://purl.org/dc/terms/",
14
+ r"http://www\.w3\.org/1999/02/22-rdf-syntax-ns#$": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
15
+ r"http://www\.w3\.org/2000/01/rdf-schema#$": "http://www.w3.org/2000/01/rdf-schema#",
16
+ r"http://www\.w3\.org/2002/07/owl#$": "http://www.w3.org/2002/07/owl#",
17
+ # Add # fragment to OWL and RDFS when URI has no fragment (pattern $ = no fragment)
18
+ # (fixes bug reported at https://stackoverflow.com/q/78934864/1245471)
19
+ r"http://www\.w3\.org/2002/07/owl$": "http://www.w3.org/2002/07/owl#",
20
+ r"http://www\.w3\.org/2000/01/rdf-schema$": "http://www.w3.org/2000/01/rdf-schema#",
21
+ # Redirect FOAF namespace to GitHub mirror
22
+ r"https?://xmlns\.com/foaf/0\.1/.+": "https://raw.githubusercontent.com/foaf/foaf/refs/heads/master/xmlns.com/htdocs/foaf/0.1/index.rdf",
23
+ r"https://www\.nanopub\.org/nschema$": "https://www.nanopub.net/nschema#",
24
+ r"https://nanopub\.org/nschema$": "https://nanopub.net/nschema#",
25
+ # Convert lexvo.org/id URLs to lexvo.org/data URLs
26
+ r"http://lexvo\.org/id/(.+)": r"http://lexvo.org/data/\1",
27
+ r"https://lexvo\.org/id/(.+)": r"http://lexvo.org/data/\1",
28
+ r"https://www\.lexinfo\.net/(.+)": r"http://www.lexinfo.net/\1",
29
+ # Convert Wikidata https:// to http:// (Wikidata JSON-LD uses http:// URIs)
30
+ r"https://www\.wikidata\.org/entity/(.+)": r"http://www.wikidata.org/entity/\1",
31
+ }
15
32
  )
16
33
 
17
- REDIRECTS = MappingProxyType({
18
- # FIXME This is presently hardcoded; we need to
19
- # - either find a way to resolve these URLs automatically,
20
- # - or create a repository of those redirects online.
21
- 'http://purl.org/vocab/vann/': URIRef(
22
- 'https://vocab.org/vann/vann-vocab-20100607.rdf',
23
- ),
24
- URIRef(str(DC)): URIRef(str(DCTERMS)),
25
- URIRef(str(RDF)): URIRef(str(RDF)),
26
- URIRef(str(RDFS)): URIRef(str(RDFS)),
27
- URIRef(str(OWL)): URIRef(str(OWL)),
28
34
 
29
- # Add # fragment to OWL and RDFS namespace URIs
30
- # (fixes bug reported at https://stackoverflow.com/q/78934864/1245471)
31
- URIRef('http://www.w3.org/2002/07/owl'): URIRef('http://www.w3.org/2002/07/owl#'),
32
- URIRef('http://www.w3.org/2000/01/rdf-schema'): URIRef('http://www.w3.org/2000/01/rdf-schema#'),
33
-
34
- # Redirect FOAF namespace to GitHub mirror
35
- URIRef('https?://xmlns.com/foaf/0.1/.+'): URIRef(
36
- 'https://raw.githubusercontent.com/foaf/foaf/refs/heads/master/xmlns.com/htdocs/foaf/0.1/index.rdf',
37
- ),
38
- URIRef('https://www.nanopub.org/nschema'): URIRef(
39
- 'https://www.nanopub.net/nschema#',
40
- ),
41
- URIRef('https://nanopub.org/nschema'): URIRef(
42
- 'https://nanopub.net/nschema#',
43
- ),
44
-
45
- # Convert lexvo.org/id URLs to lexvo.org/data URLs
46
- r'http://lexvo\.org/id/(.+)': r'http://lexvo.org/data/\1',
47
- r'https://lexvo\.org/id/(.+)': r'http://lexvo.org/data/\1',
48
- r'https://www\.lexinfo\.net/(.+)': r'http://www.lexinfo.net/\1',
49
- # Convert Wikidata https:// to http:// (Wikidata JSON-LD uses http:// URIs)
50
- r'https://www\.wikidata\.org/entity/(.+)': r'http://www.wikidata.org/entity/\1',
51
- })
52
-
53
-
54
- def apply_redirect(source: URIRef) -> URIRef: # noqa: WPS210
35
+ def apply_redirect(source: URIRef) -> URIRef: # noqa: WPS210
55
36
  """
56
37
  Rewrite the URL using regex patterns and group substitutions.
57
38
 
@@ -65,10 +46,8 @@ def apply_redirect(source: URIRef) -> URIRef: # noqa: WPS210
65
46
  pattern_str = str(pattern)
66
47
  destination_str = str(destination)
67
48
 
68
- match = re.match(pattern_str, source_str)
69
- if match:
70
- # Replace any group references in the destination
71
- # (like \1, \2, etc.)
49
+ if re.match(pattern_str, source_str):
50
+ # Replace any group references in the destination (e.g. \1)
72
51
  redirected_uri = re.sub(
73
52
  pattern_str,
74
53
  destination_str,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: iolanta
3
- Version: 2.1.12
3
+ Version: 2.1.14
4
4
  Summary: Semantic Web browser
5
5
  License: MIT
6
6
  Author: Anatoly Scherbakov
@@ -6,7 +6,7 @@ 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=CZ22-DQY3xHvvUiq1o9XDrpC2an4429yQNOE8LytDkg,4524
9
+ iolanta/cli/main.py,sha256=T1l1ilWp818pF3oR6VJIlPQ_ElicN7ECGlcJm5XiUqo,8170
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
@@ -61,6 +61,17 @@ iolanta/facets/mkdocs_material_insiders_markdown/facet.py,sha256=EY-H4gR5YgiDVt2
61
61
  iolanta/facets/mkdocs_material_insiders_markdown/templates/datatype.jinja2.md,sha256=k9GSdy27mAY3eRL899pk6ZCYr4ZpEY1EuM5RY-OApYM,551
62
62
  iolanta/facets/page_title.py,sha256=TwgZK2g_e5UoWYjKNgDzzkmq1EI3cY58680iC8N9kZI,1407
63
63
  iolanta/facets/qname.py,sha256=Z2wjDWV90Z4vuwLj31MSf5EBGTb0dxzjlKl-Iv4dPao,533
64
+ iolanta/facets/query/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
+ iolanta/facets/query/ask_result_csv.py,sha256=oDuk_a8RiTsyXZuPraUSKswC7dLTCjSFJU8tyRaLALY,589
66
+ iolanta/facets/query/ask_result_json.py,sha256=qXKIg1AdVPixd3SDY_nyXleJ7y4Q94kPFnanzsCmcTM,590
67
+ iolanta/facets/query/ask_result_table.py,sha256=QdmrhKofca7ZOca9SN7GA3Riite1NPOsrKdLvW0xXkU,608
68
+ iolanta/facets/query/construct_result_csv.py,sha256=70KYP9aSnGSm_Gxk6Wjcik4YkvsdmAlO5EwNVOE59Nc,850
69
+ iolanta/facets/query/construct_result_json.py,sha256=mdaxGReivhHGtK_0OCMky6BcQ7EGth0-nEUMNy4XnpE,856
70
+ iolanta/facets/query/construct_result_table.py,sha256=bCUHj0eW086Rx7g6gW432j8Js4vFNCNceH_AJhnJ7po,1398
71
+ iolanta/facets/query/data/query_result.yamlld,sha256=uutBc4XEYh3LSVeYdvrs5uVsdDU7e9TQ2TQEtDfzaks,3440
72
+ iolanta/facets/query/select_result_csv.py,sha256=Js5h_MJ-DgWGJbhypuLoJ0UiW7wsS8rG23aMCAOGdd0,880
73
+ iolanta/facets/query/select_result_json.py,sha256=gajYXgROSWphYeimfO0W1xumsMLdpy_d57QgYQEI3a4,614
74
+ iolanta/facets/query/select_result_table.py,sha256=ePeUydu4bV7MZciZriPreIKgshrtfd8qn9qQC59hsBg,1236
64
75
  iolanta/facets/textual_browser/__init__.py,sha256=sKgDvXOwib9n9d63kdtKCEv26-FoL0VN6zxDmfcheZ8,104
65
76
  iolanta/facets/textual_browser/app.py,sha256=rF34KbWi0L-Mozwzm-wzBS-3OqCcwbaXl0GZCl4YpAg,3503
66
77
  iolanta/facets/textual_browser/facet.py,sha256=5mX1l6P-Ga7buzXmItxSpta6G_D4Fvwv8H6mU8-3g80,742
@@ -69,10 +80,10 @@ iolanta/facets/textual_browser/home.py,sha256=GfDD1G2HiwdLkPkNdcYRqVIxDl5tWH9few
69
80
  iolanta/facets/textual_browser/location.py,sha256=qWa7xUgaWKYOmiQuwI1TbyvujpKRb1pxJJZ8lFDcjKk,259
70
81
  iolanta/facets/textual_browser/models.py,sha256=DqTBjhkkTt5mNwqr4DzNbPSqzV-QtNqfKj7wpn6T3ao,173
71
82
  iolanta/facets/textual_browser/page.py,sha256=NkcQ5rSKZRbp63C8ozgsR_iVhcKHGv_SytUCQyGa7ss,786
72
- iolanta/facets/textual_browser/page_switcher.py,sha256=M0-bBT8ROvSY84g-NejPiFcSBtb1YuwMJzZXU3WdGF0,10455
83
+ iolanta/facets/textual_browser/page_switcher.py,sha256=BmUZq0PUBJWGO7-rNFolkfmmWDw8HUZuD9df0llt00E,10458
73
84
  iolanta/facets/textual_class/__init__.py,sha256=tiL0p-3JspGcBRj4qa3rmoBFAuadk71l2ja2lJN6CEs,75
74
85
  iolanta/facets/textual_class/facets.py,sha256=MiGTapgt30ME2fapwdrD_yQj4mhkdmyMAjzxaoLW5Dk,6087
75
- iolanta/facets/textual_class/sparql/instances.sparql,sha256=v0rHyr0Ha-ioZ2ssv0ytqeO8-Qt1xnX9FKfwSstttzI,230
86
+ iolanta/facets/textual_class/sparql/instances.sparql,sha256=Wx3xThlEgwz8gqH5Fnv789p1CiBRJGLOhRpChtFq1Us,139
76
87
  iolanta/facets/textual_class/textual-class.yamlld,sha256=HBQCC3Kg41rFfPne9Gx1CXsQ3nQPXmwUXh9hr3AQU5A,586
77
88
  iolanta/facets/textual_default/__init__.py,sha256=snxA0FEY9qfAxNv3MlZLrJsXugD4dvs5hLStZWV7soM,158
78
89
  iolanta/facets/textual_default/facets.py,sha256=D3W9kMxel_BqA8mWoxfWc3IJlHMwdM5ndyZ5SBeYHnA,5721
@@ -101,7 +112,7 @@ iolanta/facets/textual_nanopublication/models.py,sha256=MphggSvKmYac6v866GOKW5lc
101
112
  iolanta/facets/textual_nanopublication/nanopublication_widget.py,sha256=sQPgEx25XJ15VqB5zjZuz2q2bf_B5GWXEp32FAufxQ4,2387
102
113
  iolanta/facets/textual_nanopublication/term_list_widget.py,sha256=NZNATKjFmgI2sE5R0ebyQh5Qk2g-kf-MT4YZ-Vw78M4,992
103
114
  iolanta/facets/textual_nanopublication/term_widget.py,sha256=uI5msCTSIYumAIS3I8nBfUz57_vRzvCKkouevrS3Qwk,3536
104
- iolanta/facets/textual_no_facet_found.py,sha256=DZJKHUy-bARGi5UG0gOh70q4-uEpS_R3C-XO4pF3oiE,2608
115
+ iolanta/facets/textual_no_facet_found.py,sha256=erEsYIcet6C1_1PIOgC_uDrQBHpMn6jmyqpbAb_CHPI,3321
105
116
  iolanta/facets/textual_ontology/__init__.py,sha256=3H6bfYaEbXFr90C6ZpGWC4O-24uaO18tnTXx7mckQSA,94
106
117
  iolanta/facets/textual_ontology/facets.py,sha256=jc56d_M7CJ2lUbiohdux8KGrtF-pcS_jsNBOIx7UXsE,3341
107
118
  iolanta/facets/textual_ontology/sparql/terms.sparql,sha256=oVLxN452nqog_95qRaTWnvar6rxPNxPrRonSo7oFFTg,324
@@ -118,17 +129,17 @@ iolanta/facets/title/title.yamlld,sha256=FjfqNPl3EAzZNLYAZNQ6mHfNmFkfxMm1A43gygf
118
129
  iolanta/facets/wikibase_statement_title/__init__.py,sha256=_yk1akxgSJOiUBJIc8QGrD2vovvmx_iw_vJDuv1rD7M,91
119
130
  iolanta/facets/wikibase_statement_title/facets.py,sha256=gNRqiwOTMxyyHYvb_vIrfd-4ipb8wfyJ4GgPcQdyy9E,726
120
131
  iolanta/facets/wikibase_statement_title/sparql/statement-title.sparql,sha256=n07DQWxKqB5c3CA4kacq2HSN0R0dLgnMnLP1AxMo5YA,320
121
- iolanta/iolanta.py,sha256=rfaPXuiV88mZGi1PFAf4EiUs-F14xbV9oOqYXApSHZ0,13681
132
+ iolanta/iolanta.py,sha256=qHc4S1u86m8GLM4omdgzGMoB9QXNnsFH8K5U2rq0r7Y,14086
122
133
  iolanta/labeled_triple_set/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
134
  iolanta/labeled_triple_set/data/labeled_triple_set.yamlld,sha256=P3oAPSPsirpbcRXej-VekuYFTpWqrkysYsxghZc3bTk,1008
124
135
  iolanta/labeled_triple_set/labeled_triple_set.py,sha256=o4IgvTvPd0mzBtpgHYd4n1xpujYdAvWBr6gIYwp5vnA,4061
125
136
  iolanta/labeled_triple_set/sparql/triples.sparql,sha256=VsCmYN5AX7jSIiFm-SqLcRcOvUVj8yyZI4PSzKROtQw,82
126
137
  iolanta/mcp/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
- iolanta/mcp/cli.py,sha256=wlDandYo_VoMIg9oDGPJsIsMmiPo4j4-RBytIKWDtEI,484
138
+ iolanta/mcp/cli.py,sha256=QRHrkGnfxXNZx_iUwTbXz4zZwvp5N_ceKoB8ae_fLzY,823
128
139
  iolanta/mermaid/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
129
140
  iolanta/mermaid/facet.py,sha256=8mLOBrzlY84jiWhtJNY5BkXPDpRhL2OB1LUwwwNS1X0,4065
130
141
  iolanta/mermaid/mermaid.yamlld,sha256=G_8lqNfs6S7pz9koDC8xAaic4EaHsYnFLgexDVyMuCU,552
131
- iolanta/mermaid/models.py,sha256=5lvIu_M3FtoM2tAU7dL6WOMzHwr1ix0BdfOKtiU7Y-Q,4969
142
+ iolanta/mermaid/models.py,sha256=OzY54DZbxmOCqlfyfin2h8NR3EytdgwlNhbpnY_PH7Y,5330
132
143
  iolanta/mermaid/sparql/ask-has-triples.sparql,sha256=mOYJ_rutEG_15PKTCHSv2GqzbkAawIn1U2kjkIr_Me0,41
133
144
  iolanta/mermaid/sparql/graph.sparql,sha256=mDGf05od3CUFhzI6rcqt5ZMVy-gSKDu-WxmV_zpIsVI,62
134
145
  iolanta/mermaid/sparql/subgraphs.sparql,sha256=VuoOYr_ZtKXXRrBpAEJek0mBRzR9EV-KnKENgAbkzCs,71
@@ -148,13 +159,13 @@ iolanta/sparqlspace/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSu
148
159
  iolanta/sparqlspace/cli.py,sha256=pb6q03lzrU8OaZ4A3QAQEmaFYcQ_-sHUrPhRs6GE88w,1590
149
160
  iolanta/sparqlspace/inference/wikidata-prop-label.sparql,sha256=JYLAs28Z3a77cMcv44aZplwwrdqB-yshZn1dDZmRFAU,250
150
161
  iolanta/sparqlspace/inference/wikidata-statement-label.sparql,sha256=_Dp9jKCpCp2pLk0uacNUhUvvQ2Hov-WiMFprtuYTRyY,759
151
- iolanta/sparqlspace/processor.py,sha256=hRQ38YNKm6iEO73dnTDyGN1Y4DFxJVtV311gLf_z1j0,25744
152
- iolanta/sparqlspace/redirects.py,sha256=ZYLb8rsjk9JG-mT5OQAzELer7okev34Le2VnACwpYzM,2657
162
+ iolanta/sparqlspace/processor.py,sha256=FGFydsboratdAloMxSqUVxM3epySg3Zf1hnJOkvyb-I,25529
163
+ iolanta/sparqlspace/redirects.py,sha256=8k_8ow0vhQKdYZq-iN0XGsYVGYvQWWov0BpQc0BXPQk,2772
153
164
  iolanta/sparqlspace/sparqlspace.py,sha256=Y8_ZPXwuGEXbEes6XQjaQWA2Zv9y8SWxMPDFdqVBGFo,796
154
165
  iolanta/widgets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
166
  iolanta/widgets/description.py,sha256=98Qd3FwT9r8sYqKjl9ZEptaVX9jJ2ULWf0uy3j52p5o,800
156
167
  iolanta/widgets/mixin.py,sha256=nDRCOc-gizCf1a5DAcYs4hW8eZEd6pHBPFsfm0ncv7E,251
157
- iolanta-2.1.12.dist-info/METADATA,sha256=T4Ee-_-SCeBpfvtXKzAmtNRG3Af_EoWeHGYu1uaUYYE,2317
158
- iolanta-2.1.12.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
159
- iolanta-2.1.12.dist-info/entry_points.txt,sha256=2WLr6410ZI7lwzxevIn74trs3U_y4Rx8aK3N3NT_YPw,1786
160
- iolanta-2.1.12.dist-info/RECORD,,
168
+ iolanta-2.1.14.dist-info/METADATA,sha256=EN4ENjcg8JZtX_U453qszOR1IACQz1Lq10L6kNoe1JY,2317
169
+ iolanta-2.1.14.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
170
+ iolanta-2.1.14.dist-info/entry_points.txt,sha256=Z1f3OaNruE2a6eprkiLgcPw-lZCah_cRT-PTlDD-Y1s,2569
171
+ iolanta-2.1.14.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.2.1
2
+ Generator: poetry-core 2.3.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -4,7 +4,13 @@ iolanta-mcp=iolanta.mcp.cli:app
4
4
  sparqlspace=iolanta.sparqlspace.cli:app
5
5
 
6
6
  [iolanta.facets]
7
+ ask-result-csv-facet=iolanta.facets.query.ask_result_csv:AskResultCsvFacet
8
+ ask-result-json-facet=iolanta.facets.query.ask_result_json:AskResultJsonFacet
9
+ ask-result-table-facet=iolanta.facets.query.ask_result_table:AskResultTableFacet
7
10
  boolean=iolanta.facets.generic:BoolLiteral
11
+ construct-result-csv-facet=iolanta.facets.query.construct_result_csv:ConstructResultCsvFacet
12
+ construct-result-json-facet=iolanta.facets.query.construct_result_json:ConstructResultJsonFacet
13
+ construct-result-table-facet=iolanta.facets.query.construct_result_table:ConstructResultTableFacet
8
14
  icon=iolanta.facets.icon:IconFacet
9
15
  labeled-triple-set=iolanta.labeled_triple_set.labeled_triple_set:LabeledTripleSet
10
16
  mermaid-graph=iolanta.mermaid.facet:Mermaid
@@ -12,6 +18,9 @@ mermaid-roadmap=iolanta.facets.mermaid_roadmap.facet:MermaidRoadmap
12
18
  mkdocs-material-insiders-markdown-datatype=iolanta.facets.mkdocs_material_insiders_markdown:MkDocsMaterialInsidersMarkdownFacet
13
19
  qname=iolanta.facets.qname:QNameFacet
14
20
  rich-declension-table=iolanta.declension.facet:RichDeclensionTable
21
+ select-result-csv-facet=iolanta.facets.query.select_result_csv:SelectResultCsvFacet
22
+ select-result-json-facet=iolanta.facets.query.select_result_json:SelectResultJsonFacet
23
+ select-result-table-facet=iolanta.facets.query.select_result_table:SelectResultTableFacet
15
24
  textual-browser=iolanta.facets.textual_browser:TextualBrowserFacet
16
25
  textual-class=iolanta.facets.textual_class:Class
17
26
  textual-graph=iolanta.facets.textual_graph:GraphFacet