Skip to content

Conversation

@mmcky
Copy link
Contributor

@mmcky mmcky commented Nov 3, 2025

Purpose

This PR sets up a test environment to evaluate:

  1. The new exercise_style feature from sphinx-exercise PR FEAT: Add solution_after_exercise style option executablebooks/sphinx-exercise#81
  2. The latest quantecon-book-theme release (v0.10.1)

Changes

  1. Updated environment.yml:

  2. Updated lectures/_config.yml: Enabled new configuration option

    • Added: exercise_style: "solution_follow_exercise"

Testing Scope

This lecture series contains 20+ exercises across multiple files that will be affected by the new exercise styling:

  • wealth_dynamics.md
  • odu.md
  • mle.md
  • ols.md
  • likelihood_ratio_process_2.md
  • finite_markov.md
  • uncertainty_traps.md
  • jv.md
  • cass_fiscal.md
  • likelihood_ratio_process.md
  • prob_meaning.md
  • And more...

Next Steps

  1. Build the lectures to evaluate the new styling with the latest theme
  2. Review HTML output to assess visual improvements
  3. Provide feedback to sphinx-exercise maintainers

Related

mmcky added 2 commits November 3, 2025 16:33
- Install sphinx-exercise from PR #81 branch
- Enable style_solution_after_exercise = True in _config.yml
- Testing new exercise/solution styling feature
- Change from: style_solution_after_exercise: true
- Change to: exercise_style: "solution_follow_exercise"

This makes the option name clearer and more descriptive.
Default value should be '' (empty string).
@github-actions
Copy link

github-actions bot commented Nov 3, 2025

📖 Netlify Preview Ready!

Preview URL: https://pr-670--sunny-cactus-210e3e.netlify.app (971b892)

@github-actions
Copy link

github-actions bot commented Nov 3, 2025

📖 Netlify Preview Ready!

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

@mmcky
Copy link
Contributor Author

mmcky commented Nov 3, 2025

  • we may need to update all admonitions styles (such as collapsible hint) in our theme to convert them all. Currently all exercises and solution directives are taken care of by sphinx-exercise.
Screenshot 2025-11-03 at 5 04 29 pm

cc: @jstac for 👀

@mmcky
Copy link
Contributor Author

mmcky commented Nov 3, 2025

  • introduced a new header style solution_follow_exercise in sphinx-exercise
  • update theme to provide consistent updating of Hide and Show

@github-actions
Copy link

github-actions bot commented Nov 4, 2025

📖 Netlify Preview Ready!

Preview URL: https://pr-670--sunny-cactus-210e3e.netlify.app (389d962)

- Install quantecon-book-theme from PR #322
- Now testing both sphinx-exercise PR #81 and theme PR #322
- Related: QuantEcon/quantecon-book-theme#322
@github-actions
Copy link

github-actions bot commented Nov 4, 2025

📖 Netlify Preview Ready!

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

@mmcky
Copy link
Contributor Author

mmcky commented Nov 4, 2025

  • fixed in our theme across all admonition types.
Screenshot 2025-11-05 at 10 05 43 am

@mmcky
Copy link
Contributor Author

mmcky commented Nov 5, 2025

  • updated sphinx-exercise to use Solution only in the header
  • added full validators to solution_follow_exercise style option to warn if a solution doesn't follow the associated exercise.

- Change from PR branch to released version 0.10.1
- Theme PR #322 has been merged and released
- Still testing sphinx-exercise PR #81
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

📖 Netlify Preview Ready!

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

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

📖 Netlify Preview Ready!

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

@mmcky
Copy link
Contributor Author

mmcky commented Nov 5, 2025

@jstac this has been updated and we have updates for sphinx-exercise and quantecon-book-theme ready to role.

Screenshot 2025-11-05 at 12 52 33 pm

I left the "Show" on the RHS so that it is a common location for all collapsible blocks (such as hint and tip admonitions). I have a screenshot of the only situation where they are side-by-side.

Is this consistency ok? or would you rather "Show solution" instead?

@jstac
Copy link
Contributor

jstac commented Nov 5, 2025

Perfect, thanks @mmcky !

- Testing default sphinx-exercise behavior without custom styling
- Will compare results with previous exercise_style configuration
@mmcky
Copy link
Contributor Author

mmcky commented Nov 5, 2025

  • running a build to test default behaviours of sphinx-exercise to make sure they are as expected, then will merge and release a new version and setup lecture-python.myst with the new style setting.

@github-actions
Copy link

github-actions bot commented Nov 5, 2025

📖 Netlify Preview Ready!

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

@mmcky
Copy link
Contributor Author

mmcky commented Nov 5, 2025

  • testing is complete.

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