Skip to content

docs(skills): add dpdata plugin skill#954

Open
njzjz-bot wants to merge 4 commits intodeepmodeling:masterfrom
njzjz-bot:skills/dpdata-plugin-skill
Open

docs(skills): add dpdata plugin skill#954
njzjz-bot wants to merge 4 commits intodeepmodeling:masterfrom
njzjz-bot:skills/dpdata-plugin-skill

Conversation

@njzjz-bot
Copy link
Contributor

@njzjz-bot njzjz-bot commented Mar 15, 2026

This PR adds an Agent Skill under skills/ describing how to create and install external dpdata plugins (Format.register + project.entry-points."dpdata.plugins").

Authored by OpenClaw (model: gpt-5.2)

Summary by CodeRabbit

  • Documentation
    • Added a comprehensive guide for creating and distributing external dpdata plugins: explains plugin discovery paths, package layout and entry-point configuration, a minimal Format implementation returning dpdata-aligned data, an install/test snippet to verify registration after import, and a troubleshooting checklist for common discovery/registration issues.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 15, 2026
@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 98ef7729-95cd-4efa-aa9e-2f1016a43e39

📥 Commits

Reviewing files that changed from the base of the PR and between f251724 and 3807cb1.

📒 Files selected for processing (1)
  • skills/dpdata-plugin/SKILL.md
✅ Files skipped from review due to trivial changes (1)
  • skills/dpdata-plugin/SKILL.md

📝 Walkthrough

Walkthrough

New documentation guide skills/dpdata-plugin/SKILL.md describing how to create and distribute external dpdata plugin packages that register Format readers/writers via @Format.register(...), dpdata’s two plugin-loading paths, example package layout and pyproject.toml entry-point configuration, and a verification/debug checklist.

Changes

Cohort / File(s) Summary
Documentation
skills/dpdata-plugin/SKILL.md
Added a new skill document explaining external dpdata plugin creation and discovery. Covers automatic import of built-in dpdata.plugins.* vs. external discovery via [project.entry-points.'dpdata.plugins'], requirement that the entry-point import performs @Format.register(...), minimal example project structure, sample Format implementation shape (fields like cells, coords, atom_names, atom_types), example pyproject.toml mapping, install/test snippet using Format.get_formats() after importing dpdata, and a plugin discovery/debug checklist.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

dpdata

Suggested reviewers

  • wanghan-iapcm
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'docs(skills): add dpdata plugin skill' directly and clearly describes the main change: adding documentation for a dpdata plugin skill.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codspeed-hq
Copy link

codspeed-hq bot commented Mar 15, 2026

Merging this PR will degrade performance by 13.47%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 1 untouched benchmark

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_import 9.8 ms 11.3 ms -13.47%

Comparing njzjz-bot:skills/dpdata-plugin-skill (3807cb1) with master (80abfc5)

Open in CodSpeed

@codecov
Copy link

codecov bot commented Mar 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.63%. Comparing base (d68b700) to head (3807cb1).
⚠️ Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #954      +/-   ##
==========================================
+ Coverage   86.37%   86.63%   +0.26%     
==========================================
  Files          86       86              
  Lines        8086     8006      -80     
==========================================
- Hits         6984     6936      -48     
+ Misses       1102     1070      -32     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new “dpdata-plugin” skill document describing how to build and distribute external dpdata Format plugins via pyproject.toml entry points, and updates .gitignore to ignore common local uv development artifacts.

Changes:

  • Add skills/dpdata-plugin/SKILL.md documenting external plugin discovery and a minimal plugin package template.
  • Ignore uv.lock and .venv/ in .gitignore for local development.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 3 comments.

File Description
skills/dpdata-plugin/SKILL.md New skill documentation for creating/distributing external dpdata plugins via entry points
.gitignore Ignore local uv lockfile and virtualenv directory

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@njzjz-bot
Copy link
Contributor Author

CodSpeed flagged a small import-time regression.

To minimize any chance of CI noise, I reverted the .gitignore changes in this PR (keeping this PR focused on docs-only skill addition).

Authored by OpenClaw (model: gpt-5.2)

@njzjz-bot
Copy link
Contributor Author

Note: uv.lock is a local dev artifact and is not committed.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
skills/dpdata-plugin/SKILL.md (1)

108-113: Add a key-collision check to the debug checklist

Please add a checklist bullet to verify the registered key (e.g., random) does not collide with existing built-in or external plugin keys, since later-loaded plugins can overwrite prior registrations silently.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@skills/dpdata-plugin/SKILL.md` around lines 108 - 113, Add a checklist bullet
to skills/dpdata-plugin/SKILL.md under "Debug checklist" that instructs users to
verify the plugin's registered key (e.g., the string passed to `@Format.register`,
such as "random") doesn't collide with built-in or previously loaded plugin
keys; specifically check the registry for existing keys before registering to
avoid silent overwrites by later-loaded plugins.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@skills/dpdata-plugin/SKILL.md`:
- Around line 94-104: The verification snippet fails because the example plugin
package isn't installed into the uv environment, so Format.get_formats() won't
include the "random" entry; fix the SKILL.md example by installing the plugin
into the uv environment before running the test (e.g., run uv pip install -e .
prior to uv run) so that dpdata's entry points are registered and
Format.get_formats() returns True.

---

Nitpick comments:
In `@skills/dpdata-plugin/SKILL.md`:
- Around line 108-113: Add a checklist bullet to skills/dpdata-plugin/SKILL.md
under "Debug checklist" that instructs users to verify the plugin's registered
key (e.g., the string passed to `@Format.register`, such as "random") doesn't
collide with built-in or previously loaded plugin keys; specifically check the
registry for existing keys before registering to avoid silent overwrites by
later-loaded plugins.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: d1ada6e5-1002-453c-aacd-8ad8e4814222

📥 Commits

Reviewing files that changed from the base of the PR and between d68b700 and 285cbdd.

📒 Files selected for processing (1)
  • skills/dpdata-plugin/SKILL.md

Copy link
Contributor

@wanghan-iapcm wanghan-iapcm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check the suggestions raised by the AI reviewers.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Mar 18, 2026
Install the example plugin into the same environment before verifying registration so the entry point is actually discovered.

Also add a debug checklist item reminding users to avoid collisions with existing format keys.

Authored by OpenClaw (model: gpt-5.4)
@njzjz njzjz closed this Mar 23, 2026
@njzjz njzjz reopened this Mar 23, 2026
Use the real  parameter name in the example and explain that this sample interprets it as an integer frame count for generating random frames.\n\nAuthored by OpenClaw (model: gpt-5.4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants