Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
45b4531
Add oekg.registry package
jh-RLI Jun 14, 2026
a943d61
Add Dimension Property Registry (harmonized comparison vocabulary)
jh-RLI Jun 14, 2026
12e5e26
Add registry loader: YAML -> registry.json contract + accessors
jh-RLI Jun 14, 2026
ba1c6c2
Add registry structural validator + work-list report
jh-RLI Jun 14, 2026
e562382
Add TIB Terminology Service label->IRI resolver
jh-RLI Jun 14, 2026
14fe08f
Add registry-driven test OBDA mapping generator
jh-RLI Jun 14, 2026
e0a80e4
Add registry-driven test OBDA mapping generator
jh-RLI Jun 14, 2026
8f4461c
Document the Dimension Property Registry
jh-RLI Jun 14, 2026
7bb82ee
Add LinkML registry sample (format evaluation)
jh-RLI Jun 14, 2026
580d833
Serve the dimension registry contract at /oekg/registry/
jh-RLI Jun 14, 2026
4fa7522
Wire the dimension_registry endpoint
jh-RLI Jun 14, 2026
ad8fb19
Add dimensionRegistry endpoint to frontend config
jh-RLI Jun 14, 2026
d500b1e
Add useRegistry hook (fetch /oekg/registry/)
jh-RLI Jun 14, 2026
9d4a1a5
Add registry-driven SPARQL builders
jh-RLI Jun 14, 2026
4f1ebf9
Add TS term resolver (frontend, shared)
jh-RLI Jun 14, 2026
0306a72
Add registry-driven comparison view (beta)
jh-RLI Jun 14, 2026
e28dce4
Mount Registry (beta) comparison tab
jh-RLI Jun 14, 2026
23d3061
Add ariadne2 IAMC test mapping (registry-generated)
jh-RLI Jun 14, 2026
bb30fb5
Merge branch 'feature-2339-enhance-data-comparison-workflow' of https…
jh-RLI Jun 15, 2026
79c0b9e
Add ontop-reload.sh: restart dev ontop + verify served mapping matche…
jh-RLI Jul 9, 2026
9e6588e
Add registry-generated AMIRIS mapping (facets, units, time axis)
jh-RLI Jul 12, 2026
4980ccf
Add WF-07 multi-source selection prototype (3 variants) + comparabili…
jh-RLI Jul 12, 2026
5181094
Update WF-07 prototype notes: eu_leg measure gap charted as WF-21
jh-RLI Jul 13, 2026
8839a2a
Build out WF-07 variant B per maintainer reaction round 1
jh-RLI Jul 13, 2026
684c143
Add measure bar to WF-07 variant B (reaction round 2)
jh-RLI Jul 13, 2026
fe881ec
Add no-data feedback and raw-data peek to WF-07 prototype (round 3)
jh-RLI Jul 13, 2026
5e41ecc
Resolve chart legend terms via TIB + add zoom (WF-07 round 4)
jh-RLI Jul 13, 2026
8cc1959
Note WF-07 reaction round 5: entry-point issue charted as WF-24
jh-RLI Jul 13, 2026
66327b7
WF-07 round 6: chart title, computation statement, measure picker, Ho…
jh-RLI Jul 13, 2026
92b57dc
WF-07 round 7: picker controls into the dropdown, toolbar alignment
jh-RLI Jul 13, 2026
027f5c9
WF-07 round 7 follow-up: picker controls as circular icon buttons
jh-RLI Jul 13, 2026
a334b71
WF-07 round 8: facet semantics fixes + chart transparency
jh-RLI Jul 13, 2026
f7f8b7d
WF-07 round 9: facet filters + scenario-mode rail
jh-RLI Jul 13, 2026
2bef0a5
WF-07 round 10: measures per rail row, scenario provenance per measure
jh-RLI Jul 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions docker/ontop-reload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env bash
# SPDX-FileCopyrightText: 2026 Jonas Huber <https://github.com/jh-RLI> © Reiner Lemoine Institut
#
# SPDX-License-Identifier: AGPL-3.0-or-later

