Skip to content

Commit 536cec1

Browse files
committed
fix(test): track pre-built indexes and surface pytest failures in CI
1 parent 2a9d328 commit 536cec1

33 files changed

Lines changed: 293 additions & 15 deletions

.github/workflows/run_tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ jobs:
3737

3838
- name: Run tests with coverage
3939
run: |
40+
set -o pipefail
4041
uv run pytest | tee pytest-output.txt
4142
echo "COVERAGE=$(grep TOTAL pytest-output.txt | awk '{print $4}')" >> $GITHUB_ENV
4243

.gitignore

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ var/
2828

2929
# Tests
3030
test/virtuoso-test-data/
31-
test/virtuoso-meta-data/*
32-
!test/virtuoso-meta-data/meta_subset.nq
33-
test/qlever-index-data/*
34-
!test/qlever-index-data/index_subset.nt
31+
test/virtuoso-meta-data/database/virtuoso.lck
32+
test/virtuoso-meta-data/database/virtuoso.log
33+
test/virtuoso-meta-data/index_entities.txt
34+
test/qlever-index-data/oc-index-test.server-log.txt
3535
.coverage
3636

3737
# uv

test/conftest.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
TEST_DIR = os.path.dirname(os.path.abspath(__file__))
2525
QLEVER_DATA_DIR = os.path.join(TEST_DIR, "qlever-index-data")
2626
VIRTUOSO_DATA_DIR = os.path.join(TEST_DIR, "virtuoso-meta-data")
27+
VIRTUOSO_DB_DIR = os.path.join(VIRTUOSO_DATA_DIR, "database")
2728

2829

2930
def _wait_for_http(port: int, timeout: int = 60) -> None:
@@ -88,23 +89,13 @@ def virtuoso_endpoint():
8889
"-p", f"{VIRTUOSO_HTTP_PORT}:8890",
8990
"-p", f"{VIRTUOSO_ISQL_PORT}:1111",
9091
"-e", "DBA_PASSWORD=dba",
91-
"-e", "VIRT_Parameters_DirsAllowed=/",
92-
"-v", f"{VIRTUOSO_DATA_DIR}:/data",
92+
"-v", f"{VIRTUOSO_DB_DIR}:/opt/virtuoso-opensource/database",
9393
VIRTUOSO_IMAGE,
9494
],
9595
check=True,
9696
capture_output=True,
9797
)
9898
_wait_for_virtuoso(VIRTUOSO_CONTAINER)
99-
subprocess.run(
100-
[
101-
"docker", "exec", VIRTUOSO_CONTAINER,
102-
"isql", "1111", "dba", "dba",
103-
"exec=ld_dir('/data', 'meta_subset.nq', ''); rdf_loader_run(); checkpoint;",
104-
],
105-
check=True,
106-
capture_output=True,
107-
)
10899
yield f"http://127.0.0.1:{VIRTUOSO_HTTP_PORT}/sparql"
109100
subprocess.run(["docker", "stop", VIRTUOSO_CONTAINER], capture_output=True)
110101
subprocess.run(["docker", "rm", "-f", VIRTUOSO_CONTAINER], capture_output=True)
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2026-03-08 15:08:39.865 - INFO: QLever index builder 6168b36, compiled on Fri Mar 6 04:34:10 UTC 2026 using git hash 6168b3
2+
2026-03-08 15:08:39.865 - INFO: Locale was not specified in settings file, default is en_US
3+
2026-03-08 15:08:39.865 - INFO: You specified "locale = en_US" and "ignore-punctuation = 0"
4+
2026-03-08 15:08:39.865 - INFO: By default, integers that cannot be represented by QLever will throw an exception
5+
2026-03-08 15:08:39.865 - WARN: Implicitly using the parallel parser for a single input file for reasons of backward compatibility; this is deprecated, please use the command-line option --parse-parallel or -p
6+
2026-03-08 15:08:39.865 - INFO: Processing triples from single input stream /dev/stdin (parallel = true) ...
7+
2026-03-08 15:08:39.868 - INFO: Parsing input triples and creating partial vocabularies, one per batch ...
8+
2026-03-08 15:08:39.930 - INFO: Triples parsed: 208 [average speed 0.0 M/s]
9+
2026-03-08 15:08:39.939 - INFO: Number of triples created (including QLever-internal ones): 208 [may contain duplicates]
10+
2026-03-08 15:08:39.939 - INFO: Number of partial vocabularies created: 1
11+
2026-03-08 15:08:39.939 - INFO: Merging partial vocabularies ...
12+
2026-03-08 15:08:39.940 - INFO: Words merged: 117 [average speed 0.3 M/s]
13+
2026-03-08 15:08:39.942 - INFO: Finished writing compressed internal vocabulary, size = 1288 B [uncompressed = 5662 B, ratio = 22%]
14+
2026-03-08 15:08:39.942 - INFO: Number of words in external vocabulary: 117
15+
2026-03-08 15:08:39.946 - INFO: Converting triples from local IDs to global IDs ...
16+
2026-03-08 15:08:39.947 - INFO: Triples converted: 208 [average speed 0.2 M/s]
17+
2026-03-08 15:08:39.948 - INFO: Creating permutations SPO and SOP ...
18+
2026-03-08 15:08:39.949 - INFO: Number of inputs to `uniqueView`: 208
19+
2026-03-08 15:08:39.949 - INFO: Number of unique elements: 208
20+
2026-03-08 15:08:39.949 - INFO: Triples sorted: 208 [average speed 2.5 M/s]
21+
2026-03-08 15:08:39.950 - INFO: Statistics for SPO: #relations = 52, #blocks = 1, #triples = 208
22+
2026-03-08 15:08:39.951 - INFO: Statistics for SOP: #relations = 52, #blocks = 1, #triples = 208
23+
2026-03-08 15:08:39.951 - INFO: Number of distinct patterns: 1
24+
2026-03-08 15:08:39.951 - INFO: Number of subjects with pattern: 52 [all]
25+
2026-03-08 15:08:39.951 - INFO: Total number of distinct subject-predicate pairs: 208
26+
2026-03-08 15:08:39.951 - INFO: Average number of predicates per subject: 4.0
27+
2026-03-08 15:08:39.951 - INFO: Average number of subjects per predicate: 52
28+
2026-03-08 15:08:39.951 - INFO: Creating permutations OSP and OPS ...
29+
2026-03-08 15:08:39.952 - INFO: Triples sorted: 208 [average speed 5.5 M/s]
30+
2026-03-08 15:08:39.954 - INFO: Statistics for OSP: #relations = 56, #blocks = 1, #triples = 208
31+
2026-03-08 15:08:39.954 - INFO: Statistics for OPS: #relations = 56, #blocks = 1, #triples = 208
32+
2026-03-08 15:08:39.954 - INFO: Adding 52 triples to the POS and PSO permutation for the internal `ql:has-pattern` ...
33+
2026-03-08 15:08:39.955 - INFO: Creating permutations PSO and POS ...
34+
2026-03-08 15:08:39.956 - INFO: Number of inputs to `uniqueView`: 52
35+
2026-03-08 15:08:39.956 - INFO: Number of unique elements: 52
36+
2026-03-08 15:08:39.956 - INFO: Triples sorted: 52 [average speed 1.8 M/s]
37+
2026-03-08 15:08:39.957 - INFO: Statistics for PSO: #relations = 1, #blocks = 1, #triples = 52
38+
2026-03-08 15:08:39.957 - INFO: Statistics for POS: #relations = 1, #blocks = 1, #triples = 52
39+
2026-03-08 15:08:39.957 - INFO: Creating permutations PSO and POS ...
40+
2026-03-08 15:08:39.958 - INFO: Triples sorted: 208 [average speed 6.3 M/s]
41+
2026-03-08 15:08:39.958 - INFO: Statistics for PSO: #relations = 4, #blocks = 1, #triples = 208
42+
2026-03-08 15:08:39.958 - INFO: Statistics for POS: #relations = 4, #blocks = 1, #triples = 208
43+
2026-03-08 15:08:39.959 - INFO: Index build completed
845 Bytes
Binary file not shown.
4.03 KB
Binary file not shown.
846 Bytes
Binary file not shown.
4.03 KB
Binary file not shown.
88 Bytes
Binary file not shown.
884 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)