Skip to content

docs: OED reference site (spec-generated fields & coded values) - #286

Merged
sstruzik merged 8 commits into
mainfrom
docs/migration
Aug 28, 2026
Merged

docs: OED reference site (spec-generated fields & coded values)#286
sstruzik merged 8 commits into
mainfrom
docs/migration

Conversation

@sstruzik

@sstruzik sstruzik commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Stands up a Sphinx documentation site for OED, generated from the specification, so the standard is documented where it is defined.

Part of the cross-repo Oasis documentation restructure (Option B): each repository owns the docs for what it owns, and GenerateDocs aggregates them into the published site.

What this adds

  • A reference site generated from the spec. The field definitions and coded values are produced at build time from this repository's own specification data, so they cannot drift from it — edit the spec, and the pages follow.
  • Diátaxis structure — explanation and reference — with the shared Oasis branding used across all six component sites (Furo, the maroon/red palette, the logo, and a link back to the aggregated documentation home).
  • Cross-component links via intersphinx, driven by the orchestrator so references resolve between components in the assembled site.

OasisLMF and ODS_Tools link here for OED definitions rather than restating them, so this landing removes duplication elsewhere as well as adding pages here.

Review-round changes

  • Dead links repointed. The new link check over the assembled site found two links to OpenDataStandards/tree/master/OpenExposureData/Docs, a path that went when the Open Data Standards repository was split. Now ODS_OpenExposureData/tree/main/Docs, verified 200.
  • conf.py no longer aborts when OASIS_INTERSPHINX_MAP is exported empty: environ.get(NAME, "{}") only substitutes its default when the variable is unset, so an empty value reached json.loads("") and killed the build with a traceback. Now environ.get(NAME) or "{}", verified with the variable unset, set-but-empty and mapped.
  • style: split the one-line import in conf.py that autopep8 flagged as E401, so the cross-component block is lint-clean and identical to the other components'.

Two links in import-format.rst still point at OpenDataStandards/tree/master/OpenExposureData. Those resolve today, so nothing flags them, but they reference the superseded repository — left for a follow-up rather than widened into a fix for what is actually broken.

Build is 0 warnings standalone and in the aggregated build.

Add a Sphinx documentation site for OED, with fields and coded values generated from the specification.

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 31bf943
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/29595728157
Excel File excel_spec.zip
JSON File extracted_spec.zip

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 0b99e0d
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/29597794013
Excel File excel_spec.zip
JSON File extracted_spec.zip

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 61e484b
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/31019937445
Excel File excel_spec.zip
JSON File extracted_spec.zip

@sstruzik
sstruzik marked this pull request as ready for review August 11, 2026 08:58
@sstruzik
sstruzik requested a review from benhayes21 August 11, 2026 14:05
@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 04ce9bc
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/32131775216
Excel File excel_spec.zip
JSON File extracted_spec.zip

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit cefb348
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/32132142032
Excel File excel_spec.zip
JSON File extracted_spec.zip

@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit fc7d993
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/32232654503
Excel File excel_spec.zip
JSON File extracted_spec.zip

sstruzik and others added 6 commits August 27, 2026 12:06
…alues

Standalone Furo/MyST site for the Open Exposure Data standard. Field reference (by
input file: Loc/Acc/ReinsInfo/ReinsScope) and coded-value lists (perils, occupancy,
construction, country, coverage) are generated at build time from oed.json
(_ext/gen_oed_reference.py, which regenerates oed.json from the CSVs if absent);
plus the migrated spec chapters and an overview/hierarchy explanation. Cross-component
links via intersphinx (orchestrator-driven).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add the Oasis logo (light/dark, always visible in the Furo sidebar), the maroon/red
Raleway palette matching oasislmf.github.io, and a persistent 'Oasis documentation home'
link (rewritten to page-relative by the aggregator) so you can return to the top of the
aggregated site from anywhere.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The sidebar logo now returns to the aggregated landing, so the redundant 'Oasis
documentation home' announcement bar is removed. Add the GitHub link in Furo's
conventional spot — the footer icons (bottom of every page).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
`environ.get(NAME, "{}")` only substitutes the default when the variable is UNSET, so
exporting it empty reached json.loads("") and aborted the build with a traceback instead
of falling back to no cross-component inventories. Now `environ.get(NAME) or "{}"`.

