py-horned-owl 1.2.1.dev0__tar.gz → 1.3.0.dev1__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.
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/Cargo.lock +65 -64
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/Cargo.toml +5 -6
- py_horned_owl-1.3.0.dev1/Makefile +24 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/PKG-INFO +2 -1
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/index.rst +1 -0
- py_horned_owl-1.3.0.dev1/docs/source/reasoner.rst +110 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/lib/reasoner/Cargo.toml +2 -2
- py_horned_owl-1.3.0.dev1/lib/reasoner/src/lib.rs +133 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyhornedowl/__init__.pyi +44 -20
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyproject.toml +11 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/lib.rs +0 -1
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/ontology.rs +26 -5
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/reasoner.rs +115 -72
- py_horned_owl-1.2.1.dev0/Makefile +0 -24
- py_horned_owl-1.2.1.dev0/lib/reasoner/src/lib.rs +0 -132
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/.github/workflows/CI.yaml +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/.gitignore +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/.readthedocs.yaml +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/CITATION.cff +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/COPYING +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/COPYING.lesser +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/README.md +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/build.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/Makefile +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/TestOntoPyLibs.ipynb +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/make.bat +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/multipath.png +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/requirements.txt +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/_templates/autosummary/class.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/_templates/autosummary/module.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/api.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/conf.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/custom_doc.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/details.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/installation.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/performance.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/quickstart.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/docs/source/usage.rst +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/examples/TestingPyO3.ipynb +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/examples/test_python.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/examples/test_python2.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/examples/test_python3.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyhornedowl/__init__.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyhornedowl/model/__init__.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyhornedowl/model/__init__.pyi +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/pyhornedowl/py.typed +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/requirements.txt +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/scripts/build_doc.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/scripts/build_model.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/scripts/gen_pyi.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/doc.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/model.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/model_generated.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/prefix_mapping.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/src/wrappers.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/model.json +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/model.schema.json +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/base.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/enum.pyi.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/enum.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/extensions.pyi.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/extensions.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/named-struct.pyi.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/named-struct.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/static.pyi +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/static.rs +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/transparent-enum.pyi.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/transparent-enum.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/tuple-struct.pyi.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/template/templates/tuple-struct.rs.jinja2 +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/performance/perf.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/performance/prepare.sh +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/gen.sh +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.ofn +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.ofn.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.omn +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.omn.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.owl +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.owl.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.owx +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/prefix.owx.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.ofn +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.ofn.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.omn +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.omn.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.owl +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.owl.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.owx +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/resources/simple.owx.raw +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_base.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_class_expression_builder.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_hierarchy.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_id.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_index.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_io.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_iri.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_label.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_modify.py +0 -0
- {py_horned_owl-1.2.1.dev0 → py_horned_owl-1.3.0.dev1}/test/test_prefix.py +0 -0
|
@@ -4,9 +4,9 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "adler2"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.1"
|
|
8
8
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
-
checksum = "
|
|
9
|
+
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
|
|
10
10
|
|
|
11
11
|
[[package]]
|
|
12
12
|
name = "atty"
|
|
@@ -21,9 +21,9 @@ dependencies = [
|
|
|
21
21
|
|
|
22
22
|
[[package]]
|
|
23
23
|
name = "autocfg"
|
|
24
|
-
version = "1.
|
|
24
|
+
version = "1.5.0"
|
|
25
25
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
26
|
-
checksum = "
|
|
26
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
27
27
|
|
|
28
28
|
[[package]]
|
|
29
29
|
name = "base64"
|
|
@@ -54,18 +54,18 @@ dependencies = [
|
|
|
54
54
|
|
|
55
55
|
[[package]]
|
|
56
56
|
name = "cc"
|
|
57
|
-
version = "1.2.
|
|
57
|
+
version = "1.2.29"
|
|
58
58
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
59
|
-
checksum = "
|
|
59
|
+
checksum = "5c1599538de2394445747c8cf7935946e3cc27e9625f889d979bfb2aaf569362"
|
|
60
60
|
dependencies = [
|
|
61
61
|
"shlex",
|
|
62
62
|
]
|
|
63
63
|
|
|
64
64
|
[[package]]
|
|
65
65
|
name = "cfg-if"
|
|
66
|
-
version = "1.0.
|
|
66
|
+
version = "1.0.1"
|
|
67
67
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
|
-
checksum = "
|
|
68
|
+
checksum = "9555578bc9e57714c812a1f84e4fc5b4d21fcb063490c624de019f7464c91268"
|
|
69
69
|
|
|
70
70
|
[[package]]
|
|
71
71
|
name = "clap"
|
|
@@ -121,11 +121,11 @@ dependencies = [
|
|
|
121
121
|
|
|
122
122
|
[[package]]
|
|
123
123
|
name = "curie"
|
|
124
|
-
version = "0.1.
|
|
124
|
+
version = "0.1.4"
|
|
125
125
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
126
|
-
checksum = "
|
|
126
|
+
checksum = "30667fc7792d940719ecada2201aeaedf0f38b876675fa69191e632dabc57569"
|
|
127
127
|
dependencies = [
|
|
128
|
-
"indexmap 2.
|
|
128
|
+
"indexmap 2.10.0",
|
|
129
129
|
]
|
|
130
130
|
|
|
131
131
|
[[package]]
|
|
@@ -166,9 +166,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
|
166
166
|
|
|
167
167
|
[[package]]
|
|
168
168
|
name = "flate2"
|
|
169
|
-
version = "1.1.
|
|
169
|
+
version = "1.1.2"
|
|
170
170
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
171
|
-
checksum = "
|
|
171
|
+
checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
|
|
172
172
|
dependencies = [
|
|
173
173
|
"crc32fast",
|
|
174
174
|
"miniz_oxide",
|
|
@@ -212,9 +212,9 @@ checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
|
|
212
212
|
|
|
213
213
|
[[package]]
|
|
214
214
|
name = "hashbrown"
|
|
215
|
-
version = "0.15.
|
|
215
|
+
version = "0.15.4"
|
|
216
216
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
217
|
-
checksum = "
|
|
217
|
+
checksum = "5971ac85611da7067dbfcabef3c70ebb5606018acd9e2a3903a0da507521e0d5"
|
|
218
218
|
|
|
219
219
|
[[package]]
|
|
220
220
|
name = "heck"
|
|
@@ -233,8 +233,9 @@ dependencies = [
|
|
|
233
233
|
|
|
234
234
|
[[package]]
|
|
235
235
|
name = "horned-bin"
|
|
236
|
-
version = "1.0
|
|
237
|
-
source = "
|
|
236
|
+
version = "1.1.0"
|
|
237
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
238
|
+
checksum = "c72d4e2f7a3578ce27a1a03ac5a11d287d78d91fea05db18a96709582ae28b0b"
|
|
238
239
|
dependencies = [
|
|
239
240
|
"clap",
|
|
240
241
|
"horned-owl",
|
|
@@ -246,8 +247,9 @@ dependencies = [
|
|
|
246
247
|
|
|
247
248
|
[[package]]
|
|
248
249
|
name = "horned-owl"
|
|
249
|
-
version = "1.0
|
|
250
|
-
source = "
|
|
250
|
+
version = "1.1.0"
|
|
251
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
252
|
+
checksum = "8587bf7d7bd1fe6aa28294a5dc508cc4cd4f6bd8a4c275eebbe7b1bd809c1acb"
|
|
251
253
|
dependencies = [
|
|
252
254
|
"curie",
|
|
253
255
|
"enum_meta",
|
|
@@ -384,12 +386,12 @@ dependencies = [
|
|
|
384
386
|
|
|
385
387
|
[[package]]
|
|
386
388
|
name = "indexmap"
|
|
387
|
-
version = "2.
|
|
389
|
+
version = "2.10.0"
|
|
388
390
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
389
|
-
checksum = "
|
|
391
|
+
checksum = "fe4cd85333e22411419a0bcae1297d25e58c9443848b11dc6a86fefe8c78a661"
|
|
390
392
|
dependencies = [
|
|
391
393
|
"equivalent",
|
|
392
|
-
"hashbrown 0.15.
|
|
394
|
+
"hashbrown 0.15.4",
|
|
393
395
|
]
|
|
394
396
|
|
|
395
397
|
[[package]]
|
|
@@ -415,18 +417,18 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
|
|
|
415
417
|
|
|
416
418
|
[[package]]
|
|
417
419
|
name = "libc"
|
|
418
|
-
version = "0.2.
|
|
420
|
+
version = "0.2.174"
|
|
419
421
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
420
|
-
checksum = "
|
|
422
|
+
checksum = "1171693293099992e19cddea4e8b849964e9846f4acee11b3948bcc337be8776"
|
|
421
423
|
|
|
422
424
|
[[package]]
|
|
423
425
|
name = "libloading"
|
|
424
|
-
version = "0.8.
|
|
426
|
+
version = "0.8.8"
|
|
425
427
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
426
|
-
checksum = "
|
|
428
|
+
checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667"
|
|
427
429
|
dependencies = [
|
|
428
430
|
"cfg-if",
|
|
429
|
-
"windows-targets 0.53.
|
|
431
|
+
"windows-targets 0.53.2",
|
|
430
432
|
]
|
|
431
433
|
|
|
432
434
|
[[package]]
|
|
@@ -437,9 +439,9 @@ checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
|
|
|
437
439
|
|
|
438
440
|
[[package]]
|
|
439
441
|
name = "lock_api"
|
|
440
|
-
version = "0.4.
|
|
442
|
+
version = "0.4.13"
|
|
441
443
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
442
|
-
checksum = "
|
|
444
|
+
checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
|
|
443
445
|
dependencies = [
|
|
444
446
|
"autocfg",
|
|
445
447
|
"scopeguard",
|
|
@@ -453,9 +455,9 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
|
|
453
455
|
|
|
454
456
|
[[package]]
|
|
455
457
|
name = "memchr"
|
|
456
|
-
version = "2.7.
|
|
458
|
+
version = "2.7.5"
|
|
457
459
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
458
|
-
checksum = "
|
|
460
|
+
checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0"
|
|
459
461
|
|
|
460
462
|
[[package]]
|
|
461
463
|
name = "memoffset"
|
|
@@ -468,9 +470,9 @@ dependencies = [
|
|
|
468
470
|
|
|
469
471
|
[[package]]
|
|
470
472
|
name = "miniz_oxide"
|
|
471
|
-
version = "0.8.
|
|
473
|
+
version = "0.8.9"
|
|
472
474
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
473
|
-
checksum = "
|
|
475
|
+
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
|
|
474
476
|
dependencies = [
|
|
475
477
|
"adler2",
|
|
476
478
|
]
|
|
@@ -504,9 +506,9 @@ checksum = "54b4ed3a7192fa19f5f48f99871f2755047fabefd7f222f12a1df1773796a102"
|
|
|
504
506
|
|
|
505
507
|
[[package]]
|
|
506
508
|
name = "parking_lot"
|
|
507
|
-
version = "0.12.
|
|
509
|
+
version = "0.12.4"
|
|
508
510
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
509
|
-
checksum = "
|
|
511
|
+
checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
|
|
510
512
|
dependencies = [
|
|
511
513
|
"lock_api",
|
|
512
514
|
"parking_lot_core",
|
|
@@ -514,9 +516,9 @@ dependencies = [
|
|
|
514
516
|
|
|
515
517
|
[[package]]
|
|
516
518
|
name = "parking_lot_core"
|
|
517
|
-
version = "0.9.
|
|
519
|
+
version = "0.9.11"
|
|
518
520
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
519
|
-
checksum = "
|
|
521
|
+
checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
|
|
520
522
|
dependencies = [
|
|
521
523
|
"cfg-if",
|
|
522
524
|
"libc",
|
|
@@ -533,9 +535,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e"
|
|
|
533
535
|
|
|
534
536
|
[[package]]
|
|
535
537
|
name = "pest"
|
|
536
|
-
version = "2.8.
|
|
538
|
+
version = "2.8.1"
|
|
537
539
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
538
|
-
checksum = "
|
|
540
|
+
checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323"
|
|
539
541
|
dependencies = [
|
|
540
542
|
"memchr",
|
|
541
543
|
"thiserror 2.0.12",
|
|
@@ -544,9 +546,9 @@ dependencies = [
|
|
|
544
546
|
|
|
545
547
|
[[package]]
|
|
546
548
|
name = "pest_derive"
|
|
547
|
-
version = "2.8.
|
|
549
|
+
version = "2.8.1"
|
|
548
550
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
549
|
-
checksum = "
|
|
551
|
+
checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc"
|
|
550
552
|
dependencies = [
|
|
551
553
|
"pest",
|
|
552
554
|
"pest_generator",
|
|
@@ -554,9 +556,9 @@ dependencies = [
|
|
|
554
556
|
|
|
555
557
|
[[package]]
|
|
556
558
|
name = "pest_generator"
|
|
557
|
-
version = "2.8.
|
|
559
|
+
version = "2.8.1"
|
|
558
560
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
559
|
-
checksum = "
|
|
561
|
+
checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966"
|
|
560
562
|
dependencies = [
|
|
561
563
|
"pest",
|
|
562
564
|
"pest_meta",
|
|
@@ -567,20 +569,19 @@ dependencies = [
|
|
|
567
569
|
|
|
568
570
|
[[package]]
|
|
569
571
|
name = "pest_meta"
|
|
570
|
-
version = "2.8.
|
|
572
|
+
version = "2.8.1"
|
|
571
573
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
572
|
-
checksum = "
|
|
574
|
+
checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5"
|
|
573
575
|
dependencies = [
|
|
574
|
-
"once_cell",
|
|
575
576
|
"pest",
|
|
576
577
|
"sha2",
|
|
577
578
|
]
|
|
578
579
|
|
|
579
580
|
[[package]]
|
|
580
581
|
name = "portable-atomic"
|
|
581
|
-
version = "1.11.
|
|
582
|
+
version = "1.11.1"
|
|
582
583
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
583
|
-
checksum = "
|
|
584
|
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
|
584
585
|
|
|
585
586
|
[[package]]
|
|
586
587
|
name = "potential_utf"
|
|
@@ -613,7 +614,7 @@ dependencies = [
|
|
|
613
614
|
|
|
614
615
|
[[package]]
|
|
615
616
|
name = "py-horned-owl"
|
|
616
|
-
version = "1.
|
|
617
|
+
version = "1.3.0-dev1"
|
|
617
618
|
dependencies = [
|
|
618
619
|
"curie",
|
|
619
620
|
"horned-bin",
|
|
@@ -723,9 +724,9 @@ dependencies = [
|
|
|
723
724
|
|
|
724
725
|
[[package]]
|
|
725
726
|
name = "redox_syscall"
|
|
726
|
-
version = "0.5.
|
|
727
|
+
version = "0.5.13"
|
|
727
728
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
728
|
-
checksum = "
|
|
729
|
+
checksum = "0d04b7d0ee6b4a0207a0a7adb104d23ecb0b47d6beae7152d0fa34b692b29fd6"
|
|
729
730
|
dependencies = [
|
|
730
731
|
"bitflags 2.9.1",
|
|
731
732
|
]
|
|
@@ -764,9 +765,9 @@ dependencies = [
|
|
|
764
765
|
|
|
765
766
|
[[package]]
|
|
766
767
|
name = "rustls"
|
|
767
|
-
version = "0.23.
|
|
768
|
+
version = "0.23.28"
|
|
768
769
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
769
|
-
checksum = "
|
|
770
|
+
checksum = "7160e3e10bf4535308537f3c4e1641468cd0e485175d6163087c0393c7d46643"
|
|
770
771
|
dependencies = [
|
|
771
772
|
"log",
|
|
772
773
|
"once_cell",
|
|
@@ -848,9 +849,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
|
|
|
848
849
|
|
|
849
850
|
[[package]]
|
|
850
851
|
name = "smallvec"
|
|
851
|
-
version = "1.15.
|
|
852
|
+
version = "1.15.1"
|
|
852
853
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
853
|
-
checksum = "
|
|
854
|
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
854
855
|
|
|
855
856
|
[[package]]
|
|
856
857
|
name = "stable_deref_trait"
|
|
@@ -872,9 +873,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|
|
872
873
|
|
|
873
874
|
[[package]]
|
|
874
875
|
name = "syn"
|
|
875
|
-
version = "2.0.
|
|
876
|
+
version = "2.0.104"
|
|
876
877
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
877
|
-
checksum = "
|
|
878
|
+
checksum = "17b6f705963418cdb9927482fa304bc562ece2fdd4f616084c50b7023b435a40"
|
|
878
879
|
dependencies = [
|
|
879
880
|
"proc-macro2",
|
|
880
881
|
"quote",
|
|
@@ -1034,9 +1035,9 @@ checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
|
|
|
1034
1035
|
|
|
1035
1036
|
[[package]]
|
|
1036
1037
|
name = "wasi"
|
|
1037
|
-
version = "0.11.
|
|
1038
|
+
version = "0.11.1+wasi-snapshot-preview1"
|
|
1038
1039
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1039
|
-
checksum = "
|
|
1040
|
+
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
|
|
1040
1041
|
|
|
1041
1042
|
[[package]]
|
|
1042
1043
|
name = "webpki-roots"
|
|
@@ -1044,14 +1045,14 @@ version = "0.26.11"
|
|
|
1044
1045
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1045
1046
|
checksum = "521bc38abb08001b01866da9f51eb7c5d647a19260e00054a8c7fd5f9e57f7a9"
|
|
1046
1047
|
dependencies = [
|
|
1047
|
-
"webpki-roots 1.0.
|
|
1048
|
+
"webpki-roots 1.0.1",
|
|
1048
1049
|
]
|
|
1049
1050
|
|
|
1050
1051
|
[[package]]
|
|
1051
1052
|
name = "webpki-roots"
|
|
1052
|
-
version = "1.0.
|
|
1053
|
+
version = "1.0.1"
|
|
1053
1054
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1054
|
-
checksum = "
|
|
1055
|
+
checksum = "8782dd5a41a24eed3a4f40b606249b3e236ca61adf1f25ea4d45c73de122b502"
|
|
1055
1056
|
dependencies = [
|
|
1056
1057
|
"rustls-pki-types",
|
|
1057
1058
|
]
|
|
@@ -1123,9 +1124,9 @@ dependencies = [
|
|
|
1123
1124
|
|
|
1124
1125
|
[[package]]
|
|
1125
1126
|
name = "windows-targets"
|
|
1126
|
-
version = "0.53.
|
|
1127
|
+
version = "0.53.2"
|
|
1127
1128
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
1128
|
-
checksum = "
|
|
1129
|
+
checksum = "c66f69fcc9ce11da9966ddb31a40968cad001c5bedeb5c2b82ede4253ab48aef"
|
|
1129
1130
|
dependencies = [
|
|
1130
1131
|
"windows_aarch64_gnullvm 0.53.0",
|
|
1131
1132
|
"windows_aarch64_msvc 0.53.0",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "py-horned-owl"
|
|
3
|
-
version = "1.
|
|
3
|
+
version = "1.3.0-dev1"
|
|
4
4
|
authors = ["Janna Hastings <j.hastings@ucl.ac.uk>"]
|
|
5
5
|
edition = "2018"
|
|
6
|
+
license = "LGPL-3.0-or-later"
|
|
6
7
|
|
|
7
8
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
|
8
9
|
|
|
@@ -15,11 +16,9 @@ version = "0.21"
|
|
|
15
16
|
features = ["abi3-py37", "extension-module", "experimental-inspect", "multiple-pymethods"]
|
|
16
17
|
|
|
17
18
|
[dependencies]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
horned-owl = {
|
|
21
|
-
horned-bin = { git = "https://github.com/phillord/horned-owl", branch = "devel" }
|
|
22
|
-
py-horned-owl-reasoner = { path = "../py-horned-owl/lib/reasoner" }
|
|
19
|
+
horned-owl = "^1.1"
|
|
20
|
+
horned-bin = "^1.1"
|
|
21
|
+
py-horned-owl-reasoner = { path = "lib/reasoner" }
|
|
23
22
|
curie = "0.1.2"
|
|
24
23
|
libloading = "0.8"
|
|
25
24
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
all: lib pyi
|
|
2
|
+
|
|
3
|
+
dev: mdev pyi
|
|
4
|
+
|
|
5
|
+
mdev: model docs
|
|
6
|
+
.venv/bin/maturin develop
|
|
7
|
+
|
|
8
|
+
pyi: venv
|
|
9
|
+
.venv/bin/python3 scripts/gen_pyi.py
|
|
10
|
+
|
|
11
|
+
docs: src/doc.rs
|
|
12
|
+
|
|
13
|
+
#src/doc.rs: venv
|
|
14
|
+
# venv/bin/python3 scripts/build_doc.py
|
|
15
|
+
|
|
16
|
+
model: .venv
|
|
17
|
+
.venv/bin/python3 scripts/build_model.py
|
|
18
|
+
|
|
19
|
+
lib: model docs
|
|
20
|
+
.venv/bin/maturin build --release
|
|
21
|
+
|
|
22
|
+
venv:
|
|
23
|
+
python3 -m venv .venv
|
|
24
|
+
.venv/bin/pip3 install -r requirements.txt
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: py-horned-owl
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.3.0.dev1
|
|
4
4
|
Classifier: Programming Language :: Rust
|
|
5
5
|
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
6
6
|
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
7
|
+
Requires-Dist: jinja2>=3.1.6
|
|
7
8
|
License-File: COPYING
|
|
8
9
|
License-File: COPYING.lesser
|
|
9
10
|
Author: Janna Hastings <j.hastings@ucl.ac.uk>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
Reasoner
|
|
2
|
+
==========
|
|
3
|
+
|
|
4
|
+
Py-Horned-OWL provides an interface for reasoners that are compatible with the Horned OWL library.
|
|
5
|
+
|
|
6
|
+
Using a reasoner
|
|
7
|
+
----------------
|
|
8
|
+
A compatible reasoner should provide a python package that exports a `create_reasoner` function. This functions takes an ontology as an argument and returns a :class:`~pyhornedowl.PyReasoner` instance which can be used to perform reasoning tasks. The ontology instance is linked to the reasoner, which means that any changes to the ontology will be reflected in the reasoner. But, a manual call to :func:`PyReasoner.flush <pyhornedowl.PyReasoner.flush>` is required to update the reasoner with any changes made to the ontology. Here is an example with the EL Reasoner `whelk-rs <https://github.com/INCATools/whelk-rs>`__ via `PyWhelk <https://github.com/ontology-tools/py-whelk/>`__.
|
|
9
|
+
|
|
10
|
+
.. code-block:: console
|
|
11
|
+
|
|
12
|
+
(.venv) $ pip install pyhornedowl pywhelk
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
.. code-block:: python
|
|
16
|
+
|
|
17
|
+
import pyhornedowl
|
|
18
|
+
import pywhelk
|
|
19
|
+
|
|
20
|
+
# Open an ontology
|
|
21
|
+
o = pyhornedowl.open_ontology("<path/to/ontology>")
|
|
22
|
+
|
|
23
|
+
# Create a reasoner instance
|
|
24
|
+
reasoner = pywhelk.create_reasoner(o)
|
|
25
|
+
|
|
26
|
+
# Perform reasoning tasks
|
|
27
|
+
print(f"Ontology is consistent: {reasoner.is_consistent()}")
|
|
28
|
+
|
|
29
|
+
# Modify the ontology and make it inconsistent
|
|
30
|
+
from pyhornedowl.model import SubClassOf
|
|
31
|
+
o.add_axiom(SubClassOf(o.clazz('owl:Thing'), o.clazz('owl:Nothing')))
|
|
32
|
+
|
|
33
|
+
# The ontology is now inconsistent, but the reasoner is not yet aware of it
|
|
34
|
+
print(f"Ontology is consistent: {reasoner.is_consistent()}")
|
|
35
|
+
# Flush the reasoner to update it
|
|
36
|
+
reasoner.flush()
|
|
37
|
+
# Now the reasoner is aware of the inconsistency
|
|
38
|
+
print(f"Ontology is consistent: {reasoner.is_consistent()}")
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
Developing a reasoner
|
|
43
|
+
---------------------
|
|
44
|
+
|
|
45
|
+
To make a reasoner written in Rust and with Horned-OWL compatible with Py-Horned-OWL, the library must export a type which implements the `Reasoner` trait and a `create_reasoner` function with the following signature:
|
|
46
|
+
|
|
47
|
+
.. code-block:: rust
|
|
48
|
+
|
|
49
|
+
#[unsafe(no_mangle)]
|
|
50
|
+
pub fn create_reasoner(
|
|
51
|
+
ontology: SetOntology<ArcStr>,
|
|
52
|
+
) -> Box<dyn Reasoner<ArcStr, ArcAnnotatedComponent>>
|
|
53
|
+
|
|
54
|
+
The library must be compiled as a shared C library (crate type "cdylib"). The reasoner can then be used in Python using :func:`~pyhornedowl.create_reasoner`, which takes the path to the shared library as an argument and returns a :func:`~pyhornedowl.PyReasoner` instance. There is the helper trait `PyReasoner` and macro `export_py_reasoner!` to get type checking for the `create_reasoner` function. A typical reasoner implementation would look like this:
|
|
55
|
+
|
|
56
|
+
.. code-block:: rust
|
|
57
|
+
|
|
58
|
+
pub struct MyReasoner {
|
|
59
|
+
pending_insert: Vec<ArcAnnotatedComponent>,
|
|
60
|
+
pending_remove: Vec<ArcAnnotatedComponent>,
|
|
61
|
+
// ... any other fields needed for storing the internal state of the reasoner
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export_py_reasoner!(MyReasoner);
|
|
65
|
+
|
|
66
|
+
impl PyReasoner for MyReasoner {
|
|
67
|
+
fn create_reasoner(ontology: SetOntology<ArcStr>) -> Self {
|
|
68
|
+
todo!()
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
impl OntologyIndex<ArcStr, ArcAnnotatedComponent> for MyReasoner {
|
|
73
|
+
fn index_insert(&mut self, cmp: ArcAnnotatedComponent) -> bool {
|
|
74
|
+
self.pending_insert.push(cmp);
|
|
75
|
+
true
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
fn index_remove(&mut self, _cmp: &AnnotatedComponent<ArcStr>) -> bool {
|
|
79
|
+
self.pending_remove.push(cmp);
|
|
80
|
+
true
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
impl Reasoner<ArcStr, ArcAnnotatedComponent> for MyReasoner {
|
|
85
|
+
fn get_name(&self) -> String {
|
|
86
|
+
todo!()
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
fn flush(&mut self) -> Result<(), ReasonerError> {
|
|
90
|
+
// Handle the pending inserts and removes and update the internal state of the reasoner
|
|
91
|
+
todo!()
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
fn inferred_axioms(&self) -> Box<dyn Iterator<Item = Component<ArcStr>>> {
|
|
95
|
+
// Return an iterator over the inferred axioms based on the internal state of the reasoner
|
|
96
|
+
todo!()
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
// implement any other methods from the `Reasoner` trait supported by your reasoner. By default, all methods are implemented to return `Err(ReasonerError::NotImplemented)`.
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
It might be useful to package the reasoner as a Python package that exports the `create_reasoner` function, so it can be installed via pip and used directly in Python. The `py-whelk project <https://github.com/ontology-tools/py-whelk/>`__ is an example that can be used as a reference.
|
|
105
|
+
|
|
106
|
+
How it works
|
|
107
|
+
------------
|
|
108
|
+
A specific reasoner can be developed using Horned-OWL without targeting Py-Horned-OWL directly. To add support for a specific reasoner anybody can create a Rust library that implements the `Reasoner` trait and exports a `create_reasoner` function without dealing with the specifics of PyO3 or Py-Horned-OWLs inner workings. Py-Horned-OWL provides the necessary wrappers and facades to make the Rust functions available in Python through the :class:`~pyhornedowl.PyReasoner` class. To create a reasoner it will load the shared library dynamically, look for the `create_reasoner` function and call it.
|
|
109
|
+
|
|
110
|
+
This seperation allows for reasoners to be developed and installed independently of Py-Horned-OWL and without the need to understand the Python bindings or the PyO3 library.
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
name = "py-horned-owl-reasoner"
|
|
3
3
|
version = "0.1.0"
|
|
4
4
|
edition = "2018"
|
|
5
|
+
license = "LGPL-3.0-or-later"
|
|
5
6
|
|
|
6
7
|
[lib]
|
|
7
8
|
name = "pyhornedowlreasoner"
|
|
8
9
|
|
|
9
10
|
[dependencies]
|
|
10
|
-
|
|
11
|
-
horned-owl = { git = "https://github.com/phillord/horned-owl", branch = "devel" }
|
|
11
|
+
horned-owl = "^1.1"
|