From 150e2e9777042ef28e7af7f1b931efd63a2d25a9 Mon Sep 17 00:00:00 2001 From: Nayef Ahmed Date: Thu, 15 Sep 2022 17:34:52 -0700 Subject: [PATCH 1/4] Fix Sphinx-gallery display and pin sphinx-related packages --- docs/requirements.txt | 6 +++++- docs/source/_static/css/pytorch_theme.css | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 82de9e49f4..374abec2b2 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,5 +1,9 @@ Jinja2<3.1.0 sphinx==3.5.4 -e git+https://github.com/pytorch/pytorch_sphinx_theme.git@b4d0005#egg=pytorch_sphinx_theme +sphinx==5.1.1 +sphinxcontrib.katex==0.8.6 +sphinxcontrib.bibtex==2.4.2 +sphinx_gallery==0.11.1 +nbsphinx==0.8.8 matplotlib -sphinx_gallery diff --git a/docs/source/_static/css/pytorch_theme.css b/docs/source/_static/css/pytorch_theme.css index 98e64e0da1..7c6b579f6f 100644 --- a/docs/source/_static/css/pytorch_theme.css +++ b/docs/source/_static/css/pytorch_theme.css @@ -115,3 +115,12 @@ nav .hidden-section { .wy-side-nav-search>div.version { color: #000; } + +/* Fix for Sphinx gallery 0.11 +See https://github.com/sphinx-gallery/sphinx-gallery/issues/990 +*/ +article.pytorch-article .sphx-glr-thumbnails .sphx-glr-thumbcontainer { + width: unset; + margin-right: 0; + margin-left: 0; +} From 75d199351d3630908f029a7276c3c691d1abcd84 Mon Sep 17 00:00:00 2001 From: Nayef Ahmed Date: Mon, 19 Sep 2022 11:30:00 -0700 Subject: [PATCH 2/4] Resolving PR comments --- docs/requirements.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index ee124ecaf5..63fb28f693 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,9 +1,6 @@ Jinja2<3.1.0 -sphinx==3.5.4 --e git+https://github.com/pytorch/pytorch_sphinx_theme.git@cece053#egg=pytorch_sphinx_theme sphinx==5.1.1 -sphinxcontrib.katex==0.8.6 -sphinxcontrib.bibtex==2.4.2 +-e git+https://github.com/pytorch/pytorch_sphinx_theme.git@cece053#egg=pytorch_sphinx_theme sphinx_gallery==0.11.1 nbsphinx==0.8.8 matplotlib From 64876e5ae7748e3d9e371bee758804e496215674 Mon Sep 17 00:00:00 2001 From: Nayef Ahmed Date: Mon, 19 Sep 2022 11:30:51 -0700 Subject: [PATCH 3/4] Resolving PR comments --- docs/requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/requirements.txt b/docs/requirements.txt index 63fb28f693..2f20beb5b4 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -2,5 +2,4 @@ Jinja2<3.1.0 sphinx==5.1.1 -e git+https://github.com/pytorch/pytorch_sphinx_theme.git@cece053#egg=pytorch_sphinx_theme sphinx_gallery==0.11.1 -nbsphinx==0.8.8 matplotlib From 0b63c6c217f7c700e3fc86a65e6696033b5d7820 Mon Sep 17 00:00:00 2001 From: Nayef Ahmed Date: Tue, 20 Sep 2022 00:52:17 -0400 Subject: [PATCH 4/4] Remove language = None from docs --- docs/source/conf.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 386fbd4537..6e80a7de5e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -145,13 +145,6 @@ def _get_pattern(): version = f"Nightly Build ({torchtext.__version__})" release = "nightly" -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path