Skip to content

Commit 980b947

Browse files
Aathish SivasubrahmanianAathish Sivasubrahmanian
authored andcommitted
Merge branch 'master' into log-file
Now that #151 has been merged, this branch needs to be updated so work can resume on it.
2 parents a6c4151 + 5b991f0 commit 980b947

File tree

20 files changed

+1000
-582
lines changed

20 files changed

+1000
-582
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 31 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,34 @@
1+
<!---
12
Thanks for contributing to manim!
2-
3-
**Please ensure that your pull request works with the latest version of manim.**
3+
**Please ensure that your pull request works with the latest version of manim from this repository.**
44
You should also include:
5+
1. The motivation for making this change (or link the relevant issues)
6+
2. How you tested the new behavior (e.g. a minimal working example, before/after
7+
screenshots, gifs, commands, etc.) This is rather informal at the moment, but
8+
the goal is to show us how you know the pull request works as intended.
9+
If you don't need any of the optional sections, feel free to delete them to prevent clutter.
10+
-->
11+
12+
## List of Changes
13+
<!-- List out your changes one by one like this:
14+
- Change 1
15+
- Change 2
16+
- and so on..
17+
-->
18+
19+
## Motivation
20+
<!-- Why you feel your changes are required. -->
21+
22+
## Explanation for Changes
23+
<!-- How do your changes solve aforementioned problems? -->
24+
25+
## Testing Status
26+
<!-- Optional, but recommended, your computer specs and what tests you ran with their results, if any -->
27+
28+
## Further Comments
29+
<!-- Optional, any edits/updates should preferably be written here. -->
30+
31+
## Acknowledgement
32+
- [ ] I have read the [Contributing Guidelines](https://github.com/ManimCommunity/manim/wiki/Documentation-guidelines-(WIP))
533

6-
1. The motivation for making this change (or link the relevant issues)
7-
2. How you tested the new behavior (e.g. a minimal working example, before/after
8-
screenshots, gifs, commands, etc.) This is rather informal at the moment, but
9-
the goal is to show us how you know the pull request works as intended.
34+
<!-- Once again, thanks for helping out by contributing to manim! -->

.github/workflows/ci.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
python: [3.6, 3.7, 3.8]
17+
18+
steps:
19+
- name: Checkout the repository
20+
uses: actions/checkout@v2
21+
22+
- name: Set up Python
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python }}
26+
27+
- name: Install system dependencies (Linux)
28+
if: runner.os == 'Linux'
29+
run: |
30+
sudo apt update
31+
sudo apt install -y ffmpeg
32+
sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa
33+
34+
- name: Install system dependencies (MacOS)
35+
if: runner.os == 'macOS'
36+
run: |
37+
brew install openssl readline ffmpeg sox pyenv pyenv-virtualenv
38+
brew cask install basictex
39+
eval "$(/usr/libexec/path_helper -s)"
40+
sudo tlmgr update --self
41+
sudo tlmgr install standalone preview doublestroke relsize fundus-calligra wasysym physics dvisvgm.x86_64-darwin dvisvgm rsfs wasy cm-super
42+
echo "::set-env name=PATH::$PATH"
43+
44+
- name: Install system dependencies (Windows)
45+
if: runner.os == 'Windows'
46+
run: |
47+
Try {Invoke-WebRequest https://yihui.org/gh/tinytex/tools/install-windows.bat -O install_tinytex.bat}
48+
Catch {Invoke-WebRequest https://raw.githubusercontent.com/yihui/tinytex/master/tools/install-windows.bat -O install_tinytex.bat}
49+
Start-Process install_tinytex.bat -NoNewWindow -Wait
50+
$env:Path += ";" + $env:APPDATA + "\TinyTeX\bin\win32"
51+
tlmgr install standalone preview doublestroke ms setspace rsfs relsize ragged2e fundus-calligra microtype wasysym physics dvisvgm jknapltx wasy cm-super babel-english
52+
choco install --no-progress ffmpeg
53+
choco install --no-progress sox.portable
54+
echo "::set-env name=Path::$env:Path"
55+
56+
- name: Install Pycairo (Non-Windows)
57+
if: runner.os == 'macOS' || runner.os == 'Linux'
58+
run: pip install pycairo
59+
60+
- name: Install Pycairo (Windows)
61+
if: runner.os == 'Windows'
62+
run: python ./scripts/pycairoinstall.py
63+
64+
- name: Install manim
65+
run: pip install . pytest
66+
67+
- name: Run tests
68+
run: pytest

.travis.yml

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

.travis/linux.sh

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

.travis/osx.sh

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

.travis/travis-requirements.txt

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

example_scenes/basic.py

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,59 @@ def construct(self):
133133
)
134134
self.wait()
135135

136+
class VDictTest(Scene):
137+
def construct(self):
138+
square = Square().set_color(RED)
139+
circle = Circle().set_color(YELLOW).next_to(square, UP)
140+
141+
# create dict from list of tuples each having key-mobject pair
142+
pairs = [('s', square), ('c', circle)]
143+
my_dict = VDict(*pairs, show_keys=True)
144+
145+
# display it just like a VGroup
146+
self.play(
147+
ShowCreation(my_dict)
148+
)
149+
self.wait()
150+
151+
print(my_dict.get_all_submobjects())
152+
153+
text = TextMobject("Some text").set_color(GREEN).next_to(square, DOWN)
154+
155+
#add like a VGroup
156+
my_dict.add(('t', text))
157+
self.wait()
158+
159+
rect = Rectangle().next_to(text, DOWN)
160+
# can also do key assignment like a python dict
161+
my_dict['r'] = rect
162+
print(my_dict.get_all_submobjects())
163+
164+
# access submobjects like a python dict
165+
my_dict['t'].set_color(PURPLE)
166+
self.play(my_dict['t'].scale, 3)
167+
self.wait()
168+
169+
# also supports python dict styled reassignment
170+
my_dict['t'] = TextMobject("Some other text").set_color(BLUE)
171+
self.wait()
172+
173+
# remove submojects by key
174+
my_dict.remove('t')
175+
self.wait()
176+
177+
self.play(Uncreate(my_dict['s']))
178+
self.wait()
179+
180+
self.play(FadeOut(my_dict['c']))
181+
self.wait()
182+
183+
self.play(FadeOutAndShift(my_dict['r'], DOWN))
184+
self.wait()
185+
186+
# iterate through all submobjects currently associated with my_dict
187+
for submob in my_dict.get_all_submobjects():
188+
self.play(ShowCreation(submob))
189+
self.wait()
190+
136191
# See old_projects folder for many, many more

example_scenes/manim.cfg

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
#This is some custom configuration just as an example
3+
[logger]
4+
logging_keyword = magenta
5+
logging_level_notset = dim
6+
logging_level_debug = yellow
7+
logging_level_info = dim purple
8+
logging_level_warning = dim red
9+
logging_level_error = red
10+
logging_level_critical = red
11+
log_level =
12+
log_time = dim yellow
13+
log_message = green
14+
log_path = dim blue
15+

0 commit comments

Comments
 (0)