No description
Find a file
2026-01-13 14:51:08 +01:00
api subdomains and CORS 2026-01-13 14:51:08 +01:00
fuseki init commit 2026-01-13 11:32:57 +01:00
kg init commit 2026-01-13 11:32:57 +01:00
osl subdomains and CORS 2026-01-13 14:51:08 +01:00
python init commit 2026-01-13 11:32:57 +01:00
.gitignore Initial commit 2026-01-13 11:31:05 +01:00
Caddyfile.snippet subdomains and CORS 2026-01-13 14:51:08 +01:00
docker-compose.yml subdomains and CORS 2026-01-13 14:51:08 +01:00
LICENSE Initial commit 2026-01-13 11:31:05 +01:00
README.md subdomains and CORS 2026-01-13 14:51:08 +01:00

Health Methods KG Starter (Task-first, theory + practice)

This repository bootstraps a methods knowledge graph for health/public health analytics:

  • what methods exist (stat/ML/math)
  • what tasks they address (task-first navigation)
  • what data types they operate on
  • assumptions and outputs
  • practical implementations (libraries, repos), tutorials, papers
  • live updates via an API that writes validated triples into Fuseki named graphs
  • SHACL shapes to keep your graph consistent

Services

Start

docker compose up -d

Load seed data into Fuseki

cd python
python -m venv .venv
# Windows: .venv\Scripts\activate
# Linux/macOS: source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
python -m tools.load_seed
python -m tools.validate_seed

Live updates from OSL

For live updates, have OSL pages/forms POST JSON to the API endpoints:

  • POST /upsert/method
  • POST /upsert/implementation

Examples are in python/tools/example_requests.md.

Versioning and consistency

Each API write:

  • replaces the current snapshot in KG_GRAPH_INSTANCES for the edited subject
  • appends the same triples into a timestamped edit graph
    • .../graph/method-edits/<version>/<timestamp>
    • .../graph/implementation-edits/<version>/<timestamp>

What to edit next

  • expand vocabularies: tasks, datatypes, assumptions, outputs
  • add more methods and link them using: generalizes / extends / neuralImplementationOf / oftenCombinedWith
  • add tutorial & paper instances
  • add evaluation metrics vocabulary and ex:evaluatedBy

OSL Templates & Forms

See osl/Templates/README_OSL_TEMPLATES.md for pages you can import (Template:Method, optional Form:Method) and a live-update box that posts to the API.

Caddy reverse proxy (bastler_internal)

This stack is designed to sit behind a separate Caddy reverse proxy compose. All services join the external Docker network bastler_internal (see docker-compose.yml). A ready-to-use Caddyfile snippet is in Caddyfile.snippet.

Authelia + CORS (subdomains)

This repo ships a Caddy snippet (Caddyfile.snippet) that protects api.osl.bastler.space and fuseki.osl.bastler.space using Authelia forward_auth.

CORS

The API enables CORS for the OSL origin. Set via OSL_ORIGIN env var in docker-compose.yml (default: https://osl.bastler.space).

DNS

You need DNS records for:

  • osl.bastler.space
  • api.osl.bastler.space
  • fuseki.osl.bastler.space

Unless you already have a wildcard record like *.bastler.space pointing at your Caddy entrypoint (or you use Caddy on-demand TLS with appropriate DNS pointing). If no wildcard exists, create A/AAAA (or CNAME) records for each subdomain.