Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
54f23e3
Add download button for Jupyter notebooks in tutorial pages
Sep 18, 2025
ff55d5a
Refactor Quarto rendering and remove download notebook script
Sep 22, 2025
8dd8fbf
Merge branch 'main' into add_notebook_dl
AoifeHughes Sep 22, 2025
091e1a1
Update to Turing 0.40
mhauru Aug 13, 2025
fc4df94
Update version in _quarto.yml
mhauru Aug 13, 2025
df1f9cd
Fix DPPL 0.37 run_ad change
mhauru Aug 13, 2025
14973ad
Fix VI tutorial
mhauru Aug 20, 2025
06bb33d
Fix model-manual's use of contexts
mhauru Aug 21, 2025
e7519c9
Fix references to __context__
mhauru Aug 21, 2025
4530247
Fix use of addlogprob for log prior
mhauru Aug 21, 2025
57c3162
Fix typo
mhauru Sep 16, 2025
2065a14
Regenerate manifest
mhauru Sep 16, 2025
2babb2d
Remove version pin of DelayDiffEq and update Manifest
mhauru Sep 18, 2025
b41a4cb
Fix call to evaluate
mhauru Sep 18, 2025
425539d
Add note about contexts tutorial being out of date
mhauru Sep 19, 2025
dde0ed3
Apply suggestions from code review
mhauru Sep 22, 2025
a32ec1b
Add ipynb format support
Sep 24, 2025
1e7f351
maybe added links to dl?
Sep 24, 2025
e455881
Merge branch 'add_notebook_dl' of https://github.com/TuringLang/docs …
Sep 24, 2025
d1bacac
reset mainifest
Sep 24, 2025
a78fac4
dont execute ipynb
Sep 24, 2025
98bf999
bump local changes
Sep 25, 2025
60a07a8
Merge branch 'main' into add_notebook_dl
AoifeHughes Sep 26, 2025
af7ceb4
add post-render script for converting .quarto_ipynb files to .ipynb
Sep 26, 2025
4459016
Merge branch 'add_notebook_dl' of https://github.com/TuringLang/docs …
Sep 26, 2025
7f00453
Refactor notebook generation process and clean up tutorial metadata
Sep 29, 2025
708d22b
Merge branch 'main' into add_notebook_dl
AoifeHughes Sep 29, 2025
64c62a4
please work :(
Sep 29, 2025
1c6fad9
Merge branch 'add_notebook_dl' of github.com:TuringLang/docs into add…
Sep 29, 2025
26cdf37
freeze?
Sep 30, 2025
01e6954
last try
Sep 30, 2025
f55de5c
forgot to add links...
Sep 30, 2025
848dc87
grep...
Sep 30, 2025
fdbee40
fixed edit loc
Sep 30, 2025
2a56d63
placement
Sep 30, 2025
9ed76f1
added a script to do notebooks justice
Sep 30, 2025
27b9d8b
posix
Sep 30, 2025
e06a333
Merge branch 'main' into add_notebook_dl
AoifeHughes Oct 1, 2025
2a396e4
patched to insert pkg local usage over global.
Oct 6, 2025
3a1691e
removed specifying versions
Oct 6, 2025
e7979d9
Merge branch 'main' into add_notebook_dl
AoifeHughes Oct 6, 2025
d07ab29
made variable thingy in script.
Oct 6, 2025
c00b84d
Add environment variable for Colab path prefix in notebook link scripts
Oct 7, 2025
997eac5
fixed for ci
Oct 9, 2025
6dcb42e
perl?
Oct 9, 2025
0355f82
added better using statements
Oct 9, 2025
da8886a
Merge branch 'main' into add_notebook_dl
AoifeHughes Oct 20, 2025
23b5728
Merge branch 'main' into add_notebook_dl
penelopeysm Nov 21, 2025
c583eb1
Merge branch 'main' into add_notebook_dl
penelopeysm Dec 2, 2025
36f1005
Use Julia
penelopeysm Dec 2, 2025
14744da
instantiate
penelopeysm Dec 2, 2025
e740585
Julia
penelopeysm Dec 2, 2025
1eecd82
move add_notebooks to Julia too
penelopeysm Dec 3, 2025
7f14daa
fix _site
penelopeysm Dec 3, 2025
e1b5505
fix Quarto callout blocks
penelopeysm Dec 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
patched to insert pkg local usage over global.
  • Loading branch information
AoifeHughes committed Oct 6, 2025
commit 2a396e4a73da99d7e1c921eb86bbccac4f4b36c3
29 changes: 25 additions & 4 deletions assets/scripts/qmd_to_ipynb.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,18 @@ def parse(self) -> None:
code_lines.append(lines[i])
i += 1

# Add code cell (with options as comments at the top)
full_code = cell_options + code_lines
self._add_code_cell(full_code, lang)
# Check if this is the Pkg.instantiate() cell that we want to skip
code_content = '\n'.join(code_lines).strip()
is_pkg_instantiate = (
'using Pkg' in code_content and
'Pkg.instantiate()' in code_content and
len(code_content.split('\n')) <= 3 # Only skip if it's just these lines
)

# Add code cell (with options as comments at the top) unless it's the Pkg.instantiate cell
if not is_pkg_instantiate:
full_code = cell_options + code_lines
self._add_code_cell(full_code, lang)

i += 1 # Skip closing ```
else:
Expand Down Expand Up @@ -129,8 +138,20 @@ def _add_code_cell(self, lines: List[str], lang: str) -> None:

def to_notebook(self) -> Dict[str, Any]:
"""Convert parsed cells to Jupyter notebook format."""
# Add package activation cell at the top for Julia notebooks
cells = self.cells
if self.kernel_name.startswith("julia"):
pkg_cell = {
"cell_type": "code",
"execution_count": None,
"metadata": {},
"outputs": [],
"source": "using Pkg; Pkg.activate(; temp=true)"
}
cells = [pkg_cell] + self.cells

notebook = {
"cells": self.cells,
"cells": cells,
"metadata": {
"kernelspec": {
"display_name": "Julia 1.11",
Expand Down