Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Architecture

LODE is built in layers. Data flows in one direction, from the document you give it to the documentation it produces, and each layer knows only the one before it. A new format is a profile that plugs into this flow. The cards below follow it in order, and each one says what the step does, what you can change, and where to read more.

The numbers are those of the cards below. Solid arrows are the data flow; dotted ones are what the steps rely on.

1. Profile

What it is. The package lode/profiles/<format>/ that tells LODE how to read and show one format. It is the only place that knows which formats exist.

2. Reader

What it does. Turns an RDF graph into model entities, following a YAML mapper and, where YAML is not enough, a reader class.

3. Model

What it is. The entity classes of lode.models (Concept, Relation, Statement, ...). The reader creates them, the artefact holds them, the viewer reads them.

4. Artefact

What it is. The hand-over between the reader and everything after it: entities, graph, warnings and format. Viewers, the builder and the API depend on it only.

5. Viewer

What it does. Turns the artefact into the dictionaries the HTML templates render, and into RDF serializations.

Dependency rules

tests/unit/core/test_architecture.py checks these rules on the source files, so a violation fails the test suite.