Skip to content

fix sphinx to render rotating gif#59

Merged
m-reuter merged 2 commits intomainfrom
fix-ipynb
Feb 25, 2026
Merged

fix sphinx to render rotating gif#59
m-reuter merged 2 commits intomainfrom
fix-ipynb

Conversation

@m-reuter
Copy link
Member

@m-reuter m-reuter commented Feb 25, 2026

This PR aims to make the rotating snap_rotate GIF in the WhipperSnapPy tutorial render correctly in the Sphinx docs build (via nbsphinx/nbconvert), instead of degrading to a text/plain representation.

Changes:

Updates the tutorial notebook to save the rotation GIF to a local filename.
Adds Sphinx conf.py monkeypatches to include image/gif in nbsphinx output selection and rendering.
Patches nbconvert’s output extraction so image/gif gets written as binary bytes to extracted files.

@codecov
Copy link

codecov bot commented Feb 25, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 40.00%. Comparing base (d833146) to head (c42dc5c).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #59   +/-   ##
=======================================
  Coverage   40.00%   40.00%           
=======================================
  Files          23       23           
  Lines        2130     2130           
  Branches      327      327           
=======================================
  Hits          852      852           
  Misses       1177     1177           
  Partials      101      101           
Flag Coverage Δ
unittests 40.00% <ø> (ø)

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

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

Copy link
Contributor

Copilot AI left a comment

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 aims to make the rotating snap_rotate GIF in the WhipperSnapPy tutorial render correctly in the Sphinx docs build (via nbsphinx/nbconvert), instead of degrading to a text/plain representation.

Changes:

  • Updates the tutorial notebook to save the rotation GIF to a local filename.
  • Adds Sphinx conf.py monkeypatches to include image/gif in nbsphinx output selection and rendering.
  • Patches nbconvert’s output extraction so image/gif gets written as binary bytes to extracted files.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
tutorials/whippersnappy_tutorial.ipynb Adjusts snap_rotate GIF output path intended to improve Sphinx accessibility.
doc/conf.py Adds runtime patches for nbsphinx/nbconvert to select, render, and extract image/gif outputs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@m-reuter m-reuter merged commit a16ea13 into main Feb 25, 2026
29 checks passed
@m-reuter m-reuter deleted the fix-ipynb branch February 25, 2026 20:13
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