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.
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.
What it does. Turns an RDF graph into model entities, following a YAML mapper and, where YAML is not enough, a reader class.
What it is. The entity classes of lode.models (Concept, Relation, Statement, ...). The reader creates them, the artefact holds them, the viewer reads them.
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.
What it does. Turns the artefact into the dictionaries the HTML templates render, and into RDF serializations.
Dependency rules¶
The viewer does not import the reader.
The model imports neither the reader nor the viewer.
The reader does not import the viewer.
The core (reader, viewer, model, helpers) reaches a profile only through the registry in
lode.profiles. It never imports a profile package.A profile does not import another profile.
tests/unit/core/test_architecture.py checks these rules on the source files, so a violation fails the test suite.