Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Nov 23, 2025

Overview

This PR upgrades quantecon-book-theme from v0.12.0 to v0.13.0, which includes the new collapsible stderr warnings feature.

Changes

  • Updated environment.yml to use quantecon-book-theme==0.13.0 (released to PyPI)

New Features in v0.13.0

Collapsible stderr warnings - Automatic detection and collapsing of stderr output in notebook cells
✅ Clean "⚠ Warnings" button UI with expand/collapse functionality
✅ Improves readability by hiding verbose upstream warnings (JAX, CUDA, etc.)
✅ Full dark mode support and accessibility features
✅ Compatible with merge_streams option
✅ No breaking changes - purely additive

Problem Being Solved

When Jupyter notebooks execute code that produces warnings via stderr, these warnings can be verbose and visually distracting. Example warnings from QuantEcon lectures include:

  • JAX CUDA initialization messages
  • GPU interconnect warnings
  • Other upstream package warnings

While useful for debugging, these warnings disrupt reading flow and take up significant visual space. The new feature automatically detects these warnings and provides a clean collapsible interface.

Testing

Once merged, CI will build the lectures with the new theme version to validate:

  • Stderr warnings are properly detected and collapsed
  • Build process completes successfully
  • All existing functionality remains intact
  • Dark mode styling works correctly

Related

@github-actions
Copy link

📖 Netlify Preview Ready!

Preview URL: https://pr-733--sunny-cactus-210e3e.netlify.app (aa3601c)

@mmcky
Copy link
Contributor Author

mmcky commented Nov 23, 2025

@jstac I have been working on this idea to collapse the warnings issued by code (automatically in our theme).

Screenshot 2025-11-24 at 8 33 05 am

This might be a bit too prominent, maybe remove the background colour?

But keen to hear your thoughts on this approach (rather than suppression).

@mmcky
Copy link
Contributor Author

mmcky commented Nov 23, 2025

  • remove background colour
  • update "Warnings" to "Code warnings"

@mmcky
Copy link
Contributor Author

mmcky commented Nov 23, 2025

@jstac I think this looks better and will update Warnings -> Code warnings.

Screenshot 2025-11-24 at 9 10 16 am

@jstac
Copy link
Contributor

jstac commented Nov 23, 2025

I agree, that's perfect @mmcky !

Many thanks!!

@mmcky mmcky changed the title test: Upgrade theme to PR #333 - collapsible stderr warnings feature Upgrade quantecon-book-theme to v0.13.0 - collapsible stderr warnings Nov 24, 2025
@mmcky
Copy link
Contributor Author

mmcky commented Nov 24, 2025

@jstac once I get the green ticks I will merge and deploy.

@mmcky
Copy link
Contributor Author

mmcky commented Nov 24, 2025

  • final style in new release
Screenshot 2025-11-24 at 2 28 24 pm

and when you hover over it:

Screenshot 2025-11-24 at 2 28 54 pm

@jstac
Copy link
Contributor

jstac commented Nov 24, 2025

@mmcky Perfect

@github-actions
Copy link

📖 Netlify Preview Ready!

Preview URL: https://pr-733--sunny-cactus-210e3e.netlify.app (448f14a)

@mmcky mmcky merged commit c5f8770 into main Nov 24, 2025
1 check passed
@mmcky mmcky deleted the test-theme-upgrade-333 branch November 24, 2025 03:45
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.

3 participants