Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
a35b334
Add necessary files and fix readme
naveen521kk Jun 27, 2020
83e4936
remove poetry.lock
naveen521kk Jun 27, 2020
8539d87
Change some things
naveen521kk Jul 1, 2020
8c4c159
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk Jul 14, 2020
f267f94
Add Github action to Publish
naveen521kk Jul 14, 2020
4b9f5b4
Specify rich version - updates in setup.py
naveen521kk Aug 26, 2020
3b20c04
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk Aug 27, 2020
06b6bb9
Add lock file
naveen521kk Aug 28, 2020
5352cca
Add some docs about poetry
naveen521kk Aug 29, 2020
4028f40
Add some docs and upgrade rich
naveen521kk Aug 31, 2020
4bc0e44
Merge Master
naveen521kk Aug 31, 2020
a281afd
remove Setup.py
naveen521kk Aug 31, 2020
d48eba7
Github Action using Poetry
naveen521kk Aug 31, 2020
a55f8ee
Fix tests
naveen521kk Aug 31, 2020
6a7ce4f
Merge branch 'poetry-change-new' of https://github.com/naveen521kk/ma…
naveen521kk Aug 31, 2020
5a3b3bc
Move to py 3.7 until poetry fixes it
naveen521kk Aug 31, 2020
c2215ab
Remove 3.6
naveen521kk Aug 31, 2020
e3bbbdf
Looks like 3.6 works now
naveen521kk Aug 31, 2020
fab900f
Fix Path for CI
naveen521kk Aug 31, 2020
af70d52
Windows build
naveen521kk Aug 31, 2020
80e53d9
Add CI that actually works
naveen521kk Aug 31, 2020
69afbdc
Merge branch 'master' into poetry-change-new
naveen521kk Aug 31, 2020
268423f
Fix some spaces
naveen521kk Aug 31, 2020
238626a
Merge Master and add Black Version
naveen521kk Sep 1, 2020
842b778
Update docs and fix windows test
naveen521kk Sep 1, 2020
c84f92a
Fix windows run
naveen521kk Sep 1, 2020
a227285
Change some formatting -Docs
naveen521kk Sep 1, 2020
185cbbc
Some docs update
naveen521kk Sep 1, 2020
c642037
Merge Master from Manim Community
naveen521kk Sep 1, 2020
61eea4f
Change doc url Pyproject - Some formatting docs - change ci on releas…
naveen521kk Sep 1, 2020
231a851
Change to manimlib
naveen521kk Sep 1, 2020
30a9b7b
Some formatting changes
naveen521kk Sep 2, 2020
3e163f9
Merge Master
naveen521kk Sep 2, 2020
3c402d2
Merge branch 'master' of https://github.com/ManimCommunity/manim into…
naveen521kk Sep 3, 2020
b442949
Remove pytest.ini and Have a note in Readme
naveen521kk Sep 3, 2020
ddd938b
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk Sep 5, 2020
439394c
Update some docs
naveen521kk Sep 6, 2020
e4644af
Merge branch 'master' into poetry-change-new
naveen521kk Sep 6, 2020
dc99c9b
Merge branch 'master' of https://github.com/ManimCommunity/manim into…
naveen521kk Sep 6, 2020
c6be40e
Merge branch 'poetry-change-new' of https://github.com/naveen521kk/ma…
naveen521kk Sep 6, 2020
8d654fa
Update Authors field
naveen521kk Sep 7, 2020
5609372
Make readthedocs work
naveen521kk Sep 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 16 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@ on:
jobs:
test:
runs-on: ${{ matrix.os }}
env:
POETRY_VIRTUALENVS_CREATE: false
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: [3.6, 3.7, 3.8]
python: [3.6,3.7, 3.8]

steps:
- name: Checkout the repository
Expand All @@ -24,6 +27,11 @@ jobs:
with:
python-version: ${{ matrix.python }}

- name: Install Poetry
run: |
pip install wheel
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python

- name: Get pip cache dir
shell: bash
id: pip-cache-and-time
Expand All @@ -43,6 +51,7 @@ jobs:
sudo apt update
sudo apt install -y ffmpeg
sudo apt-get -y install texlive texlive-latex-extra texlive-fonts-extra texlive-latex-recommended texlive-science texlive-fonts-extra tipa
echo "::add-path::$HOME/.poetry/bin"

- name: Install system dependencies (MacOS)
if: runner.os == 'macOS'
Expand All @@ -52,6 +61,7 @@ jobs:
eval "$(/usr/libexec/path_helper -s)"
sudo tlmgr update --self
sudo tlmgr install standalone preview doublestroke relsize fundus-calligra wasysym physics dvisvgm.x86_64-darwin dvisvgm rsfs wasy cm-super
echo "::add-path::$HOME/.poetry/bin"
echo "::set-env name=PATH::$PATH"

