ipywidgets icon indicating copy to clipboard operation
ipywidgets copied to clipboard

How to properly reference ipywidgets elements in sphinx documentation for third party packages?

Open jmborr opened this issue 6 years ago • 4 comments

Referencing ipywidgets components in RST documents doesn't include a link after building In my conf.py file:

# Domains for intersphinx inventory file objects.inv
intersphinx_mapping = {
    'ipywidgets': ('http://ipywidgets.readthedocs.io/en/latest', None),
}

Then in the docstrings of my class methods, I've tried referencing class Widget in different ways

    def link_widget(self, widget, mapping=None):
        r"""Link the value of a single ipywidget to one trait, or the values
        of the element widgets of a composite ipywidget to different traits.
        The specific traits can be specified with the `mapping` argument.

        :class:`~ipywidgets:Widget`
        :class:`~ipywidgets:widget.Widget`
        :class:`~ipywidgets:widgets.widget.Widget`

        :class:`~ipywidgets:ipywidgets.Widget`
        :class:`~ipywidgets:ipywidgets.widget.Widget`
        :class:`~ipywidgets:ipywidgets.widgets.widget.Widget`

        Parameters
        ----------
        widget: :class:`~ipywidgets:ipywidgets.widgets.widget.Widget`
        mapping : str, dict, or **None**
...

None of these syntax seem to work. Can you please specify which syntax to use?

jmborr avatar Jun 13 '18 01:06 jmborr