Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: executablebooks/sphinx-exercise
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.2.1
Choose a base ref
...
head repository: executablebooks/sphinx-exercise
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.2.2
Choose a head ref
  • 5 commits
  • 13 files changed
  • 3 contributors

Commits on Nov 17, 2025

  1. Configuration menu
    Copy the full SHA
    f721c3f View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2026

  1. FIX: Use alabaster in the gated test root to unbreak CI (#88)

    The `gateddirective` test root was the only HTML test root using a third-party
    theme (`html_theme = "sphinx_book_theme"`), which pulls in pydata-sphinx-theme.
    Current pydata-sphinx-theme calls `_get_toctree_ancestors`, which does not exist
    in Sphinx 6 or 7, so every HTML test using that root fails with:
    
        sphinx.errors.ThemeError: An error happened in rendering the page exercise.
        Reason: ImportError("cannot import name '_get_toctree_ancestors' from
        'sphinx.environment.adapters.toctree'")
    
    This is dependency drift rather than a code regression: main last ran CI on
    2025-11-17, before the theme released the change, and nothing in this repo
    changed. Six tests fail on the Sphinx 6 and 7 jobs.
    
    The theme is incidental to what these tests check. The regression fixtures
    capture only the `div.exercise` / `div.solution` markup this extension
    generates, so no third-party theme is needed to exercise them, and depending on
    one couples the suite to that theme's Sphinx support matrix. The other three
    HTML test roots already use alabaster; this brings the fourth into line.
    
    Pinning the theme instead was considered and rejected: it would need a
    per-Sphinx-version pin and would rot again on the next release, whereas
    removing the dependency from the HTML test path ends the whole class of
    failure.
    
    `test-simplebook` still names sphinx_book_theme but is only ever built with the
    latex builder, which never loads an HTML theme, so it is unaffected and left
    alone.
    
    Verified by reproducing the exact CI combination locally (Python 3.13,
    Sphinx 6.2.1, pydata-sphinx-theme 0.20.0, sphinx-book-theme 1.4.0):
    
    - before: 6 failed, 6 passed in tests/test_gateddirective.py
    - after:  12 passed
    - full suite: 116 passed on that combination, and 116 passed on Sphinx 8.2.3
    
    No regression fixtures needed regenerating, which confirms they are
    theme-independent.
    
    Co-authored-by: Claude Fable 5 <[email protected]>
    mmcky and claude authored Aug 24, 2026
    Configuration menu
    Copy the full SHA
    9804d68 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2026

  1. FIX: Keep figures inside exercise and solution boxes from floating in…

    … LaTeX (#95)
    
    * FIX: Keep figures inside exercise and solution boxes from floating in LaTeX
    
    Sphinx's LaTeX writer increments no_latex_floats when it opens an
    admonition, so visit_figure writes \begin{figure}[H] rather than a
    float. The exercise and solution visitors open the same sphinxadmonition
    box but never touched the counter, so a captioned figure inside them was
    written as \begin{figure}[htbp] and LaTeX stopped with "Not in outer par
    mode".
    
    Open and close the box through a helper pair that also maintains the
    counter, used by all three LaTeX visit/depart pairs (exercise_node,
    exercise_enumerable_node and solution_node; gated blocks are transformed
    into these nodes).
    
    Add a latexfigure test root with a figure in each kind of box, plus one
    after them that must still float, so the counter is shown to be restored.
    
    Fixes #94
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    
    * DOCS: Link the CHANGELOG entry to the pull request
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    
    * TST: Cover myst-nb code-cell figures and match LaTeX figures by name
    
    Add a notebook to the latexfigure test root with a code-cell whose
    mystnb figure metadata puts a captioned figure inside a gated solution,
    which is how Jupyter Book projects usually hit the float bug. Its
    outputs are stored and nb_execution_mode is "off", so no kernel runs.
    
    Match figures by their :name: label instead of their caption. The
    caption regex stopped at the first closing brace, so a caption with
    markup such as \sphinxhyphen{} was misread, and a figure without a
    caption was paired with the next one.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    
    ---------
    
    Co-authored-by: Claude Opus 5.5 <[email protected]>
    mmcky and claude authored Nov 10, 2026
    Configuration menu
    Copy the full SHA
    599a08a View commit details
    Browse the repository at this point in the history
  2. Release v1.2.2

    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    mmcky and claude committed Nov 10, 2026
    Configuration menu
    Copy the full SHA
    295c46d View commit details
    Browse the repository at this point in the history
  3. FIX: Update the PyPI publish action so it accepts current wheel metadata

    The v1.2.2 tag's publish job failed before uploading anything:
    pypa/[email protected] (2020) runs a twine that rejects
    Metadata-Version 2.5, which current hatchling (1.33.0) writes.
    
    v1.14.3 bundles twine 7.0.0 and packaging 26.2, and `twine check
    --strict` with those versions passes the 1.2.2 wheel and sdist. The
    user/password token inputs are unchanged; the attestations input is
    ignored with a warning when a token is used.
    
    Co-Authored-By: Claude Opus 5.5 <[email protected]>
    mmcky and claude committed Nov 10, 2026
    Configuration menu
    Copy the full SHA
    cccfb87 View commit details
    Browse the repository at this point in the history
Loading