-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: make annotate_sphere and annotate_arrow safe when run after plot invalidation #4699
BUG: make annotate_sphere and annotate_arrow safe when run after plot invalidation #4699
Conversation
didn't have a chance to run tests locally (other than verifying the reproducer script now works)... but probably should pass? don't think we have a lot of test coverage for this callback beyond simple unit tests. Also -- should I add a new test (probably cant get to that til tomorrow)? |
oh and note that I played around with storing the |
Thank you for taking this on ! I think a new test would be useful too. |
added a test and fixed the ArrowCallback as well |
p = SlicePlot(ds, "z", ("gas", "density")) | ||
p.annotate_sphere([0.5, 0.5, 0.5], 0.1) | ||
p.set_font_size(24) | ||
assert_fname(p.save(prefix)[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we could speed up these tests by calling p.render
instead of p.save
here (yes, that's also true for a lot of existing tests in this module, but of course it's way out of scope to deal with everything here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good!
Co-authored-by: Clément Robert <cr52@protonmail.com>
…rrow safe when run after plot invalidation
Closes #4698