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

Questions RE: contributing to testing of Manim #798

Open
matthewfeickert opened this issue Nov 19, 2019 · 7 comments
Open

Questions RE: contributing to testing of Manim #798

matthewfeickert opened this issue Nov 19, 2019 · 7 comments

Comments

@matthewfeickert
Copy link

@matthewfeickert matthewfeickert commented Nov 19, 2019

Hi. In the README it mentions that

there is a dire need for tests

As I'm currently moving a quite a few of my own projects CI systems to GitHub Actions I was wondering if there is any general consensus or thoughts on how testing on Manim should go. Obviously animation is a tricky thing to test rigorously, but at least installation and some other basic tests can be started on.

I'm generally a fan of pytest, so unless there are strong objections if I were to start a testing PR on this before the end of the year would people be fine using pytest? Regardless, I have a question related to how to treat Manim in testing. Is Manim meant to be a library or an application? This may sound vauge, so I will just let Donald Stufft's post "setup.py vs requirements.txt" and the pipenv website explain what I'm asking and why for me better than I can.

Thanks in general for all this nice work!

cc @3b1b @eulertour

@625248808
Copy link

@625248808 625248808 commented Nov 23, 2019

Emm... Just a question, how to download the manim? When I checked the botton named Clone and Download, it didn't give me any way to download. What happend? How to do it?

@625248808
Copy link

@625248808 625248808 commented Nov 23, 2019

Hope to get a quickly answer.

@matthewfeickert
Copy link
Author

@matthewfeickert matthewfeickert commented Nov 23, 2019

@625248808 It seems that you're new to Git, so please search on "github clone and download". I would suggest that you familiarize yourself with Git and there are many excellent resources on the internet to do so — GitHub itself offers many such resources if you search.

@3b1b
Copy link
Owner

@3b1b 3b1b commented Dec 11, 2019

Hi Matthew,

Thanks for the inquiry and willingness to help, and apologies for a slow response. Pytest seems good, though I'll admit to not knowing what the right considerations at play are here. Testing the look of the animations is probably very tricky, in no small part because it's possible stylistic changes would be desirable without breaking all tests. Maybe the best way to start is with simple tests that ensure things don't break, and that basic positional data lines up with expectations. For example, obj1.next_to(obj2, LEFT) should leave the x_component of obj1.get_right() smaller than that of obj2.get_left().

As to the question of library vs. application, I agree that it's a little ambiguous at the moment. The end goal is probably be to separate the two, a library handling all manipulation of shapes, animations, etc., and an application for actually putting together scenes and animation. Where do you see it making the biggest difference for testing right now?

-Grant

@matthewfeickert
Copy link
Author

@matthewfeickert matthewfeickert commented Dec 11, 2019

Pytest seems good, though I'll admit to not knowing what the right considerations at play are here. Testing the look of the animations is probably very tricky, in no small part because it's possible stylistic changes would be desirable without breaking all tests. Maybe the best way to start is with simple tests that ensure things don't break, and that basic positional data lines up with expectations. For example, obj1.next_to(obj2, LEFT) should leave the x_component of obj1.get_right() smaller than that of obj2.get_left().

This seems like a good plan. There are some things that given the current API you've settled around should remain foundational, and at the very least those can be tested. I will admit that I'm used to writing tests for computational libraries, and not for visualization ones, so this will also be something I will need to learn and experiment with, given that I am not even a manim user at the moment.

As to the question of library vs. application, I agree that it's a little ambiguous at the moment. The end goal is probably be to separate the two, a library handling all manipulation of shapes, animations, etc., and an application for actually putting together scenes and animation.

Cool. This is good to know.

Where do you see it making the biggest difference for testing right now?

The biggest short term impact (IMO) is understanding how to install the dependencies for testing. If we test manim as a library then it makes sense to identify the lowest release version of dependencies that result in a successful build of manim and then clearly indicate those in setup.py (and/or setup.cfg) — maybe also using the compatible release syntax to lock into stable major releases so that a big API change doesn't sneak up on you. To be explicit, this is all compared to treating it like an application and using a pinned requirements.txt (or perhaps better Poetry and its lock file) to get a truly reproducible "deployment" environment (reasons outlined well by @di for the example of requirements.txt using in blog posts here and here).

Also no need to apologize on the response time! Even if you had responded instantly I realistically wouldn't have had the time to work on anything sooner then now (or over the holidays).

@matthewfeickert
Copy link
Author

@matthewfeickert matthewfeickert commented Dec 11, 2019

@3b1b @eulertour One request: As the manim GitHub project gets an impressively large number of issues opened up on it can you please add a "tests" label to this Issue? Have it be labelled makes it much easier to find when it gets bumped from page to page.

@eulertour
Copy link
Collaborator

@eulertour eulertour commented Dec 16, 2019

@matthewfeickert If you intend to make significant changes to manim I beseech you to join the discord. It's much, much faster and more responsive than GitHub. It's linked from the README in case you missed it.

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

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.