From 0ce4c185195b70332b54e5689f49f3833960217c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Eertmans?= Date: Mon, 30 Jan 2023 22:23:53 +0100 Subject: [PATCH] chore(docs): improving the docs (#115) * chore(docs): improving the docs This improves the docs as suggested by some reddit user. Now, most of Manim is documented in one place * try: update lockfile * chore(deps): remove duplicate key * fix(ci): isort issue See https://github.com/home-assistant/core/issues/86892 * fix(ci): bad identation * fix(ci): fixing lock file * fix(example): issue when ManimGL does not count wait as animation --- .github/workflows/pages.yml | 8 +- .github/workflows/test_examples.yml | 12 +- .gitignore | 8 ++ .pre-commit-config.yaml | 4 +- README.md | 27 +++- docs/source/changelog.md | 3 + docs/source/conf.py | 10 +- docs/source/contributing/index.md | 21 +++ docs/source/contributing/internals.md | 11 ++ docs/source/contributing/workflow.md | 57 ++++++++ docs/source/index.md | 36 +++++ docs/source/index.rst | 28 ---- docs/source/license.md | 5 + docs/source/quickstart.md | 21 +++ docs/source/reference/api.md | 13 ++ docs/source/reference/cli.md | 10 ++ docs/source/reference/examples.md | 59 ++++++++ docs/source/reference/index.md | 17 +++ example.py | 27 ++-- manim_slides/slide.py | 6 +- poetry.lock | 191 +++++++++++++++++++++++++- pyproject.toml | 5 +- 22 files changed, 509 insertions(+), 70 deletions(-) create mode 100644 docs/source/changelog.md create mode 100644 docs/source/contributing/index.md create mode 100644 docs/source/contributing/internals.md create mode 100644 docs/source/contributing/workflow.md create mode 100644 docs/source/index.md delete mode 100644 docs/source/index.rst create mode 100644 docs/source/license.md create mode 100644 docs/source/quickstart.md create mode 100644 docs/source/reference/api.md create mode 100644 docs/source/reference/cli.md create mode 100644 docs/source/reference/examples.md create mode 100644 docs/source/reference/index.md diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 8d25942..dffbb4f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -55,8 +55,10 @@ jobs: key: ${{ runner.os }}-media - name: Build animation and convert it into HTML slides run: | - poetry run manim example.py ConvertExample + poetry run manim example.py ConvertExample BasicExample ThreeDExample poetry run manim-slides convert ConvertExample docs/source/_static/slides.html -ccontrols=true + poetry run manim-slides convert BasicExample docs/source/_static/basic_example.html -ccontrols=true + poetry run manim-slides convert ThreeDExample docs/source/_static/three_d_example.html -ccontrols=true - name: Save media to cache id: cache-media-save uses: actions/cache/save@v3 @@ -69,8 +71,8 @@ jobs: if: github.event_name != 'pull_request' uses: actions/upload-pages-artifact@v1 with: - # Upload docs/build/html dir - path: docs/build/html/ + # Upload docs/build/html dir + path: docs/build/html/ - name: Deploy to GitHub Pages id: deployment if: github.event_name != 'pull_request' diff --git a/.github/workflows/test_examples.yml b/.github/workflows/test_examples.yml index af9859d..38d9914 100644 --- a/.github/workflows/test_examples.yml +++ b/.github/workflows/test_examples.yml @@ -97,19 +97,19 @@ jobs: poetry config experimental.new-installer false poetry install --with test - # Render slides + # Render slides - name: Render slides if: matrix.manim == 'manim' - run: poetry run manim -ql example.py Example ThreeDExample + run: poetry run manim -ql example.py BasicExample ThreeDExample - name: Render slides if: matrix.manim == 'manimgl' - run: poetry run -v manimgl -l example.py Example ThreeDExample + run: poetry run -v manimgl -l example.py BasicExample ThreeDExample - # Play slides + # Play slides - name: Test slides - run: poetry run manim-slides Example ThreeDExample --skip-all + run: poetry run manim-slides BasicExample ThreeDExample --skip-all - # Test slides to html + # Test slides to html - name: Test convert on Ubuntu if: matrix.os == 'ubuntu-latest' && matrix.manim == 'manim' run: | diff --git a/.gitignore b/.gitignore index dbb5eba..9b36bef 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,11 @@ docs/source/_static/slides.html slides_assets/ slides.html + +docs/source/_static/basic_example_assets/ + +docs/source/_static/basic_example.html + +docs/source/_static/three_d_example.html + +docs/source/_static/three_d_example_assets/ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f670e94..05c047d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,7 +7,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/isort - rev: 5.11.4 + rev: 5.12.0 hooks: - id: isort name: isort (python) @@ -24,7 +24,7 @@ repos: hooks: - id: black - repo: https://github.com/charliermarsh/ruff-pre-commit - rev: v0.0.230 + rev: v0.0.237 hooks: - id: ruff - repo: https://github.com/pre-commit/mirrors-mypy diff --git a/README.md b/README.md index 5c0613c..390e045 100644 --- a/README.md +++ b/README.md @@ -25,16 +25,22 @@ Tool for live presentations using either [Manim (community edition)](https://www ## Installation + + While installing Manim Slides and its dependencies on your global Python is fine, I recommend using a virtual environment (e.g., [venv](https://docs.python.org/3/tutorial/venv.html)) for a local installation. ### Dependencies + + Manim Slides requires either Manim or ManimGL to be installed. Having both packages installed is fine too. If none of those packages are installed, please refer to their specific installation guidelines: - [Manim](https://docs.manim.community/en/stable/installation.html) - [ManimGL](https://3b1b.github.io/manim/getting_started/installation.html) + + ### Pip Install The recommended way to install the latest release is to use pip: @@ -54,17 +60,20 @@ pip install -e . > *Note:* the `-e` flag allows you to edit the files, and observe the changes directly when using Manim Slides + + ## Usage + + Using Manim Slides is a two-step process: 1. Render animations using `Slide` (resp. `ThreeDSlide`) as a base class instead of `Scene` (resp. `ThreeDScene`), and add calls to `self.pause()` everytime you want to create a new slide. 2. Run `manim-slides` on rendered animations and display them like a *Power Point* presentation. -The command-line documentation is available [online](https://eertmans.be/manim-slides/). +The documentation is available [online](https://eertmans.be/manim-slides/). ### Basic Example - Wrap a series of animations between `self.start_loop()` and `self.stop_loop()` when you want to loop them (until input to continue): ```python @@ -74,7 +83,7 @@ from manim import * # or: from manimlib import * from manim_slides import Slide -class Example(Slide): +class BasicExample(Slide): def construct(self): circle = Circle(radius=3, color=BLUE) dot = Dot() @@ -89,7 +98,9 @@ class Example(Slide): self.play(dot.animate.move_to(ORIGIN)) self.pause() # Waits user to press continue to go to the next slide - self.wait() + # Each slide MUST end with an animation + # -> self.wait is considered an animation with Manim, not ManimGL + self.play(dot.animate.move_to(LEFT)) ``` You **must** end your `Slide` with a `self.play(...)` or a `self.wait(...)`. @@ -97,9 +108,9 @@ You **must** end your `Slide` with a `self.play(...)` or a `self.wait(...)`. First, render the animation files: ```bash -manim example.py +manim example.py BasicExample # or -manimgl example.py +manimgl example.py BasicExample ``` To start the presentation using `Scene1`, `Scene2` and so on simply run: @@ -111,9 +122,11 @@ manim-slides [OPTIONS] Scene1 Scene2... Or in this example: ```bash -manim-slides Example +manim-slides BasicExample ``` + + ## Key Bindings The default key bindings to control the presentation are: diff --git a/docs/source/changelog.md b/docs/source/changelog.md new file mode 100644 index 0000000..994ad82 --- /dev/null +++ b/docs/source/changelog.md @@ -0,0 +1,3 @@ +# Changelog + +Changes between releases are listed in Manim Slides' [Github releases](https://github.com/jeertmans/manim-slides/releases). You can read the [latest release here](https://github.com/jeertmans/manim-slides/releases). diff --git a/docs/source/conf.py b/docs/source/conf.py index b3593e6..cfea894 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -8,13 +8,19 @@ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = "Manim Slides" -copyright = "2022, Jérome Eertmans" +copyright = "2023, Jérome Eertmans" author = "Jérome Eertmans" # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration -extensions = ["sphinx.ext.autodoc", "sphinx_click"] +extensions = [ + "sphinx.ext.autodoc", + "sphinx.ext.viewcode", + "sphinx_click", + "myst_parser", + "sphinx_copybutton", +] templates_path = ["_templates"] exclude_patterns = [] diff --git a/docs/source/contributing/index.md b/docs/source/contributing/index.md new file mode 100644 index 0000000..7cf0fe7 --- /dev/null +++ b/docs/source/contributing/index.md @@ -0,0 +1,21 @@ +# Contributing + +Thank you for your interest in Manim Slides! ✨ + +Manim Slides is an open source project, first created as a fork of [manim-presentation](https://github.com/galatolofederico/manim-presentation) (now deprecated in favor to Manim Slides), and we welcome contributions of all forms. + +This section is here to help fist-time contributors know how they can help this project grow. Whether you are already familiar with Manim or GitHub, it is worth taking a few minutes to read those documents! + + +```{toctree} +:hidden: + +workflow +internals +``` + +[Workflow](./workflow) +: how to work on this project. Start here if you're a new contributor. + +[Internals](./internals) +: how Manim Slides is built and how the various parts of it work. diff --git a/docs/source/contributing/internals.md b/docs/source/contributing/internals.md new file mode 100644 index 0000000..1dc90a5 --- /dev/null +++ b/docs/source/contributing/internals.md @@ -0,0 +1,11 @@ +# Internals + +Manim-Slides' work in split in two steps: first, when rendering animation, and, second, when converting multiple animations into one slides presentation. + +## Rendering + +To render animations, Manim Slides simply uses Manim or ManimGL, and creates some additional output files that it needs for the presentation. + +## Slides presentation + +Manim Slides searches for the local artifacts it generated previously, and concatenates them into one presentation. For the graphical interface, it uses `PySide6`. diff --git a/docs/source/contributing/workflow.md b/docs/source/contributing/workflow.md new file mode 100644 index 0000000..6480751 --- /dev/null +++ b/docs/source/contributing/workflow.md @@ -0,0 +1,57 @@ +# Workflow + +This document is there to help you recreate a working environment for Manim Slides. + +## Dependencies + +```{include} ../../../README.md +:start-after: +:end-before: +``` + +## Forking the repository and cloning it locally + +We used GitHub to host Manim Slides' repository, and we encourage contributors to use git. + +Useful links: + +* [GitHub's Hello World](https://docs.github.com/en/get-started/quickstart/hello-world). +* [GitHub Pull Request in 100 Seconds](https://www.youtube.com/watch?v=8lGpZkjnkt4&ab_channel=Fireship). + +Once you feel comfortable with git and GitHub, [fork](https://github.com/jeertmans/manim-slides/fork) the repository, and clone it locally. + +As for every Python project, using virtual environment is recommended to avoid conflicts between modules. For Manim Slides, we use [Poetry](https://python-poetry.org/docs/#installing-with-the-official-installer). If not already, please install it. + +## Installing Python modules + +With Poetry, installation becomes straightforward: + +```bash +poetry install +``` + +## Running commands + +As modules were installed in a new Python environment, you cannot use them directly in the shell. +Instead, you either need to prepend `poetry run` to any command, e.g.: + +```bash +poetry run manim-slides wizard +``` + +or enter a new shell that uses this new Python environment: + +``` +poetry run +manim-slides wizard +``` + +## Testing your code + +Most of the tests are done with GitHub actions, thus not on your computer. The only command you should run locally is `pre-commit run --all-files`: this runs a few linter and formatter to make sure the code quality and style stay constant across time. If a warning or an error is displayed, please fix it before going to next step. + +## Proposing changes + +Once you feel ready and think your contribution is ready to be reviewed, create a [pull request](https://github.com/jeertmans/manim-slides/pulls) and wait for a reviewer to check your work! + +Many thanks to you! diff --git a/docs/source/index.md b/docs/source/index.md new file mode 100644 index 0000000..89fff53 --- /dev/null +++ b/docs/source/index.md @@ -0,0 +1,36 @@ +--- +hide-toc: true +--- + +

+ +# Welcome to Manim Slide's documentation + +Manim Slides makes creating slides with Manim super easy! + +In a [very few steps](./quickstart), you can create slides and present them either using the GUI, or your browser. + + +Slide through the demo below to get a quick glimpse on what you can do with Manin Slides. + + + + +
+ + +```{toctree} +:hidden: + +quickstart +reference/index +``` + +```{toctree} +:caption: Development +:hidden: + +contributing/index +changelog +license +``` diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 052c0cd..0000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,28 +0,0 @@ -.. manim-slides documentation master file, created by - sphinx-quickstart on Wed Sep 21 15:07:28 2022. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -.. image:: _static/logo.png - :width: 600px - :align: center - :alt: Manim Slide logo - -Welcome to Manim Slide's CLI documentation! -=========================================== - - -.. raw:: html - - - -
- - -This page contains an exhaustive list of all the commands available with `manim-slides`. - -If you need help installing or using Manim Slide, please refer to the `GitHub README `_. - -.. click:: manim_slides.__main__:cli - :prog: manim-slides - :nested: full diff --git a/docs/source/license.md b/docs/source/license.md new file mode 100644 index 0000000..dcad9dc --- /dev/null +++ b/docs/source/license.md @@ -0,0 +1,5 @@ +# License + + +```{include} ../../LICENSE.md +``` diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md new file mode 100644 index 0000000..8056b1d --- /dev/null +++ b/docs/source/quickstart.md @@ -0,0 +1,21 @@ +# Quickstart + +## Installation + +```{include} ../../README.md +:start-after: +:end-before: +``` + +## Creating your first slides + +```{include} ../../README.md +:start-after: +:end-before: +``` + +The output slides should look this this: + +
+ +For more advanced examples, see the [Examples](reference/examples) section. diff --git a/docs/source/reference/api.md b/docs/source/reference/api.md new file mode 100644 index 0000000..62ea77f --- /dev/null +++ b/docs/source/reference/api.md @@ -0,0 +1,13 @@ +# Application Programming Interface + +Manim Slides' API is very limited: it simply consists in two classes, `Slide` and `ThreeDSlide`, which are subclasses of `Scene` and `ThreeDScene` from Manim. + +Thefore, we only document here the methods we think the end-user will ever use, not the methods used internally when rendering. + +```{eval-rst} +.. autoclass:: manim_slides.Slide + :members: start_loop, end_loop, pause, play + +.. autoclass:: manim_slides.ThreeDSlide + :members: +``` diff --git a/docs/source/reference/cli.md b/docs/source/reference/cli.md new file mode 100644 index 0000000..d0830b6 --- /dev/null +++ b/docs/source/reference/cli.md @@ -0,0 +1,10 @@ +# Command Line Interface + +This page contains an exhaustive list of all the commands available with `manim-slides`. + + +```{eval-rst} +.. click:: manim_slides.__main__:cli + :prog: manim-slides + :nested: full +``` diff --git a/docs/source/reference/examples.md b/docs/source/reference/examples.md new file mode 100644 index 0000000..091fd90 --- /dev/null +++ b/docs/source/reference/examples.md @@ -0,0 +1,59 @@ +# Examples + +Contents of `example.py`. + +Do not forget to import Manim Slides and Manim or ManimGL. + +## Basic Example + +Basic example from quickstart. + +```{eval-rst} +.. literalinclude:: ../../../example.py + :language: python + :linenos: + :pyobject: BasicExample +``` + +
+ +## 3D Example + +Example using 3D camera. As Manim and ManimGL handle 3D differently, definitions are slightly different. + +### With Manim + +```{eval-rst} +.. literalinclude:: ../../../example.py + :language: python + :linenos: + :dedent: 4 + :start-after: [manim-3d] + :end-before: [manim-3d] +``` + +
+ +### With ManimGL + +```{eval-rst} +.. literalinclude:: ../../../example.py + :language: python + :linenos: + :dedent: 4 + :start-after: [manimgl-3d] + :end-before: [manimgl-3d] +``` + +## Advanced Example + +A more advanced example is `ConvertExample`, which is used as demo slide and tutorial. + +```{eval-rst} +.. literalinclude:: ../../../example.py + :language: python + :linenos: + :pyobject: ConvertExample +``` + +
diff --git a/docs/source/reference/index.md b/docs/source/reference/index.md new file mode 100644 index 0000000..752868d --- /dev/null +++ b/docs/source/reference/index.md @@ -0,0 +1,17 @@ +# Reference Documentation + +Automatically generated reference for Manim Slides. + +```{toctree} +:hidden: + +api +cli +examples +``` + +[Application Programming Interface](./api): list of classes and methods that may be useful to the end-user. + +[Command Line Interface](./cli): list of all commands available using Manim Slides' executable. + +[Examples](./examples): curated list of examples and their output. diff --git a/example.py b/example.py index deb4c87..3d4b14d 100644 --- a/example.py +++ b/example.py @@ -16,30 +16,24 @@ else: from manim_slides import Slide, ThreeDSlide -class Example(Slide): +class BasicExample(Slide): def construct(self): circle = Circle(radius=3, color=BLUE) dot = Dot() self.play(GrowFromCenter(circle)) - self.pause() + self.pause() # Waits user to press continue to go to the next slide - self.start_loop() + self.start_loop() # Start loop self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) - self.end_loop() + self.end_loop() # This will loop until user inputs a key self.play(dot.animate.move_to(ORIGIN)) - self.pause() + self.pause() # Waits user to press continue to go to the next slide - self.play(dot.animate.move_to(RIGHT * 3)) - self.pause() - - self.start_loop() - self.play(MoveAlongPath(dot, circle), run_time=2, rate_func=linear) - self.end_loop() - - # Each slide MUST end with an animation (a self.wait is considered an animation) - self.play(dot.animate.move_to(ORIGIN)) + # Each slide MUST end with an animation + # -> self.wait is considered an animation with Manim, not ManimGL + self.play(dot.animate.move_to(LEFT)) class ConvertExample(Slide): @@ -261,6 +255,7 @@ class Example(Slide): if not MANIMGL: + # [manim-3d] class ThreeDExample(ThreeDSlide): def construct(self): axes = ThreeDAxes() @@ -296,7 +291,9 @@ if not MANIMGL: # Each slide MUST end with an animation (a self.wait is considered an animation) self.play(dot.animate.move_to(ORIGIN)) + # [manim-3d] else: + # [manimgl-3d] # WARNING: 3b1b's manim change how ThreeDScene work, # this is why things have to be managed differently. class ThreeDExample(Slide): @@ -342,3 +339,5 @@ else: # Each slide MUST end with an animation (a self.wait is considered an animation) self.play(dot.animate.move_to(ORIGIN)) + + # [manimgl-3d] diff --git a/manim_slides/slide.py b/manim_slides/slide.py index a975a4e..a41d182 100644 --- a/manim_slides/slide.py +++ b/manim_slides/slide.py @@ -27,7 +27,7 @@ def reverse_video_file(src: str, dst: str) -> None: class Slide(Scene): # type:ignore """ - Inherits from `manim.Scene` or `manimlib.Scene` and provide necessary tools for slides rendering. + Inherits from :class:`manim.Scene` or :class:`manimlib.Scene` and provide necessary tools for slides rendering. """ def __init__( @@ -224,9 +224,9 @@ class Slide(Scene): # type:ignore class ThreeDSlide(Slide, ThreeDScene): # type: ignore """ - Inherits from `manim.ThreeDScene` or `manimlib.ThreeDScene` and provide necessary tools for slides rendering. + Inherits from :class:`Slide` and :class:`manim.ThreeDScene` or :class:`manimlib.ThreeDScene` and provide necessary tools for slides rendering. - Note that ManimGL does not need ThreeDScene for 3D rendering in recent versions, see `example.py`. + .. note:: ManimGL does not need ThreeDScene for 3D rendering in recent versions, see `example.py`. """ pass diff --git a/poetry.lock b/poetry.lock index 09c0a43..545755d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -92,6 +92,14 @@ category = "main" optional = false python-versions = ">=3.6" +[[package]] +name = "cfgv" +version = "3.3.1" +description = "Validate configuration and produce human readable error messages." +category = "dev" +optional = false +python-versions = ">=3.6.1" + [[package]] name = "charset-normalizer" version = "3.0.1" @@ -195,6 +203,14 @@ category = "dev" optional = false python-versions = ">=3.5" +[[package]] +name = "distlib" +version = "0.3.6" +description = "Distribution utilities" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "docutils" version = "0.19" @@ -214,6 +230,18 @@ python-versions = "*" [package.extras] tests = ["asttokens", "littleutils", "pytest", "rich"] +[[package]] +name = "filelock" +version = "3.9.0" +description = "A platform independent file lock." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["furo (>=2022.12.7)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] +testing = ["covdefaults (>=2.2.2)", "coverage (>=7.0.1)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-timeout (>=2.1)"] + [[package]] name = "fonttools" version = "4.38.0" @@ -258,6 +286,17 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "identify" +version = "2.5.17" +description = "File identification library for Python" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +license = ["ukkonen"] + [[package]] name = "idna" version = "3.4" @@ -541,6 +580,22 @@ python-versions = ">=3.5" [package.dependencies] traitlets = "*" +[[package]] +name = "mdit-py-plugins" +version = "0.3.3" +description = "Collection of plugins for markdown-it-py" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +markdown-it-py = ">=1.0.0,<3.0.0" + +[package.extras] +code-style = ["pre-commit"] +rtd = ["attrs", "myst-parser (>=0.16.1,<0.17.0)", "sphinx-book-theme (>=0.1.0,<0.2.0)"] +testing = ["coverage", "pytest", "pytest-cov", "pytest-regressions"] + [[package]] name = "mdurl" version = "0.1.2" @@ -635,6 +690,29 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "myst-parser" +version = "0.18.1" +description = "An extended commonmark compliant parser, with bridges to docutils & sphinx." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +docutils = ">=0.15,<0.20" +jinja2 = "*" +markdown-it-py = ">=1.0.0,<3.0.0" +mdit-py-plugins = ">=0.3.1,<0.4.0" +pyyaml = "*" +sphinx = ">=4,<6" +typing-extensions = "*" + +[package.extras] +code-style = ["pre-commit (>=2.12,<3.0)"] +linkify = ["linkify-it-py (>=1.0,<2.0)"] +rtd = ["ipython", "sphinx-book-theme", "sphinx-design", "sphinxcontrib.mermaid (>=0.7.1,<0.8.0)", "sphinxext-opengraph (>=0.6.3,<0.7.0)", "sphinxext-rediraffe (>=0.2.7,<0.3.0)"] +testing = ["beautifulsoup4", "coverage[toml]", "pytest (>=6,<7)", "pytest-cov", "pytest-param-files (>=0.3.4,<0.4.0)", "pytest-regressions", "sphinx (<5.2)", "sphinx-pytest"] + [[package]] name = "networkx" version = "2.8.8" @@ -650,6 +728,17 @@ doc = ["nb2plots (>=0.6)", "numpydoc (>=1.5)", "pillow (>=9.2)", "pydata-sphinx- extra = ["lxml (>=4.6)", "pydot (>=1.4.2)", "pygraphviz (>=1.9)", "sympy (>=1.10)"] test = ["codecov (>=2.1)", "pytest (>=7.2)", "pytest-cov (>=4.0)"] +[[package]] +name = "nodeenv" +version = "1.7.0" +description = "Node.js virtual environment builder" +category = "dev" +optional = false +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" + +[package.dependencies] +setuptools = "*" + [[package]] name = "numpy" version = "1.24.1" @@ -747,6 +836,21 @@ python-versions = ">=3.7" docs = ["furo (>=2022.12.7)", "proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-autodoc-typehints (>=1.19.5)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.2.2)", "pytest (>=7.2)", "pytest-cov (>=4)", "pytest-mock (>=3.10)"] +[[package]] +name = "pre-commit" +version = "3.0.2" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" +optional = false +python-versions = ">=3.8" + +[package.dependencies] +cfgv = ">=2.0.0" +identify = ">=1.0.0" +nodeenv = ">=0.11.1" +pyyaml = ">=5.1" +virtualenv = ">=20.10.0" + [[package]] name = "prompt-toolkit" version = "3.0.36" @@ -1143,6 +1247,21 @@ click = ">=7.0" docutils = "*" sphinx = ">=2.0" +[[package]] +name = "sphinx-copybutton" +version = "0.5.1" +description = "Add a copy button to each of your code cells." +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +sphinx = ">=1.8" + +[package.extras] +code-style = ["pre-commit (==2.12.1)"] +rtd = ["ipython", "myst-nb", "sphinx", "sphinx-book-theme", "sphinx-examples"] + [[package]] name = "sphinxcontrib-applehelp" version = "1.0.4" @@ -1284,7 +1403,7 @@ telegram = ["requests"] [[package]] name = "traitlets" -version = "5.8.1" +version = "5.9.0" description = "Traitlets Python configuration system" category = "dev" optional = false @@ -1329,6 +1448,23 @@ decorator = ">=3.4.0" [package.extras] test = ["flake8 (>=2.4.0)", "isort (>=4.2.2)", "pytest (>=2.2.3)"] +[[package]] +name = "virtualenv" +version = "20.17.1" +description = "Virtual Python Environment builder" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +distlib = ">=0.3.6,<1" +filelock = ">=3.4.1,<4" +platformdirs = ">=2.4,<3" + +[package.extras] +docs = ["proselint (>=0.13)", "sphinx (>=5.3)", "sphinx-argparse (>=0.3.2)", "sphinx-rtd-theme (>=1)", "towncrier (>=22.8)"] +testing = ["coverage (>=6.2)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=21.3)", "pytest (>=7.0.1)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.2)", "pytest-mock (>=3.6.1)", "pytest-randomly (>=3.10.3)", "pytest-timeout (>=2.1)"] + [[package]] name = "watchdog" version = "2.2.1" @@ -1363,7 +1499,7 @@ testing = ["flake8 (<5)", "func-timeout", "jaraco.functools", "jaraco.itertools" [metadata] lock-version = "1.1" python-versions = ">=3.8.1,<3.12" -content-hash = "def8bb22c62695f896e888757fa851bbd46e1c3ef28691f6262c1d54e2a25f42" +content-hash = "c3931f97423e6cf1082a0144b675da951151869c357f33a44a3bce06fd0b6520" [metadata.files] alabaster = [ @@ -1408,6 +1544,10 @@ certifi = [ {file = "certifi-2022.12.7-py3-none-any.whl", hash = "sha256:4ad3232f5e926d6718ec31cfc1fcadfde020920e278684144551c91769c7bc18"}, {file = "certifi-2022.12.7.tar.gz", hash = "sha256:35824b4c3a97115964b408844d64aa14db1cc518f6562e8d7261699d1350a9e3"}, ] +cfgv = [ + {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, + {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, +] charset-normalizer = [ {file = "charset-normalizer-3.0.1.tar.gz", hash = "sha256:ebea339af930f8ca5d7a699b921106c6e29c617fe9606fa7baa043c1cdae326f"}, {file = "charset_normalizer-3.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:88600c72ef7587fe1708fd242b385b6ed4b8904976d5da0893e31df8b3480cb6"}, @@ -1624,6 +1764,10 @@ decorator = [ {file = "decorator-5.1.1-py3-none-any.whl", hash = "sha256:b8c3f85900b9dc423225913c5aace94729fe1fa9763b38939a95226f02d37186"}, {file = "decorator-5.1.1.tar.gz", hash = "sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330"}, ] +distlib = [ + {file = "distlib-0.3.6-py2.py3-none-any.whl", hash = "sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e"}, + {file = "distlib-0.3.6.tar.gz", hash = "sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46"}, +] docutils = [ {file = "docutils-0.19-py3-none-any.whl", hash = "sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc"}, {file = "docutils-0.19.tar.gz", hash = "sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6"}, @@ -1632,6 +1776,10 @@ executing = [ {file = "executing-1.2.0-py2.py3-none-any.whl", hash = "sha256:0314a69e37426e3608aada02473b4161d4caf5a4b244d1d0c48072b8fee7bacc"}, {file = "executing-1.2.0.tar.gz", hash = "sha256:19da64c18d2d851112f09c287f8d3dbbdf725ab0e569077efb6cdcbd3497c107"}, ] +filelock = [ + {file = "filelock-3.9.0-py3-none-any.whl", hash = "sha256:f58d535af89bb9ad5cd4df046f741f8553a418c01a7856bf0d173bbc9f6bd16d"}, + {file = "filelock-3.9.0.tar.gz", hash = "sha256:7b319f24340b51f55a2bf7a12ac0755a9b03e718311dac567a0f4f7fabd2f5de"}, +] fonttools = [ {file = "fonttools-4.38.0-py3-none-any.whl", hash = "sha256:820466f43c8be8c3009aef8b87e785014133508f0de64ec469e4efb643ae54fb"}, {file = "fonttools-4.38.0.zip", hash = "sha256:2bb244009f9bf3fa100fc3ead6aeb99febe5985fa20afbfbaa2f8946c2fbdaf1"}, @@ -1692,6 +1840,10 @@ glcontext = [ {file = "glcontext-2.3.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:ef0c7e534e53f14b7b09dc3fe1e207243c9bb3eb2543d9876ed253156ca7a8bf"}, {file = "glcontext-2.3.7.tar.gz", hash = "sha256:bb2d0503f45ad85ca7319bd37fd983e374b3f824c38a450b5f72cfc974114156"}, ] +identify = [ + {file = "identify-2.5.17-py2.py3-none-any.whl", hash = "sha256:7d526dd1283555aafcc91539acc061d8f6f59adb0a7bba462735b0a318bff7ed"}, + {file = "identify-2.5.17.tar.gz", hash = "sha256:93cc61a861052de9d4c541a7acb7e3dcc9c11b398a2144f6e52ae5285f5f4f06"}, +] idna = [ {file = "idna-3.4-py3-none-any.whl", hash = "sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2"}, {file = "idna-3.4.tar.gz", hash = "sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4"}, @@ -1986,6 +2138,10 @@ matplotlib-inline = [ {file = "matplotlib-inline-0.1.6.tar.gz", hash = "sha256:f887e5f10ba98e8d2b150ddcf4702c1e5f8b3a20005eb0f74bfdbd360ee6f304"}, {file = "matplotlib_inline-0.1.6-py3-none-any.whl", hash = "sha256:f1f41aab5328aa5aaea9b16d083b128102f8712542f819fe7e6a420ff581b311"}, ] +mdit-py-plugins = [ + {file = "mdit-py-plugins-0.3.3.tar.gz", hash = "sha256:5cfd7e7ac582a594e23ba6546a2f406e94e42eb33ae596d0734781261c251260"}, + {file = "mdit_py_plugins-0.3.3-py3-none-any.whl", hash = "sha256:36d08a29def19ec43acdcd8ba471d3ebab132e7879d442760d963f19913e04b9"}, +] mdurl = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -2090,10 +2246,18 @@ mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] +myst-parser = [ + {file = "myst-parser-0.18.1.tar.gz", hash = "sha256:79317f4bb2c13053dd6e64f9da1ba1da6cd9c40c8a430c447a7b146a594c246d"}, + {file = "myst_parser-0.18.1-py3-none-any.whl", hash = "sha256:61b275b85d9f58aa327f370913ae1bec26ebad372cc99f3ab85c8ec3ee8d9fb8"}, +] networkx = [ {file = "networkx-2.8.8-py3-none-any.whl", hash = "sha256:e435dfa75b1d7195c7b8378c3859f0445cd88c6b0375c181ed66823a9ceb7524"}, {file = "networkx-2.8.8.tar.gz", hash = "sha256:230d388117af870fce5647a3c52401fcf753e94720e6ea6b4197a5355648885e"}, ] +nodeenv = [ + {file = "nodeenv-1.7.0-py2.py3-none-any.whl", hash = "sha256:27083a7b96a25f2f5e1d8cb4b6317ee8aeda3bdd121394e5ac54e498028a042e"}, + {file = "nodeenv-1.7.0.tar.gz", hash = "sha256:e0e7f7dfb85fc5394c6fe1e8fa98131a2473e04311a45afb6508f7cf1836fa2b"}, +] numpy = [ {file = "numpy-1.24.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:179a7ef0889ab769cc03573b6217f54c8bd8e16cef80aad369e1e8185f994cd7"}, {file = "numpy-1.24.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b09804ff570b907da323b3d762e74432fb07955701b17b08ff1b5ebaa8cfe6a9"}, @@ -2161,6 +2325,13 @@ pillow = [ {file = "Pillow-9.4.0-1-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:b8c2f6eb0df979ee99433d8b3f6d193d9590f735cf12274c108bd954e30ca858"}, {file = "Pillow-9.4.0-1-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b70756ec9417c34e097f987b4d8c510975216ad26ba6e57ccb53bc758f490dab"}, {file = "Pillow-9.4.0-1-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:43521ce2c4b865d385e78579a082b6ad1166ebed2b1a2293c3be1d68dd7ca3b9"}, + {file = "Pillow-9.4.0-2-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:9d9a62576b68cd90f7075876f4e8444487db5eeea0e4df3ba298ee38a8d067b0"}, + {file = "Pillow-9.4.0-2-cp311-cp311-macosx_10_10_x86_64.whl", hash = "sha256:87708d78a14d56a990fbf4f9cb350b7d89ee8988705e58e39bdf4d82c149210f"}, + {file = "Pillow-9.4.0-2-cp37-cp37m-macosx_10_10_x86_64.whl", hash = "sha256:8a2b5874d17e72dfb80d917213abd55d7e1ed2479f38f001f264f7ce7bae757c"}, + {file = "Pillow-9.4.0-2-cp38-cp38-macosx_10_10_x86_64.whl", hash = "sha256:83125753a60cfc8c412de5896d10a0a405e0bd88d0470ad82e0869ddf0cb3848"}, + {file = "Pillow-9.4.0-2-cp39-cp39-macosx_10_10_x86_64.whl", hash = "sha256:9e5f94742033898bfe84c93c831a6f552bb629448d4072dd312306bab3bd96f1"}, + {file = "Pillow-9.4.0-2-pp38-pypy38_pp73-macosx_10_10_x86_64.whl", hash = "sha256:013016af6b3a12a2f40b704677f8b51f72cb007dac785a9933d5c86a72a7fe33"}, + {file = "Pillow-9.4.0-2-pp39-pypy39_pp73-macosx_10_10_x86_64.whl", hash = "sha256:99d92d148dd03fd19d16175b6d355cc1b01faf80dae93c6c3eb4163709edc0a9"}, {file = "Pillow-9.4.0-cp310-cp310-macosx_10_10_x86_64.whl", hash = "sha256:2968c58feca624bb6c8502f9564dd187d0e1389964898f5e9e1fbc8533169157"}, {file = "Pillow-9.4.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:c5c1362c14aee73f50143d74389b2c158707b4abce2cb055b7ad37ce60738d47"}, {file = "Pillow-9.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bd752c5ff1b4a870b7661234694f24b1d2b9076b8bf337321a814c612665f343"}, @@ -2229,6 +2400,10 @@ platformdirs = [ {file = "platformdirs-2.6.2-py3-none-any.whl", hash = "sha256:83c8f6d04389165de7c9b6f0c682439697887bca0aa2f1c87ef1826be3584490"}, {file = "platformdirs-2.6.2.tar.gz", hash = "sha256:e1fea1fe471b9ff8332e229df3cb7de4f53eeea4998d3b6bfff542115e998bd2"}, ] +pre-commit = [ + {file = "pre_commit-3.0.2-py2.py3-none-any.whl", hash = "sha256:f448d5224c70e196a6c6f87961d2333dfdc49988ebbf660477f9efe991c03597"}, + {file = "pre_commit-3.0.2.tar.gz", hash = "sha256:aa97fa71e7ab48225538e1e91a6b26e483029e6de64824f04760c32557bc91d7"}, +] prompt-toolkit = [ {file = "prompt_toolkit-3.0.36-py3-none-any.whl", hash = "sha256:aa64ad242a462c5ff0363a7b9cfe696c20d55d9fc60c11fd8e632d064804d305"}, {file = "prompt_toolkit-3.0.36.tar.gz", hash = "sha256:3e163f254bef5a03b146397d7c1963bd3e2812f0964bb9a24e6ec761fd28db63"}, @@ -2547,6 +2722,10 @@ sphinx-click = [ {file = "sphinx-click-4.4.0.tar.gz", hash = "sha256:cc67692bd28f482c7f01531c61b64e9d2f069bfcf3d24cbbb51d4a84a749fa48"}, {file = "sphinx_click-4.4.0-py3-none-any.whl", hash = "sha256:2821c10a68fc9ee6ce7c92fad26540d8d8c8f45e6d7258f0e4fb7529ae8fab49"}, ] +sphinx-copybutton = [ + {file = "sphinx-copybutton-0.5.1.tar.gz", hash = "sha256:366251e28a6f6041514bfb5439425210418d6c750e98d3a695b73e56866a677a"}, + {file = "sphinx_copybutton-0.5.1-py3-none-any.whl", hash = "sha256:0842851b5955087a7ec7fc870b622cb168618ad408dee42692e9a5c97d071da8"}, +] sphinxcontrib-applehelp = [ {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, @@ -2595,8 +2774,8 @@ tqdm = [ {file = "tqdm-4.64.1.tar.gz", hash = "sha256:5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4"}, ] traitlets = [ - {file = "traitlets-5.8.1-py3-none-any.whl", hash = "sha256:a1ca5df6414f8b5760f7c5f256e326ee21b581742114545b462b35ffe3f04861"}, - {file = "traitlets-5.8.1.tar.gz", hash = "sha256:32500888f5ff7bbf3b9267ea31748fa657aaf34d56d85e60f91dda7dc7f5785b"}, + {file = "traitlets-5.9.0-py3-none-any.whl", hash = "sha256:9e6ec080259b9a5940c797d58b613b5e31441c2257b87c2e795c5228ae80d2d8"}, + {file = "traitlets-5.9.0.tar.gz", hash = "sha256:f6cde21a9c68cf756af02035f72d5a723bf607e862e7be33ece505abf4a3bad9"}, ] typing-extensions = [ {file = "typing_extensions-4.4.0-py3-none-any.whl", hash = "sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e"}, @@ -2609,6 +2788,10 @@ urllib3 = [ validators = [ {file = "validators-0.20.0.tar.gz", hash = "sha256:24148ce4e64100a2d5e267233e23e7afeb55316b47d30faae7eb6e7292bc226a"}, ] +virtualenv = [ + {file = "virtualenv-20.17.1-py3-none-any.whl", hash = "sha256:ce3b1684d6e1a20a3e5ed36795a97dfc6af29bc3970ca8dab93e11ac6094b3c4"}, + {file = "virtualenv-20.17.1.tar.gz", hash = "sha256:f8b927684efc6f1cc206c9db297a570ab9ad0e51c16fa9e45487d36d1905c058"}, +] watchdog = [ {file = "watchdog-2.2.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a09483249d25cbdb4c268e020cb861c51baab2d1affd9a6affc68ffe6a231260"}, {file = "watchdog-2.2.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5100eae58133355d3ca6c1083a33b81355c4f452afa474c2633bd2fbbba398b3"}, diff --git a/pyproject.toml b/pyproject.toml index 556d98a..6de7775 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,15 +76,18 @@ tqdm = "^4.64.1" [tool.poetry.group.dev.dependencies] black = "^22.10.0" -isort = "^5.10.1" +isort = "^5.12.0" mypy = "^0.991" +pre-commit = "^3.0.2" ruff = "^0.0.219" [tool.poetry.group.docs.dependencies] furo = "^2022.9.29" manim = "^0.17.0" +myst-parser = "^0.18.1" sphinx = "^5.3.0" sphinx-click = "^4.4.0" +sphinx-copybutton = "^0.5.1" [tool.poetry.group.test.dependencies] manim = "^0.17.0"