Skip to content

Commit 4f998c4

Browse files
njzjznjzjz-botpre-commit-ci[bot]
authored
docs: migrate admonitions to GFM alerts (#5886)
## Summary - enable the MyST `alert` extension and require MyST-Parser 5.1.0 with Sphinx 8+ - migrate 83 fenced admonitions across 54 Markdown files to GitHub-style alerts while preserving nested directives - map the former `danger` admonitions to GFM `CAUTION` alerts - align the documentation Python environment with the MyST-Parser 5.1 requirement ## Validation - `ruff check .` - `ruff format --check .` - `mdformat` pre-commit hook - representative Sphinx HTML build with MyST-Parser 5.1.0 and myst-nb 1.4.0 - TOML and YAML parsing - alert migration count and legacy directive checks - `git diff --check` Reference: - executablebooks/MyST-Parser#1128 Coding agent: Codex Codex version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning effort: xhigh <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Standardized notes, warnings, cautions, and important notices across the documentation for clearer, more consistent rendering. * Expanded DPA-2 guidance for graph-based inference, evaluation, training, legacy routing, and cutoff smoothness. * Clarified documentation build requirements, including Python 3.11+, Sphinx 8, MyST-Parser 5.1, and Doxygen. * **Chores** * Updated the documentation environment and tooling requirements to current supported versions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: njzjz-bot <njzjz.bot@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 7c1c5eb commit 4f998c4

59 files changed

Lines changed: 260 additions & 344 deletions

Some content is hidden

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

doc/README

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
To run the HTML documentation build, doxygen have to be installed.
1+
Building the documentation requires Python 3.11 or newer because the `docs`
2+
extra uses MyST-Parser 5.1 and Sphinx 8. Doxygen must also be installed to build
3+
the HTML documentation.

doc/backend.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ The `.pd` extension is used for model checkpoint storage, which is commonly util
4545

4646
### DP {{ dpmodel_icon }}
4747

48-
:::{note}
49-
This backend is only for development and should not take into production.
50-
:::
48+
> [!NOTE]
49+
> This backend is only for development and should not take into production.
5150
5251
- Model filename extension: `.dp`, `.yaml`, `.yml`
5352

doc/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@
201201
"https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.0/es5/tex-mml-chtml.min.js"
202202
)
203203
myst_enable_extensions = [
204+
"alert",
204205
"dollarmath",
205206
"colon_fence",
206207
"substitution",

doc/data/system.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,8 @@ In general, we always use the following convention of units:
5050

5151
## Mixed type
5252

53-
:::{note}
54-
Only the [DPA-1](../model/train-se-atten.md) and [DPA-2](../model/dpa2.md) descriptors support this format.
55-
:::
53+
> [!NOTE]
54+
> Only the [DPA-1](../model/train-se-atten.md) and [DPA-2](../model/dpa2.md) descriptors support this format.
5655
5756
In the standard data format, only those frames with the same fingerprint (i.e. the number of atoms of different elements) can be put together as a unified system.
5857
This may lead to sparse frame numbers in those rare systems.

doc/development/create-a-model-pt.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Create a model in other backends {{ pytorch_icon }} {{ dpmodel_icon }}
22

3-
:::{note}
4-
**Supported backends**: PyTorch {{ pytorch_icon }}, DP {{ dpmodel_icon }}
5-
6-
In the following context, we use the PyTorch backend as the example, while it also applies to other backends listed above.
7-
:::
3+
> [!NOTE]
4+
> **Supported backends**: PyTorch {{ pytorch_icon }}, DP {{ dpmodel_icon }}
5+
>
6+
> In the following context, we use the PyTorch backend as the example, while it also applies to other backends listed above.
87
98
If you'd like to create a new model that isn't covered by the existing DeePMD-kit library, but reuse DeePMD-kit's other efficient modules such as data processing, trainer, etc, you may want to read this section.
109

doc/development/type-embedding.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,5 @@ build -> _pass_filter -> _filter -> _filter_lower
8686

8787
In `fitting net`, it takes the descriptor vector as input, whose dimension is \[natoms, $M_1\times M_2$\]. Because we need to involve information on the centric atom in this step, we need to generate a matrix named `atype_embed` (of dim [natoms, nchanl]), in which each row is the type embedding vector of the specific centric atom. The input is sorted by type of centric atom, we also know the number of a particular atom type (stored in `natoms[2+i]`), thus we get the type vector of the centric atom. In the build phase of the fitting net, it will check whether type embedding exists in `input_dict` and fetch them. After that, call `embed_atom_type` function to look up the embedding vector for the type vector of the centric atom to obtain `atype_embed`, and concat input with it ([input, atype_embed]). The modified input goes through `fitting` net\` to get predicted energy.
8888

89-
:::{note}
90-
You can't apply the compression method while using atom-type embedding.
91-
:::
89+
> [!NOTE]
90+
> You can't apply the compression method while using atom-type embedding.

doc/env.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Runtime environment variables
22

3-
:::{note}
4-
For build-time environment variables, see [Install from source code](./install/install-from-source.md).
5-
:::
3+
> [!NOTE]
4+
> For build-time environment variables, see [Install from source code](./install/install-from-source.md).
65
76
## All interfaces
87

doc/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ channels:
44
- defaults
55
dependencies:
66
- doxygen>=1.9.1
7-
- python=3.10
7+
- python=3.11
88
- pip>=20.1
99
- pip:
1010
- ..[docs,cpu,torch]

doc/freeze/compress.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Compress a model {{ tensorflow_icon }} {{ pytorch_icon }}
22

3-
:::{note}
4-
**Supported backends**: TensorFlow {{ tensorflow_icon }}, PyTorch {{ pytorch_icon }}
5-
:::
3+
> [!NOTE]
4+
> **Supported backends**: TensorFlow {{ tensorflow_icon }}, PyTorch {{ pytorch_icon }}
65
76
## Theory
87

doc/inference/cxx.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# C/C++ interface
22

3-
:::{note}
4-
See [Environment variables](../env.md) for the runtime environment variables.
5-
:::
3+
> [!NOTE]
4+
> See [Environment variables](../env.md) for the runtime environment variables.
65
76
## C++ interface
87

0 commit comments

Comments
 (0)