Skip to content

Commit

Permalink
Included exhale to make prettier C++ API.
Browse files Browse the repository at this point in the history
  • Loading branch information
tuoping authored and tuoping committed May 27, 2021
1 parent 6dee7d7 commit 9bc6788
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 23 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ venv*
.vscode/**
_build
_templates
API_CC
4 changes: 2 additions & 2 deletions doc/development/api.rst → doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
API
===
Python API
==========

.. toctree::
:maxdepth: 2
Expand Down
29 changes: 25 additions & 4 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,36 @@ def setup(app):
"sphinx_rtd_theme",
'myst_parser',
'sphinx.ext.autosummary',
'breathe'
'breathe',
'exhale'
]

breathe_domain_by_extension = {
"h" : "cpp",
}
# breathe_domain_by_extension = {
# "h" : "cpp",
# }
breathe_projects = {"myproject": "_build/xml/"}
breathe_default_project = "myproject"

exhale_args = {
"containmentFolder": "./API_CC",
"rootFileName": "api_cc.rst",
"rootFileTitle": "C++ API",
"doxygenStripFromPath": "..",
# Suggested optional arguments
# "createTreeView": True,
# TIP: if using the sphinx-bootstrap-theme, you need
# "treeViewIsBootstrap": True,
# "exhaleExecutesDoxygen": True,
# "exhaleDoxygenStdin": "INPUT = ../include"
}

# Tell sphinx what the primary language being documented is.
primary_domain = 'cpp'

# Tell sphinx what the pygments highlight language should be.
highlight_language = 'cpp'

#
myst_heading_anchors = 4

# Add any paths that contain templates here, relative to this directory.
Expand Down
14 changes: 0 additions & 14 deletions doc/development/api_cc.rst

This file was deleted.

4 changes: 2 additions & 2 deletions doc/development/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Developer Guide

- [API](api.rst)
- [API of C++](api_cc.rst)
- [Python API](../api.rst)
- [C++ API](../API_CC/api_cc.rst)
- [Coding Conventions](coding-conventions.rst)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
cmake_minimum_required_version="3.0",
extras_require={
"test": ["dpdata>=0.1.9", "ase", "pytest", "pytest-cov", "pytest-sugar"],
"docs": ["sphinx", "recommonmark", "sphinx_rtd_theme", "sphinx_markdown_tables", "myst-parser", "breathe"],
"docs": ["sphinx", "recommonmark", "sphinx_rtd_theme", "sphinx_markdown_tables", "myst-parser", "breathe", "exhale"],
**extras_require,
},
entry_points={"console_scripts": ["dp = deepmd.entrypoints.main:main"]},
Expand Down

0 comments on commit 9bc6788

Please sign in to comment.