Skip to content

Commit e7f9d23

Browse files
committed
2 parents afe91d0 + 56bc8ad commit e7f9d23

File tree

466 files changed

+19638
-9887
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

466 files changed

+19638
-9887
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
[codespell]
22
exclude-file=.codespell_ignorelines
33
check-hidden=True
4-
ignore-words-list = sherif
4+
ignore-words-list = nam,sherif,falsy

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ extend-ignore = E203, W503, D202, D212, D213, D404
2121
A001, A002, A003,
2222

2323
# Plug-in: flake8-bugbear
24-
B006, B007, B008, B009, B010,
24+
B006, B007, B008, B009, B010, B903, B950,
2525

2626
# Plug-in: flake8-simplify
2727
SIM105, SIM106, SIM119,

.github/ISSUE_TEMPLATE/installation_issue.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ assignees: ''
1111

1212
- [ ] I have followed the latest version of the
1313
[installation instructions](https://docs.manim.community/en/stable/installation.html).
14-
- [ ] I have checked the [troubleshooting page](https://docs.manim.community/en/stable/installation/troubleshooting.html) and my problem is either not mentioned there,
14+
- [ ] I have checked the [installation FAQ](https://docs.manim.community/en/stable/faq/installation.html) and my problem is either not mentioned there,
1515
or the solution given there does not help.
1616

1717
## Description of error

.github/ISSUE_TEMPLATE/suggestion.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/codeql.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
query-filters:
2+
- exclude:
3+
id: py/init-calls-subclass
4+
- exclude:
5+
id: py/unexpected-raise-in-special-method
6+
- exclude:
7+
id: py/modification-of-locals
8+
- exclude:
9+
id: py/multiple-calls-to-init
10+
- exclude:
11+
id: py/missing-call-to-init
12+
paths:
13+
- manim
14+
paths-ignore:
15+
- tests/
16+
- example_scenes/

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"
7+
ignore:
8+
- dependency-name: "*"
9+
update-types:
10+
- "version-update:semver-minor"
11+
- "version-update:semver-patch"

.github/workflows/cffconvert.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out a copy of the repository
14-
uses: actions/checkout@v2
14+
uses: actions/checkout@v3
1515

1616
- name: Check whether the citation metadata from CITATION.cff is valid
1717
uses: citation-file-format/[email protected]

.github/workflows/ci.yml

Lines changed: 35 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -13,77 +13,31 @@ on:
1313
- main
1414

1515
jobs:
16-
test-arm:
17-
runs-on: self-hosted
18-
env:
19-
DISPLAY: :0
20-
PYTEST_ADDOPTS: "--color=yes" # colors in pytest
21-
strategy:
22-
fail-fast: false
23-
matrix:
24-
python: ['3.7.12', '3.10.2']
25-
steps:
26-
- name: Checkout the repository
27-
uses: actions/checkout@v2
28-
29-
- name: Check Runner
30-
run: |
31-
which latex
32-
which ffmpeg
33-
latex --version
34-
ffmpeg -version
35-
which python
36-
python --version
37-
38-
- name: Activate Python ${{ matrix.python }}
39-
run: |
40-
echo "/root/.pyenv/versions/${{ matrix.python }}/bin:/root/.poetry/bin:$PATH" > $GITHUB_PATH
41-
42-
- name: Show Python Version
43-
run: |
44-
python --version --version
45-
46-
- name: Install Manim
47-
run: |
48-
poetry install
49-
50-
- name: Run tests
51-
run: |
52-
poetry run pytest
53-
54-
- name: Run module doctests
55-
run: |
56-
poetry run pytest --cov-append --doctest-modules --ignore-glob="*opengl*" manim
57-
58-
- name: Run doctests in rst files
59-
run: |
60-
cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
61-
62-
6316
test:
6417
runs-on: ${{ matrix.os }}
6518
env:
6619
DISPLAY: :0
6720
PYTEST_ADDOPTS: "--color=yes" # colors in pytest
68-
GLCONTEXT_WIN_LIBGL: C:\msys64\mingw64\bin\opengl32.dll
6921
strategy:
7022
fail-fast: false
7123
matrix:
72-
os: [ubuntu-latest, macos-latest, windows-latest]
73-
python: ['3.7', '3.8', '3.9', '3.10']
24+
os: [ubuntu-22.04, macos-latest, windows-latest]
25+
python: ["3.8", "3.9", "3.10", "3.11"]
7426

7527
steps:
7628
- name: Checkout the repository
77-
uses: actions/checkout@v2
29+
uses: actions/checkout@v3
30+
31+
- name: Install Poetry
32+
run: |
33+
pipx install "poetry==1.5.*"
34+
poetry config virtualenvs.prefer-active-python true
7835
7936
- name: Setup Python ${{ matrix.python }}
80-
uses: actions/setup-python@v2
37+
uses: actions/setup-python@v4
8138
with:
8239
python-version: ${{ matrix.python }}
83-
84-
- name: Install Poetry
85-
run: |
86-
pip install --user poetry
40+
cache: "poetry"
8741

8842
- name: Setup macOS PATH
8943
if: runner.os == 'macOS'
@@ -94,33 +48,38 @@ jobs:
9448
shell: bash
9549
id: cache-vars
9650
run: |
97-
echo "::set-output name=poetry-venv-dir::$(poetry config virtualenvs.path)"
98-
echo "::set-output name=date::$(/bin/date -u "+%m%w%Y")"
99-
100-
- name: Setup Poetry cache
101-
uses: actions/cache@v2
102-
with:
103-
path: ${{ steps.cache-vars.outputs.poetry-venv-dir }}
104-
key: ${{ runner.os }}-poetry-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}
51+
echo "date=$(/bin/date -u "+%m%w%Y")" >> $GITHUB_OUTPUT
10552
10653
- name: Install and cache ffmpeg (all OS)
107-
uses: FedericoCarboni/setup-ffmpeg@v1.1.0
54+
uses: FedericoCarboni/setup-ffmpeg@v2
10855
with:
10956
token: ${{ secrets.GITHUB_TOKEN }}
11057
id: setup-ffmpeg
11158

11259
- name: Install system dependencies (Linux)
60+
if: runner.os == 'Linux'
61+
uses: awalsh128/cache-apt-pkgs-action@latest
62+
with:
63+
packages: python3-opengl libpango1.0-dev xvfb
64+
version: 1.0
65+
66+
- name: Install Texlive (Linux)
67+
if: runner.os == 'Linux'
68+
uses: teatimeguest/setup-texlive-action@v2
69+
with:
70+
cache: true
71+
packages: scheme-basic fontspec inputenc fontenc tipa mathrsfs calligra xcolor standalone preview doublestroke ms everysel setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english gnu-freefont mathastext cbfonts-fd xetex
72+
73+
- name: Start virtual display (Linux)
11374
if: runner.os == 'Linux'
11475
run: |
115-
sudo apt update
116-
sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa python-opengl libpango1.0-dev xvfb
11776
# start xvfb in background
11877
sudo /usr/bin/Xvfb $DISPLAY -screen 0 1280x1024x24 &
11978
12079
- name: Setup macOS cache
80+
uses: actions/cache@v3
12181
id: cache-macos
12282
if: runner.os == 'macOS'
123-
uses: actions/cache@v2
12483
with:
12584
path: ${{ github.workspace }}/macos-cache
12685
key: ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
@@ -159,20 +118,12 @@ jobs:
159118
- name: Setup Windows cache
160119
id: cache-windows
161120
if: runner.os == 'Windows'
162-
uses: actions/cache@v2
121+
uses: actions/cache@v3
163122
with:
164123
path: ${{ github.workspace }}\ManimCache
165124
key: ${{ runner.os }}-dependencies-tinytex-${{ hashFiles('.github/manimdependency.json') }}-${{ steps.cache-vars.outputs.date }}-1
166125

167-
- name: Setup MSYS2 (Windows)
168-
if: runner.os == 'Windows'
169-
uses: msys2/setup-msys2@v2
170-
with:
171-
release: false
172-
msystem: MINGW64
173-
path-type: inherit
174-
install: >-
175-
mingw-w64-x86_64-mesa
126+
- uses: ssciwr/setup-mesa-dist-win@v1
176127

177128
- name: Install system dependencies (Windows)
178129
if: runner.os == 'Windows' && steps.cache-windows.outputs.cache-hit != 'true'
@@ -182,7 +133,7 @@ jobs:
182133
echo "Install Tinytex"
183134
Invoke-WebRequest "https://github.com/yihui/tinytex-releases/releases/download/daily/TinyTeX-1.zip" -O "$($env:TMP)\TinyTex.zip"
184135
Expand-Archive -LiteralPath "$($env:TMP)\TinyTex.zip" -DestinationPath "$($PWD)\ManimCache\LatexWindows"
185-
$env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32;$($env:PATH)"
136+
$env:Path = "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows;$($env:PATH)"
186137
tlmgr update --self
187138
foreach ($c in $tinyTexPackages){
188139
$c=$c.Trim()
@@ -194,27 +145,23 @@ jobs:
194145
- name: Add Windows dependencies to PATH
195146
if: runner.os == 'Windows'
196147
run: |
197-
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32"
148+
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\windows"
198149
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
199-
$env:PATH = "C:\msys64\mingw64\bin;$($env:PATH)"
200150
echo "$env:Path" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
201151
202152
- name: Install manim
203153
run: |
204-
poetry config experimental.new-installer false
154+
poetry config installer.modern-installation false
205155
poetry install
206156
207157
- name: Run tests
208158
run: |
209-
poetry run pytest
159+
poetry run python -m pytest
210160
211161
- name: Run module doctests
212162
run: |
213-
poetry run pytest --cov-append --doctest-modules --ignore-glob="*opengl*" manim
163+
poetry run python -m pytest -v --cov-append --ignore-glob="*opengl*" --doctest-modules manim
214164
215165
- name: Run doctests in rst files
216166
run: |
217-
cd docs && pip install -r requirements.txt && poetry run make doctest O=-tskip-manim
218-
219-
- name: Upload coverage
220-
uses: codecov/codecov-action@v1
167+
cd docs && poetry run make doctest O=-tskip-manim

.github/workflows/codeql.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "21 16 * * 3"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ python ]
24+
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v3
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
config-file: ./.github/codeql.yml
34+
queries: +security-and-quality
35+
36+
- name: Autobuild
37+
uses: github/codeql-action/autobuild@v2
38+
39+
- name: Perform CodeQL Analysis
40+
uses: github/codeql-action/analyze@v2
41+
with:
42+
category: "/language:${{ matrix.language }}"

.github/workflows/publish-docker.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
release:
8+
types: [released]
9+
10+
jobs:
11+
docker-latest:
12+
runs-on: ubuntu-latest
13+
if: github.event_name != 'release'
14+
steps:
15+
- name: Set up QEMU
16+
uses: docker/setup-qemu-action@v2
17+
18+
- name: Set up Docker Buildx
19+
uses: docker/setup-buildx-action@v2
20+
21+
- name: Login to DockerHub
22+
uses: docker/login-action@v2
23+
with:
24+
username: ${{ secrets.DOCKERHUB_USERNAME }}
25+
password: ${{ secrets.DOCKERHUB_TOKEN }}
26+
27+
- name: Build and push
28+
uses: docker/build-push-action@v4
29+
with:
30+
platforms: linux/arm64,linux/amd64
31+
push: true
32+
file: docker/Dockerfile
33+
tags: |
34+
manimcommunity/manim:latest
35+
36+
docker-release:
37+
runs-on: ubuntu-latest
38+
if: github.event_name == 'release'
39+
steps:
40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v2
42+
43+
- name: Set up Docker Buildx
44+
uses: docker/setup-buildx-action@v2
45+
46+
- name: Login to DockerHub
47+
uses: docker/login-action@v2
48+
with:
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}
50+
password: ${{ secrets.DOCKERHUB_TOKEN }}
51+
52+
- name: Get Version
53+
id: create_release
54+
shell: python
55+
env:
56+
tag_act: ${{ github.ref }}
57+
run: |
58+
import os
59+
ref_tag = os.getenv('tag_act').split('/')[-1]
60+
with open(os.getenv('GITHUB_OUTPUT'), 'w') as f:
61+
print(f"tag_name={ref_tag}", file=f)
62+
63+
- name: Build and push
64+
uses: docker/build-push-action@v4
65+
with:
66+
platforms: linux/arm64,linux/amd64
67+
push: true
68+
file: docker/Dockerfile
69+
tags: |
70+
manimcommunity/manim:stable
71+
manimcommunity/manim:latest
72+
manimcommunity/manim:${{ steps.create_release.outputs.tag_name }}

0 commit comments

Comments
 (0)