Unverified Commit dba5cf31 authored by Aditya Oke's avatar Aditya Oke Committed by GitHub
Browse files

Add copy button and automatic cross-refs to external projects in docs (#3868)

parent 91d9797e
sphinx==2.4.4 sphinx==2.4.4
sphinx-gallery>=0.9.0 sphinx-gallery>=0.9.0
sphinx-copybutton>=0.3.1
matplotlib matplotlib
numpy numpy
-e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme -e git+git://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme
...@@ -21,10 +21,6 @@ ...@@ -21,10 +21,6 @@
# import sys # import sys
# sys.path.insert(0, os.path.abspath('.')) # sys.path.insert(0, os.path.abspath('.'))
from pathlib import Path
import os
import torch
import torchvision import torchvision
import pytorch_sphinx_theme import pytorch_sphinx_theme
...@@ -48,7 +44,9 @@ extensions = [ ...@@ -48,7 +44,9 @@ extensions = [
'sphinx.ext.mathjax', 'sphinx.ext.mathjax',
'sphinx.ext.napoleon', 'sphinx.ext.napoleon',
'sphinx.ext.viewcode', 'sphinx.ext.viewcode',
'sphinx.ext.duration',
'sphinx_gallery.gen_gallery', 'sphinx_gallery.gen_gallery',
"sphinx_copybutton"
] ]
sphinx_gallery_conf = { sphinx_gallery_conf = {
...@@ -202,7 +200,10 @@ texinfo_documents = [ ...@@ -202,7 +200,10 @@ texinfo_documents = [
# Example configuration for intersphinx: refer to the Python standard library. # Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = { intersphinx_mapping = {
'python': ('https://docs.python.org/', None), 'python': ('https://docs.python.org/', None),
'torch': ('https://pytorch.org/docs/stable/', None),
'numpy': ('http://docs.scipy.org/doc/numpy/', None), 'numpy': ('http://docs.scipy.org/doc/numpy/', None),
'PIL': ('https://pillow.readthedocs.io/en/stable/', None),
'matplotlib': ('https://matplotlib.org/stable/', None),
} }
# -- A patch that prevents Sphinx from cross-referencing ivar tags ------- # -- A patch that prevents Sphinx from cross-referencing ivar tags -------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment