Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Downloadable docs#247

Merged
vitenti merged 2 commits into
masterfrom
downloadable_docs
May 7, 2026
Merged

Downloadable docs#247
vitenti merged 2 commits into
masterfrom
downloadable_docs

Conversation

@vitenti

@vitenti vitenti commented May 7, 2026

Copy link
Copy Markdown
Contributor

Making quarto project generate jupyter notebooks and python scripts as downloadable artifacts.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ipynb as an additional Quarto output format across tutorials/examples/benchmarks and scope certain figure/table options to HTML only.
  • Add a Quarto post-render hook to convert generated notebooks into .py scripts via jupyter nbconvert.
  • Inject an after-body HTML snippet that adds “Python” download links next to the existing .ipynb format 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 thread docs/_quarto.yml.in
Comment on lines +26 to +27
post-render:
- ./ipynb_to_py.sh
Comment thread docs/add-py-link.html
Comment on lines +12 to +17

li.innerHTML =
`<a href="${pyHref}" download>
<i class="bi bi-filetype-py"></i>Python
</a>`;

@codecov

codecov Bot commented May 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.43%. Comparing base (7fc093a) to head (e77c0d1).

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.
📢 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.

@vitenti vitenti merged commit 71d4f88 into master May 7, 2026
18 of 20 checks passed
@vitenti vitenti deleted the downloadable_docs branch May 7, 2026 23:25
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.

2 participants