Skip to content

Commit

Permalink
add graphviz to readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
j9ac9k committed May 28, 2024
1 parent 1b1fe1a commit 406ba22
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 10 deletions.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"sphinx.ext.autosummary",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
"sphinx.ext.intersphinx",
"sphinx.ext.graphviz",
"sphinxext.rediraffe",
"sphinx_design",
Expand Down Expand Up @@ -61,6 +62,10 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store", "**.ipynb_checkpoints"]

intersphinx_mapping = {
'sphinx': ('https://www.sphinx-doc.org/en/master', None)
}

# -- Sitemap -----------------------------------------------------------------

# ReadTheDocs has its own way of generating sitemaps, etc.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ Graphviz
Inheritance Diagram
-------------------

Using `sphinx.ext.inheritance_diagram`, inheritance diagrams can be generated
through `sphinx.ext.graphviz`. If the output of the inheritance diagrams are
in `svg` format, they can be made to conform to light or dark mode.
Using :mod:`sphinx.ext.inheritance_diagram`, inheritance diagrams can be generated
through :mod:`sphinx.ext.graphviz`. If the output of the inheritance diagrams are
in SVG format, they can be made to conform to light or dark mode.

To have the inheritance-diagram render to `svg`, inside `conf.py`, you need
To have the inheritance-diagram render to SVG, inside ``conf.py``, you need
the following option.

.. code-block:: python
Expand Down
1 change: 1 addition & 0 deletions docs/examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ See the sections in the primary sidebar and below to explore.
kitchen-sink/index
pydata
execution
graphviz


.. Note: the caption below is intentionally long in order to test out what long captions look like.
Expand Down
22 changes: 16 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[build-system]
requires = ["sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip"]
requires = [
"sphinx-theme-builder @ https://github.com/pradyunsg/sphinx-theme-builder/archive/87214d0671c943992c05e3db01dca997e156e8d6.zip",
]
build-backend = "sphinx_theme_builder"

[tool.sphinx-theme-builder]
Expand All @@ -10,7 +12,7 @@ additional-compiled-static-assets = [
"vendor/",
"styles/bootstrap.css",
"scripts/bootstrap.js",
"locale/"
"locale/",
]

[project]
Expand All @@ -27,7 +29,7 @@ dependencies = [
"Babel",
"pygments>=2.7",
"accessible-pygments",
"typing-extensions"
"typing-extensions",
]
license = { file = "LICENSE" }
maintainers = [
Expand All @@ -52,7 +54,7 @@ classifiers = [
[project.optional-dependencies]
doc = [
"numpydoc",
"linkify-it-py", # for link shortening
"linkify-it-py", # for link shortening
"rich",
"sphinxext-rediraffe",
"sphinx-sitemap",
Expand All @@ -76,10 +78,18 @@ doc = [
"nbsphinx",
"ipyleaflet",
"colorama",
"ipywidgets"
"ipywidgets",
"graphviz",
]
test = ["pytest", "pytest-cov", "pytest-regressions", "sphinx[test]"]
dev = ["pyyaml", "pre-commit", "pydata-sphinx-theme[doc,test]", "tox", "pandoc", "sphinx-theme-builder[cli]"]
dev = [
"pyyaml",
"pre-commit",
"pydata-sphinx-theme[doc,test]",
"tox",
"pandoc",
"sphinx-theme-builder[cli]",
]
a11y = ["pytest-playwright"]
i18n = ["Babel", "jinja2"]

Expand Down
2 changes: 2 additions & 0 deletions readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ build:
os: ubuntu-20.04
tools:
python: "3.10"
apt_packages:
- graphviz
jobs:
# build the gallery of themes before building the doc
post_install:
Expand Down

0 comments on commit 406ba22

Please sign in to comment.