Skip to content

Commit 5cd773c

Browse files
authored
Merge pull request #1 from ManimCommunity/master
Update from Upstream
2 parents 06accee + e375290 commit 5cd773c

File tree

204 files changed

+2527
-963
lines changed

Some content is hidden

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

204 files changed

+2527
-963
lines changed

.travis.yml

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ jobs:
3939
language: sh
4040
python: 3.6
4141
env: PYVER="3.6.10"
42+
before_install:
43+
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
44+
- brew install ffmpeg
45+
- brew cask install mactex
46+
- eval "$(/usr/libexec/path_helper)"
4247
install:
4348
- pip3 install --upgrade pip
4449
- pip3 install -r ./.travis/travis-requirements.txt
@@ -51,6 +56,11 @@ jobs:
5156
language: sh
5257
python: 3.7
5358
env: PYVER="3.7.7"
59+
before_install:
60+
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
61+
- brew install ffmpeg
62+
- brew cask install mactex
63+
- eval "$(/usr/libexec/path_helper)"
5464
install:
5565
- pip3 install --upgrade pip
5666
- pip3 install -r ./.travis/travis-requirements.txt
@@ -63,6 +73,11 @@ jobs:
6373
language: sh
6474
python: 3.8
6575
env: PYVER="3.8.0" # Using Python 3.8.0 due to error with rich
76+
before_install:
77+
- ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" < /dev/null 2> /dev/null
78+
- brew install ffmpeg
79+
- brew cask install mactex
80+
- eval "$(/usr/libexec/path_helper)"
6681
install:
6782
- pip3 install --upgrade pip
6883
- pip3 install -r ./.travis/travis-requirements.txt
@@ -80,15 +95,14 @@ jobs:
8095
install:
8196
- choco install python --version=$PYVER
8297
- export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH"
83-
- choco install ffmpeg
8498
- cmd.exe //c "RefreshEnv.cmd"
8599
- python -m pip install --upgrade pip
86100
- python -m pip install --user -r ./.travis/travis-requirements.txt
87101
- python ./scripts/pycairoinstall.py
88102
- cmd.exe //c "RefreshEnv.cmd"
89103
- python -m pip install --user .
90-
script:
91-
- python -m pytest
104+
script:
105+
- python -m pytest --skip_end_to_end -rs
92106

93107
- os: windows
94108
language: sh
@@ -97,15 +111,14 @@ jobs:
97111
install:
98112
- choco install python --version=$PYVER
99113
- export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH"
100-
- choco install ffmpeg
101114
- cmd.exe //c "RefreshEnv.cmd"
102115
- python -m pip install --upgrade pip
103116
- python -m pip install --user -r ./.travis/travis-requirements.txt
104117
- python ./scripts/pycairoinstall.py
105118
- cmd.exe //c "RefreshEnv.cmd"
106119
- python -m pip install --user .
107-
script:
108-
- python -m pytest
120+
script:
121+
- python -m pytest --skip_end_to_end -rs
109122

110123
- os: windows
111124
language: sh
@@ -114,18 +127,18 @@ jobs:
114127
install:
115128
- choco install python --version=$PYVER
116129
- export PATH="/c/$PYDIR:/c/$PYDIR/Scripts:$PATH"
117-
- choco install ffmpeg
118130
- cmd.exe //c "RefreshEnv.cmd"
119131
- python -m pip install --upgrade pip
120132
- python -m pip install --user -r ./.travis/travis-requirements.txt
121133
- python ./scripts/pycairoinstall.py
122134
- cmd.exe //c "RefreshEnv.cmd"
123135
- python -m pip install --user .
124-
script:
125-
- python -m pytest
136+
script:
137+
- python -m pytest --skip_end_to_end -rs
126138

127139
before_install:
128140
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then chmod +x ./.travis/osx.sh; sh ./.travis/osx.sh; fi
141+
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then chmod +x ./.travis/linux.sh; sh ./.travis/linux.sh; fi
129142

130143
branches:
131144
only:

.travis/linux.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
##### THIS IS FOR TRAVIS BUILDS, DO NOT RUN THIS ON YOUR COMPUTER! #####
2+
3+
sudo apt update
4+
sudo apt install -y ffmpeg
5+
sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa

.travis/osx.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@
33
brew update
44
brew install openssl readline
55
brew outdated pyenv || brew upgrade pyenv
6+
brew install ffmpeg
67
brew install pyenv-virtualenv
78
pyenv install $PYVER
89
export PYENV_VERSION=$PYVER
910
export PATH="/Users/travis/.pyenv/shims:${PATH}"
1011
pyenv virtualenv venv
1112
source ~/.pyenv/versions/venv/bin/activate
12-
python --version
13+
python --version

.travis/travis-requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@ Pillow
55
progressbar
66
scipy
77
tqdm
8-
# opencv-python
9-
# pycairo
108
pydub
119
pygments
1210
pyreadline; sys_platform == 'win32'
1311
rich
14-
pytest
12+
pytest

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
2. (For the maintainers of this repo) Label PRs appropriately.
55
3. Link relevant issues.
66
4. Ensure compatibility with the latest changes in the repo.
7+
5. After you've made your changes, please test them out thoroughly. If the repository has any example code or code exclusively used for testing, please test your changes against those. If you have added new features, consider writing and contributing to a test for that feature to ensure it works properly.
78

89
## Contributing to the Manim Community Fork - General instructions
910

