Skip to content

Commit 0811549

Browse files
authored
Merge pull request #528 from dice-group/develop
New release: 0.9.2
2 parents 4c8a6a1 + 8e427a7 commit 0811549

20 files changed

+708
-340
lines changed

.coveragerc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
[run]
22
omit =
33
tests/*
4-
ontolearn/triple_store.py
54

65
[report]
76
exclude_lines =

.github/workflows/test.yml

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
name: Python package
22

3-
on: [push,pull_request]
3+
on: [push, pull_request]
44

55
jobs:
66
build:
77
runs-on: ubuntu-latest
8+
services:
9+
fuseki:
10+
image: stain/jena-fuseki
11+
ports:
12+
- 3030:3030
13+
options: >-
14+
--health-cmd "curl --silent --fail http://localhost:3030 || exit 1"
15+
--health-interval 10s
16+
--health-timeout 5s
17+
--health-retries 5
18+
env:
19+
ADMIN_PASSWORD: admin
20+
821
strategy:
922
matrix:
1023
python-version: ["3.10.14"]
1124
max-parallel: 5
25+
1226
steps:
1327
- uses: actions/checkout@v3
28+
1429
- name: Set up Python ${{ matrix.python-version }}
1530
uses: actions/setup-python@v4
1631
with:
1732
python-version: ${{ matrix.python-version }}
33+
1834
- name: Install dependencies
1935
run: |
2036
python -m pip install --upgrade pip
@@ -32,8 +48,30 @@ jobs:
3248
wget https://files.dice-research.org/projects/NCES/NCES_Ontolearn_Data/NCESData.zip
3349
unzip KGs.zip && unzip LPs.zip && unzip NCESData.zip && unzip CLIPData.zip
3450
51+
- name: Wait for Fuseki to start
52+
run: |
53+
echo "Waiting for Fuseki to be ready..."
54+
until curl -s http://localhost:3030; do
55+
sleep 2
56+
done
57+
echo "Fuseki is up!"
58+
59+
- name: Create dataset (mutagenesis)
60+
run: |
61+
curl -X POST http://localhost:3030/$/datasets \
62+
--user admin:admin \
63+
--header "Content-Type: application/x-www-form-urlencoded" \
64+
--data "dbName=mutagenesis&dbType=tdb"
65+
66+
- name: Load OWL data into Fuseki
67+
run: |
68+
curl -X PUT -H "Content-Type: application/rdf+xml" \
69+
--data-binary @KGs/Mutagenesis/mutagenesis.owl \
70+
http://localhost:3030/mutagenesis/data \
71+
--user admin:admin
72+
3573
- name: Testing and coverage report
3674
run: |
3775
pip install coverage
3876
coverage run -m pytest -p no:warnings -x
39-
coverage report -m
77+
coverage report -m

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,3 +163,5 @@ KGs.zip
163163
**/CLIPData*
164164
**/LPs*
165165
LPs.zip
166+
/results/
167+
reports.csv

