-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Move to Poetry #165
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Move to Poetry #165
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 83e4936
remove poetry.lock
naveen521kk 8539d87
Change some things
naveen521kk 8c4c159
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk f267f94
Add Github action to Publish
naveen521kk 4b9f5b4
Specify rich version - updates in setup.py
naveen521kk 3b20c04
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk 06b6bb9
Add lock file
naveen521kk 5352cca
Add some docs about poetry
naveen521kk 4028f40
Add some docs and upgrade rich
naveen521kk 4bc0e44
Merge Master
naveen521kk a281afd
remove Setup.py
naveen521kk d48eba7
Github Action using Poetry
naveen521kk a55f8ee
Fix tests
naveen521kk 6a7ce4f
Merge branch 'poetry-change-new' of https://github.com/naveen521kk/ma…
naveen521kk 5a3b3bc
Move to py 3.7 until poetry fixes it
naveen521kk c2215ab
Remove 3.6
naveen521kk e3bbbdf
Looks like 3.6 works now
naveen521kk fab900f
Fix Path for CI
naveen521kk af70d52
Windows build
naveen521kk 80e53d9
Add CI that actually works
naveen521kk 69afbdc
Merge branch 'master' into poetry-change-new
naveen521kk 268423f
Fix some spaces
naveen521kk 238626a
Merge Master and add Black Version
naveen521kk 842b778
Update docs and fix windows test
naveen521kk c84f92a
Fix windows run
naveen521kk a227285
Change some formatting -Docs
naveen521kk 185cbbc
Some docs update
naveen521kk c642037
Merge Master from Manim Community
naveen521kk 61eea4f
Change doc url Pyproject - Some formatting docs - change ci on releas…
naveen521kk 231a851
Change to manimlib
naveen521kk 30a9b7b
Some formatting changes
naveen521kk 3e163f9
Merge Master
naveen521kk 3c402d2
Merge branch 'master' of https://github.com/ManimCommunity/manim into…
naveen521kk b442949
Remove pytest.ini and Have a note in Readme
naveen521kk ddd938b
Merge branch 'master' of https://github.com/manimcommunity/manim into…
naveen521kk 439394c
Update some docs
naveen521kk e4644af
Merge branch 'master' into poetry-change-new
naveen521kk dc99c9b
Merge branch 'master' of https://github.com/ManimCommunity/manim into…
naveen521kk c6be40e
Merge branch 'poetry-change-new' of https://github.com/naveen521kk/ma…
naveen521kk 8d654fa
Update Authors field
naveen521kk 5609372
Make readthedocs work
naveen521kk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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``. | ||
|
|
||
leotrs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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. | ||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. 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: | ||
|
|
||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| .. 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/>`_. | ||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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. | ||
leotrs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. important:: Windows Users can skip the steps to install Pycairo. | ||
|
|
||
|
|
||
| Additionally, ``git`` has to be installed. For instructions see `Documentation | ||
| <https://git-scm.com/>`_. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| ***************************** | ||
|
|
||
| 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 [email protected]: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. | ||
leotrs marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. 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 | ||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| .. 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 | ||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| 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 | ||
|
|
||
naveen521kk marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 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 | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.