docs: migrate admonitions to GFM alerts#5886
Conversation
Enable MyST-Parser alert support and use the native Read the Docs uv pip installer. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
for more information, see https://pre-commit.ci
There was a problem hiding this comment.
Pull request overview
This PR updates DeePMD-kit’s documentation toolchain and Markdown authoring style by enabling MyST’s alert extension, bumping the doc build dependencies (Sphinx/MyST-Parser), and migrating MyST fenced admonitions (:::{note} / :::{warning} / ::::{danger}) to GitHub-flavored Markdown (GFM) alert blocks (> [!NOTE], > [!WARNING], > [!CAUTION], etc.), including cases with nested directives.
Changes:
- Enable MyST
alertand migrate many doc admonitions from colon-fenced directives to GFM alerts (including mapping formerdangerblocks toCAUTION). - Bump doc build requirements to
sphinx>=8andmyst-parser>=5.1.0(and aligndoc/requirements.txt). - Update Read the Docs config to use native
uvinstall configuration and remove the prior post-install steps / Inkscape dependency.
Reviewed changes
Copilot reviewed 59 out of 59 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
pyproject.toml |
Raises doc extra requirements (sphinx>=8, myst-parser>=5.1.0) to support MyST alerts on Sphinx 8+. |
doc/requirements.txt |
Aligns docs requirements with sphinx>=8. |
doc/conf.py |
Enables MyST alert extension for GFM alert parsing. |
.readthedocs.yml |
Switches RTD installs to native uv configuration and removes previous job hooks / apt packages. |
doc/environment.yml |
Updates the docs conda environment to Python 3.11. |
doc/env.md |
Converts a note admonition to a GFM alert block. |
doc/backend.md |
Converts a note admonition to a GFM alert block. |
doc/train/training.md |
Converts a warning admonition to a GFM alert block. |
doc/train/tensorboard.md |
Converts a supported-backends note to a GFM alert block. |
doc/train/parallel-training.md |
Converts note admonitions (including multi-paragraph content) to GFM alert blocks. |
doc/train/multi-task-training.md |
Converts note/warning admonitions to GFM alert blocks. |
doc/train/finetuning.md |
Converts warning/note admonitions (including code-fence content) to GFM alert blocks. |
doc/third-party/nvalchemi.md |
Converts a supported-backends note to a GFM alert block. |
doc/third-party/lammps-command.md |
Converts multiple notes to GFM alert blocks. |
doc/third-party/jaxmd.md |
Converts a note admonition to a GFM alert block. |
doc/third-party/ipi.md |
Converts a note admonition to a GFM alert block. |
doc/third-party/gromacs.md |
Converts an important admonition (with nested deprecated) to a GFM alert block. |
doc/third-party/dpdata.md |
Converts a note admonition to a GFM alert block. |
doc/third-party/ase.md |
Converts a note admonition to a GFM alert block. |
doc/nvnmd/nvnmd.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-e3.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-e3-tebd.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-e2-r.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-e2-a.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-e2-a-tebd.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-se-atten.md |
Converts supported-backends and other notes to GFM alert blocks. |
doc/model/train-se-a-mask.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-hybrid.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-fitting-tensor.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-fitting-property.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-fitting-population.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-fitting-dos.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/train-energy.md |
Converts supported-backends notes to GFM alert blocks. |
doc/model/train-energy-spin.md |
Converts warning/note admonitions (including list content) to GFM alert blocks. |
doc/model/train-energy-hessian.md |
Converts note/warning admonitions to GFM alert blocks. |
doc/model/pairtab.md |
Converts notes to GFM alert blocks. |
doc/model/overall.md |
Converts a warning admonition to a GFM alert block. |
doc/model/linear.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/dprc.md |
Converts supported-backends notes to GFM alert blocks. |
doc/model/dplr.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/dpa4.md |
Converts notes/important admonitions to GFM alert blocks. |
doc/model/dpa3.md |
Converts a supported-backends note to a GFM alert block. |
doc/model/dpa2.md |
Converts two long notes (with lists) to GFM alert blocks. |
doc/model/change-bias.md |
Converts a supported-backends note to a GFM alert block. |
doc/install/install-lammps.md |
Converts a note (with code example) to a GFM alert block. |
doc/install/install-gromacs.md |
Converts a former danger admonition (with nested deprecated) to a CAUTION GFM alert block. |
doc/install/install-from-source.md |
Converts a warning admonition to a GFM alert block. |
doc/install/install-from-c-library.md |
Converts a supported-backends note to a GFM alert block. |
doc/install/easy-install.md |
Converts multiple notes/danger/warning admonitions to GFM alert blocks (CAUTION for former danger). |
doc/install/easy-install-dev.md |
Converts a supported-backends note to a GFM alert block. |
doc/install/build-conda.md |
Converts a former danger admonition (deprecated notice) to a CAUTION GFM alert block. |
doc/inference/python.md |
Converts multiple notes to GFM alert blocks. |
doc/inference/nodejs.md |
Converts a note admonition to a GFM alert block. |
doc/inference/embedding.md |
Converts a supported-backends note to a GFM alert block. |
doc/inference/cxx.md |
Converts a note admonition to a GFM alert block. |
doc/freeze/compress.md |
Converts a supported-backends note to a GFM alert block. |
doc/development/type-embedding.md |
Converts a note admonition to a GFM alert block. |
doc/development/create-a-model-pt.md |
Converts a supported-backends note (multi-paragraph) to a GFM alert block. |
doc/data/system.md |
Converts a note admonition to a GFM alert block. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe documentation build now targets Python 3.11 with Sphinx 8 and MyST Parser 5.1. Documentation notes, warnings, cautions, and important notices are converted to Markdown alert syntax across the documentation, with expanded DPA-2 routing guidance. ChangesDocumentation build and general alerts
Installation documentation alerts
Model documentation alerts
Training and third-party documentation alerts
Estimated code review effort: 2 (Simple) | ~15 minutes Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@doc/install/easy-install.md`:
- Around line 10-11: In the Markdown alert block around the second [!NOTE],
remove the blockquote marker from the blank separator line so it is an unquoted
empty line, keeping the two alerts as separate blocks.
In `@doc/model/dpa2.md`:
- Around line 104-113: Remove the blank blockquote line between the two
paragraphs in the alert note, keeping the surrounding `> [!NOTE]` content and
paragraph text unchanged so the blockquote has no empty line and satisfies
MD028.
In `@doc/third-party/gromacs.md`:
- Around line 3-7: Resolve the MD028 alert-spacing violations by removing the
empty quoted line inside the IMPORTANT alert at doc/third-party/gromacs.md lines
3-7 and removing the blank line between the NOTE and WARNING alerts at
doc/train/multi-task-training.md lines 3-7; only suppress MD028 at either site
if the separator is required for the nested directive or intentional alert
separation.
In `@doc/train/finetuning.md`:
- Around line 250-255: In the Paddle fine-tuning note, update the misspelled
word “refering” to “referring” while leaving the surrounding documentation
unchanged.
- Around line 106-111: Remove the leading “$ ” shell prompt from the command in
the migrated alert snippets, including the command near the multi-task
pre-trained model note and the corresponding snippet around the other referenced
section. Keep the fenced bash commands otherwise unchanged so they remain
directly copyable and satisfy markdownlint MD014.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: afd02458-3681-44c4-8741-bd0a0e64e0e6
📒 Files selected for processing (59)
.readthedocs.ymldoc/backend.mddoc/conf.pydoc/data/system.mddoc/development/create-a-model-pt.mddoc/development/type-embedding.mddoc/env.mddoc/environment.ymldoc/freeze/compress.mddoc/inference/cxx.mddoc/inference/embedding.mddoc/inference/nodejs.mddoc/inference/python.mddoc/install/build-conda.mddoc/install/easy-install-dev.mddoc/install/easy-install.mddoc/install/install-from-c-library.mddoc/install/install-from-source.mddoc/install/install-gromacs.mddoc/install/install-lammps.mddoc/model/change-bias.mddoc/model/dpa2.mddoc/model/dpa3.mddoc/model/dpa4.mddoc/model/dplr.mddoc/model/dprc.mddoc/model/linear.mddoc/model/overall.mddoc/model/pairtab.mddoc/model/train-energy-hessian.mddoc/model/train-energy-spin.mddoc/model/train-energy.mddoc/model/train-fitting-dos.mddoc/model/train-fitting-population.mddoc/model/train-fitting-property.mddoc/model/train-fitting-tensor.mddoc/model/train-hybrid.mddoc/model/train-se-a-mask.mddoc/model/train-se-atten.mddoc/model/train-se-e2-a-tebd.mddoc/model/train-se-e2-a.mddoc/model/train-se-e2-r.mddoc/model/train-se-e3-tebd.mddoc/model/train-se-e3.mddoc/nvnmd/nvnmd.mddoc/requirements.txtdoc/third-party/ase.mddoc/third-party/dpdata.mddoc/third-party/gromacs.mddoc/third-party/ipi.mddoc/third-party/jaxmd.mddoc/third-party/lammps-command.mddoc/third-party/nvalchemi.mddoc/train/finetuning.mddoc/train/multi-task-training.mddoc/train/parallel-training.mddoc/train/tensorboard.mddoc/train/training.mdpyproject.toml
Fix command prompts and wording issues identified during review. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
Install documentation requirements with the Python executable from the Read the Docs virtual environment so the subsequent uv run can find Sphinx. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #5886 +/- ##
==========================================
- Coverage 78.87% 78.62% -0.26%
==========================================
Files 1054 1054
Lines 121770 121756 -14
Branches 4413 4403 -10
==========================================
- Hits 96046 95730 -316
- Misses 24159 24454 +295
- Partials 1565 1572 +7 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Restore the Read the Docs configuration to the master version so this pull request remains focused on GFM alerts. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
wanghan-iapcm
left a comment
There was a problem hiding this comment.
Clean, lossless migration. Verified: the full 83-admonition count reconciles (the 7-vs-8 warning gap is a capitalized :::{Warning} in easy-install.md), a bag-of-lines diff across all 58 files shows no dropped or added body text, danger->CAUTION is the only non-identity mapping, and nested :::{deprecated} inside > [!CAUTION] renders correctly under a real MyST-Parser 5.1 build. Config is consistent: the alert extension requires myst-parser>=5.1.0 (which is published on PyPI and requires python>=3.11, matching the environment.yml 3.11 bump and RTD's existing 3.11), and .readthedocs.yml nets to no change. Minor optional follow-ups: bump the myst-nb floor to >=1.4.0 to pin the validated pairing, and note that the [docs] extra now needs python>=3.11 while the package declares >=3.10 (no real impact since doc builds already use 3.11).
Pin myst-nb to the version validated with MyST-Parser 5.1 and document that the docs extra requires Python 3.11 or newer. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
Addressed both optional follow-ups from #5886 (review) in
Validation: full-repository Ruff formatting/checks pass, the TOML pre-commit hook passes, and dependency resolution selects Coding agent: Codex |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 59 out of 59 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
doc/train/finetuning.md:1
- This migration dropped the
$shell prompt from the command example (previously shown as$ dp ...). If the docs use prompts elsewhere for shell commands, consider restoring it here for consistency, or consistently removing prompts across the docs if that’s the new convention.
doc/train/finetuning.md:1 - Same as the earlier note: the
$shell prompt was removed during conversion. Consider keeping the prompt if that’s the established style for shell snippets in this documentation set, or standardize on prompt-free commands everywhere.
Summary
alertextension and require MyST-Parser 5.1.0 with Sphinx 8+dangeradmonitions to GFMCAUTIONalertsValidation
ruff check .ruff format --check .mdformatpre-commit hookgit diff --checkReference:
Coding agent: Codex
Codex version: codex-cli 0.144.6
Model: gpt-5.6-sol
Reasoning effort: xhigh
Summary by CodeRabbit