From fc19fea7ed9a67023a7446a5770a4183845146d8 Mon Sep 17 00:00:00 2001 From: Naveen M K Date: Sat, 29 May 2021 23:35:14 +0530 Subject: [PATCH] Fix docs for new structure Also use sphinx_rtd_theme --- docs/_templates/autosummary/class.rst | 1 - docs/conf.py | 15 ++++++----- docs/reference.rst | 38 +++++++++++++++++++-------- environment.yml | 8 +++--- requirements-dev.txt | 3 ++- 5 files changed, 41 insertions(+), 24 deletions(-) diff --git a/docs/_templates/autosummary/class.rst b/docs/_templates/autosummary/class.rst index 09a4d099d..76399d42a 100644 --- a/docs/_templates/autosummary/class.rst +++ b/docs/_templates/autosummary/class.rst @@ -3,7 +3,6 @@ .. currentmodule:: {{ module }} .. autoclass:: {{ objname }} - :show-inheritance: :members: {% block methods %} diff --git a/docs/conf.py b/docs/conf.py index 02447f8a3..b231f5697 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -15,17 +15,17 @@ # import sys # sys.path.insert(0, os.path.abspath("..")) - from pathlib import Path +import manimpango + # -- Project information ----------------------------------------------------- -from pkg_resources import get_distribution project = "ManimPango" -copyright = "2021, The Manim Community Dev Team" -author = "The Manim Community Dev Team" +copyright = "2021, Naveen M K" +author = "Naveen M K" -release = get_distribution("ManimPango").version +release = manimpango.__version__ version = ".".join(release.split(".")[:2]) @@ -42,6 +42,7 @@ "sphinx.ext.extlinks", "sphinx.ext.intersphinx", "sphinxext.opengraph", + "sphinx_rtd_theme", ] # Add any paths that contain templates here, relative to this directory. @@ -58,7 +59,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "furo" +html_theme = "sphinx_rtd_theme" # 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, @@ -76,7 +77,7 @@ add_module_names = False intersphinx_mapping = { - "manim": ("https://docs.manim.community/en/v0.2.0", None), + "manim": ("https://docs.manim.community/en/stable", None), "python": ("https://docs.python.org/3", None), } diff --git a/docs/reference.rst b/docs/reference.rst index 00af64639..68cd617b7 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -1,22 +1,38 @@ Manimpango Reference ==================== +.. currentmodule:: manimpango + +************ +Font Manager +************ + .. autosummary:: :toctree: reference - manimpango.TextSetting - manimpango.PangoUtils - manimpango.text2svg - manimpango.MarkupUtils - manimpango.register_font - manimpango.unregister_font - manimpango.list_fonts + ~FontProperties + ~RegisterFont +***** Enums -===== +***** + +.. autosummary:: + :toctree: reference + + ~Style + ~Weight + ~Variant + ~Alignment + +***** +Utils +***** + .. autosummary:: :toctree: reference - manimpango.Style - manimpango.Weight - manimpango.Variant + ~Color + ~pango_version + ~cairo_version + ~list_fonts diff --git a/environment.yml b/environment.yml index 887568285..19ad2aea9 100644 --- a/environment.yml +++ b/environment.yml @@ -1,9 +1,9 @@ -name: manimpango +name: '48' channels: - defaults dependencies: - _libgcc_mutex=0.1=main - - ca-certificates=2020.12.8=h06a4308_0 + - ca-certificates=2021.4.13=h06a4308_1 - cairo=1.14.12=h8948797_3 - certifi=2020.12.5=py37h06a4308_0 - fontconfig=2.13.0=h9420a91_0 @@ -23,7 +23,7 @@ dependencies: - libxcb=1.14=h7b6447c_0 - libxml2=2.9.10=hb55368b_3 - ncurses=6.2=he6710b0_1 - - openssl=1.1.1i=h27cfd23_0 + - openssl=1.1.1k=h27cfd23_0 - pango=1.45.3=hd140c19_0 - pcre=8.44=he6710b0_0 - pip=20.3.3=py37h06a4308_0 @@ -32,6 +32,7 @@ dependencies: - python=3.7.9=h7579374_0 - readline=8.0=h7b6447c_0 - setuptools=51.0.0=py37h06a4308_2 + - sphinx_rtd_theme=0.4.3=py_0 - sqlite=3.33.0=h62c20be_0 - tk=8.6.10=hbc83047_0 - wheel=0.36.2=pyhd3eb1b0_0 @@ -44,7 +45,6 @@ dependencies: - chardet==4.0.0 - cython==0.29.21 - docutils==0.16 - - furo==2021.3.20b30 - idna==2.10 - imagesize==1.2.0 - jinja2==2.11.2 diff --git a/requirements-dev.txt b/requirements-dev.txt index 3324cc094..d10c066fd 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -2,4 +2,5 @@ pytest-cov pytest Cython coverage -manim>0.2.0 +sphinx-rtd-theme +sphinx