-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Improve documentation section about contributing to docs #3555
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
chopan050
merged 7 commits into
ManimCommunity:main
from
chopan050:better_docbuild_docs
Dec 29, 2023
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
2acf6f4
Improve section in docs about contributing to docs
chopan050 f760266
Add note about doc build command depending on the OS
chopan050 efa8920
Improve section in docs about contributing to docs
chopan050 18c7054
Add note about doc build command depending on the OS
chopan050 b16ae57
Merge branch 'better_docbuild_docs' of https://github.com/chopan050/m…
chopan050 b982d95
Merge branch 'main' into better_docbuild_docs
chopan050 f33568d
Fix wrong toctree path in docs/source/contributing/docs.rst
chopan050 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
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,80 @@ | ||
==================== | ||
Adding Documentation | ||
==================== | ||
|
||
Building the documentation | ||
-------------------------- | ||
|
||
When you clone the Manim repository from GitHub, you can access the | ||
``docs/`` folder which contains the necessary files to build the | ||
documentation. | ||
|
||
To build the docs locally, open a CLI, enter the ``docs/`` folder with the | ||
``cd`` command and execute the following depending on your OS: | ||
|
||
- Windows: ``./make.bat html`` | ||
- macOS and Linux: ``make html`` | ||
|
||
The first time you build the docs, the process will take several minutes | ||
because it needs to generate all the ``.rst`` (reST) files from scratch | ||
by reading and parsing all the Manim content. The process becomes much | ||
shorter the next time, as it rebuilds only the parts which have changed. | ||
|
||
|
||
Sphinx library and extensions | ||
----------------------------- | ||
|
||
Manim uses `Sphinx <https://www.sphinx-doc.org>`_ for building the docs. It also makes | ||
use of Sphinx extensions such as: | ||
|
||
- `Autodoc: <https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html>`_ | ||
imports Manim's Python source code, extracts its docstrings and | ||
generates documentation from them. | ||
- `Autosummary: <https://www.sphinx-doc.org/en/master/usage/extensions/autosummary.html>`_ | ||
a complement to Autodoc which adds a special directive ``autosummary``, | ||
used in Manim to automatically document classes, methods, attributes, functions, | ||
module-level variables and exceptions. Autosummary makes use of | ||
`Jinja templates <https://jinja.palletsprojects.com/templates/>`_, which | ||
Manim defines for autosummarizing classes and modules inside ``docs/source/_templates/``. | ||
- `Graphviz extension for Sphinx: <https://www.sphinx-doc.org/en/master/usage/extensions/graphviz.html>`_ | ||
embeds graphs generated by the `Graphviz <https://graphviz.org/>`_ module, which must be installed | ||
in order to render the inheritance diagrams in :doc:`/reference`. | ||
- `Napoleon: <https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html>`_ | ||
enables Sphinx to read Google style docstrings and, in particular for | ||
Manim, `NumPy style docstrings <https://numpydoc.readthedocs.io/en/latest/format.html>`_ | ||
- see :doc:`docs/docstrings` for more information. | ||
|
||
|
||
Sphinx theme | ||
------------ | ||
|
||
The theme used for this website is `Furo <https://sphinx-themes.org/sample-sites/furo/>`_. | ||
|
||
|
||
Custom Sphinx directives | ||
------------------------ | ||
|
||
Manim implements **custom directives** for use with Autodoc and Autosummary, which | ||
are defined in :mod:`~.docbuild`: | ||
|
||
.. currentmodule:: manim.utils.docbuild | ||
|
||
.. autosummary:: | ||
|
||
:toctree: ../../reference | ||
autoaliasattr_directive | ||
autocolor_directive | ||
manim_directive | ||
|
||
|
||
Index | ||
----- | ||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
docs/admonitions | ||
docs/docstrings | ||
docs/examples | ||
docs/references | ||
docs/typings |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,17 @@ | ||
"""Utilities for building the Manim documentation. | ||
|
||
For more information about the Manim documentation building, see: | ||
|
||
- :doc:`/contributing/development`, specifically the ``Documentation`` | ||
bullet point under :ref:`polishing-changes-and-submitting-a-pull-request` | ||
- :doc:`/contributing/docs` | ||
|
||
.. autosummary:: | ||
:toctree: ../reference | ||
|
||
autoaliasattr_directive | ||
autocolor_directive | ||
manim_directive | ||
module_parsing | ||
|
||
""" |
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,17 @@ | ||
"""Utilities for Manim tests using `pytest <https://pytest.org>`_. | ||
|
||
For more information about Manim testing, see: | ||
|
||
- :doc:`/contributing/development`, specifically the ``Tests`` bullet | ||
point under :ref:`polishing-changes-and-submitting-a-pull-request` | ||
- :doc:`/contributing/testing` | ||
|
||
.. autosummary:: | ||
|
||
:toctree: ../reference | ||
frames_comparison | ||
_frames_testers | ||
_show_diff | ||
_test_class_makers | ||
|
||
""" |
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.