push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,294 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
texliveInfraOnly,
# build-system
poetry-core,
setuptools,
# buildInputs
cairo,
# dependencies
av,
beautifulsoup4,
click,
cloup,
decorator,
isosurfaces,
manimpango,
mapbox-earcut,
moderngl,
moderngl-window,
networkx,
numpy,
pillow,
pycairo,
pydub,
pygments,
rich,
scipy,
screeninfo,
skia-pathops,
srt,
svgelements,
tqdm,
typing-extensions,
watchdog,
# optional-dependencies
jupyterlab,
notebook,
# tests
ffmpeg,
pytest-cov-stub,
pytest-xdist,
pytestCheckHook,
versionCheckHook,
}:
let
# According to ManimCommunity documentation manim uses tex-packages packaged
# in a custom distribution called "manim-latex",
#
# https://community.chocolatey.org/packages/manim-latex#files
#
# which includes another custom distribution called tinytex, for which the
# package list can be found at
#
# https://github.com/yihui/tinytex/blob/master/tools/pkgs-custom.txt
#
# these two combined add up to:
manim-tinytex = texliveInfraOnly.withPackages (
ps: with ps; [
# tinytex
amsfonts
amsmath
atbegshi
atveryend
auxhook
babel
bibtex
bigintcalc
bitset
booktabs
cm
dehyph
dvipdfmx
dvips
ec
epstopdf-pkg
etex
etexcmds
etoolbox
euenc
everyshi
fancyvrb
filehook
firstaid
float
fontspec
framed
geometry
gettitlestring
glyphlist
graphics
graphics-cfg
graphics-def
grffile
helvetic
hycolor
hyperref
hyph-utf8
iftex
inconsolata
infwarerr
intcalc
knuth-lib
kvdefinekeys
kvoptions
kvsetkeys
l3backend
l3kernel
l3packages
latex
latex-amsmath-dev
latex-bin
latex-fonts
latex-tools-dev
latexconfig
latexmk
letltxmacro
lm
lm-math
ltxcmds
lua-alt-getopt
luahbtex
lualatex-math
lualibs
luaotfload
luatex
mdwtools
metafont
mfware
natbib
pdfescape
pdftex
pdftexcmds
plain
psnfss
refcount
rerunfilecheck
stringenc
tex
tex-ini-files
times
tipa
tools
unicode-data
unicode-math
uniquecounter
url
xcolor
xetex
xetexconfig
xkeyval
xunicode
zapfding
# manim-latex
standalone
everysel
preview
doublestroke
setspace
rsfs
relsize
ragged2e
fundus-calligra
microtype
wasysym
physics
dvisvgm
jknapltx
wasy
cm-super
babel-english
gnu-freefont
mathastext
cbfonts-fd
]
);
# https://github.com/ManimCommunity/manim/pull/4037
av_13_1 = av.overridePythonAttrs rec {
version = "13.1.0";
src = fetchFromGitHub {
owner = "PyAV-Org";
repo = "PyAV";
tag = "v${version}";
hash = "sha256-x2a9SC4uRplC6p0cD7fZcepFpRidbr6JJEEOaGSWl60=";
};
};
in
buildPythonPackage rec {
pname = "manim";
pyproject = true;
version = "0.19.0";
src = fetchFromGitHub {
owner = "ManimCommunity";
repo = "manim";
tag = "v${version}";
hash = "sha256-eQgp/GwKsfQA1ZgqfB3HF2ThEgH3Fbn9uAtcko9pkjs=";
};
build-system = [
poetry-core
setuptools
];
patches = [ ./pytest-report-header.patch ];
buildInputs = [ cairo ];
dependencies = [
av_13_1
beautifulsoup4
click
cloup
decorator
isosurfaces
manimpango
mapbox-earcut
moderngl
moderngl-window
networkx
numpy
pillow
pycairo
pydub
pygments
rich
scipy
screeninfo
skia-pathops
srt
svgelements
tqdm
typing-extensions
watchdog
];
optional-dependencies = {
jupyterlab = [
jupyterlab
notebook
];
# TODO package dearpygui
# gui = [ dearpygui ];
};
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [
ffmpeg
manim-tinytex
])
];
nativeCheckInputs = [
ffmpeg
manim-tinytex
pytest-cov-stub
pytest-xdist
pytestCheckHook
versionCheckHook
];
versionCheckProgramArg = "--version";
# about 55 of ~600 tests failing mostly due to demand for display
disabledTests = import ./failing_tests.nix;
pythonImportsCheck = [ "manim" ];
meta = {
description = "Animation engine for explanatory math videos - Community version";
longDescription = ''
Manim is an animation engine for explanatory math videos. It's used to
create precise animations programmatically, as seen in the videos of
3Blue1Brown on YouTube. This is the community maintained version of
manim.
'';
mainProgram = "manim";
changelog = "https://docs.manim.community/en/latest/changelog/${version}-changelog.html";
homepage = "https://github.com/ManimCommunity/manim";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ osbm ];
};
}

