Skip to content

Fix idle draw animation#504

Merged
cvanelteren merged 33 commits into
mainfrom
fix-idle-draw-animation
Jan 30, 2026
Merged

Fix idle draw animation#504
cvanelteren merged 33 commits into
mainfrom
fix-idle-draw-animation

Conversation

@cvanelteren

@cvanelteren cvanelteren commented Jan 24, 2026

Copy link
Copy Markdown
Collaborator

Updated the animation draw pipeline to avoid repeated layout recomputation, which was causing layout jitter during animations. Auto‑layout now only runs when the layout is actually dirty or on the initial draw, and layout dirtiness is tracked across format calls, subplot/panel creation, and user‑driven size changes. Added a regression test to ensure draw_idle no longer retriggers layout. CI has been hardened: selected‑test mode now falls back to the full suite when nodeids are missing (exit code 4/5), baseline generation does the same on base commits, and coverage is collected in a single‑process pass to avoid xdist worker gaps. Finally, CI logs were made quieter with short tracebacks and warnings suppressed so failures are easier to spot.

Closes #488

@codecov

codecov Bot commented Jan 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 96.25000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/figure.py 92.30% 0 Missing and 2 partials ⚠️
ultraplot/axes/base.py 50.00% 0 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren cvanelteren marked this pull request as ready for review January 28, 2026 02:25
Comment thread pyproject.toml

[tool.pytest.ini_options]
filterwarnings = [
"ignore:'resetCache' deprecated - use 'reset_cache':DeprecationWarning:matplotlib._fontconfig_pattern",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"ignore:'resetCache' deprecated - use 'reset_cache':DeprecationWarning:matplotlib._fontconfig_pattern",
"ignore:'resetCache' deprecated - use 'reset_cache':DeprecationWarning:matplotlib._fontconfig_pattern",
]

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason I cannot accept this change on the web but I don't see what this doesexactly given the code -- other than the extra lien

@cvanelteren

Copy link
Copy Markdown
Collaborator Author

This PR is not fixed yet. There are some funky things still happening on this PR.

@cvanelteren cvanelteren merged commit bc7f723 into main Jan 30, 2026
14 of 24 checks passed
@cvanelteren cvanelteren deleted the fix-idle-draw-animation branch January 30, 2026 13:08
K-Mirembe-Mercy pushed a commit to K-Mirembe-Mercy/UltraPlot that referenced this pull request Mar 22, 2026
* animation: skip auto_layout on draw_idle

* layout: skip auto_layout unless layout is dirty

* layout: avoid dirtying layout on backend size updates

* ci: append coverage data with xdist

* ci: force pytest-cov plugin with xdist

* ci: fall back to full tests when selection is empty

* ci: handle empty selected tests under bash -e

* ci: fall back to full baseline generation on empty selection

* ci: treat missing nodeids as empty selection

* ci: run coverage without xdist to avoid worker gaps

* ci: quiet pytest output

* ci: suppress pytest warnings output

* ci: stabilize pytest exit handling

* ci: retry pytest without xdist on nonzero exit

* ci: run main test step without xdist

* ci: filter missing nodeids before pytest

* ci: bump cache keys for test map and baselines

* ci: rely on coverage step for test gating

* ci: drop coverage step from build workflow

* Remove workflow changes from branch

* run test single thread

* Prevent None from interfering with tickers

* Remove git install

* Harden workflow

* update workflow

* Restore workflow files

* Apply suggestion from @beckermr

---------

Co-authored-by: Matthew R. Becker <beckermr@users.noreply.github.com>
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.

Points to note when creating animations using ultraplot

2 participants