3b1b / manim

Animation engine for explanatory math videos
MIT License
60.28k stars 5.7k forks source link

(Willing to PR) Add snapshot testing, linters, and CI? #2004

Closed fzyzcjy closed 1 year ago

fzyzcjy commented 1 year ago

Hi thanks for the great library and your (i.e. @3b1b's) great math videos! Given its popularity (50k stars), it would be great to add a bit of software engineering. For example:

  1. Linters: Catch common errors, bad practices, etc. Given that the repo has type annotations, type errors can also be caught.
  2. Snapshot testing: In short, take a "snapshot" (say, mp4 files) for the example scenes in the first run. Then, for each commit in the future, re-generate the snapshots and compare them. If the snapshots are identical, we are pretty sure the code change does not break things. The technique is often seen in frontend development.
  3. CI (continuous integration): Run all the things above automatically on each commit to GitHub, as well as each PR.

If you want, I can provide examples of these software engineering techniques in real repositories as well :)

fzyzcjy commented 1 year ago

Ah I see, the community fork already has these :)