Repository navigation
HyperTools 1.1.1: quiet backend warning, caller-figure layout, findfont lines (#290, #291, #292) - #293
Merged
Conversation
…290, #291, #292) - #290: the import-time BACKEND_WARNING is issued only by a call that displays an interactive/animated matplotlib plot, once per session. - #291: hyp.plot(ax=) no longer runs tight_layout on a figure the caller built (hyp.subplots grids and hypertools' own figures are still laid out, through the figure rather than pyplot); the legend fit leaves a caller's layout engine in place. - #292: fallback font families with no regular-weight face are left out of the sans-serif stack, so matplotlib >= 3.11 logs no findfont line. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
…rded after delivery) - hyp.plot(ax=) no longer fits a legend by widening a caller-built figure: measured, a widened figure leaves the last legend clipped under the caller's own tight_layout, while an untouched one lays out cleanly. Also fixes a crash for axes that live in a SubFigure. - the backend warning is recorded as issued only after warnings.warn returns; argument inspection tolerates array-valued animate=. - changelog limitations, release checklist preface for 1.1.1, session notes. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
… second call) - every figure hypertools creates is marked, so hyp.plot(more, ax=fig.axes[0], legend=...) still tightens it and fits the legend. - the warning's argument inspection runs inside the try/finally that restores rcParams; a plotly Figure passed as ax= never gets the matplotlib backend warning. - changelog, docstring and checklist wording corrected. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
- pytest 9.2 rejects nested sequences in approx: compare as arrays. - pylsl 1.18.7 (liblsl 1.18.0.b7) takes up to 7 s to destroy an outlet an inlet connected to; the outlet fixture's teardown budget was 5 s. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
Yahoo answers a throttled address with HTTP 429 and a plain-text body, which surfaced as 'returned a non-JSON response ... JSONDecodeError' and failed eight live tests on one CI runner. The loader now says the address is being rate-limited; the tests' transient-network classifier reads that as an outage (skip, or fail under HYPERTOOLS_REQUIRE_LIVE_SOURCES=1). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch release 1.1.1: fixes for three issues met when
hyp.plotdraws into a figure the caller built, found by executing notebooks underjupyter nbconvertwith matplotlib 3.11. No API changes.Closes #290
Closes #291
Closes #292
What changed
BACKEND_WARNINGis issued only by a call that displays an animated or interactive plot that matplotlib renders, and once per session per message. Static plots,show=False,save_path=, and plots rendered by plotly (including a plotly Figure passed asax=) no longer issue it.hyp.plot(..., ax=ax)no longer lays out or resizes a figure the caller built: notight_layout, no legend fit. Figures hypertools makes behave as in 1.1.0: its own figure (including a later call into it withax=fig.axes[0]), apanels=grid, and ahyp.subplotsgrid. The layout call now goes through the figure, not pyplot.font=, or the only font covering the text, is kept.ax=andhyp.subplots, and a 1.1.1 preface inRELEASE_CHECKLIST.md.Behavior changes to be aware of
fig.tight_layout()after plotting, create the figure withlayout='constrained', or build the grid withhyp.subplots.legend=beside a caller's axes is no longer fitted by widening the caller's figure, so without a layout it can cover the next panel or run off the canvas. Measured in 2-D and 3-D with one and two panels: on a figure left alone,fig.tight_layout()andlayout='constrained'both place every legend without clipping or overlap; on a figure the fit had widened, the caller'sfig.tight_layout()left the last legend clipped.findfontweight line: bold or other non-regular text, afont=naming a family with no regular face, and text whose only covering font has none. See "Documented limitations" in the changelog.Also in this PR
SubFigurewhenlegend=is given (present in 1.1.0).pytest.approxthat pytest 9.2 rejects, and an LSL fixture whose 5 s teardown wait is shorter than the 7 s that pylsl 1.18.7 takes to destroy an outlet. The assertions are unchanged.Verification
tests/test_caller_figure_hygiene.py(new, 37 tests): passes on matplotlib 3.10.8 and 3.11.2; against master's code under 3.11 it gives 22 failed and 11 errors.ruff check .clean; Sphinx-Wbuild with all 51 gallery examples succeeded.notes/session_2026-11-21_release-1.1.1.md. Reviewer comparison against master: figures hypertools makes itself are pixel-identical (PNGs), animations byte-identical (6 gifs), plotly figures identical (8).Not in this PR
Nothing here puts the repository in release form.
readme.mdstill pins its images to thev1.1.0tag, and the galleries, tag, and PyPI upload followRELEASE_CHECKLIST.mdafter the merge. Until then therelease-gatejob onmasteris expected to fail.🤖 Generated with Claude Code
https://claude.ai/code/session_01DcKtysUSGLqA8RApYP9xYG