Skip to content

Add an MkDocs site: usage guide, design notes and API reference - #10

Merged
Iznoanygod merged 5 commits into
mainfrom
claude/rome-mkdocs-docs-ee3oos
Aug 30, 2026
Merged

Iznoanygod merged 5 commits into
mainfrom
claude/rome-mkdocs-docs-ee3oos

Conversation

@Iznoanygod

Copy link
Copy Markdown
Contributor

ROME's documentation was four deep-dive notes (delta, dragon, impress, proteinmpnn_training) with no way in: nothing explained what the three managers are, how to attach them to an existing workflow, or what the public API is. This adds the surrounding site, in the shape the sibling RADICAL projects use — MkDocs Material with gen-files, literate-nav and mkdocstrings.

The four existing notes keep their paths, since the source references them by name in a dozen docstrings and comments. They are folded into the nav as-is.

What's in it

Section Contents
Home Overview, installation, and a quickstart that runs the closed loop end to end with no model
User Guide One page per manager (data, training, stream), plus writing a trainer and reading the logs
Design Architecture, the DDict state layout and its one rule, and how tasks reach the execution backend — including why result_fallback_seconds and the train_complete marker exist
Examples The dummy loop, the LLM/GRPO run, and IMPRESS-R across all four of its examples
HPC The existing Delta, IMPRESS and ProteinMPNN notes
API Reference Generated from the source at build time, covering rome/ plus examples.impress_r.mpnn

Two things the reference needed from the source

Both are documentation-visibility fixes, not behaviour changes.

Attribute docstrings. griffe reads PEP 258 attribute docstrings but not Sphinx #: comments, so documented module constants and class attributes (TRAIN_COMPLETE_MARKER, MODEL_VERSION_KEY, DEFAULT_DDICT_KWARGS, …) rendered as bare names with their documentation dropped. The public ones are now string docstrings — a no-op at runtime. Private ones keep their #: comments; they are filtered out of the docs anyway. Verified by AST that every converted constant is still assigned.

Sphinx dialect. The docstrings use :meth:, :class:, .. warning:: and friends, which leak into a Markdown page as literal text (:meth: DataManager.add). Rather than rewrite sixty-odd docstrings into a second dialect, docs/griffe_rst.py rewrites roles and directives as the docs are built. Roles become inline code rather than links, because mkdocs-autorefs fails a --strict build on any target it cannot resolve and several roles name things that are not documented API or not Python at all.

Build and CI

Docs dependencies are docs/requirements.txt rather than a [docs] extra. mkdocstrings reads the source statically through griffe, so the site builds with no Dragon, no torch and no GPU — an extra would have pulled all three in. CI installs the deps in ~6 s and builds in ~3 s.

mkdocs build --strict runs with full validation (omitted_files, absolute_links, unrecognized_links, anchors), so a renamed heading or moved page fails the build rather than shipping as a dead link. Pull requests build; pushes to main build and deploy to Pages.

pip install -r docs/requirements.txt
mkdocs serve          # http://127.0.0.1:8000
mkdocs build --strict # what CI runs

After merge

Pages needs its source set to GitHub Actions (Settings → Pages → Build and deployment). Once merged, the first push to main publishes to https://iznoanygod.github.io/ROME/ — the auto-created github-pages environment already permits main, so no further configuration is needed.

Notes for review

  • The Mermaid diagrams are the one thing not visually verified — the sandbox this was built in blocks the CDN Material loads Mermaid from. mkdocs serve locally will show them; the Architecture and Shared state pages have the most.
  • The test suite was not run: pytest and the runtime dependencies aren't installed in the build environment, and pulling torch and Dragon in seemed disproportionate for a change that is docstring literals. The AST check over all nine touched source files stands in for it.

🤖 Generated with Claude Code

https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm


Generated by Claude Code

claude added 5 commits August 30, 2026 19:55
ROME's documentation was four deep-dive notes (delta, dragon, impress,
proteinmpnn_training) with no way in: nothing explained what the three
managers are, how to attach them to an existing workflow, or what the
public API is. This adds the surrounding site, in the shape the sibling
RADICAL projects use — MkDocs Material with gen-files, literate-nav and
mkdocstrings.

The four existing notes keep their paths, since the source references
them by name in a dozen places; they are folded into the nav as-is.

New pages:

  Home       overview, installation, and a quickstart that runs the
             closed loop end to end with no model
  Guide      one page per manager, plus writing a trainer and logging
  Design     architecture, the DDict state layout and its one rule,
             and how tasks reach the execution backend — including why
             the result fallback and the train_complete marker exist
  Examples   the dummy loop, the LLM/GRPO run, and IMPRESS-R
  API        generated from the source at build time, so it cannot
             drift from it

Two things the reference needed from the source:

  * griffe reads PEP 258 attribute docstrings but not Sphinx `#:`
    comments, so the documented module constants and class attributes
    rendered as bare names. Public ones are now string docstrings —
    a no-op at runtime. Private ones keep their `#:` comments; they
    are filtered out of the docs anyway.

  * the docstrings are written in the Sphinx dialect (`:meth:`,
    `.. warning::`), which leaks into a Markdown page as literal text.
    docs/griffe_rst.py rewrites roles and directives as the docs are
    built, so the source needs no second dialect.

Docs dependencies are docs/requirements.txt rather than a `[docs]`
extra: mkdocstrings reads the source statically, so the site builds
with no Dragon, no torch and no GPU, and an extra would have pulled
all three in. CI builds with `--strict` and full link and anchor
validation, and deploys to Pages from main.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm
The repo is Iznoanygod/ROME, not iznoanygod/rome. A Pages project site
preserves the repo name's casing (only the owner is lowercased in the
github.io host), so site_url, repo_url and the magiclink shorthand all
pointed at the wrong place.

The deploy job now also runs on workflow_dispatch from any branch, so a
docs branch can be previewed on the live Pages URL before it is merged.
Pages serves one site per repo, so such a preview replaces whatever main
last published until main is pushed again.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm
GitHub only shows the "Run workflow" button for a workflow that already
exists on the default branch, so workflow_dispatch cannot preview a docs
branch that has not merged yet. Triggering on this branch's own pushes
can. The trigger entry is marked for removal at merge.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm
The previous condition only allowed pushes to main, so the preview push
from this branch built and uploaded the artifact and then skipped the
deploy. `on.push.branches` is already what decides which branches reach
this job, so keying off "not a pull request" needs no further editing
when the temporary preview branch comes back out of that list.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm
The preview branch is being merged rather than published from, so the
temporary trigger entry comes back out. Pages then deploys only from
main, which is what the auto-created github-pages environment allows
without a deployment-branch rule.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172TcugNGapdfYToJwvj4Cm
@Iznoanygod
Iznoanygod merged commit 99db954 into main Aug 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants