Downloadable docs#247
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Quarto documentation site build to emit Jupyter notebooks as alternate downloadable artifacts, and adds a post-render step + small HTML helper to also expose derived Python scripts alongside the notebooks.
Changes:
- Enable
ipynbas an additional Quarto output format across tutorials/examples/benchmarks and scope certain figure/table options to HTML only. - Add a Quarto
post-renderhook to convert generated notebooks into.pyscripts viajupyter nbconvert. - Inject an after-body HTML snippet that adds “Python” download links next to the existing
.ipynbformat links.
Reviewed changes
Copilot reviewed 21 out of 22 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| numcosmo/model/nc_hicosmo_de.c | Adds a new gi-docgen comment block for nc_hicosmo_de_d2E2Omega_de_dz2 (currently duplicated/overlapping with an existing typoed doc block). |
| docs/tutorials/python/sky_match.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/tutorials/python/cluster_wl_simul.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/tutorials/python/bounce.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/tutorials/python/bounce_spectra.qmd | Enables ipynb output and nests many chunk figure options under html:. |
| docs/tutorials/c/gobject.qmd | Enables ipynb output and adds format-links. |
| docs/tutorials/c/curve_tutorial.qmd | Enables ipynb output and adds format-links. |
| docs/examples/intro/simple.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/intro/recombination.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/intro/power_spectrum.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/intro/hiprim.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/intro/hiprim_tensor.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/intro/epdf.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/examples/data_analysis/snia.qmd | Enables ipynb output and nests chunk figure options under html:. |
| docs/benchmarks/ccl_two_point.qmd | Enables ipynb output and nests chunk figure/table options under html:. |
| docs/benchmarks/ccl_power_spectrum.qmd | Enables ipynb output and nests chunk figure/table options under html:. |
| docs/benchmarks/ccl_background.qmd | Enables ipynb output and nests chunk figure/table options under html:. |
| docs/meson.build | Installs the new post-render script and HTML include into the Quarto build input set. |
| docs/ipynb_to_py.sh | New script that converts generated .ipynb files into .py scripts via nbconvert. |
| docs/add-py-link.html | New after-body script that adds a “Python” download link next to .ipynb format links. |
| docs/_quarto.yml.in | Adds post-render hook and includes the HTML injection snippet for HTML output. |
| .gitignore | Ignores /.luarc.json. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1217
to
+1221
| /** | ||
| * nc_hicosmo_de_d2E2Omega_de_dz2: | ||
| * @cosmo_de: a #NcHICosmoDE | ||
| * @z: redshift $z$ | ||
| * |
Comment on lines
+26
to
+27
| post-render: | ||
| - ./ipynb_to_py.sh |
Comment on lines
+12
to
+17
|
|
||
| li.innerHTML = | ||
| `<a href="${pyHref}" download> | ||
| <i class="bi bi-filetype-py"></i>Python | ||
| </a>`; | ||
|
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
==========================================
- Coverage 77.46% 77.43% -0.04%
==========================================
Files 663 663
Lines 110638 110638
==========================================
- Hits 85707 85672 -35
- Misses 24931 24966 +35 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Making quarto project generate jupyter notebooks and python scripts as downloadable artifacts.