From ba16fb5dde5dfe0a2c60804d47a1d4ae8eea6bc9 Mon Sep 17 00:00:00 2001 From: Frederik Hennig <frederik.hennig@fau.de> Date: Wed, 3 Apr 2024 19:04:14 +0200 Subject: [PATCH] add type system inheritance diagram to docs --- docs/source/api/types.rst | 4 ++++ docs/source/conf.py | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/docs/source/api/types.rst b/docs/source/api/types.rst index ce08697e2..624d956bc 100644 --- a/docs/source/api/types.rst +++ b/docs/source/api/types.rst @@ -17,6 +17,10 @@ Basic Functions Data Type Class Hierarchy ------------------------- +.. inheritance-diagram:: pystencils.types.meta.PsType pystencils.types.types + :top-classes: pystencils.types.PsType + :parts: 1 + .. autoclass:: pystencils.types.PsType :members: diff --git a/docs/source/conf.py b/docs/source/conf.py index 45546d9b7..4f68a697e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -29,6 +29,7 @@ extensions = [ "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinx.ext.napoleon", + "sphinx.ext.inheritance_diagram", "nbsphinx", "sphinxcontrib.bibtex", "sphinx_autodoc_typehints", @@ -47,6 +48,12 @@ intersphinx_mapping = { "sympy": ("https://docs.sympy.org/latest/", None), } +# -- Options for inheritance diagrams----------------------------------------- + +inheritance_graph_attrs = { + "bgcolor": "white", +} + # -- Options for HTML output ------------------------------------------------- html_theme = "furo" -- GitLab