From 979a78f8b20528f039b2f01e0b2a6d4eb1198e6c Mon Sep 17 00:00:00 2001 From: Rohit Goswami Date: Mon, 7 Mar 2022 14:50:09 +0000 Subject: [PATCH] Sphinx panel Fixes https://github.com/pytorch/pytorch/issues/73835. The full context for this is detailed in the issue, but briefly: - Adds `sphinx-panel` Other PRs will demonstrate usage. Pull Request resolved: https://github.com/pytorch/pytorch/pull/73836 Approved by: https://github.com/albanD --- CONTRIBUTING.md | 2 +- docs/requirements.txt | 1 + docs/source/conf.py | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 59b7ae8a488f5e..9e1a366c0336db 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -512,7 +512,7 @@ missing file warnings but will still complete. For example, to work on `jit.rst` ```bash cd docs/source -ls | grep rst | grep -v index | grep -v jit | xargs rm +find . -type f | grep rst | grep -v index | grep -v jit | xargs rm # Make your changes, build the docs, etc. diff --git a/docs/requirements.txt b/docs/requirements.txt index 34ec6078225bdf..4febcba5f0f0f0 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -7,3 +7,4 @@ tensorboard # required to build torch.distributed.elastic.rendezvous.etcd* docs python-etcd>=0.4.5 sphinx_copybutton +sphinx-panels diff --git a/docs/source/conf.py b/docs/source/conf.py index de66776b85cbae..c77612fa15de65 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -57,12 +57,16 @@ 'sphinxcontrib.katex', 'sphinx.ext.autosectionlabel', 'sphinx_copybutton', + 'sphinx_panels' ] # build the templated autosummary files autosummary_generate = True numpydoc_show_class_members = False +# Theme has bootstrap already +panels_add_bootstrap_css = False + # autosectionlabel throws warnings if section names are duplicated. # The following tells autosectionlabel to not throw a warning for # duplicated section names that are in different documents.