Skip to content

Commit 322249a

Browse files
committed
merge fix
2 parents 3c1ca10 + 56bc8ad commit 322249a

40 files changed

+1471
-1463
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030

3131
- name: Install Poetry
3232
run: |
33-
pipx install poetry
33+
pipx install "poetry==1.5.*"
3434
poetry config virtualenvs.prefer-active-python true
3535
3636
- name: Setup Python ${{ matrix.python }}
@@ -68,7 +68,7 @@ jobs:
6868
uses: teatimeguest/setup-texlive-action@v2
6969
with:
7070
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
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
7272

7373
- name: Start virtual display (Linux)
7474
if: runner.os == 'Linux'
@@ -151,7 +151,7 @@ jobs:
151151
152152
- name: Install manim
153153
run: |
154-
poetry config experimental.new-installer false
154+
poetry config installer.modern-installation false
155155
poetry install
156156
157157
- name: Run tests

.github/workflows/publish-docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
password: ${{ secrets.DOCKERHUB_TOKEN }}
2626

2727
- name: Build and push
28-
uses: docker/build-push-action@v3
28+
uses: docker/build-push-action@v4
2929
with:
3030
platforms: linux/arm64,linux/amd64
3131
push: true
@@ -61,7 +61,7 @@ jobs:
6161
print(f"tag_name={ref_tag}", file=f)
6262
6363
- name: Build and push
64-
uses: docker/build-push-action@v3
64+
uses: docker/build-push-action@v4
6565
with:
6666
platforms: linux/arm64,linux/amd64
6767
push: true

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ repos:
2424
name: isort (pyi)
2525
types: [pyi]
2626
- repo: https://github.com/asottile/pyupgrade
27-
rev: v3.3.1
27+
rev: v3.9.0
2828
hooks:
2929
- id: pyupgrade
3030
name: Update code to new python versions
@@ -35,11 +35,11 @@ repos:
3535
- id: python-check-blanket-noqa
3636
name: Precision flake ignores
3737
- repo: https://github.com/psf/black
38-
rev: 23.3.0
38+
rev: 23.7.0
3939
hooks:
4040
- id: black
4141
- repo: https://github.com/asottile/blacken-docs
42-
rev: 1.13.0
42+
rev: 1.15.0
4343
hooks:
4444
- id: blacken-docs
4545
additional_dependencies: [black==22.3.0]
@@ -58,7 +58,7 @@ repos:
5858
flake8-simplify==0.14.1,
5959
]
6060
- repo: https://github.com/pre-commit/mirrors-mypy
61-
rev: v1.2.0
61+
rev: v1.4.1
6262
hooks:
6363
- id: mypy
6464
additional_dependencies:
@@ -71,7 +71,7 @@ repos:
7171
]
7272

7373
- repo: https://github.com/codespell-project/codespell
74-
rev: v2.2.4
74+
rev: v2.2.5
7575
hooks:
7676
- id: codespell
7777
files: ^.*\.(py|md|rst)$

.readthedocs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
version: 2
22
build:
3-
image: latest
3+
os: ubuntu-22.04
4+
5+
tools:
6+
python: "3.10"
7+
48
apt_packages:
59
- libpango1.0-dev
610
- ffmpeg
11+
- graphviz
12+
713
python:
8-
version: 3.8
914
install:
1015
- requirements: docs/rtd-requirements.txt
1116
- requirements: docs/requirements.txt

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ in order for Manim to work properly, some additional system
5959
dependencies need to be installed first. The following pages have
6060
operating system specific instructions for you to follow.
6161

62-
Manim requires Python version ``3.7`` or above to run.
62+
Manim requires Python version ``3.8`` or above to run.
6363

6464
.. hint::
6565

docs/source/installation/linux.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ The installation instructions depend on your particular operating
55
system and package manager. If you happen to know exactly what you are doing,
66
you can also simply ensure that your system has:
77