- name: Cache Windows
Expand Down Expand Up @@ -80,7 +90,7 @@ jobs:
Invoke-WebRequest "https://downloads.sourceforge.net/project/sox/sox/$($soxVersionNumber)/$($soxVersion).zip" -UserAgent "wget" -O "$($env:TMP)\SoX.zip"
7z x "$($env:TMP)\SoX.zip" -o"$($PWD)\ManimCache"
Move-Item "ManimCache\sox-*" "ManimCache\SoX"
Invoke-WebRequest https://ffmpeg.zeranoe.com/builds/win64/static/$($ffmpegVersion).zip -O "$($env:TMP)\$($ffmpegVersion).zip"
Invoke-WebRequest "https://ffmpeg.zeranoe.com/builds/win64/static/$($ffmpegVersion).zip" -O "$($env:TMP)\$($ffmpegVersion).zip"
7z x "$($env:TMP)\$($ffmpegVersion).zip" -o"$($PWD)\ManimCache"
Move-Item "ManimCache\ffmpeg-*" "ManimCache\FFmpeg"

Expand All @@ -90,23 +100,15 @@ jobs:
$env:Path += ";" + "$($PWD)\ManimCache\FFmpeg\bin"
$env:Path += ";" + "$($PWD)\ManimCache\LatexWindows\TinyTeX\bin\win32"
$env:Path += ";" + "$($PWD)\ManimCache\SoX"
$env:Path = "$env:USERPROFILE\.poetry\bin;$($env:PATH)"
echo "::set-env name=Path::$env:Path"

- name: Install Pycairo (Non-Windows)
if: runner.os == 'macOS' || runner.os == 'Linux'
run: pip install pycairo

- name: Install Pycairo (Windows)
if: runner.os == 'Windows'
run: python ./scripts/pycairoinstall.py

- name: Install manim
run: |
pip install wheel
pip install . pytest
poetry install

- name: Run tests
run: pytest
run: poetry run pytest

- name: Run module doctests
run: pytest --doctest-modules manim
run: poetry run pytest --doctest-modules manim
16 changes: 16 additions & 0 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Upload Python Package