# Restart the dev ontop container and verify that what it serves matches
# docker/serviceConfigs/ontop/mapping.obda.
#
# ontop reads the OBDA mapping ONLY at startup: after a branch switch or a
# mapping edit, a running container silently keeps serving the old mapping
# (newly mapped tables return 0 rows). Run this after any mapping change.
#
# Usage:
# ./docker/ontop-reload.sh restart, wait for the endpoint, verify
# ./docker/ontop-reload.sh --check verify only (no restart)
#
# Environment overrides: ONTOP_CONTAINER (default: ontop),
# ONTOP_ENDPOINT (default: http://localhost:8080/sparql), ONTOP_TIMEOUT (120s).
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CONTAINER="${ONTOP_CONTAINER:-ontop}"
ENDPOINT="${ONTOP_ENDPOINT:-http://localhost:8080/sparql}"
MAPPING="$SCRIPT_DIR/serviceConfigs/ontop/mapping.obda"
# table-name predicate emitted by every row anchor (see oekg/registry)
TABLE_PRED="https://openenergyplatform.org/ontology/oeo/OEO_00000504"
TIMEOUT="${ONTOP_TIMEOUT:-120}"

if [[ "${1:-}" != "--check" ]]; then
echo "Restarting '$CONTAINER'..."
docker restart "$CONTAINER" >/dev/null
fi

printf 'Waiting for %s ' "$ENDPOINT"
deadline=$((SECONDS + TIMEOUT))
until curl -sf -o /dev/null --data-urlencode 'query=ASK {}' "$ENDPOINT"; do
if ((SECONDS >= deadline)); then
printf '\nERROR: endpoint not answering after %ss\n' "$TIMEOUT" >&2
exit 1
fi
printf '.'
sleep 3
done
printf ' up.\n'

# Tables the mapping file on disk maps (FROM "schema"."table" in the source SQL).
mapfile -t expected < <(grep -oE 'FROM[[:space:]]+"[^"]+"\."[^"]+"' "$MAPPING" |
sed -E 's/.*\."([^"]+)"$/\1/' | sort -u)
if ((${#expected[@]} == 0)); then
echo "ERROR: no mapped tables found in $MAPPING" >&2
exit 1
fi

# Tables the running endpoint actually serves, with row counts.
query="SELECT ?t (COUNT(?s) AS ?c) WHERE { ?s <$TABLE_PRED> ?t } GROUP BY ?t ORDER BY ?t"
csv="$(curl -sf -H 'Accept: text/csv' --data-urlencode "query=$query" "$ENDPOINT")"

status=0
echo "Mapped tables (mapping.obda on disk vs SPARQL endpoint):"
for t in "${expected[@]}"; do
count="$(printf '%s\n' "$csv" | tr -d '\r' | awk -F, -v t="$t" '$1 == t {print $2}')"
if [[ -n "${count:-}" && "$count" != "0" ]]; then
printf ' OK %-45s %s rows\n' "$t" "$count"
else
printf ' STALE %-45s not served (0 rows)\n' "$t"
status=1
fi
done
if ((status != 0)); then
echo "Verification FAILED: the container serves an older mapping (or the table is empty in Postgres). Re-run without --check to restart." >&2
fi
exit $status
27 changes: 27 additions & 0 deletions docker/serviceConfigs/ontop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,30 @@ Download the database JDBC driver for ontop:
- <https://jdbc.postgresql.org/>

Add the file postgresql.jar to this directory.

## Reloading the mapping (dev)

ontop reads `mapping.obda` **only at startup**. If the file changes while the
container is running — a mapping edit, or a `git checkout` that rewrites it —
the container silently keeps serving the old mapping: newly mapped tables return
0 rows in SPARQL and the comparison frontend shows no data.

After **any** change to `mapping.obda` (including branch switches), run:

```sh
./docker/ontop-reload.sh
```

It restarts the `ontop` container, waits for the SPARQL endpoint, and then
verifies that every table mapped in `mapping.obda` on disk is actually served
(row count > 0 via the table-name predicate `oeo:OEO_00000504`).

To only check whether the running container matches the file on disk, without
restarting:

```sh
./docker/ontop-reload.sh --check
```

A `STALE` line means the container loaded an older mapping (restart it) — or the
table exists in the mapping but is empty in Postgres.
604 changes: 556 additions & 48 deletions docker/serviceConfigs/ontop/mapping.obda

Large diffs are not rendered by default.

Loading
Loading