@@ -33,6 +34,8 @@ As this is a Fork of [Manim by 3b1b](https://github.com/3b1b/manim), contributin
3334

3435
4. After that, you can make your changes to the repo's files (the code is in the `manim` directory). Then, you can commit said changes.
3536

37+
> As stated in the General Contribution Guidelines, make sure to test your changes against the example scenes in the `example_scenes` directory and test scenes in the `tests` directory, and add a new test in the `tests` directory for your new feature if you've made one.
38+
3639
> Note: if your Pull Request doesn't change any of the actual code, please add `[skip ci]` to your commit message for Travis to ignore it.
3740
3841
5. Finally, instead of typing in `git push`, enter the command below.

README.md

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,23 @@ Manim is an animation engine for explanatory math videos. It's used to create pr
1919
+ [FFmpeg Installation](#ffmpeg-installation)
2020
+ [SoX Installation](#sox-installation)
2121
+ [LaTeX Installation](#latex-installation)
22-
* [Linux](#linux)
22+
* [Ubuntu/Debian](#ubuntudebian)
2323
+ [Cairo Installation](#cairo-installation-1)
2424
+ [FFmpeg Installation](#ffmpeg-installation-1)
2525
+ [SoX Installation](#sox-installation-1)
2626
+ [LaTeX Installation](#latex-installation-1)
2727
+ [Additional Installation Steps](#additional-installation-steps)
28-
* [Mac](#mac)
29-
+ [Homebrew Installation](#homebrew-installation)
28+
* [Arch/Manjaro](#archmanjaro)
3029
+ [Cairo Installation](#cairo-installation-2)
3130
+ [FFmpeg Installation](#ffmpeg-installation-2)
3231
+ [SoX Installation](#sox-installation-2)
3332
+ [LaTeX Installation](#latex-installation-2)
33+
* [Mac](#mac)
34+
+ [Homebrew Installation](#homebrew-installation)
35+
+ [Cairo Installation](#cairo-installation-3)
36+
+ [FFmpeg Installation](#ffmpeg-installation-3)
37+
+ [SoX Installation](#sox-installation-3)
38+
+ [LaTeX Installation](#latex-installation-3)
3439
* [Installing Manim-Community itself](#installing-manim-community-itself)
3540
- [Usage](#usage)
3641
- [Documentation](#documentation)
@@ -96,7 +101,7 @@ Before installing `manim-community`, there are some additional dependencies that
96101
<img style="width: 20vw;" src="./readme-assets/windows_miktex.png" />
97102
<br><br>
98103

99-
### Linux
104+
### Ubuntu/Debian
100105

101106
Before installing `manim-community`, there are some additional dependencies that you must have installed:
102107
- Cairo
@@ -123,12 +128,32 @@ sudo apt install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-r
123128
> Note: this installation may take up a lot of space. The developers are working on providing a simpler, lighter LaTeX package for you to install
124129
2. You can check you did it right by running `latex`
125130

126-
#### Additional Installation Steps
127-
- You must install additional codecs to play MP4 files:
131+
### Arch/Manjaro
132+
133+
Before installing `manim-community`, there are some additional dependencies that you must have installed:
134+
- Cairo
135+
- FFmpeg
136+
- Sox (optional, for sound)
137+
- LaTeX (optional, for LaTeX)
138+
139+
#### Cairo Installation
140+
1. Install the `cairo` package with your package manager: `sudo pacman -S cairo`
141+
142+
#### FFmpeg Installation
143+
1. Install the `ffmpeg` package with your package manager: `sudo pacman -S ffmpeg`
144+
2. You can check you did it right by running `ffmpeg -version`
145+
146+
#### SoX Installation
147+
1. Install the `sox` package with your package manager: `sudo pacman -S sox`
148+
2. You can check you did it right by running `sox`
149+
150+
#### LaTeX Installation
151+
1. Install `texlive` with your package manager by running the following commands:
128152
```
129-
sudo apt install libdvdnav4 libdvd-pkg gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly libdvd-pkg
130-
sudo apt install ubuntu-restricted-extras
153+
sudo pacman -S texlive-most
131154
```
155+
> Note: this installation may take up a lot of space. The developers are working on providing a simpler, lighter LaTeX package for you to install
156+
2. You can check you did it right by running `latex`
132157

133158
### Mac
134159

example_scenes/basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ def construct(self):
106106
)
107107
group = VGroup(example_text, example_tex)
108108
group.arrange(DOWN)
109-
group.set_width(FRAME_WIDTH - 2 * LARGE_BUFF)
109+
group.set_width(config['frame_width'] - 2 * LARGE_BUFF)
110110

111111
self.play(Write(example_text))
112112
self.play(Write(example_tex))

example_scenes/customtex.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212

1313
class ExampleFileScene(Scene):
1414
def construct(self):
15-
text=TexMobject(r"\vv{vb}")
15+
text = TexMobject(r"\vv{vb}")
1616
#text=TextMobject(r"$\vv{vb}$")
1717
self.play(Write(text))
1818

19+
1920
class ExampleClassScene(Scene):
2021
def construct(self):
21-
tpl=TexTemplate()
22+
tpl = TexTemplate()
2223
tpl.append_package(["esvect",["f"]])
2324
config.register_tex_template(tpl)
2425

2526
#text=TextMobject(r"$\vv{vb}$")
26-
text=TexMobject(r"\vv{vb}")
27+
text = TexMobject(r"\vv{vb}")
2728
self.play(Write(text))

manim/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
#!/usr/bin/env python
2+
3+
# Importing config should be the first thing since other modules use it
4+
from .config import config
25
from .constants import *
36

47
from .animation.animation import *

0 commit comments

Comments
 (0)