Skip to content

Commit

Permalink
Merge pull request #4 from lmcinnes/main
Browse files Browse the repository at this point in the history
Format the API docs better by messing around with how Param produces docstring material
  • Loading branch information
lmcinnes authored Sep 14, 2022
2 parents c884874 + 7c66d4c commit 740c5f1
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 19 deletions.
36 changes: 20 additions & 16 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,39 +1,41 @@
TNT API Guide
=============

TNT Provides a number of different Pane classes that can be combined and
TNT Provides a number of different Pane adn Widget classes that can be combined and
linked in various ways. The core Panes are the Plot Panes, with various
associated other panes.
associated other panes and widgets.

.. currentmodule:: thisnotthat

Plot Panes
----------

.. autoclass:: thisnotthat.bokeh_plot.BokehPlotPane
:members:
.. autoclass:: BokehPlotPane
:members: add_cluster_labels

.. autoclass:: thisnotthat.deck_plot.DeckglPlotPane
:members:
.. autoclass:: DeckglPlotPane
:members: add_cluster_labels

Data Panes
----------

.. autoclass:: thisnotthat.instance_viewer.InformationPane
:members:
.. autoclass:: InformationPane
:members: link_to_plot

.. autoclass:: thisnotthat.data_viewer.DataPane
:members:
.. autoclass:: DataPane
:members: link_to_plot

Search and Edit Widgets
-----------------------

.. autoclass:: thisnotthat.search.SearchWidget
:members:
.. autoclass:: SearchWidget
:members: link_to_plot

.. autoclass:: thisnotthat.label_editor.LabelEditorWidget
:members:
.. autoclass:: LabelEditorWidget
:members: link_to_plot

.. autoclass:: thisnotthat.plot_controls.PlotControlWidget
:members:
.. autoclass:: PlotControlWidget
:members: link_to_plot


Finally TNT provides tools for annotating plots with cluster labels.
Expand All @@ -44,3 +46,5 @@ Cluster Labelling Methods

.. automodule:: thisnotthat.map_cluster_labelling
:members:


5 changes: 4 additions & 1 deletion doc/basic_concepts.rst
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,7 @@ in Panel, and you can even make use of `templates`_ for more polished apps.
.. _Param documentation: https://param.holoviz.org/getting_started.html
.. _linking docs: https://panel.holoviz.org/user_guide/Links.html
.. _layout options: https://panel.holoviz.org/reference/index.html#layouts
.. _templates: https://panel.holoviz.org/user_guide/Templates.html
.. _templates: https://panel.holoviz.org/user_guide/Templates.html
.. _Row: https://panel.holoviz.org/reference/layouts/Row.html
.. _Column: https://panel.holoviz.org/reference/layouts/Column.html
.. _GridSpec: https://panel.holoviz.org/reference/layouts/GridSpec.html
4 changes: 2 additions & 2 deletions doc/building_panels.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ functionality and performance. Choosing the right PlotPane type for your task wi
go a long way toward making your Panel effective. Currently TNT supports the following
PlotPane types:

* :py:class:`~thisnotthat.BokehPlotPane`
* :py:class:`~thisnotthat.DeckglPlotPane`
* :py:class:`~BokehPlotPane`
* :py:class:`~DeckglPlotPane`

and we hope that more can be added in the future. The API documentation for each PlotPane
type will provide the most details on the capabilities of the PlotPanes, but here is a useful
Expand Down
14 changes: 14 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
sys.path.insert(0, os.path.abspath(".."))
sys.path.insert(0, os.path.abspath("."))

import param_docs
from param_docs.paramdoc import param_format_basic, print_lines
import param
import numpydoc

# -- Project information -----------------------------------------------------

Expand All @@ -29,7 +33,12 @@
master_doc = "index"


def setup(app):
app.connect("autodoc-process-docstring", param_format_basic, priority=-200)


# -- General configuration ---------------------------------------------------
autodoc_member_order = "bysource"

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand All @@ -39,8 +48,13 @@
"sphinx.ext.intersphinx",
"nbsphinx",
"sphinx.ext.mathjax",
"numpydoc",
]

# this is needed for some reason...
# see https://github.com/numpy/numpydoc/issues/69
numpydoc_show_class_members = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]

Expand Down
2 changes: 2 additions & 0 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ scikit-learn
umap-learn
hdbscan
apricot-select
numpydoc
git+https://github.com/lmcinnes/param_docs

0 comments on commit 740c5f1

Please # to comment.