Skip to content

Add colab notebooks#176

Merged
yebai merged 10 commits into
mainfrom
literate-notebooks
Jun 23, 2026
Merged

Add colab notebooks#176
yebai merged 10 commits into
mainfrom
literate-notebooks

Conversation

@yebai

@yebai yebai commented Jun 23, 2026

Copy link
Copy Markdown
Member

Closes #137
Closes #119
Closes #136

yebai and others added 3 commits June 23, 2026 22:59
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>
yebai and others added 2 commits June 23, 2026 23:07
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>
@github-actions

Copy link
Copy Markdown
Contributor

SSMProblems.jl/SSMProblems documentation for PR #176 is available at:
https://TuringLang.github.io/SSMProblems.jl/SSMProblems/previews/PR176/

yebai and others added 2 commits June 23, 2026 23:20
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

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 75 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.35%. Comparing base (57320d5) to head (d87b572).
⚠️ Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
GeneralisedFilters/docs/literate.jl 0.00% 35 Missing ⚠️
SSMProblems/docs/literate.jl 0.00% 35 Missing ⚠️
...lisedFilters/examples/trend-inflation/utilities.jl 0.00% 4 Missing ⚠️
GeneralisedFilters/docs/make.jl 0.00% 1 Missing ⚠️
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     
Flag Coverage Δ
GeneralisedFilters 82.52% <0.00%> (-1.13%) ⬇️
SSMProblems 30.25% <0.00%> (-12.61%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

yebai and others added 2 commits June 24, 2026 00:00
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>
@github-actions

Copy link
Copy Markdown
Contributor

SSMProblems.jl/GeneralisedFilters documentation for PR #176 is available at:
https://TuringLang.github.io/SSMProblems.jl/GeneralisedFilters/previews/PR176/

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>
@yebai yebai merged commit d2c19a5 into main Jun 23, 2026
16 of 17 checks passed
@yebai yebai deleted the literate-notebooks branch June 23, 2026 23:26
@yebai yebai mentioned this pull request Jun 23, 2026
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>
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.

Adding examples based on Jupyter notebooks so we can open them via Google Colab.

1 participant