8-
- a reasonably recent version of Python 3 (3.7–3.10),
8+
- a reasonably recent version of Python 3 (3.8 or above),
99
- with working Cairo bindings in the form of
1010
`pycairo <https://cairographics.org/pycairo/>`__,
1111
- FFmpeg accessible from the command line as ``ffmpeg``,
@@ -145,6 +145,12 @@ installed by running:
145145
146146
sudo apt install texlive texlive-latex-extra
147147
148+
For Fedora (see `docs <https://docs.fedoraproject.org/en-US/neurofedora/latex/>`__):
149+
150+
.. code-block:: bash
151+
152+
sudo dnf install texlive-scheme-full
153+
148154
Should you choose to work with some smaller TeX distribution like
149155
`TinyTeX <https://yihui.org/tinytex/>`__ , the full list
150156
of LaTeX packages which Manim interacts with in some way (a subset might

docs/source/installation/macos.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ are required, namely:
3434

3535
.. code-block:: bash
3636
37-
brew install pango scipy
37+
brew install pango pkg-config scipy
3838
3939
After all required dependencies are installed, simply run:
4040

docs/source/installation/windows.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ package manager like `Chocolatey <https://chocolatey.org/>`__
66
or `Scoop <https://scoop.sh>`__. If you are not afraid of editing
77
your System's ``PATH``, a manual installation is also possible.
88
In fact, if you already have an existing Python
9-
installation (3.7-3.10), it might be the easiest way to get
9+
installation (3.8 or above), it might be the easiest way to get
1010
everything up and running.
1111

1212
If you choose to use one of the package managers, please follow
@@ -19,7 +19,7 @@ to make one of them available on your system.
1919
Required Dependencies
2020
---------------------
2121

22-
Manim requires a recent version of Python (3.7–3.10) and ``ffmpeg``
22+
Manim requires a recent version of Python (3.8 or above) and ``ffmpeg``
2323
in order to work.
2424

2525
Chocolatey
@@ -80,10 +80,10 @@ Manual Installation
8080
*******************
8181

8282
As mentioned above, Manim needs a reasonably recent version of
83-
Python 3 (3.7–3.10) and FFmpeg.
83+
Python 3 (3.8 or above) and FFmpeg.
8484

8585
**Python:** Head over to https://www.python.org, download an installer
86-
for Python (3.7–3.10), and follow its instructions to get Python
86+
for a recent version of Python, and follow its instructions to get Python
8787
installed on your system.
8888

8989
.. note::

manim/_config/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ def quality(self):
11721172
keys = ["pixel_width", "pixel_height", "frame_rate"]
11731173
q = {k: self[k] for k in keys}
11741174
for qual in constants.QUALITIES:
1175-
if all([q[k] == constants.QUALITIES[qual][k] for k in keys]):
1175+
if all(q[k] == constants.QUALITIES[qual][k] for k in keys):
11761176
return qual
11771177
return None
11781178

manim/camera/camera.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -893,8 +893,10 @@ def display_point_cloud(
893893
thickness: float,
894894
pixel_array: np.ndarray,
895895
):
896-
"""Displays a PMobject by modifying the Pixel array suitably..
896+
"""Displays a PMobject by modifying the pixel array suitably.
897+
897898
TODO: Write a description for the rgbas argument.
899+
898900
Parameters
899901
----------
900902
pmobject
@@ -1129,17 +1131,19 @@ def on_screen_pixels(self, pixel_coords: np.ndarray):
11291131
],
11301132
)
11311133

1132-
def adjusted_thickness(self, thickness: float):
1133-
"""
1134+
def adjusted_thickness(self, thickness: float) -> float:
1135+
"""Computes the adjusted stroke width for a zoomed camera.
11341136
11351137
Parameters
11361138
----------
11371139
thickness
1140+
The stroke width of a mobject.
11381141
11391142
Returns
11401143
-------
11411144
float
1142-
1145+
The adjusted stroke width that reflects zooming in with
1146+
the camera.
11431147
"""
11441148
# TODO: This seems...unsystematic
11451149
big_sum = op.add(config["pixel_height"], config["pixel_width"])
@@ -1148,7 +1152,8 @@ def adjusted_thickness(self, thickness: float):
11481152
return 1 + (thickness - 1) * factor
11491153

11501154
def get_thickening_nudges(self, thickness: float):
1151-
"""
1155+
"""Determine a list of vectors used to nudge
1156+
two-dimensional pixel coordinates.
11521157
11531158
Parameters
11541159
----------
@@ -1222,13 +1227,16 @@ def get_coords_of_all_pixels(self):
12221227
# NOTE: The methods of the following class have not been mentioned outside of their definitions.
12231228
# Their DocStrings are not as detailed as preferred.
12241229
class BackgroundColoredVMobjectDisplayer:
1230+
"""Auxiliary class that handles displaying vectorized mobjects with
1231+
a set background image.
1232+
1233+
Parameters
1234+
----------
1235+
camera
1236+
Camera object to use.
1237+
"""
1238+
12251239
def __init__(self, camera: Camera):
1226-
"""
1227-
Parameters
1228-
----------
1229-
camera
1230-
Camera object to use.
1231-
"""
12321240
self.camera = camera
12331241
self.file_name_to_pixel_array_map = {}
12341242
self.pixel_array = np.array(camera.pixel_array)

0 commit comments

Comments
 (0)