Commit bc617b7
refact: refactor format backends into dpdata.formats (#970)
This PR fixes the CI failures from #946 after moving implementation
modules.
Changes:
- Keep real format backends under `dpdata.formats`.
- Move the non-format MD analysis/tool modules back to `dpdata.md`
instead of `dpdata.formats.md`.
- Do not preserve `dpdata.lammps` / `dpdata.vasp` as top-level exports.
- Add explicit package exports for the newly moved format subpackages
under `dpdata.formats`.
- Update direct helper imports in tests/internal code to their new
locations:
- `dpdata.formats.cp2k.cell.cell_to_low_triangle`
- `dpdata.formats.gaussian.gjf.detect_multiplicity`
- `dpdata.formats.qe.traj.convert_celldm`
- `dpdata.formats.amber.md.cell_lengths_angles_to_cell`
- `dpdata.md.msd.msd`
- `dpdata.md.water.*`
Follow-up:
- Removed the legacy `dpdata.<format>` wrapper modules that were added
earlier; this branch no longer keeps those old import paths alive.
Local checks:
- `cd tests && uv run pytest test_amber_md.py
test_cell_to_low_triangle.py
test_gaussian_driver.py::TestMakeGaussian::test_detect_multiplicity
test_qe_cp_traj.py::TestConverCellDim test_msd.py test_water_ions.py -q`
→ 45 passed
- `uv run pyright` → currently reports 2 pre-existing missing `_version`
/ `__version__` diagnostics in `dpdata/__init__.py` and `dpdata/cli.py`
- `git grep -n "from dpdata\.formats\..* import \*\|legacy" -- dpdata
tests` → no matches
Authored by OpenClaw (model: custom-chat-jinzhezeng-group/gpt-5.5)
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
## Release Notes
* **Refactor**
* Reorganized internal format handler modules into a dedicated `formats`
subdirectory for improved code structure and maintainability.
* Updated internal import paths throughout the codebase to reflect the
new module organization structure.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: OpenClaw Bot <bot@openclaw.dev>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>1 parent 6cdc360 commit bc617b7
100 files changed
Lines changed: 185 additions & 154 deletions
File tree
- dpdata
- formats
- abacus
- amber
- cp2k
- deepmd
- dftbplus
- fhi_aims
- gaussian
- gromacs
- lammps
- lmdb
- openmx
- orca
- psi4
- pwmat
- pymatgen
- qe
- rdkit
- siesta
- vasp
- xyz
- plugins
- siesta
- vasp
- xyz
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | | - | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | 17 | | |
19 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
| 9 | + | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
82 | | - | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
File renamed without changes.
File renamed without changes.
0 commit comments