IBM / mi-prometheus

Enabling reproducible Machine Learning research
http://mi-prometheus.rtfd.io/
Apache License 2.0
42 stars 18 forks source link

[Feature] Linking the documentation to other documentations #56

Closed vmarois closed 5 years ago

vmarois commented 5 years ago

It is possible to link the documentation to refer to the Python standard library, or others librairies' documentation. For the builtins of Python, it seems that it works not too bad out-of-the-box. For instance, if we specify the type of an argument in a function's docstring, e.g. :type name: str, a hyperlink refering to str's doc page is created when the documentation is built.

It is possible also to link to PyTorch documentation, but it requires a bit more work. For instance, to link to the doc page of Dataset, we have to indicate the following in the docstring:

:py:class:torch.utils.data.Dataset

:py:class is thus the directive to use to tell Sphinx that we want to link to this class's doc page. That can work with numpy, torchvision etc.

There are so many ways in which we could enhance the documentation, and I feel like we are barely scratching the surface...