Latent rather than live: the GenerateDocs orchestrator always writes valid JSON via
json.dumps, so it triggers only when the variable is exported empty by hand or by a CI
step. Found while reworking the same block in ODS_Tools (#289, 10e38ba) and applied
across the remaining components for consistency.

Verified by executing conf.py with the variable unset, set-but-empty and mapped: all
three succeed, and any pre-existing intersphinx_mapping entries are preserved.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
autopep8 --diff --exit-code, which OasisLMF runs recursively over the repo, flagged
`import json as _ix_json, os as _ix_os` as E401. Pre-existing, and dormant only because
the code-quality workflow is not among the checks triggered on the docs PRs.

Same change ODS_Tools already took in eb349ea, so all six components now have an
identical, lint-clean cross-component block.

Verified: 0 autopep8 findings for this file (was 3), the CI flake8 selection is clean,
and conf.py still executes with OASIS_INTERSPHINX_MAP unset, set-but-empty and mapped.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The link check (GenerateDocs#54) found two links to
OpenDataStandards/tree/master/OpenExposureData/Docs, which 404s — that path went when the
Open Data Standards repo was split. The equivalent lives here:
ODS_OpenExposureData/tree/main/Docs (verified 200).

Note two further links in import-format.rst still point at
OpenDataStandards/tree/master/OpenExposureData. Those resolve today, so the check does not
flag them, but they reference the superseded repository rather than this one — worth a
follow-up sweep, kept out of here to stay a fix for what is actually broken.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 9c8829e
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/33065979139
Excel File excel_spec.zip
JSON File extracted_spec.zip

@sstruzik
sstruzik requested a review from SkylordA August 27, 2026 11:32

@SkylordA SkylordA left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs/Cyber/ReadMe.md and Docs/Liability/ReadMe.md (background, taxonomy, contributor list) aren't migrated anywhere. "Cyber" only survives as peril-code table rows in docs/source/explanation/geography-perils.rst:113-114,140; "Liability" doesn't appear anywhere in the new docs except the caveat at docs/source/reference/fields.md:20-21.

Comment thread docs/source/_ext/gen_oed_reference.py Outdated
Comment thread docs/source/_ext/gen_oed_reference.py Outdated
Comment thread docs/source/_ext/gen_oed_reference.py Outdated
Comment thread docs/source/_ext/gen_oed_reference.py
Comment thread docs/source/explanation/index.md
Review feedback (SkylordA, #286), the three items inside this PR's scope.

_ensure_oed_json() returned early whenever oed.json existed, so a repeat
local build after editing a spec CSV served the tables from the old file.
Renamed to _build_oed_json() and always rebuilt: utils/gen-json.py takes
under a second, which is cheaper than a staleness check and leaves no stale
path at all. Verified by planting a marker file with an empty input_fields
and rebuilding — the marker is gone and 574 fields are written.

generate_fields() read oed["input_fields"] as a bare subscript, unlike every
other lookup in the file, so a partial oed.json failed the Sphinx build with
a bare KeyError. It now raises a ValueError naming the file and the fix.

The exposure hierarchy folded Docs/2_OED_Overview.rst into explanation/index.md
and lost two things on the way: the account-group level (AccGroup, which no
page explained) and the table of which hierarchy levels primary and
reinsurance terms attach to. Both restored, with Account and Portfolio
written out to match, and the note about overcounting at policy level.

The other three review findings are answered on the PR: the field-status
columns and the AreaCode value list are follow-ups, and the Cyber/Liability
background documents are content this restructure does not cover.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit 8be81c9
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/33083230599
Excel File excel_spec.zip
JSON File extracted_spec.zip

Remaining review feedback on #286 (SkylordA), plus the duplication it exposed.

Field statuses. generate_fields() rendered only "Property field status" under a
column headed "Status". 1041 of the 1100 fields do not have the same status
across the four lines of business, so that column was wrong for 95% of rows
with nothing to say which line it described — and OpenExposureData/README.md
states outright that a field's status is allowed to differ by exposure class.
All four columns of OEDInputFields.csv are now rendered (Property, Cyber,
Liability, Marine Cargo) and the caveat pointing readers at oed.json, an
untracked generated file, is gone. This table is new in this PR, not migrated:
nothing in the old Docs/ or in GenerateDocs ever rendered it.

Area codes. generate_values() skipped "area", though the AreaCode field
description says "See AreaCode Values sheet for details". Read from
AreaCodeValues.csv rather than oed.json, whose "area" entry keeps only the
codes and drops the names and resolutions. 1502 codes across 48 countries, so
each country is a collapsed dropdown.

Cyber and Liability. Neither had any page; "Liability" appeared in the new docs
only in the caveat removed above. Added a classes-of-business page covering all
four classes — including Marine Cargo, which has no background document and was
silently absent — and migrated both ReadMes as pages. The taxonomy image was
referenced from a personal patch branch and 404ing, so it is now carried in the
repo. The contributor list is verbatim.

Duplication. Docs/*.rst were byte-identical to the migrated docs/source pages
(five of seven exactly; the other two differed only by the link repoint in
09b18e7), and Docs/2_OED_Overview.rst still carried an unfilled
"{enter link to that .rst here}" placeholder. Removed, along with Docs/index.rst
which only included them, so there is one copy to edit. Docs/ keeps its
governance PDFs and the shared images pool.

Two links inside these pages pointed at GitHub for content that is now in the
site — the field reference and the coded values — and are internal :doc: links.

Build is clean on a fresh -E with 0 warnings; 12 external links, none dead.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

Build Preview

You can find files attached to the below linked Workflow Run URL (Logs).
Please note that files only stay for around 14 days!

Name Link
Commit aa2d6f6
Build https://github.com/OasisLMF/ODS_OpenExposureData/actions/runs/33093054586
Excel File excel_spec.zip
JSON File extracted_spec.zip

@sstruzik

Copy link
Copy Markdown
Contributor Author

On the Cyber/Liability point from the review summary — done in e878af3, and the trail turned out to be worth writing down.

Both are now pages: explanation/cyber.html and explanation/liability.html, plus a classes-of-business page covering all four classes. Marine Cargo is included and says plainly that it has no separate background document — it was silently absent before, which the review did not catch but is the same gap.

The duplication is gone. Docs/Cyber/ReadMe.md, Docs/Liability/ReadMe.md, the eight Docs/*_OED_*.rst chapters and Docs/index.rst are removed. The chapters were byte-identical to the migrated docs/source/explanation/ pages (five of seven exactly; the other two differed only by the link repoint in 09b18e7), and Docs/2_OED_Overview.rst still carried an unfilled {enter link to that .rst here} placeholder. Docs/ keeps its governance PDFs and the shared images/ pool. Nothing referenced the deleted files.

Two things were broken and are now fixed as a side effect:

  1. The liability taxonomy image was referenced from a personal patch branch — blob/MattDonovan82-patch-1/Docs/images/..., a hard 404. It is now carried in the repo and renders.
  2. GenerateDocs src/sections/OED.rst links to the OED docs are all six 404, because the path is written OpenExposureData/Docs/... while the files live at repo root Docs/.... History: they were correct as of 89a3e54d (2023-07-25); the OED repo moved the files in 45ddc37 "Update repo layout (Update repo layout  #208)" (2024-07-17); b3e75e55 (2026-06-17) tried to catch up and inserted Docs/ after OpenExposureData/ instead of replacing it, producing six paths that have never existed in this repo. Adding peril code for Volcanic events to OED #54 deletes that page, so they disappear with it, and these new pages are the destination.

Also repointed two links inside our own pages that sent readers to GitHub for content now in the site — the field reference and the coded values — to internal :doc: links.

The contributor list in the cyber page is verbatim. It is from a 2022 working group, so it may want a check by whoever owns that content, but that felt like a separate call from migrating it.

@sstruzik
sstruzik requested a review from SkylordA August 27, 2026 16:42
@sstruzik
sstruzik merged commit cd3905c into main Aug 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants