fix(vasp): collect OUTCAR files from multiple directories#1034
fix(vasp): collect OUTCAR files from multiple directories#1034njzjz-bot wants to merge 3 commits into
Conversation
Discover canonically named OUTCAR files recursively so the multi-system CLI path can combine one-calculation-per-directory VASP datasets. Add a regression covering nested single-frame calculations. Coding-Agent: Codex Codex-Version: codex-cli 0.144.4 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
Warning Review limit reached
Next review available in: 59 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughVASP OUTCAR format loading now recursively discovers and sorts nested ChangesVASP multi-system loading
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant MultiSystems
participant VASPOutcarFormat
participant Filesystem
MultiSystems->>VASPOutcarFormat: from_multi_systems(directory)
VASPOutcarFormat->>Filesystem: os.walk(directory)
Filesystem-->>VASPOutcarFormat: nested OUTCAR paths
VASPOutcarFormat-->>MultiSystems: sorted OUTCAR paths
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Merging this PR will improve performance by 33.1%
|
| Mode | Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|---|
| ⚡ | WallTime | test_cli |
378.2 ms | 277.1 ms | +36.49% |
| ⚡ | WallTime | test_import |
11.2 ms | 8.6 ms | +29.81% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing njzjz-bot:fix/issue-894 (42450f9) with master (d2105f6)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1034 +/- ##
=======================================
Coverage 86.94% 86.95%
=======================================
Files 90 90
Lines 9178 9185 +7
=======================================
+ Hits 7980 7987 +7
Misses 1198 1198 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
wanghan-iapcm
left a comment
There was a problem hiding this comment.
Approving: correct fix for #894. VASPOutcarFormat.from_multi_systems recursively walks the directory and returns sorted OUTCAR file paths, which is exactly the type MultiSystems.from_fmt_obj feeds into from_labeled_system(file_name=...); it mirrors the established os.walk pattern in the deepmd/npy loader (returning file paths rather than directories because VASP loads a file, and adding sorted() for determinism). The new test is a genuine regression test -- verified to raise NotImplementedError (format.py:317) on pre-fix code and pass after, exercising the public MultiSystems.from_file path over a nested layout. Build and codecov/patch green (docs/readthedocs red is the unrelated emscripten-forge outage, #1035). Optional follow-up: the test asserts only counts (len/nframes); asserting the two discovered systems' formulas match the sources would harden it (per the same guidance on #1015).
Strengthen recursive OUTCAR coverage by checking that both loaded systems preserve the non-zero compositions of their source calculations. Coding-Agent: Codex Codex-Version: codex-cli 0.144.6 Model: gpt-5.6-sol Reasoning-Effort: xhigh
|
Addressed the optional composition assertion in commit Coding agent: Codex |
Fixes #894.
Recursively discover and deterministically parse standard-named OUTCAR files for MultiSystems conversion.
Tests: Relevant VASP/MultiSystems tests plus CLI deepmd/npy conversion.
Why existing tests missed it: Tests covered single-file LabeledSystem parsing and other multi-mode backends, never VASP default multi-directory discovery.
Coding agent: Codex
Codex version: codex-cli 0.144.4
Model: gpt-5.6-sol
Reasoning effort: xhigh
Summary by CodeRabbit