README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
[![Downloads](https://static.pepy.tech/badge/ontolearn)](https://pepy.tech/project/ontolearn)
22
[![Downloads](https://img.shields.io/pypi/dm/ontolearn)](https://pypi.org/project/ontolearn/)
33
[![Coverage](https://img.shields.io/badge/coverage-86%25-green)](https://ontolearn-docs-dice-group.netlify.app/usage/09_further_resources#code-coverage)
4-
[![Pypi](https://img.shields.io/badge/pypi-0.9.1-blue)](https://pypi.org/project/ontolearn/0.9.1/)
5-
[![Docs](https://img.shields.io/badge/documentation-0.9.1-yellow)](https://ontolearn-docs-dice-group.netlify.app/usage/01_introduction)
4+
[![Pypi](https://img.shields.io/badge/pypi-0.9.2-blue)](https://pypi.org/project/ontolearn/0.9.2/)
5+
[![Docs](https://img.shields.io/badge/documentation-0.9.2-yellow)](https://ontolearn-docs-dice-group.netlify.app/usage/01_introduction)
66
[![Python](https://img.shields.io/badge/python-3.10.13+-4584b6)](https://www.python.org/downloads/release/python-31013/)
7+
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/dice-group/Ontolearn)
78
 
89

910
![Ontolearn](docs/_static/images/Ontolearn_logo.png)
@@ -244,6 +245,16 @@ To compute the test performance, we compute F1-score of H w.r.t. test positive a
244245
# To download learning problems and benchmark learners on the Family benchmark dataset with benchmark learning problems.
245246
python examples/concept_learning_cv_evaluation.py --kb ./KGs/Family/family-benchmark_rich_background.owl --lps ./LPs/Family/lps_difficult.json --path_of_nces_embeddings ./NCESData/family/embeddings/ConEx_entity_embeddings.csv --path_of_clip_embeddings ./CLIPData/family/embeddings/ConEx_entity_embeddings.csv --max_runtime 60 --report family_results.csv
246247
```
248+
249+
```shell
250+
# To download learning problems and benchmark with selected learners on the Family benchmark dataset with benchmark learning problems.
251+
python examples/concept_learning_cv_evaluation.py --kb ./KGs/Family/family-benchmark_rich_background.owl --lps ./LPs/Family/lps_difficult.json --learner_types ocel drill tdl nces --path_of_nces_embeddings ./NCESData/family/embeddings/ConEx_entity_embeddings.csv --path_of_clip_embeddings ./CLIPData/family/embeddings/ConEx_entity_embeddings.csv --max_runtime 60 --report family_results.csv
252+
```
253+
254+
```shell
255+
# To download learning problems and benchmark with a single learner on the Family benchmark dataset with benchmark learning problems.
256+
python examples/concept_learning_cv_evaluation.py --kb ./KGs/Family/family-benchmark_rich_background.owl --lps ./LPs/Family/lps_difficult.json --learner_types nces --path_of_nces_embeddings ./NCESData/family/embeddings/ConEx_entity_embeddings.csv --path_of_clip_embeddings ./CLIPData/family/embeddings/ConEx_entity_embeddings.csv --max_runtime 60 --report family_results.csv
257+
```
247258
In the following python script, the results are summarized and the markdown displayed below generated.
248259
```python
249260
import pandas as pd

docs/usage/01_introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# About Ontolearn
22

3-
**Version:** ontolearn 0.9.1
3+
**Version:** ontolearn 0.9.2
44

55
**GitHub repository:** [https://github.com/dice-group/Ontolearn](https://github.com/dice-group/Ontolearn)
66

docs/usage/09_further_resources.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ You can also reach us privately in any of the emails below:
139139

140140
## Code Coverage
141141

142-
The coverage report is generated using [coverage.py](https://coverage.readthedocs.io/en) for Ontolearn v0.9.1.
142+
The coverage report is generated using [coverage.py](https://coverage.readthedocs.io/en) for Ontolearn v0.9.2.
143143

144144

145145
```
@@ -167,7 +167,7 @@ ontolearn/learners/__init__.py 5 0 100%
167167
ontolearn/learners/celoe.py 167 25 85% 158, 183, 237, 241, 314-318, 332, 335-360
168168
ontolearn/learners/drill.py 31 0 100%
169169
ontolearn/learners/ocel.py 21 0 100%
170-
ontolearn/learners/tree_learner.py 193 28 85% 160, 243-273, 361, 368, 370-374, 390, 393, 414, 423
170+
ontolearn/learners/tree_learner.py 193 27 86% 160, 243-273, 361, 368, 370-374, 390, 393, 414
171171
ontolearn/learning_problem.py 55 9 84% 98, 119, 129, 135-140
172172
ontolearn/learning_problem_generator.py 16 0 100%
173173
ontolearn/lp_generator/__init__.py 2 0 100%
@@ -177,16 +177,17 @@ ontolearn/metrics.py 50 0 100%
177177
ontolearn/nces_architectures.py 73 0 100%
178178
ontolearn/nces_modules.py 143 29 80% 44-45, 68-69, 72, 200-203, 213-242, 245-246
179179
ontolearn/nces_trainer.py 196 12 94% 72, 76, 85, 89, 174, 181-183, 204, 219-221
180-
ontolearn/nces_utils.py 99 62 37% 58-59, 64-82, 89-141, 147, 156
180+
ontolearn/nces_utils.py 99 60 39% 64-82, 89-141, 147, 156
181181
ontolearn/owl_neural_reasoner.py 178 22 88% 72-94, 101, 121, 127, 133, 137, 165-173, 196, 240, 251, 256, 271, 399-402
182182
ontolearn/quality_funcs.py 39 27 31% 32-56, 60-69
183-
ontolearn/refinement_operators.py 519 26 95% 165-166, 296, 397-398, 444, 538, 562, 596-598, 743, 779, 885, 913, 932, 958-960, 967, 988-990, 992, 994, 1062, 1084
183+
ontolearn/refinement_operators.py 519 25 95% 165-166, 296, 397-398, 444, 538, 562, 596-598, 743, 779, 885, 913, 958-960, 967, 988-990, 992, 994, 1062, 1084
184184
ontolearn/search.py 293 43 85% 69, 132, 163-170, 195, 215, 264, 302, 306, 309, 338, 391, 411, 428, 432, 440, 451-452, 455-463, 466, 481, 483, 508, 510, 575-576, 665-666, 761, 765, 769
185+
ontolearn/triple_store.py 501 237 53% 102-103, 121-122, 134-135, 151, 154-160, 167, 215-218, 225-230, 233-235, 242, 248-254, 284-286, 289, 304, 307-311, 323-327, 330-334, 339-341, 350-353, 364-368, 371-373, 376-385, 388-390, 397-398, 402-411, 454-456, 484-495, 503-515, 518-522, 525-529, 532-533, 536-537, 541-549, 553-561, 567, 571, 586-590, 594, 642, 646, 652, 663-667, 712, 738, 751, 795, 798, 809-811, 814, 818-830, 833, 836, 839, 842-844, 856-860, 889-890, 893, 896-897, 900-901, 904-905, 909, 912-913, 917, 921, 924, 928-933, 937-951, 959-965, 974-981, 985-991, 994, 997, 1000, 1003, 1006, 1009, 1012, 1015, 1020-1025, 1030-1035, 1041-1046, 1052-1057, 1060, 1068, 1072-1073, 1076-1077, 1082, 1087
185186
ontolearn/utils/__init__.py 33 2 94% 58, 98
186187
ontolearn/utils/log_config.py 19 0 100%
187188
ontolearn/utils/oplogging.py 8 0 100%
188189
ontolearn/utils/static_funcs.py 111 26 77% 53, 64, 138, 170-175, 216-217, 232-249
189190
ontolearn/value_splitter.py 159 6 96% 111-113, 118, 127, 130
190191
---------------------------------------------------------------------------
191-
TOTAL 5005 775 85%
192+
TOTAL 5506 1008 82%
192193
```

0 commit comments

Comments
 (0)