Add colab notebooks#176
Merged
Merged
Conversation
Each example is already a Literate.jl script rendered to markdown for Documenter. Also call Literate.notebook to emit a runnable .ipynb into the docs source tree; Documenter copies it verbatim into the build output, so it is deployed to gh-pages alongside the HTML (e.g. .../examples/<name>.ipynb). Applies to GeneralisedFilters (trend-inflation) and SSMProblems (kalman-filter). Verified both scripts produce valid Julia notebooks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
A Literate preprocess inserts an "Open in Colab" badge after the title (in both the rendered page and the notebook) pointing at the notebook deployed to gh-pages. The link targets the stable `dev` build; the notebook is also deployed under previews/PR<n>/ and release dirs, which the fixed dev link does not resolve to. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Apply the badge-inserting preprocess to Literate.markdown only; the generated notebook no longer carries the Open in Colab badge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Clarify in the comment that the generated notebook is copied under the versioned docs directory (dev/, vX.Y/, or previews/PR<n>/ for PR previews). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
macos-latest is now Apple Silicon (arm64), so the matrix's `arch: x64` failed at the Setup Julia step. Drop the arch axis and let setup-julia use each runner's native arch (x64 on ubuntu/windows, aarch64 on macOS). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
SSMProblems.jl/SSMProblems documentation for PR #176 is available at: |
Compute the gh-pages version subdir from the CI context to match Documenter's deploy target: previews/PR<n> for PR previews, the tag (e.g. v1.2.3) for tagged releases, otherwise dev. Previously the badge always linked to dev, so preview/release notebooks were unreachable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
In the notebook postprocess: set a generic Julia kernelspec (no pinned version) so Colab uses its default Julia runtime, and prepend a single Pkg.add of all packages the example imports/uses so it installs deps on a fresh Colab runtime. The setup cell is added to the notebook only, not the rendered docs page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #176 +/- ##
==========================================
- Coverage 82.42% 80.35% -2.08%
==========================================
Files 54 56 +2
Lines 2794 2866 +72
==========================================
Hits 2303 2303
- Misses 491 563 +72
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:
|
get_ancestry now returns ReferenceTrajectory values rather than
Vector{Vector{RBState}}, so mean_path's typed method no longer dispatched and
the example errored during the docs build (pre-existing on main). Collect each
trajectory before extracting state components; verified previously to match the
prior plots byte-for-byte.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
make.jl iterated every directory under examples/, so the script-only "PGAS Example" dir (no script.jl, no Literate dep) failed the docs build with "Package Literate not found". Filter discovery to dirs containing script.jl. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
SSMProblems.jl/GeneralisedFilters documentation for PR #176 is available at: |
Colab selects the runtime from kernelspec.name (now "julia"), so deleting language_info isn't needed for the generic-Julia/no-version behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closed
yebai
added a commit
that referenced
this pull request
Jun 23, 2026
Surface the Colab badges introduced in PR #176 on the landing page. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #137
Closes #119
Closes #136