-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Added new manim checkhealth CLI subcommand
#3299
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
MrDiver
approved these changes
Jul 30, 2023
Collaborator
|
WE SHOULD IMPLEMENT A BASIC LATEX TEST RENDERING TEST am i too late to the party? Oh damn. nothing happened |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
highlight
For contributions that should be highlighted explicitly in the next changelog
new feature
Enhancement specifically adding a new feature (feature request should be used for issues instead)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a new command line interface subcommand which can be used to check whether a local installation of Manim has been configured correctly, and all required (and optional) dependencies are available. To try it, run it via
manim checkhealthorpython -m manim checkhealth.Description of new feature
The new subcommand
manim checkhealthprogrammatically checks whether all of the required system dependencies (ffmpeg) as well as the optional dependencies (like latex and dvisvgm) are available:(manim-py3.10) behackl@draven manim % manim checkhealth Manim Community v0.17.2 Checking whether your installation of Manim Community is healthy... - Checking whether manim is on your PATH ... PASSED - Checking whether the executable belongs to manim ... PASSED - Checking whether ffmpeg is available ... PASSED - Checking whether ffmpeg is working ... PASSED - Checking whether latex is available ... PASSED - Checking whether dvisvgm is available ... PASSED No problems detected, your installation seems healthy!If all defined health checks pass, the CLI also offers to render and preview a simple test scene, namely
In case health checks fail, some (hopefully) useful instructions for fixing the problem are displayed:
Theoretically, some of these problems could also be resolved interactively, from within the CLI. More details below.
Implementation detail
Health checks have been implemented in a somewhat generic way, namely in form of a function returning a
boolthat is decorated with a new@healthcheckdecorator. The decorator takes several arguments:ffmpegexecutable is not found on the system's PATH, an interactive dialog could help to set the correspondingconfig.ffmpeg_executableoption in the user-wide config file.)