Skip to content

Commit

Permalink
merge devel to master (v0.13.0) (#1676)
Browse files Browse the repository at this point in the history
  • Loading branch information
njzjz authored Nov 23, 2024
2 parents 6943db5 + c4f05db commit e02e6a2
Show file tree
Hide file tree
Showing 142 changed files with 959 additions and 953 deletions.
3 changes: 3 additions & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node: $Format:%H$
node-date: $Format:%cI$
describe-name: $Format:%(describe:tags=true,match=*[0-9]*)$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
30 changes: 2 additions & 28 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,42 +6,16 @@ on:
- 'v*'

jobs:
conda-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: publish-to-conda
uses: felix5572/conda-publish-action@v1.9
with:
subdir: 'conda'
anacondatoken: ${{ secrets.ANACONDA_TOKEN }}
platforms: 'noarch'
construct-and-publish:
runs-on: ubuntu-latest
needs: conda-publish
steps:
- uses: actions/checkout@master
- uses: s-weigand/setup-conda@v1
- run: conda install constructor jinja2 -y
- run: constructor ./conda
- name: Upload to release
uses: softprops/action-gh-release@master
if: startsWith(github.ref, 'refs/tags/')
with:
files: dpgen-*.sh
repository: ${{ env.GITHUB_REPOSITORY }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release-to-pypi:
name: Release to pypi
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.x
architecture: x64
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ jobs:
python-version: ["3.9", "3.12"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: pip install uv
- name: Install dependencies
run: pip install -e .[test]
run: uv pip install --system -e .[test]
- name: Test
run: coverage run --source=./dpgen -m unittest -v && coverage report
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
pass:
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
# there are many log files in tests
# TODO: seperate py files and log files
Expand All @@ -28,7 +28,7 @@ repos:

# Python
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
rev: v0.7.4
hooks:
- id: ruff
args: ["--fix"]
Expand Down
11 changes: 5 additions & 6 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ build:
os: ubuntu-22.04
tools:
python: "3.10"

jobs:
post_create_environment:
- pip install uv
post_install:
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH uv pip install -r doc/requirements.txt
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
formats: all

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: doc/requirements.txt
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ For detailed usage and parameters, read [DP-GEN documentation](https://docs.deep

* [Tutorials](https://tutorials.deepmodeling.com/en/latest/Tutorials/DP-GEN/): basic tutorials for DP-GEN.
* [Examples](examples): input files in [JSON](https://docs.python.org/3/library/json.html) format.
* [Publications](https://deepmodeling.com/blog/papers/dpgen/): Published research articles using DP-GEN.
* [Publications](https://blogs.deepmodeling.com/papers/dpgen/): Published research articles using DP-GEN.
* [User guide](https://docs.deepmodeling.com/projects/dpgen/en/latest/user-guide/): frequently asked questions listed in troubleshooting.

## License
Expand Down
5 changes: 0 additions & 5 deletions conda/conda_build_config.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions conda/construct.yaml

This file was deleted.

60 changes: 0 additions & 60 deletions conda/meta.yaml

This file was deleted.

12 changes: 9 additions & 3 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
# ones.
# extensions = [
# 'recommonmark',
# "sphinx_rtd_theme",
# "sphinx_book_theme",
# 'myst_parser',
# 'sphinx_markdown_tables',
# 'sphinx.ext.autosummary'
Expand All @@ -39,7 +39,7 @@
extensions = [
"deepmodeling_sphinx",
"dargs.sphinx",
"sphinx_rtd_theme",
"sphinx_book_theme",
"myst_parser",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
Expand Down Expand Up @@ -71,14 +71,20 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme = "sphinx_book_theme"
html_logo = "_static/logo.svg"

# 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"]
html_css_files = ["css/custom.css"]
html_theme_options = {
"logo": {
"image_light": "_static/logo.svg",
"image_dark": "_static/logo-dark.svg",
}
}

autodoc_default_flags = ["members"]
autosummary_generate = True
Expand Down
2 changes: 1 addition & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ DPGEN's documentation
:glob:

Tutorials <https://tutorials.deepmodeling.com/en/latest/Tutorials/DP-GEN/>
Publications <https://deepmodeling.com/blog/papers/dpgen/>
Publications <https://blogs.deepmodeling.com/papers/dpgen/>

.. _user-guide:

Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-bulk-jdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_bulk parameters
======================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-bulk>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-bulk>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-bulk-mdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_bulk machine parameters
==================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-bulk-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-bulk-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-reaction-jdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_reaction parameters
======================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-reaction>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-reaction>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-reaction-mdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_reaction machine parameters
======================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-reaction-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-reaction-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-surf-jdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_surf parameters
======================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-surf>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-surf>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/init/init-surf-mdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen init_surf machine parameters
==================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-init-surf-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-init-surf-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.data.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/overview/code-structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Let's look at the home page of DP-GEN. https://github.com/deepmodeling/dpgen
- `tests` : unittest tools for developers.
- `examples`: templates for PARAM and MACHINE files for different software, versions and tasks.
For details of the parameters in PARAM, you can refer to `TASK parameters` chapters in this document.
If you are confused about how to set up a JSON file, you can also use [dpgui](https://mobile.deepmodeling.com/dpgui/)
If you are confused about how to set up a JSON file, you can also use [dpgui](https://mobile.dpgui.deepmodeling.com/)

Most of the code related to DP-GEN functions is in the `dpgen` directory. Open the `dpgen` directory, and we can see
````
Expand Down
6 changes: 3 additions & 3 deletions doc/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# https://github.com/sphinx-doc/sphinx/issues/11662
sphinx>=4.0.2,!=7.2.5
recommonmark
sphinx_rtd_theme
sphinx-book-theme
sphinx_markdown_tables
sphinx-argparse
sphinx-argparse<0.5.0
myst-parser
deepmodeling_sphinx>=0.1.1
deepmodeling-sphinx>=0.3.0
dargs>=0.3.1
numpydoc
.
2 changes: 1 addition & 1 deletion doc/run/mdata.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
dpgen run machine parameters
============================
.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.generator.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/run/param.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ dpgen run param parameters
=============================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-run>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-run>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.generator.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/simplify/simplify-jdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen simplify parameters
=========================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-simplify>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-simplify>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.simplify.arginfo
Expand Down
2 changes: 1 addition & 1 deletion doc/simplify/simplify-mdata.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ dpgen simplify machine parameters
=================================

.. note::
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://deepmodeling.com/dpgui/input/dpgen-simplify-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.
One can load, modify, and export the input file by using our effective web-based tool `DP-GUI <https://dpgui.deepmodeling.com/input/dpgen-simplify-machine>`_ online or hosted using the :ref:`command line interface <cli>` :code:`dpgen gui`. All parameters below can be set in DP-GUI. By clicking "SAVE JSON", one can download the input file.

.. dargs::
:module: dpgen.simplify.arginfo
Expand Down
1 change: 0 additions & 1 deletion doc/simplify/simplify.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Here is an example of `param.json` for QM7 dataset:
"limit_pref_pf": 0
},
"training": {
"set_prefix": "set",
"numb_steps": 10000,
"disp_file": "lcurve.out",
"disp_freq": 1000,
Expand Down
1 change: 1 addition & 0 deletions dpgen/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# dlogf_formatter=logging.Formatter('%(asctime)s - %(name)s - [%(filename)s:%(funcName)s - %(lineno)d ] - %(levelname)s \n %(message)s')
dlogf.setFormatter(dlogf_formatter)
dlog.addHandler(dlogf)
logging.basicConfig(level=logging.WARNING)

__author__ = "Han Wang"
__copyright__ = "Copyright 2019"
Expand Down
Loading

0 comments on commit e02e6a2

Please sign in to comment.