From ac1614c3eab1c3c01134ce42c0dd235525cd1c32 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:23:10 +0800 Subject: [PATCH 01/21] docs: add docs Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 11 ++++ docs/Makefile | 20 +++++++ docs/conf.py | 126 ++++++++++++++++++++++++++++++++++++++++++++ docs/index.rst | 17 ++++++ docs/parameters.rst | 16 ++++++ pyproject.toml | 9 ++++ 6 files changed, 199 insertions(+) create mode 100644 .readthedocs.yml create mode 100644 docs/Makefile create mode 100644 docs/conf.py create mode 100644 docs/index.rst create mode 100644 docs/parameters.rst diff --git a/.readthedocs.yml b/.readthedocs.yml new file mode 100644 index 0000000..8f4c9c0 --- /dev/null +++ b/.readthedocs.yml @@ -0,0 +1,11 @@ +version: 2 +build: + os: ubuntu-24.04 + tools: + python: "3.12" + jobs: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv sync --group docs --frozen + - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html diff --git a/docs/Makefile b/docs/Makefile new file mode 100644 index 0000000..d4bb2cb --- /dev/null +++ b/docs/Makefile @@ -0,0 +1,20 @@ +# Minimal makefile for Sphinx documentation +# + +# You can set these variables from the command line, and also +# from the environment for the first two. +SPHINXOPTS ?= +SPHINXBUILD ?= sphinx-build +SOURCEDIR = . +BUILDDIR = _build + +# Put it first so that "make" without argument is like "make help". +help: + @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) + +.PHONY: help Makefile + +# Catch-all target: route all unknown targets to Sphinx using the new +# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). +%: Makefile + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..6383ca7 --- /dev/null +++ b/docs/conf.py @@ -0,0 +1,126 @@ +# SPDX-License-Identifier: LGPL-3.0-or-later +"""Configuration file for the Sphinx documentation builder.""" +# +# This file only contains a selection of the most common options. For a full +# list see the documentation: +# https://www.sphinx-doc.org/en/master/usage/configuration.html + +# -- Path setup -------------------------------------------------------------- + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +# +import os + +# import sys +# sys.path.insert(0, os.path.abspath('..')) +from datetime import datetime, timezone + +# -- Project information ----------------------------------------------------- + +project = "DeePMD-GNN" +copyright = f"2024-{datetime.now(tz=timezone.utc).year}, DeepModeling" +author = "Jinzhe Zeng" + + +# -- General configuration --------------------------------------------------- + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = [ + "sphinx.ext.autosummary", + "sphinx.ext.mathjax", + "sphinx.ext.viewcode", + "sphinx.ext.intersphinx", + # "sphinxarg.ext", + "myst_nb", + # "sphinx_favicon", + "deepmodeling_sphinx", + "dargs.sphinx", + # "sphinxcontrib.bibtex", + # "sphinx_design", + "autoapi.extension", +] + +# Add any paths that contain templates here, relative to this directory. +# templates_path = ['_templates'] + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +# This pattern also affects html_static_path and html_extra_path. +exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] + + +# -- Options for HTML output ------------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +# +html_theme = "pydata_sphinx_theme" +# html_logo = "_static/logo.svg" +html_static_path = ["_static"] +html_js_files = [] +html_css_files = ["css/custom.css"] +html_extra_path = ["report.html", "fire.png", "bundle.js", "bundle.css"] + +html_theme_options = { + "github_url": "https://github.com/deepmodeling/deepmd-gnn", + "gitlab_url": "https://gitlab.com/RutgersLBSR/deepmd-gnn", + "logo": { + "text": "DeePMD-GNN", + "alt_text": "DeePMD-GNN", + }, +} + +html_context = { + "github_user": "deepmodeling", + "github_repo": "deepmd-gnn", + "github_version": "master", + "doc_path": "docs", +} + +myst_heading_anchors = 3 + +# favicons = [ +# { +# "rel": "icon", +# "static-file": "logo.svg", +# "type": "image/svg+xml", +# }, +# ] + +enable_deepmodeling = False + +myst_enable_extensions = [ + "dollarmath", + "colon_fence", + "attrs_inline", +] +mathjax_path = ( + "https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.2/es5/tex-mml-chtml.min.js" +) +mathjax_options = { + "integrity": "sha512-6FaAxxHuKuzaGHWnV00ftWqP3luSBRSopnNAA2RvQH1fOfnF/A1wOfiUWF7cLIOFcfb1dEhXwo5VG3DAisocRw==", + "crossorigin": "anonymous", +} +mathjax3_config = { + "loader": {"load": ["[tex]/mhchem"]}, + "tex": {"packages": {"[+]": ["mhchem"]}}, +} + +execution_mode = "off" +numpydoc_show_class_members = False + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +# html_static_path = ['_static'] + +intersphinx_mapping = { + "numpy": ("https://docs.scipy.org/doc/numpy/", None), + "python": ("https://docs.python.org/", None), + "deepmd": ("https://docs.deepmodeling.com/projects/deepmd/", None), + "torch": ("https://pytorch.org/docs/stable/", None), +} diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..d393233 --- /dev/null +++ b/docs/index.rst @@ -0,0 +1,17 @@ +.. include:: ../README.md + :parser: myst_parser.sphinx_ + +Table of contents +================= +.. toctree:: + :maxdepth: 2 + + parameters + Python API + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/docs/parameters.rst b/docs/parameters.rst new file mode 100644 index 0000000..7e18b20 --- /dev/null +++ b/docs/parameters.rst @@ -0,0 +1,16 @@ +Parameters +========== + +MACE +---- + +..dargs:: + :module: deepmd_gnn.argcheck + :func: mace_model_args + +NequIP +------ + +..dargs:: + :module: deepmd_gnn.argcheck + :func: nequip_model_args diff --git a/pyproject.toml b/pyproject.toml index f0985a2..7f98d8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,15 @@ test = [ "dargs>=0.4.8", ] +[dependency-groups] +docs = [ + "sphinx", + "myst-parser", + "deepmodeling-sphinx>=0.3.0", + "sphinx-book-theme", + "dargs", +] + [tool.scikit-build] wheel.py-api = "py2.py3" metadata.version.provider = "scikit_build_core.metadata.setuptools_scm" From 057f6649e8001d999641f81a334ce74ee1f2810f Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:32:57 +0800 Subject: [PATCH 02/21] fix config Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 8f4c9c0..5183ea8 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,8 +4,9 @@ build: tools: python: "3.12" jobs: - - asdf plugin add uv - - asdf install uv latest - - asdf global uv latest - - uv sync --group docs --frozen - - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + install: + - asdf plugin add uv + - asdf install uv latest + - asdf global uv latest + - uv sync --group docs --frozen + - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From 36e66217e1e5e84b465a715a58807284a07f3e78 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 03:36:10 +0000 Subject: [PATCH 03/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 1 - docs/index.rst | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 6383ca7..8f664b4 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -11,7 +11,6 @@ # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # -import os # import sys # sys.path.insert(0, os.path.abspath('..')) diff --git a/docs/index.rst b/docs/index.rst index d393233..9bf637a 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -7,7 +7,7 @@ Table of contents :maxdepth: 2 parameters - Python API + Python API Indices and tables ================== From 1f91b9b8c65477f8f33b2e9e318584d8358bcbf8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:38:26 +0800 Subject: [PATCH 04/21] uv lock Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.readthedocs.yml b/.readthedocs.yml index 5183ea8..fa22524 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,5 +8,6 @@ build: - asdf plugin add uv - asdf install uv latest - asdf global uv latest + - uv lock - uv sync --group docs --frozen - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From fa5a6467fcdf981d5f0df014ba07d4bbb01e6753 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:46:10 +0800 Subject: [PATCH 05/21] readthedocs Signed-off-by: Jinzhe Zeng --- build_backend/dp_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_backend/dp_backend.py b/build_backend/dp_backend.py index 1542180..3a4daad 100644 --- a/build_backend/dp_backend.py +++ b/build_backend/dp_backend.py @@ -31,7 +31,7 @@ def __dir__() -> list[str]: def cibuildwheel_dependencies() -> list[str]: - if os.environ.get("CIBUILDWHEEL", "0") == "1": + if os.environ.get("CIBUILDWHEEL", "0") == "1" or os.environ.get("READTHEDOCS", "0") == "1": return [ "deepmd-kit[torch]>=3.0.0b2", ] From ab63cc5442a6b6ab2815684b7bb78bf4be34f327 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 03:46:26 +0000 Subject: [PATCH 06/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- build_backend/dp_backend.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_backend/dp_backend.py b/build_backend/dp_backend.py index 3a4daad..17aeb0a 100644 --- a/build_backend/dp_backend.py +++ b/build_backend/dp_backend.py @@ -31,7 +31,10 @@ def __dir__() -> list[str]: def cibuildwheel_dependencies() -> list[str]: - if os.environ.get("CIBUILDWHEEL", "0") == "1" or os.environ.get("READTHEDOCS", "0") == "1": + if ( + os.environ.get("CIBUILDWHEEL", "0") == "1" + or os.environ.get("READTHEDOCS", "0") == "1" + ): return [ "deepmd-kit[torch]>=3.0.0b2", ] From 90119d6b8edf426e61e457311fec0ee5e0d1f2c1 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:48:58 +0800 Subject: [PATCH 07/21] fix Signed-off-by: Jinzhe Zeng --- build_backend/dp_backend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_backend/dp_backend.py b/build_backend/dp_backend.py index 17aeb0a..fa21935 100644 --- a/build_backend/dp_backend.py +++ b/build_backend/dp_backend.py @@ -33,7 +33,7 @@ def __dir__() -> list[str]: def cibuildwheel_dependencies() -> list[str]: if ( os.environ.get("CIBUILDWHEEL", "0") == "1" - or os.environ.get("READTHEDOCS", "0") == "1" + or os.environ.get("READTHEDOCS", "0") == "True" ): return [ "deepmd-kit[torch]>=3.0.0b2", From 6bec0ff99a6389e1430f161f12c12f003131b774 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 11:51:14 +0800 Subject: [PATCH 08/21] fix pre-commit Signed-off-by: Jinzhe Zeng --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 8f664b4..1e88a53 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -60,7 +60,7 @@ html_theme = "pydata_sphinx_theme" # html_logo = "_static/logo.svg" html_static_path = ["_static"] -html_js_files = [] +html_js_files: list[str] = [] html_css_files = ["css/custom.css"] html_extra_path = ["report.html", "fire.png", "bundle.js", "bundle.css"] From 2f96d0b9066e98b9b99c8e028c78121ba44e98de Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 13:57:30 +0800 Subject: [PATCH 09/21] fix ruff Signed-off-by: Jinzhe Zeng --- docs/conf.py | 2 +- pyproject.toml | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 1e88a53..2ab2f0f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,7 +19,7 @@ # -- Project information ----------------------------------------------------- project = "DeePMD-GNN" -copyright = f"2024-{datetime.now(tz=timezone.utc).year}, DeepModeling" +copyright = f"2024-{datetime.now(tz=timezone.utc).year}, DeepModeling" # noqa: A001 author = "Jinzhe Zeng" diff --git a/pyproject.toml b/pyproject.toml index 7f98d8e..a85b6de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -105,6 +105,10 @@ convention = "numpy" "D101", "D102", ] +"docs/conf.py" = [ + "ERA001", + "INP001", +] [tool.coverage.report] include = ["deepmd_gnn/*"] From 3ca00b6b6bbcbf89b693e05696f181af50f2927f Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:05:55 +0800 Subject: [PATCH 10/21] fx Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 4 ++-- pyproject.toml | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index fa22524..7369ba7 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,6 @@ build: - asdf plugin add uv - asdf install uv latest - asdf global uv latest - - uv lock - - uv sync --group docs --frozen + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") uv pip install -e .[docs] - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html diff --git a/pyproject.toml b/pyproject.toml index a85b6de..d4d3c17 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,8 +51,6 @@ test = [ 'pytest-cov', "dargs>=0.4.8", ] - -[dependency-groups] docs = [ "sphinx", "myst-parser", From 1acc39c09e4f6181dcc1357536bf93b5e51f97a9 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:12:42 +0800 Subject: [PATCH 11/21] env Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7369ba7..d277b9c 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,4 +10,4 @@ build: - asdf global uv latest - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") uv pip install -e .[docs] - - uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From 122c4ea431497b02bf8722aecb35dba1ac75f3c7 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:16:53 +0800 Subject: [PATCH 12/21] sphinx Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index d277b9c..564392b 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,4 +10,4 @@ build: - asdf global uv latest - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") uv pip install -e .[docs] - - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + - sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From a344ebd4c637133527b7b61cc5a390f69fece6da Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:20:21 +0800 Subject: [PATCH 13/21] kk Signed-off-by: Jinzhe Zeng --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 564392b..9630552 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -10,4 +10,4 @@ build: - asdf global uv latest - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install deepmd-kit[torch]>=3.0.0b2 --extra-index-url https://download.pytorch.org/whl/cpu - VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH CMAKE_PREFIX_PATH=$(python -c "import torch;print(torch.utils.cmake_prefix_path)") uv pip install -e .[docs] - - sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html + - $READTHEDOCS_VIRTUALENV_PATH/bin/python -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html From dc23af82bd22a7e6c3d403cae33b286252b14ed7 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:23:46 +0800 Subject: [PATCH 14/21] myst parser Signed-off-by: Jinzhe Zeng --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 2ab2f0f..df27f7d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -34,7 +34,7 @@ "sphinx.ext.viewcode", "sphinx.ext.intersphinx", # "sphinxarg.ext", - "myst_nb", + "myst_parser", # "sphinx_favicon", "deepmodeling_sphinx", "dargs.sphinx", From f348576487cc766caf5b2b231514798e9a8be09f Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:33:52 +0800 Subject: [PATCH 15/21] autoapi Signed-off-by: Jinzhe Zeng --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index d4d3c17..0af223f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ test = [ ] docs = [ "sphinx", + "sphinx-autoapi", "myst-parser", "deepmodeling-sphinx>=0.3.0", "sphinx-book-theme", From d7cf8de65e8d239688d9ca1f7ff753528cbc76ee Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:49:07 +0800 Subject: [PATCH 16/21] Add autoapi directory for deepmd_gnn documentation Signed-off-by: Jinzhe Zeng --- docs/conf.py | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/conf.py b/docs/conf.py index df27f7d..8d279be 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -123,3 +123,4 @@ "deepmd": ("https://docs.deepmodeling.com/projects/deepmd/", None), "torch": ("https://pytorch.org/docs/stable/", None), } +autoapi_dirs = ["deepmd_gnn"] \ No newline at end of file From 94bfa76b3637d027c2b798bfb5ab3a4b5ece4cde Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 4 Jan 2025 06:49:23 +0000 Subject: [PATCH 17/21] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 8d279be..5e1eef9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -123,4 +123,4 @@ "deepmd": ("https://docs.deepmodeling.com/projects/deepmd/", None), "torch": ("https://pytorch.org/docs/stable/", None), } -autoapi_dirs = ["deepmd_gnn"] \ No newline at end of file +autoapi_dirs = ["deepmd_gnn"] From 6512797b0e5dc45baec8fdc312a8acd4d75c0d15 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 14:56:04 +0800 Subject: [PATCH 18/21] Update autoapi directory path in documentation configuration Signed-off-by: Jinzhe Zeng --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 5e1eef9..88bbbfa 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -123,4 +123,4 @@ "deepmd": ("https://docs.deepmodeling.com/projects/deepmd/", None), "torch": ("https://pytorch.org/docs/stable/", None), } -autoapi_dirs = ["deepmd_gnn"] +autoapi_dirs = ["../deepmd_gnn"] From 42670b6f9089f4ebeda50bf6693f13a51d9c4ca8 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 15:08:02 +0800 Subject: [PATCH 19/21] use book theme Signed-off-by: Jinzhe Zeng --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 88bbbfa..8678512 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -57,7 +57,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = "pydata_sphinx_theme" +html_theme = "sphinx_book_theme" # html_logo = "_static/logo.svg" html_static_path = ["_static"] html_js_files: list[str] = [] From 3df05f61a70a043a73cb32ce149c08d3ba9d4a5d Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 15:09:09 +0800 Subject: [PATCH 20/21] Fix indentation in parameters.rst for consistency Signed-off-by: Jinzhe Zeng --- docs/parameters.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/parameters.rst b/docs/parameters.rst index 7e18b20..2454461 100644 --- a/docs/parameters.rst +++ b/docs/parameters.rst @@ -5,12 +5,12 @@ MACE ---- ..dargs:: - :module: deepmd_gnn.argcheck - :func: mace_model_args + :module: deepmd_gnn.argcheck + :func: mace_model_args NequIP ------ ..dargs:: - :module: deepmd_gnn.argcheck - :func: nequip_model_args + :module: deepmd_gnn.argcheck + :func: nequip_model_args From 1d6076a825594b2f4211eabb13f62e96d857d113 Mon Sep 17 00:00:00 2001 From: Jinzhe Zeng Date: Sat, 4 Jan 2025 15:12:59 +0800 Subject: [PATCH 21/21] dargs Signed-off-by: Jinzhe Zeng --- docs/index.rst | 1 + docs/parameters.rst | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/index.rst b/docs/index.rst index 9bf637a..21ddec1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,7 @@ Table of contents .. toctree:: :maxdepth: 2 + Overview parameters Python API diff --git a/docs/parameters.rst b/docs/parameters.rst index 2454461..84afb72 100644 --- a/docs/parameters.rst +++ b/docs/parameters.rst @@ -4,13 +4,13 @@ Parameters MACE ---- -..dargs:: +.. dargs:: :module: deepmd_gnn.argcheck :func: mace_model_args NequIP ------ -..dargs:: +.. dargs:: :module: deepmd_gnn.argcheck :func: nequip_model_args