How the documentation is organised¶
This page is for people writing OasisLMF documentation. It records how the docs are structured, built and published, and the rules to follow when adding a page, so that decisions already taken don’t have to be rediscovered.
Ownership: each repository documents its own code¶
Every code repository owns the documentation for its own code, in-repo, next to that code. One thin orchestrator aggregates them into the published site.
OasisLMF/docs/ MDK, pytools, CLI, the financial module, modelling
methodology, correlation, disaggregation, the kernel
component reference
OasisPlatform/docs/ platform, deployment, distributed execution, REST API
ODS_Tools/docs/ OED loading and validation, the settings schemas
ODS_OpenExposureData/ the OED standard } spec-generated reference
ODS_OpenResultsData/ the ORD standard }
OasisModels/docs/ worked, end-to-end model examples
GenerateDocs orchestrator: pins each repository to a ref, builds each
one, resolves cross-references between them, and publishes
the combined site to oasislmf.github.io
Why this shape:
It kills drift. Conceptual pages sit beside the code, so a behaviour change and its documentation travel in the same pull request and the same review.
One source of truth per topic. The orchestrator holds no prose; it only assembles.
Versioned. The orchestrator pins refs, so each published build maps to real releases and the site can offer a version selector.
Lower barrier. Documentation lives where contributors already are.
The trade-off, accepted deliberately: contributors must know which repository owns a page. If you are unsure, the owner is whichever repository contains the code the page describes.
ktools is being decommissioned and does not own documentation. Its component docs
were drained into this repository and rewritten against the oasislmf/pytools
implementations; ktools is a content source, not a documentation home.
Content model: Diátaxis¶
Four modes, and never two on the same page:
Mode |
Purpose |
Examples here |
Maintained as |
|---|---|---|---|
Tutorials |
Learning by doing |
“Run your first analysis” |
Hand-written, ideally executable |
How-to |
Task recipes |
“Generate Oasis files”, “Configure distributed execution” |
Hand-written |
Reference |
Dry facts |
Python API, CLI options, settings schemas, stream formats |
Generated where possible (autoapi, argparse, schema) |
Explanation |
Understanding |
Financial module, sampling, correlation, disaggregation |
Hand-written, co-located with the algorithms |
The reference layer is largely automatable, which frees effort for the explanation layer — where both the value and the drift risk concentrate.
Each audience gets a landing page: analysts and end users, model developers, platform operators, and contributors.
Tooling¶
In place:
Concern |
Choice |
Why |
|---|---|---|
Engine |
Sphinx |
Already in use; the right tool |
Theme |
Furo |
Branded (Oasis colours, Raleway) |
Authoring |
MyST Markdown alongside reStructuredText |
Lower barrier; both compile, so migration is incremental |
API reference |
|
AST-based, so no heavy imports; avoids a whole-package dump |
Landing pages |
|
Per-audience entry points |
Executable docs |
|
Tutorials run at build time, so they cannot silently rot |
Copy buttons |
|
Contributor experience |
Cross-repo links |
|
See the note below |
Agreed but not yet implemented — worth knowing before you assume a safety net exists:
linkcheckin CI. Dead external links build perfectly cleanly. There is no job running it today.Docstring-coverage gate (e.g.
interrogate), to keep the generated reference honest as the autoapi scope widens.Mermaid diagrams. Diagrams-as-text would diff cleanly and avoid stale binary assets, but the extension is not configured.
A render check. See the first gotcha below: “builds clean” is not “renders clean”.