Skip to content

docs: move case studies to a top-level Tutorials section - #229

Merged
seabbs merged 8 commits into
mainfrom
docs/216-tutorials-nav
Aug 5, 2026
Merged

seabbs merged 8 commits into
mainfrom
docs/216-tutorials-nav

Conversation

@seabbs-bot

@seabbs-bot seabbs-bot commented Aug 3, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Closes #216.

  • Move docs/src/case-studies/ to a top-level docs/src/tutorials/,
    merged with the existing "Renewal modifiers" walkthrough, so the nav
    carries one top-level "Tutorials" section instead of a "Case studies"
    section plus a separate "Tutorials" section.
  • Move the AD-backends page out of that Tutorials list into a
    "Benchmarks" dropdown (Overview + Automatic differentiation), so the
    AD benchmark sits with the benchmark it is, per the issue.
  • Update every internal cross-reference: the case-study @id/@ref
    anchors (case-study-* → tutorial-*, case-studies-overview →
    tutorials-overview), the overview.md "Where to go next" link, and
    the README's "Where to learn more" link.

Nav shape decision

@seabbs's comment on #216 flagged that tutorials should not be nested
inside Getting started. This repo's pages.jl already flattens Getting
started into standalone top-level "Installation" / "Overview" pages
rather than a wrapping "Getting started" group, so the second option
fits directly: keep those pages as they are, and give Tutorials its own
top-level section alongside them.

What's package-owned vs. kit-owned

docs/pages.jl and docs/docs_config.jl are package-owned (written
once by scaffold, never re-applied by update), so this PR does all
of the nav restructuring here directly — no kit change is needed for
this repo's own site.

But the shape we moved away from is the kit's default: scaffold's
templates/docs/pages.jl nests tutorial content inside "Getting
started", and _ad_tutorials_nav / bench_nav in scaffold.jl write
the AD-backends page and the Benchmarks page as two disconnected nav
entries whenever a package has both ad = true and benchmarks = true. Filed as EpiAware/EpiAwarePackageTools.jl#354 so future
scaffolded packages get this nav shape by default instead of each
package hand-fixing it.

renewal-modifiers.jl and ad-backends.jl are Literate sources
rendered by the kit's managed make.jl, which reads a single
TUTORIALS_SUBDIR from docs_config.jl for every Literate tutorial
and writes each page's .md beside its .jl source. Because this PR
sends one of those two pages into Tutorials and the other into
Benchmarks, they cannot be given different physical homes without a
kit change — #354 confirms this ("the AD-backends page's physical
path does not need to change ... only the nav fragment that groups
it"). Both stay at getting-started/tutorials/ and are reached
through the new nav positions rather than moved.

Merge resolution against main