View File

@@ -0,0 +1,92 @@
[
# reason for failure: tests try to open display
"test_background_color"
"test_scene_add_remove"
"test_Circle"
"test_wait_skip"
"test_basic_scene_with_default_values"
"test_dry_run_with_png_format"
"test_dry_run_with_png_format_skipped_animations"
"test_FixedMobjects3D"
"test_basic_scene_l_flag"
"test_n_flag"
"test_s_flag_opengl_renderer"
"test_s_flag_no_animations"
"test_image_output_for_static_scene"
"test_no_image_output_with_interactive_embed"
"test_no_default_image_output_with_non_static_scene"
"test_image_output_for_static_scene_with_write_to_movie"
"test_s_flag"
"test_r_flag"
"test_play_skip"
"test_write_to_movie_disables_window"
"test_a_flag"
"test_pixel_coords_to_space_coords"
"test_t_values"
"test_custom_folders"
"test_t_values[15]"
"test_t_values[30]"
"test_t_values[60]"
"test_dash_as_filename"
"test_images_are_created_when_png_format_set_for_opengl"
"test_t_values_with_skip_animations"
"test_static_wait_detection"
"test_non_static_wait_detection"
"test_frozen_frame"
"test_gif_format_output"
"test_animate_with_changed_custom_attribute"
"test_images_are_zero_padded_when_zero_pad_set_for_opengl"
"test_mp4_format_output"
"test_videos_not_created_when_png_format_set"
"test_images_are_created_when_png_format_set"
"test_images_are_zero_padded_when_zero_pad_set"
"test_webm_format_output"
"test_default_format_output_for_transparent_flag"
"test_mov_can_be_set_as_output_format"
"test_force_window_opengl_render_with_format"
"test_get_frame_with_preview_disabled"
"test_get_frame_with_preview_enabled"
# reason for failure: tests try to reach network
"test_logging_to_file"
"test_plugin_function_like"
"test_plugin_no_all"
"test_plugin_with_all"
# failing with:
# E AssertionError:
# E Not equal to tolerance rtol=1e-07, atol=1.01
# E Frame no -1. You can use --show_diff to visually show the difference.
# E Mismatched elements: 18525 / 1639680 (1.13%)
# E Max absolute difference: 255
# E Max relative difference: 255.
"test_Text2Color"
"test_PointCloudDot"
"test_Torus"
# test_ImplicitFunction[/test_implicit_graph] failing with:
# E AssertionError:
# E Not equal to tolerance rtol=1e-07, atol=1.01
# E Frame no -1. You can use --show_diff to visually show the difference.
# E Mismatched elements: 1185[/633] / 1639680[/1639680] (0.0723[/0.0386]%)
# E Max absolute difference: 125[/121]
# E Max relative difference: 6.5[/1]
#
# These started failing after relaxing the “watchdog” and “isosurfaces” dependencies,
# likely due to a tolerance difference. They should, however, start working again when [1] is
# included in a Manim release.
# [1]: https://github.com/ManimCommunity/manim/pull/3376
"test_ImplicitFunction"
"test_implicit_graph"
# failing with:
# TypeError: __init__() got an unexpected keyword argument 'msg' - maybe you meant pytest.mark.skipif?
"test_force_window_opengl_render_with_movies"
# mismatching expectation on the new commandline
"test_manim_new_command"
# This tests checks if the manim executable is a python script. In our case it is not.
# It is a wrapper shell script instead.
"test_manim_checkhealth_subcommand"
]

View File

@@ -0,0 +1,36 @@
diff --git a/tests/conftest.py b/tests/conftest.py
index 4de34bbb..07b4bea6 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -4,31 +4,11 @@ import logging
import sys
from pathlib import Path
-import cairo
-import moderngl
import pytest
import manim
-def pytest_report_header(config):
- try:
- ctx = moderngl.create_standalone_context()
- info = ctx.info
- ctx.release()
- except Exception as e:
- raise Exception("Error while creating moderngl context") from e
-
- return (
- f"\nCairo Version: {cairo.cairo_version()}",
- "\nOpenGL information",
- "------------------",
- f"vendor: {info['GL_VENDOR'].strip()}",
- f"renderer: {info['GL_RENDERER'].strip()}",
- f"version: {info['GL_VERSION'].strip()}\n",
- )
-
-
def pytest_addoption(parser):
parser.addoption(
"--skip_slow",