Skip to content
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

Add GraphicalUnitTester.py to manim-plugintemplate or have ability to use it via manim #8

Open
ponmike92 opened this issue Apr 14, 2021 · 5 comments

Comments

@ponmike92
Copy link

Enhancement proposal

I'm working on plugin for manim and would like to use GraphicalUnitTester class in tests. However, I didn't find how to do it and simply copy/paste existing GraphicalUnitTester.py file into my project as temporary solution.

What about giving users who create their own manim-templates ability to use utils from tests manim folder? (Sorry for issue, If this feature already exists)

@eulertour eulertour transferred this issue from ManimCommunity/manim Apr 14, 2021
@eulertour
Copy link
Member

I moved the issue to manim-plugintemplate since the addition will have to be made here.

@naveen521kk
Copy link
Member

@ponmike92 can you make a simple PR adding that file to tests folder and add some docs about it in README?

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Apr 15, 2021

As per the private discussion, it seems like a great solution is to have the GraphicalUnitTester.py available in the plugintemplate, but to allow easy generation of the test data with manim's rendering -f/--format option and giving the file type of npz (e.g. manim -f=npz [FILE] [SCENE])

@naveen521kk
Copy link
Member

but to allow easy generation of the test data with manim's rendering -f/--format option and giving the file type of npz (e.g. manim -f=npz [FILE] [SCENE])

@jsonvillanueva I thought it was only about adding that file to the tests folder so that people when using this template will get that file to create tests for the plugin. I am against complicating this template with what you suggested. The template needs to be simple and not be complicated.

@jsonvillanueva
Copy link
Member

jsonvillanueva commented Apr 15, 2021

This issue is mainly about giving the plugins the ability to add image tests for the last image of the video (just like manim).

IMO, the plugin shouldn't be responsible for having methods to generate the testing data, that's the responsibility of manim. What should be implemented here is the ability to run pytest and have graphical unit tests in the repo. But generating the control data isn't the responsibility of manim-plugintemplate, or what the PR addressing this issue should be about (i.e. any PR for this should add pytest/fixtures and demonstrate testing against control data -- but generating the control data isn't for this PR, that's for the main library)

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

No branches or pull requests

4 participants