Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ build:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r doc/requirements.txt
apt_packages:
- inkscape
formats: all
formats:
- pdf
33 changes: 3 additions & 30 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,36 +32,8 @@
copyright = "2017-%d, DeepModeling" % date.today().year
author = "DeepModeling"


def run_apidoc(_):
import sys

from sphinx.ext.apidoc import (
main,
)

sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
cur_dir = os.path.abspath(os.path.dirname(__file__))
module = os.path.join(cur_dir, "..")
main(
[
"-M",
"--tocfile",
"api_py",
"-H",
"Python API",
"-o",
os.path.join(cur_dir, "api_py"),
module,
"source/*",
"--force",
]
)


def setup(app):
# Add hook for building doxygen xml when needed
app.connect("builder-inited", run_apidoc)
autoapi_dirs = ["../deepmd"]
autoapi_add_toctree_entry = False


# -- General configuration ---------------------------------------------------
Expand Down Expand Up @@ -94,6 +66,7 @@ def setup(app):
"exhale",
"sphinxcontrib.bibtex",
"sphinx_design",
"autoapi.extension",
]

# breathe_domain_by_extension = {
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ DeePMD-kit is a package written in Python/C++, designed to minimize the effort r
development/type-embedding
development/coding-conventions
development/cicd
api_py/api_py
Python API <autoapi/deepmd/index>
api_op
API_CC/api_cc
api_c/api_c
Expand Down
2 changes: 1 addition & 1 deletion doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.[docs,cpu,torch]
exhale @ https://github.com/svenevs/exhale/archive/2759a394268307b88f5440487ae0920ee4ebf81e.zip
# https://github.com/mcmtroffaes/sphinxcontrib-bibtex/issues/309
docutils!=0.18.*,!=0.19.*
sphinx>=7
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,19 +79,19 @@ test = [
docs = [
"sphinx>=3.1.1",
"sphinx_rtd_theme>=1.0.0rc1",
"sphinx_markdown_tables",
"myst-nb>=1.0.0rc0",
"myst-parser>=0.19.2",
"sphinx-design",
"breathe",
"exhale",
"exhale>=0.3.7",
"numpydoc",
"ase",
"deepmodeling-sphinx>=0.1.0",
"dargs>=0.3.4",
"sphinx-argparse",
"pygments-lammps",
"sphinxcontrib-bibtex",
"sphinx-autoapi>=3.0.0",
]
lmp = [
"lammps~=2023.8.2.3.0",
Expand Down