Skip to content

Commit ea8a419

Browse files
author
Han Wang
committed
merge devel into master
2 parents b36cf59 + 3bc3269 commit ea8a419

File tree

143 files changed

+9070
-569
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+9070
-569
lines changed

.github/workflows/mirror_gitee.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Mirror to Gitee Repo
2+
3+
on: [ push, delete, create ]
4+
5+
# Ensures that only one mirror task will run at a time.
6+
concurrency:
7+
group: git-mirror
8+
9+
jobs:
10+
git-mirror:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: wearerequired/git-mirror-action@v1
14+
env:
15+
ORGANIZATION: deepmodeling
16+
SSH_PRIVATE_KEY: ${{ secrets.SYNC_GITEE_PRIVATE_KEY }}
17+
with:
18+
source-repo: "git@github.com:deepmodeling/dpgen.git"
19+
destination-repo: "git@gitee.com:deepmodeling/dpgen.git"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ dpgen.egg-info
3939
dbconfig.json
4040
.vscode/*
4141
.idea/*
42+
_build

README.md

Lines changed: 199 additions & 85 deletions
Large diffs are not rendered by default.

doc/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = .
9+
BUILDDIR = _build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

doc/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# How to contribute
2+
3+
- If you want to add the documentation of a toy model, simply put your file in the directory doc/toymodels/ and push;
4+
- If you want to add a new directory for a new category of instructions, make a new directory and add it in doc/index.rst.

doc/conf.py

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
# Configuration file for the Sphinx documentation builder.
2+
#
3+
# This file only contains a selection of the most common options. For a full
4+
# list see the documentation:
5+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
6+
7+
# -- Path setup --------------------------------------------------------------
8+
9+
# If extensions (or modules to document with autodoc) are in another directory,
10+
# add these directories to sys.path here. If the directory is relative to the
11+
# documentation root, use os.path.abspath to make it absolute, like shown here.
12+
#
13+
import os
14+
import subprocess
15+
# import sys
16+
import recommonmark
17+
from recommonmark.transform import AutoStructify
18+
19+
20+
# -- Project information -----------------------------------------------------
21+
22+
project = 'DPGEN'
23+
copyright = '2020, Deep Potential'
24+
author = 'Deep Potential'
25+
26+
27+
# -- General configuration ---------------------------------------------------
28+
29+
# Add any Sphinx extension module names here, as strings. They can be
30+
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
31+
# ones.
32+
# extensions = [
33+
# 'recommonmark',
34+
# "sphinx_rtd_theme",
35+
# 'myst_parser',
36+
# 'sphinx_markdown_tables',
37+
# 'sphinx.ext.autosummary'
38+
# ]
39+
40+
extensions = [
41+
"sphinx_rtd_theme",
42+
'myst_parser',
43+
'sphinx.ext.autosummary',
44+
]
45+
46+
47+
# Tell sphinx what the primary language being documented is.
48+
primary_domain = 'cpp'
49+
50+
# Tell sphinx what the pygments highlight language should be.
51+
highlight_language = 'cpp'
52+
53+
#
54+
myst_heading_anchors = 4
55+
56+
# Add any paths that contain templates here, relative to this directory.
57+
templates_path = ['_templates']
58+
59+
# List of patterns, relative to source directory, that match files and
60+
# directories to ignore when looking for source files.
61+
# This pattern also affects html_static_path and html_extra_path.
62+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
63+
64+
65+
# -- Options for HTML output -------------------------------------------------
66+
67+
# The theme to use for HTML and HTML Help pages. See the documentation for
68+
# a list of builtin themes.
69+
#
70+
html_theme = 'sphinx_rtd_theme'
71+
72+
# Add any paths that contain custom static files (such as style sheets) here,
73+
# relative to this directory. They are copied after the builtin static files,
74+
# so a file named "default.css" will overwrite the builtin "default.css".
75+
# html_static_path = ['_static']
76+
# html_css_files = ['css/custom.css']
77+
78+
autodoc_default_flags = ['members']
79+
autosummary_generate = True
80+
master_doc = 'index'

doc/index.rst

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
==========================
2+
DPGEN's documentation
3+
==========================
4+
5+
.. _tutorial:
6+
7+
.. toctree::
8+
:maxdepth: 2
9+
:caption: Tutorial
10+
:glob:
11+
12+
toymodels/*
13+
14+
15+
.. _Contribution:
16+
17+
.. toctree::
18+
:maxdepth: 2
19+
:caption: Contribution Guild
20+
21+
README.md
22+
23+
* :ref:`genindex`
24+
* :ref:`modindex`
25+
* :ref:`search`
26+
27+
.. _feedback:
28+
.. _affiliated packages:

doc/make.bat

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=.
11+
set BUILDDIR=_build
12+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

doc/requirements.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
sphinx==3.2.1
2+
recommonmark==0.7.1
3+
sphinx_rtd_theme==0.5.2
4+
sphinx_markdown_tables==0.0.15
5+
myst-parser==0.13.7

doc/toymodels/black.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# This is a blank file to test sphinx-build

0 commit comments

Comments
 (0)