on:
release:
types:
- created
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
#TODO: Set an API key from PyPI `PYPI_API_KEY` in secrets tab.
- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1
with:
pypi_token: ${{ secrets.PYPI_API_KEY }}
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![logo](logo/cropped.png)
![logo](https://raw.githubusercontent.com/ManimCommunity/manim/master/logo/cropped.png)

![CI](https://github.com/ManimCommunity/manim/workflows/CI/badge.svg)
[![Documentation Status](https://readthedocs.org/projects/manimce/badge/?version=latest)](https://manimce.readthedocs.io/en/latest/?badge=latest)
Expand Down Expand Up @@ -55,18 +55,15 @@ manim example.py SquareToCircle -pl

You should see your video player pop up and play a simple scene where a square
is transformed into a circle. You can find some more simple examples in the
[GitHub
repository](https://github.com/ManimCommunity/manim/tree/master/example_scenes).
Visit the [official
gallery](https://manimce.readthedocs.io/en/latest/examples.html) for more
advanced examples.
[GitHub repository](https://github.com/ManimCommunity/manim/tree/master/example_scenes).
Visit the [official gallery](https://manimce.readthedocs.io/en/latest/examples.html) for more advanced examples.


## Command line arguments

The general usage of manim is as follows:

![](./readme-assets/command.png)
![manim-illustration](https://raw.githubusercontent.com/ManimCommunity/manim/master/readme-assets/command.png)

The `-p` flag in the command above is for previewing, meaning the video file will automatically open when it is done rendering. The `-l` flag is for a faster rendering at a lower quality.

Expand Down Expand Up @@ -94,6 +91,8 @@ please open an issue.
Is always welcome. In particular, there is a dire need for tests and
documentation. For guidelines please see the
[documentation](https://manimce.readthedocs.io/en/latest/contributing.html).
This project uses [Poetry](https://python-poetry.org/docs/) for management. You need to have poetry installed and available in your environment.
You can find more information about it in its [Documentation](https://manimce.readthedocs.io/en/latest/installation/for_dev.html)


## License
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx==3.1.2
guzzle-sphinx-theme
recommonmark>=0.5.0
-e git://github.com/ManimCommunity/manim/@master#egg=manim
https://github.com/ManimCommunity/manim/archive/master.zip
2 changes: 1 addition & 1 deletion docs/source/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ Of interest to developers
#. Added autogenerated documentation with sphinx and autodoc/autosummary [WIP]
#. Made manim internally use relative imports
#. Since the introduction of the :code:`TexTemplate` class, the files :code:`tex_template.tex` and :code:`ctex_template.tex` have been removed

#. Move to Poetry.

Other Changes
--------------
Expand Down
7 changes: 4 additions & 3 deletions docs/source/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Installing dependencies
installation/mac
installation/linux
installation/troubleshooting
installation/for_dev


.. _installing-manim:
Expand Down Expand Up @@ -50,8 +51,7 @@ cloned this repo, run the following:

.. code-block:: bash

python3 -m pip install -r requirements.txt
python3 -m pip install -e .
python3 -m pip install .

Please see :doc:`contributing` for more details about contributing to Manim.

Expand All @@ -60,4 +60,5 @@ Please see :doc:`contributing` for more details about contributing to Manim.
repository to your local device, please uninstall the pip-installed version
of ``manim-community``, if you had installed it previously.
This is to avoid any accidental usage of the pip-installed version when developing
and testing on your local copy of the repository.
and testing on your local copy of the repository. This warning doesn't apply for
users who use [poetry](https://python-poetry.org).
143 changes: 143 additions & 0 deletions docs/source/installation/for_dev.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
Manim Installation For Developers
=================================

This documentation is for developers who want to contribute to ``ManimCommunity/manim``.

Installing Poetry
*****************

Poetry can be easily installed in any OS by just running the below command.

If your system has the ``curl`` program installed, which is usually true in Linux and Mac,

.. code-block:: bash

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python


If you are a Windows developer and want to use PowerShell, you can use the below command.

.. code-block:: bash

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py -UseBasicParsing).Content | python

.. note:: Poetry can be installed by other ways also, such as with ``pip``. See `<https://python-poetry.org/docs/#alternative-installation-methods-not-recommended>`_.

It will add it to ``PATH`` variable automatically. In order to make sure you have poetry installed correctly, try running:

.. code-block:: bash

poetry --version


.. note:: You may need to restart your shell in order for the changes to take effect.

See the `docs on installation python poetry for more information
<https://python-poetry.org/docs/>`_.

Installing System Dependencies
******************************

Please follow the instructions under :ref:`installing-manim` to install all dependencies. Then come back to this page to continue with the installation.

.. important:: Windows Users can skip the steps to install Pycairo.


Additionally, ``git`` has to be installed. For instructions see `Documentation
<https://git-scm.com/>`_.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The link could also directly go to the git documentation.


.. _install-manim-poetry:

Installing Manim using Poetry
*****************************

1. First, clone the Manim repo locally using git.

.. code-block:: bash

git clone https://github.com/ManimCommunity/manim.git

or

.. code-block:: bash

git clone git@github.com:ManimCommunity/manim.git

2. Open a Terminal/Powershell/Command Prompt and cd into the cloned directory.

.. code-block:: bash

cd path/to/manim


.. note:: This path should contain a file called ``pyproject.toml`` if it doesn't contain it, you would need to go a level up.

3. Use the below command to install python dependencies. This will use the default python version installed.

.. code-block:: bash

poetry install


.. note:: Poetry will create a virtual environment rooted at the current directory.

You can select the desired python version using

.. code-block:: bash

poetry env use <python version you need>

For example you can use for python 3.7.

.. code-block:: bash

poetry env use 3.7

For more information about this you can visit the `docs
<https://python-poetry.org/docs/managing-environments/>`_.

4. Now you can activate the virtual environment ``Poetry`` has created by using the command below.

.. code-block:: bash

poetry shell

Or if you want to run a single command use

.. code-block:: bash

poetry run manim -h

Now you are free to start developing on the Manim Repository.

Running the Tests Using Poetry
******************************

Once you are done with :ref:`install-manim-poetry`, you can run manim's test suite by activating a shell using ``poetry shell`` command and then running the command ``pytest`` to run the tests.

.. code-block:: bash

poetry shell
pytest

.. important:: You should always run the test suite before making a PR. For other contributing guidelines, see `the guide for contributions to manim <../contributing.html>`_.


Code Formatting Using Poetry
****************************

Once you are done with :ref:`install-manim-poetry`, you can run the code formatter ``black`` by activating a shell using ``poetry shell`` and then running the command ``black manim``. Or alternatively just use the command ``poetry run black manim``.

.. code-block:: bash

poetry shell
black

.. note:: Here, the word ``manim``, as used in the commands ``black manim`` or ``poetry run black manim``, refers to the folder which ``black`` is to format. You can also reformat the files containing the test suite by running the command ``black tests``.

For example, if you have written some new example and want to format it use the below command

.. code-block:: bash

poetry run black example_scenes

Loading