Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Pass AbstractMovieWriter.setup kwargs through Animation.save #28822

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

QuLogic
Copy link
Member

@QuLogic QuLogic commented Sep 14, 2024

PR summary

This is a rebase of #11863 with the addition of a test. That PR was closed because #16082 defaulted animations to save intermediate files to a temporary directory. However, that didn't actually fix the ability to pass arguments to setup, which means the idea from #16082 to "just pass frame_prefix if you want to save the temporary files" was never possible.

PR checklist

@QuLogic QuLogic force-pushed the anim-save-kwargs branch from 2ea7dd3 to f6dc4e0 Compare June 2, 2025 20:51
Copy link
Member

@timhoffm timhoffm left a comment

Choose a reason for hiding this comment

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

The idea is fundamentally reasonable. However, I think we should do a bit:

  • in AbstractMovieWriter.setup docstring clarify that subclasses may specify additional parameters.
  • optional: should we require/recommend that these additional parameters are kwonly? Should dpi even be kwonly? If either we should migrate our own setup() APIs via @make_keyword_only. - To be checked are there third-party movie writers and would we need to take extra cater for compatibility.
  • I'm very much considering putting all the additional setup paramters in a single setup_kwargs parameter - or if we want to be very explicit writer_setup_kwargs. This better rhymes with the existing savefig_kwargs and generally, with the pattern foo_kwargs (or sometimes spelled foo_kw) that we use to pass on a set of kwargs for a specific purpose.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants