mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* first draft of color class + starting library conversion * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * changed everything to Manim color todo: figure out circular dependency in utils * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * first working draft of new color version * resolving conflicts * resolving conflicts * resolving conflicts * resolving conflicts * resolving conflicts * changed default internal value of ManimColor to np.ndarray[float] * starting to fix tests * fixed more tests and changed precision of manim color * removed premature color conversion * fixed some more tests * final test changes * fix doctests * fix for 3.8 * fixing ManimColor string representation * removing some unneccesary conversions * moved community constants to manim_colors.py and added more color standards * broke some too long lines * added fallback: check whether passed object has get_hex method * actually fix _internal_from_string * added hsv support * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * remove dependency on colour * fixed DARK_EARTH being assigned twice * fixed double assignment * remove more duplicated colour names * raise NotImplementedError for ManimColor.gradient * removed unused import * remove superfluous ManimColor import * fix circular import, remove dependency of space_ops on config * one more Color -> ParseableManimColor * removed one *-import * somewhat unrelated fixed type hint * -1 *-import * fixed change of logic in CoordinateSystem.get_graph_label * removed debug print; fixed type hint in mobject.py * some fixes and improvements to text_mobject.py * update three_dimensions * fixes for rendered documentation of utils.color.* * substantial improvements to documentation, including new Sphinx directive Co-authored-by: MrDiver <mrdiverlp@gmail.com> * Rewrite of the sphinx directive to use docutils nodes and 2 column design * I just had to do it * Improve the color table * minor cleanup * fixed ColorOverview example * documentation improvements * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Update manim/mobject/mobject.py Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix flake8 errors * Removed test in test_text_mobject * Improved Documentation of core.py and added private members in sphinx so that internal methods can be documented * Change color types of labeled.py * removed some unused imports * turned docstring into comment * _colors -> _all_manim_colors; move to manim_color module * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fixed typing * rewrite import --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at> Co-authored-by: Naveen M K <naveen521kk@gmail.com>
179 lines
5.3 KiB
Python
179 lines
5.3 KiB
Python
# Configuration file for the Sphinx documentation builder.
|
|
#
|
|
# This file only contains a selection of the most common options. For a full
|
|
# list see the documentation:
|
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
|
|
from __future__ import annotations
|
|
|
|
import os
|
|
import sys
|
|
from pathlib import Path
|
|
|
|
import manim
|
|
|
|
# -- Path setup --------------------------------------------------------------
|
|
# If extensions (or modules to document with autodoc) are in another directory,
|
|
# add these directories to sys.path here. If the directory is relative to the
|
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
|
|
|
|
|
sys.path.insert(0, os.path.abspath("."))
|
|
|
|
|
|
# -- Project information -----------------------------------------------------
|
|
|
|
project = "Manim"
|
|
copyright = "2020-2022, The Manim Community Dev Team"
|
|
author = "The Manim Community Dev Team"
|
|
|
|
|
|
# -- General configuration ---------------------------------------------------
|
|
|
|
# Add any Sphinx extension module names here, as strings. They can be
|
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
|
# ones.
|
|
extensions = [
|
|
"sphinx.ext.autodoc",
|
|
"sphinx_copybutton",
|
|
"sphinx.ext.napoleon",
|
|
"sphinx.ext.autosummary",
|
|
"sphinx.ext.doctest",
|
|
"sphinx.ext.extlinks",
|
|
"sphinx.ext.viewcode",
|
|
"sphinxext.opengraph",
|
|
"manim.utils.docbuild.manim_directive",
|
|
"manim.utils.docbuild.autocolor_directive",
|
|
"sphinx.ext.graphviz",
|
|
"sphinx.ext.inheritance_diagram",
|
|
"sphinxcontrib.programoutput",
|
|
"myst_parser",
|
|
]
|
|
|
|
# Automatically generate stub pages when using the .. autosummary directive
|
|
autosummary_generate = True
|
|
|
|
# generate documentation from type hints
|
|
autodoc_typehints = "description"
|
|
autoclass_content = "both"
|
|
|
|
# controls whether functions documented by the autofunction directive
|
|
# appear with their full module names
|
|
add_module_names = False
|
|
|
|
# Add any paths that contain templates here, relative to this directory.
|
|
templates_path = ["_templates"]
|
|
|
|
# Custom section headings in our documentation
|
|
napoleon_custom_sections = ["Tests", ("Test", "Tests")]
|
|
|
|
# List of patterns, relative to source directory, that match files and
|
|
# directories to ignore when looking for source files.
|
|
# This pattern also affects html_static_path and html_extra_path.
|
|
html_extra_path = ["robots.txt"]
|
|
|
|
exclude_patterns: list[str] = []
|
|
|
|
# -- Options for internationalization ----------------------------------------
|
|
# Set the destination directory of the localized po files
|
|
locale_dirs = ["../i18n/"]
|
|
|
|
# Splits the text in more pot files.
|
|
gettext_compact = False
|
|
|
|
# Remove useless metadata from po files.
|
|
gettext_last_translator = ""
|
|
gettext_language_team = ""
|
|
|
|
# -- Options for HTML output -------------------------------------------------
|
|
|
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
|
# a list of builtin themes.
|
|
#
|
|
|
|
html_theme = "furo"
|
|
html_favicon = str(Path("_static/favicon.ico"))
|
|
|
|
# Add any paths that contain custom static files (such as style sheets) here,
|
|
# relative to this directory. They are copied after the builtin static files,
|
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
|
html_static_path = ["_static"]
|
|
|
|
html_theme_options = {
|
|
"source_repository": "https://github.com/ManimCommunity/manim/",
|
|
"source_branch": "main",
|
|
"source_directory": "docs/source/",
|
|
"top_of_page_button": None,
|
|
"light_logo": "manim-logo-sidebar.svg",
|
|
"dark_logo": "manim-logo-sidebar-dark.svg",
|
|
"light_css_variables": {
|
|
"color-content-foreground": "#000000",
|
|
"color-background-primary": "#ffffff",
|
|
"color-background-border": "#ffffff",
|
|
"color-sidebar-background": "#f8f9fb",
|
|
"color-brand-content": "#1c00e3",
|
|
"color-brand-primary": "#192bd0",
|
|
"color-link": "#c93434",
|
|
"color-link--hover": "#5b0000",
|
|
"color-inline-code-background": "#f6f6f6;",
|
|
"color-foreground-secondary": "#000",
|
|
},
|
|
"dark_css_variables": {
|
|
"color-content-foreground": "#ffffffd9",
|
|
"color-background-primary": "#131416",
|
|
"color-background-border": "#303335",
|
|
"color-sidebar-background": "#1a1c1e",
|
|
"color-brand-content": "#2196f3",
|
|
"color-brand-primary": "#007fff",
|
|
"color-link": "#51ba86",
|
|
"color-link--hover": "#9cefc6",
|
|
"color-inline-code-background": "#262626",
|
|
"color-foreground-secondary": "#ffffffd9",
|
|
},
|
|
}
|
|
html_title = f"Manim Community v{manim.__version__}"
|
|
|
|
# This specifies any additional css files that will override the theme's
|
|
html_css_files = ["custom.css"]
|
|
|
|
|
|
# external links
|
|
extlinks = {
|
|
"issue": ("https://github.com/ManimCommunity/manim/issues/%s", "#%s"),
|
|
"pr": ("https://github.com/ManimCommunity/manim/pull/%s", "#%s"),
|
|
}
|
|
|
|
# opengraph settings
|
|
ogp_site_name = "Manim Community | Documentation"
|
|
ogp_site_url = "https://docs.manim.community/"
|
|
ogp_social_cards = {
|
|
"image": "_static/logo.png",
|
|
}
|
|
|
|
|
|
# inheritance_graph settings
|
|
inheritance_graph_attrs = {
|
|
"concentrate": True,
|
|
"size": '""',
|
|
"splines": "ortho",
|
|
"nodesep": 0.1,
|
|
"ranksep": 0.2,
|
|
}
|
|
|
|
inheritance_node_attrs = {
|
|
"penwidth": 0,
|
|
"shape": "box",
|
|
"width": 0.05,
|
|
"height": 0.05,
|
|
"margin": 0.05,
|
|
}
|
|
|
|
inheritance_edge_attrs = {
|
|
"penwidth": 1,
|
|
}
|
|
|
|
html_js_files = [
|
|
"responsiveSvg.js",
|
|
]
|
|
|
|
graphviz_output_format = "svg"
|