mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-23 04:20:56 +08:00

* feat(cli): `manim-slides checkhealth` Closes #457 * chore(fmt): auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * chore(tests): implement some basic tests * chore(docs): document changes --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
40 lines
1.0 KiB
Python
40 lines
1.0 KiB
Python
import sys
|
|
|
|
import click
|
|
|
|
from .__version__ import __version__
|
|
|
|
|
|
@click.command()
|
|
def checkhealth() -> None:
|
|
"""Check Manim Slides' installation."""
|
|
click.echo(f"Manim Slides version: {__version__}")
|
|
click.echo(f"Python executable: {sys.executable}")
|
|
click.echo("Manim bindings:")
|
|
|
|
click.echo(f"Modules: {sys.modules.keys()}")
|
|
|
|
try:
|
|
from manim import __version__ as manimce_version
|
|
|
|
click.echo(f"\tmanim (version: {manimce_version})")
|
|
except ImportError:
|
|
click.secho("\tmanim not found", bold=True)
|
|
|
|
try:
|
|
from manimlib import __version__ as manimlib_version
|
|
|
|
click.echo(f"\tmanimgl (version: {manimlib_version})")
|
|
except ImportError:
|
|
click.secho("\tmanimgl not found", bold=True)
|
|
|
|
try:
|
|
from qtpy import API, QT_VERSION
|
|
|
|
click.echo(f"Qt API: {API} (version: {QT_VERSION})")
|
|
except ImportError:
|
|
click.secho(
|
|
"No Qt API found, some Manim Slides commands will not be available",
|
|
bold=True,
|
|
)
|