I'm aware of how to exclude files from Sphinx.
However, a handful of my code uses the standard pattern of:
import torch.tensor as T
T
then ends up getting the torch tensor documentation in my modules. How can I avoid this?
I am using these sphinx extensions:
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx_rtd_theme",
]
Here are example warnings from make html
:
/Users/joseph/dev/torchsynth/torchsynth/parameter.py:docstring of torchsynth.parameter.T:1: WARNING: Inline emphasis start-string without end-string.
/Users/joseph/dev/torchsynth/torchsynth/util.py:docstring of torchsynth.util.T:1: WARNING: Inline emphasis start-string without end-string.
For example, in torchsynth/parameter.py
the imports are
from typing import Optional
import torch
import torch.nn as nn
from torch import tensor as T
This is the sphinx branch in github. We just started writing our sphinx docs, so please be gentle.
Our rst
files right now are just skeletons. For example, module.rst
is:
torchsynth
==========
.. toctree::
:maxdepth: 4
torchsynth
You can see other rsts here in the branch.
Attached is a screenshot of my py-modindex.py:
You can see the floating 't' at the top left. The plus/minus button is overly scaled, I think I need to adjust the theme, but that's not my issue.