This branch conflicted with main after #53 landed
docs/src/case-studies/gaussian-process.md (anchor case-study-gp) a
few hours after this branch's last merge from main. Resolved by:

  • git mv-ing the GP page to docs/src/tutorials/gaussian-process.md
    (git's merge already proposed this location via rename detection).
  • Renaming its anchor case-study-gp → tutorial-gp.
  • Adding it back into the Tutorials list in docs/pages.jl, in the
    same relative position it held in the old Case studies list (after
    the split-observations page, before time-varying damping).
  • Adding its bullet to docs/src/tutorials/index.md, and while
    touching that file, adding the three pre-existing bullets it was
    missing (Catalyst ODE, time-varying damping, partial pooling) per
    the prior review.
  • Fixing the two leftover "case study" mentions inside the GP page's
    own prose so it reads consistently with the rest of the section.

#237 ("streamline the Gaussian-process case study") is still open
against the old docs/src/case-studies/gaussian-process.md path and
has not merged, so this resolution moves the version of the page
currently on main, not #237's rewrite. #237 will need rebasing onto
the new docs/src/tutorials/gaussian-process.md path once this PR
merges; whoever merges second should be aware of that.

Also fixed the remaining leftover "case study" prose flagged in the
prior review: nine occurrences across six tutorial pages plus one in a
docs_config.jl comment, now all say "tutorial(s)".

Redirects

DocumenterVitepress / the kit's build has no page-level redirect
mechanism (only a version-root redirect to stable), so
/case-studies/* URLs indexed from before this PR will 404 after it
merges. I could not find a way around this within the existing docs
infrastructure; flagging it rather than leaving it unstated.

Verification

I wrote and ran a small standalone Julia check confirming every path
in the new docs/pages.jl nav resolves to a real file, and grep-diffed
every @id/@ref in docs/src to confirm no dangling cross-reference
survived the rename or the merge resolution.
task docs-fast verification is recorded in the PR comments; see
those for how far each local run got.

This was opened by a bot. Please ping @seabbs for any questions.

benchmarks with Benchmarks

Closes #216.

Moves docs/src/case-studies/ to docs/src/tutorials/, merges it with
the existing Renewal modifiers walkthrough into one top-level
Tutorials nav section, and moves the AD-backends page out of that
list into a two-page Benchmarks dropdown (Overview + Automatic
differentiation), so the AD benchmark sits with the benchmark it is.

Updates every internal cross-reference: the case-study @id/@ref
anchors (case-study-* -> tutorial-*, case-studies-overview ->
tutorials-overview), the overview.md "Where to go next" link, and the
README's "Where to learn more" link.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Local verification update: I ran task docs-fast and let it run for
about 30 minutes before terminating it (compute on this box was
shared/contended). The log up to that point shows the parts most
relevant to this change succeeding cleanly:

  • pages.jl loaded and every page it lists resolved (Documenter's
    SetupBuildDirectory step passed, which fails fast on a missing
    page).
  • Generated benchmarks.md (benchmark history page) — the new
    two-page "Benchmarks" => [...] dropdown didn't trip the kit's
    benchmark-page generator.
  • Generated index.md from README.md and Generated API pages: 90 public, 20 internal bindings both completed.
  • It reached ExpandTemplates: expanding markdown templates — the
    stage that runs each page's @example code (the tutorials' NUTS
    fits) — and was still there when I stopped it.

So I did not get a full pass/fail from a local run; the terminated
run's final line (exit status 143) is my kill, not a build
failure. The Documenter / Documentation CI check on this PR is
queued and will give the authoritative result — please confirm it's
green before merging.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Try this Pull Request!

Option 1: Julia Package Manager

Open Julia and type:

import Pkg
Pkg.activate(temp=true)
Pkg.add(url="https://github.com/EpiAware/ComposableTuringIDModels.jl", rev="docs/216-tutorials-nav")
using ComposableTuringIDModels

Option 2: Local Checkout

If you have the repo locally:

git checkout docs/216-tutorials-nav
julia --project=. -e "using Pkg; Pkg.instantiate()"

@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Review

Needs work before merge, but only for one reason: this branch now conflicts with main, and the conflict is not mechanical.

db982c4 ("Hilbert-space approximate Gaussian-process latent model + case study", #53) landed on main about three hours after this branch's last merge from main, and it adds docs/src/case-studies/gaussian-process.md with @id case-study-gp, a nav entry in the "Case studies" group, and a bullet in case-studies/index.md pointing at @ref case-study-gp.
git merge-tree origin/main pr-229-review reports content conflicts in docs/pages.jl and docs/src/tutorials/index.md, plus a file-location conflict on gaussian-process.md.
The failure mode I care about is a careless resolution: take-ours on pages.jl and the GP page vanishes from the nav entirely, or the file is left where it is and you ship one page under /case-studies/ with a case-study-* anchor while the other eight are tutorial-*.
Resolving this properly means git mv-ing the page into docs/src/tutorials/, renaming its anchor to tutorial-gp, updating the index bullet, and re-adding the nav entry in the Tutorials list.
Please redo the merge and push, rather than letting GitHub's conflict editor handle it.

The second thing worth waiting on is that Documenter / Documentation has still not completed on this branch, and it is the only check that exercises any of this.
coverage failed on a 45-minute timeout and downgrade-compat passed at 35 minutes, which reads as runner contention rather than anything caused by a docs-only change.
I did not run a docs build myself.

On the specific points

The rename itself is clean.
I checked the whole branch rather than just the diff: there is no occurrence of case-studies or case-study anywhere in the repository on this branch, all three CSVs moved, and all five joinpath(pkgdir(...), "docs", "src", "tutorials", "data", ...) call sites were updated to match.
I also walked every @id and every named @ref under docs/src with a script: 12 anchors, 18 named refs, and the only unresolved one is @ref public-api in overview.md, which is unchanged by this PR and present on main too.
I could not confirm whether the kit's generated lib/public.md supplies that anchor, so I am not claiming it is broken; it is just worth a look given :cross_references is warnonly in the kit and a dead ref would not fail CI.

The half-move of renewal-modifiers.jl and ad-backends.jl is acceptable.
docs/docs_config.jl has a single TUTORIALS_SUBDIR, and the kit's Literate step writes the rendered .md beside its .jl source, so the two pages cannot be given different physical homes without a kit change.
Since this PR sends one of them to Tutorials and the other to Benchmarks, splitting them physically is genuinely blocked here, and deferring to EpiAware/EpiAwarePackageTools.jl#354 is the right call.
That reasoning is only in the kit issue though, not in this PR body, and it is the one thing the body does not disclose while being candid about everything else.
Worth a sentence in the description so the next reader does not read it as an oversight.

The /case-studies/* 404s do not matter here.
This is v0.1.1, the README points at /dev/, and versioned doc trees stay as they were built.

tutorials/index.md still under-describes the section.
The nav lists nine tutorials; the overview prose describes six, omitting catalyst-ode, time-varying-damping and hierarchy-stacked.
That gap predates this PR (git show main:docs/src/case-studies/index.md has the same three missing), so it is not a reason to hold this up, but the page is now the landing page of a top-level section rather than a subsection index, so it is more visible than it was.
A follow-up issue would do, and the merge resolution will add gaussian-process to that list of omissions.

The leftover "case study" prose is a smaller job than the description implies.
Nine occurrences across six pages, plus one in a docs_config.jl comment.
I understand the scope argument, but a section titled Tutorials whose pages open with "This case study keeps the renewal infection core..." is the kind of thing that never gets a follow-up PR.
Your call, but it is a few minutes' work while the files are already being touched.

Nothing here touches model code or sampler settings, so there is no path to plausible-but-wrong inference from this change.

This was opened by a bot. Please ping @seabbs for any questions.

PR #53 added docs/src/case-studies/gaussian-process.md with a
case-study-gp anchor, a Case studies nav entry, and an index bullet,
while this branch renamed the whole directory to tutorials/. Resolve
by moving the GP page into docs/src/tutorials/, renaming its anchor
to tutorial-gp, adding it to the Tutorials nav list in pages.jl, and
adding its bullet to tutorials/index.md in the same relative position
it held in the old case-studies index.

Also fix leftover "case study" prose (nine occurrences across six
tutorial pages plus a docs_config.jl comment) now that the section is
called Tutorials, and fill in the three tutorials/index.md bullets
that were missing before this merge (Catalyst ODE, time-varying
damping, partial pooling).

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Conflict resolved

Merged origin/main (through db982c4, #53) into this branch and resolved the
GP conflict per the review, rather than accepting GitHub's conflict editor:

  • git mv-equivalent: git's own rename-detection already proposed
    docs/src/tutorials/gaussian-process.md as the merge target, so the page
    landed there directly rather than at docs/src/case-studies/.
  • Renamed its anchor case-study-gp → tutorial-gp (only one occurrence;
    nothing else referenced it since the rest of this branch had already
    dropped case-study-* naming).
  • Re-added it to the Tutorials list in docs/pages.jl, in the same relative
    position it held in the old Case studies nav (after split-observations,
    before time-varying damping).
  • Added its bullet to docs/src/tutorials/index.md, and while there, added
    the three pre-existing missing bullets flagged in the review (Catalyst
    ODE, time-varying damping, partial pooling).
  • Fixed the two leftover "case study" mentions inside the GP page's own
    prose.

git merge-tree/git merge now reports no conflicts, and gh pr view
confirms mergeable: MERGEABLE (still BLOCKED on required
review/checks, not on conflicts).

#237 interaction

#237 ("streamline the Gaussian-process case study") is still open and
unmerged (state: OPEN, targeting the old
docs/src/case-studies/gaussian-process.md path). This resolution therefore
moved the version of the page currently on main (db982c4), not #237's
rewrite — nothing from #237 was reverted or overwritten, because none of
its commits are on main yet.

#237 will need rebasing onto the new path
(docs/src/tutorials/gaussian-process.md) once this PR merges. Whoever
merges second should be aware their diff will land as a file-move-plus-edit
against the new location.

Other review points addressed

  • renewal-modifiers.jl / ad-backends.jl physical location: confirmed
    these are genuinely blocked from separate physical homes. The kit's
    managed make.jl reads a single TUTORIALS_SUBDIR from docs_config.jl
    for every Literate tutorial and renders each .md beside its .jl
    source, so the two pages can't be given different physical locations
    without a kit change. Scaffold defaults nest tutorials under Getting started and don't pair AD-backends with Benchmarks EpiAwarePackageTools.jl#354 (already filed)
    confirms this explicitly: "the AD-backends page's physical path does not
    need to change ... only the nav fragment that groups it." Left them in
    place, and added a sentence to the PR description explaining this so it
    doesn't read as an oversight.
  • Leftover "case study" prose: fixed all nine occurrences across the six
    flagged tutorial pages plus the docs_config.jl comment, now that the
    section is called Tutorials. All now say "tutorial(s)".
  • @ref / dead-link check: re-ran the anchor/ref audit after the merge
    (15 @id anchors, 22 named @refs under docs/src, all resolve). Also
    grepped the whole tree for case-stud — zero hits outside .claude/worktrees.

Build verification

docs/Manifest.toml needed a fresh Pkg.resolve() after the merge (the
GP work added AbstractGPs/KernelFunctions to docs/Project.toml, and
the docs manifest here didn't have them yet — expected, since
Manifest.toml is gitignored). That resolved cleanly.

I then started task docs-fast locally. Compute on this box was under
heavy contention throughout (load average ~40 on 16 cores from other
concurrent jobs). The run produced no build-stage output at all in the
time I could wait on it — no precompile-complete line, no
SetupBuildDirectory, nothing from Documenter — it was still consuming
CPU under the shared load without having reached a loggable checkpoint.
I am not claiming a local pass or fail here; I could not get a
build-stage result out of this run at all
, which is a step less far
than the previous review comment's run (which at least reached
ExpandTemplates).

What I did verify directly, independent of a full build:

  • Pre-commit hooks (Julia Formatter, trailing-whitespace,
    end-of-file-fixer, merge-conflict markers, etc.) pass on every file
    this resolution touched.
  • The anchor/@ref audit described above (all resolve).
  • gh pr view 229 --json mergeable,mergeStateStatus reports
    mergeable: MERGEABLE — the conflict is gone; BLOCKED is required
    reviews/checks, not conflicts.

The Documenter / Documentation CI check on this push is the
authoritative result — please treat that as the gate for this PR's
docs-build correctness, not this comment.

@seabbs-bot

Copy link
Copy Markdown
Collaborator Author

Update: local build finished, and it passed

The task docs-fast run mentioned in my last comment was still going, not
stalled — it finished after that comment posted. Correcting the record
rather than leaving the "could not verify" comment as the last word:

  • SetupBuildDirectory, ExpandTemplates (this is the stage that runs
    every @example block, including all the tutorials' NUTS fits and the
    GP page's two @assert checks), CrossReferences, Populate, and the
    VitePress render all completed.
  • Final line: task: [docs-fast] echo "✅ Fast documentation build completed" / ✅ Fast documentation build completed. No ERROR or
    AssertionError anywhere in the log.
  • Checked the rendered output directly:
    docs/build/.documenter/tutorials/gaussian-process.md exists, its
    heading renders as # A Gaussian-process latent process {#tutorial-gp}
    (anchor correctly renamed and picked up), and the executed code blocks
    show real numbers (e.g. (exact = 8.2e-7, hsgp = 0.00019) from the
    kernel-accuracy check), not stub content — so the page's @example gp
    blocks, including the two @assert correctness checks, ran and passed.
    docs/build/1/tutorials/gaussian-process.html was produced.
  • The only warnings in the log are pre-existing and unrelated to this
    PR: un-expanded @example <Binding> notices on src/lib/public.md /
    internals.md for essentially every exported binding's docstring
    example (a package-wide DocumenterVitepress/docstring pattern, not
    something this rename touched), and "Documenter could not
    auto-detect the building environment. Skipping deployment." /
    "Found no bases suitable for deployment", which is expected for a
    local run outside CI.
  • This was --skip-notebooks, so the one Literate "heavy" tutorial
    (ad-backends.jl, per docs_config.jl's HEAVY_TUTORIALS) was
    stubbed rather than executed, by design of that task — everything
    else, including the merged GP page, ran for real.

I did not run task docs (the non-fast, notebook-inclusive build) or a
linkcheck pass locally; the log has no linkcheck output, so I'm not
claiming that ran. The Documenter / Documentation CI check remains the
authoritative result for that, but the local fast build is now a genuine
pass, not an unresolved run.

@codecov

codecov Bot commented Aug 4, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Flag Coverage Δ
unit 92.61% <ø> (+0.48%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@seabbs

seabbs commented Aug 4, 2026

Copy link
Copy Markdown
Member

Docuimente ris failing?

seabbs-bot and others added 2 commits August 4, 2026 17:25
…from #237

# Conflicts:
#	docs/src/tutorials/gaussian-process.md

Take the streamlined Gaussian-process content from main (#237) at the
new docs/src/tutorials/gaussian-process.md path, keeping the
tutorial-gp anchor. Also fix three stale case-study-* @ref targets in
design.md, hierarchy-stacked.md and split-observations.md left over
from the earlier tutorials-nav rename pass.

Co-authored-by: Sam Abbott <contact@samabbott.co.uk>
@seabbs

seabbs commented Aug 5, 2026

Copy link
Copy Markdown
Member

Doc build is failing

The README's tutorials link resolves against the live deployed docs
site, which still serves the old case-studies paths until this branch
merges and redeploys, so linkcheck 404s on it. Same pattern as the
existing CITATION.cff entry.
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

📖 Documentation preview is ready!

View the docs for this PR at: https://EpiAware.github.io/ComposableTuringIDModels.jl/previews/PR229/

This preview will be updated automatically when you push new commits.

@seabbs
seabbs merged commit 71e539c into main Aug 5, 2026
24 of 27 checks passed
@seabbs
seabbs deleted the docs/216-tutorials-nav branch August 5, 2026 14:20
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.

Our case studies and their overview should all move to tutorials I think?

2 participants