Migrate examples to Jupyter notebooks#136
Conversation
|
SSMProblems.jl/SSMProblems documentation for PR #136 is available at: |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #136 +/- ##
==========================================
+ Coverage 82.42% 83.14% +0.71%
==========================================
Files 54 53 -1
Lines 2794 2770 -24
==========================================
Hits 2303 2303
+ Misses 491 467 -24
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
SSMProblems.jl/GeneralisedFilters documentation for PR #136 is available at: |
|
Sorry @THargreaves, didn't noticed your PR because it wasn't attached in the issue. I opened same PR that generates notebook from existing scripts: #137 Feel free to review, approve or reject! |
# Conflicts: # .github/workflows/Documentation.yml
The container refactor merged from main (#151) changed `get_ancestry` to return `ReferenceTrajectory`s rather than `Vector{Vector{RBState}}`, which broke `mean_path`'s dispatch and the notebook's plotting cells. Collect each trajectory before extracting state components; verified the regenerated plots are byte-identical to the pre-merge baseline. Also guard docs example discovery so only directories shipping the expected `<slug>.ipynb` are built, skipping script-only example dirs (e.g. the `PGAS Example` added on main) instead of failing the build. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fixes from reviewing the notebook migration tooling: - docs cache key: hash GeneralisedFilters/src, SSMProblems/src and the whole examples tree, not just *.ipynb, so library/data/Project changes no longer serve stale rendered notebook output. - git hooks: replace `mapfile -d ''` (bash 4.4+) with a portable null-delimited read loop so the hooks run on macOS system bash 3.2. - pre-commit: refuse to run when a staged notebook also has unstaged changes, since the re-stage would otherwise sweep those hunks into the commit. - CI notebook-clean: read notebooks into a null-delimited array instead of unquoted word-splitting, so paths with spaces aren't silently skipped. - notebook.jl inject_docs_badges: slice headings with nextind/prevind so a multibyte title (e.g. "# Café") can't throw StringIndexError. - notebook.jl inject_edit_url: anchor the guard at the start of the page like the replacement, so a @meta fence in the body no longer suppresses EditURL. - sync_notebook_badges.py: require actual badge markup (not a bare URL substring) before stripping a line, and keep any content preceding the heading instead of discarding it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- CI test matrix: drop the `arch: x64` axis so `setup-julia` uses each runner's native arch. `macOS-latest` is now Apple Silicon (arm64), so the explicit `x64` request was failing at the Setup Julia step. ubuntu/windows remain x64 (their native default). Note: this renames the macOS test checks (drops the "- x64" suffix), so any required-status-check names referencing it in branch protection need updating. - make.jl: add explicit `return` in the example-discovery `do` block to satisfy the JuliaFormatter (blue) check flagged by reviewdog. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- notebook.jl: restore extract_inline_images, which was accidentally reverted in a8b2852 ("Remove output from loading cells"). CairoMakie figures are emitted as <img src="data:image/png;base64,..."> which Documenter renders as raw text; this extracts them to real PNG files and rewrites them as markdown image links. Verified the converted PNGs match the executed figures. - make.jl example_summary: accumulate the first prose paragraph instead of the first physical line, so a hard-wrapped intro sentence isn't truncated mid-line (e.g. "...suggested by (Stock &") in the examples index table. - Documentation.yml: include GeneralisedFilters/docs/*.jl in the notebook-output cache key so changes to the rendering scripts bust the cache and re-render, rather than serving stale output via notebook.jl's isfile(MARKDOWN) skip. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Link example pages directly under the "Examples" nav section instead of generating an examples landing/index page. Removes the now-unused index machinery (write_examples_index and its title/summary/thumbnail/links helpers, the EXAMPLE_ASSETS_OUT dir, the REPO/PKG_SUBDIR constants) and the orphaned thumbnail SVGs. /examples/ goes away; /examples/trend-inflation/ stays. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
No description provided.