Skip to content

Commit

Permalink
Document DP-GUI (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Oct 10, 2023
1 parent 444dd27 commit aef1574
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/dpgui.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Use with DP-GUI
===============

Developers can export an :class:`Argument <dargs.Argument>` to `DP-GUI <https://github.com/deepmodeling/dpgui>`_ 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 <dargs.Argument>` or a list of :class:`Argument <dargs.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.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Welcome to dargs's documentation!

intro
sphinx
dpgui
api/api
credits

Expand Down

0 comments on commit aef1574

Please sign in to comment.