From aef1574e20b6c54ad072d2f93af0826754b1f1f5 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Tue, 10 Oct 2023 13:57:28 -0400 Subject: [PATCH] Document DP-GUI (#34) --- docs/dpgui.rst | 20 ++++++++++++++++++++ docs/index.rst | 1 + 2 files changed, 21 insertions(+) create mode 100644 docs/dpgui.rst diff --git a/docs/dpgui.rst b/docs/dpgui.rst new file mode 100644 index 0000000..ead131e --- /dev/null +++ b/docs/dpgui.rst @@ -0,0 +1,20 @@ +Use with DP-GUI +=============== + +Developers can export an :class:`Argument ` to `DP-GUI `_ for users, by adding a :code:`dpgui` entry point to `pyproject.toml`: + +.. code-block:: toml + + [project.entry-points."dpgui"] + "Test Argument" = "dargs.sphinx:_test_argument" + +where `_test_argument` returns an :class:`Argument ` or a list of :class:`Argument `, and :code:`"Test Argument"` is its name that can be any string. + +Users can install the `dpgui` Python package via `pip` and serve the DP-GUI instance using the `dpgui` command line: + +.. code-block:: sh + + pip install dpgui + dpgui + +The served DP-GUI will automatically load all templates from the :code:`dpgui` entry point. diff --git a/docs/index.rst b/docs/index.rst index c4ff10f..482500d 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -12,6 +12,7 @@ Welcome to dargs's documentation! intro sphinx + dpgui api/api credits