Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Dec 9, 2025

Changes

This PR addresses issue #269 by adding the new exercise_style configuration from sphinx-exercise 1.2.0+ and updating the quantecon-book-theme to the latest version.

Configuration Changes

  • Added exercise_style: solution_follow_exercise to lectures/_config.yml
    • Enables simplified solution titles (shows just "Solution" instead of "Solution to Exercise #.#" with hyperlinks)
    • Activates order validation to ensure solutions appear after their referenced exercises
    • Provides better styling for lecture-style content where solutions naturally follow exercises

Dependency Updates

  • Updated quantecon-book-theme from 0.14.0 to 0.15.0 in environment.yml
    • Major refactoring and modernization
    • Security improvements (fixed 2 npm vulnerabilities)
    • Performance optimizations with CDN preconnect hints
    • Updated Node.js from 16.13.2 to 18.18.0 LTS
    • Improved testing infrastructure

Validation ✅

All exercise/solution pairs have been validated for compatibility with the new configuration:

  • 21 exercise/solution pairs across 13 lecture files
  • 100% compliance - All solutions correctly follow their exercises
  • Mix of gated syntax (exercise-start/end) and standard syntax ({exercise})
  • Both syntaxes are fully compatible with exercise_style: solution_follow_exercise

Files validated:

  • aiyagari_jax.md (2 pairs)
  • arellano.md (1 pair)
  • autodiff.md (1 pair)
  • hopenhayn.md (2 pairs)
  • inventory_dynamics.md (1 pair)
  • jax_intro.md (1 pair)
  • jax_nn.md (1 pair)
  • job_search.md (1 pair)
  • kesten_processes.md (1 pair)
  • lucas_model.md (1 pair)
  • mle.md (1 pair)
  • newtons_method.md (2 pairs)
  • overborrowing.md (1 pair)
  • short_path.md (1 pair)
  • wealth_dynamics.md (4 pairs)

Testing

The project already uses:

  • sphinx-exercise==1.2.1 (supports the new feature)
  • ✅ Gated directive syntax (exercise-start/exercise-end, solution-start/solution-end)
  • ✅ Solutions that follow their exercises in the same documents

The new configuration will:

  1. Simplify solution title rendering for better readability
  2. Validate exercise/solution ordering during builds
  3. Provide cleaner styling consistent with lecture-style content

Closes #269

- Added exercise_style: solution_follow_exercise to _config.yml
  * Enables simplified solution titles (just 'Solution' instead of 'Solution to Exercise #.#')
  * Activates order validation for exercises and solutions
  * Better styling for lecture-style content where solutions follow exercises
- Updated quantecon-book-theme from 0.14.0 to 0.15.0
  * Major refactoring and modernization
  * Security improvements (fixed 2 npm vulnerabilities)
  * Performance optimizations with CDN preconnect hints
  * Updated Node.js and dependencies

Fixes #269
@mmcky mmcky self-assigned this Dec 9, 2025
@netlify
Copy link

netlify bot commented Dec 9, 2025

Deploy Preview for incomparable-parfait-2417f8 ready!

Name Link
🔨 Latest commit 0b918d0
🔍 Latest deploy log https://app.netlify.com/projects/incomparable-parfait-2417f8/deploys/69377917d9e6c00008dd45c5
😎 Deploy Preview https://deploy-preview-272--incomparable-parfait-2417f8.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

@mmcky
Copy link
Contributor Author

mmcky commented Dec 9, 2025

This adopts the latest theme and updates the exercise/solution style.

Screenshot 2025-12-09 at 12 33 30 pm

@mmcky mmcky merged commit c390704 into main Dec 9, 2025
6 of 7 checks passed
@mmcky mmcky deleted the maint/exercise-solution-style branch December 9, 2025 01:38
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.

MAINT: review _config.yml for exercise/solution style and update quantecon-book-theme

2 participants