Skip to content

Add an opt-in export of downloads to a stable folder tree - #61

Merged
user27182 merged 4 commits into
mainfrom
feat/export-dir
Nov 3, 2026
Merged

user27182 merged 4 commits into
mainfrom
feat/export-dir

Conversation

@user27182

@user27182 user27182 commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

Adds an opt-in copy of the generated downloads into a stable folder tree, so a site can publish them without the _downloads/<digest>/ folders. Needed for pyvista/pyvista#9533, where MyBinder takes the gallery notebooks by section.

  • New export_dir key (default None): each download is also copied to <export_dir>/<source>/<format>/<page folder>/<file>, e.g. gallery/jupyter/examples/04-lights/shadows.ipynb. A relative path resolves from the conf.py folder.
  • New export_sources key (default ['gallery']): any of 'gallery' and 'docstrings', also accepted as a comma-separated -D value.
  • Two different downloads exported to the same path raise a warning, and the later one is kept.
  • README documents both keys.

🤖 Generated with Claude Code (Claude Opus 5.5)

Each gallery download is also written to <export_dir>/<format>/<docname folder>/<file>, so a site can publish them (e.g. to MyBinder) without the digest folders.
Downloads land at <export_dir>/<source>/<format>/<page folder>/<file>. export_sources defaults to ['gallery'].
@codecov-commenter

codecov-commenter commented Nov 3, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.94%. Comparing base (c2f7590) to head (e4f7f99).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #61   +/-   ##
=======================================
  Coverage   99.94%   99.94%           
=======================================
  Files           3        3           
  Lines        1747     1784   +37     
  Branches      335      341    +6     
=======================================
+ Hits         1746     1783   +37     
  Partials        1        1           

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

…rces

Adds _SOURCE_GALLERY, _SOURCE_DOCSTRINGS and _SOURCE_ORDER beside the format names, replaces a test that could not fail, and states in the README which downloads are exported and when.
@user27182
user27182 marked this pull request as ready for review November 3, 2026 19:35
@user27182
user27182 merged commit d6b5030 into main Nov 3, 2026
11 checks passed
@user27182
user27182 deleted the feat/export-dir branch November 3, 2026 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants