Skip to content

Commit f7d385b

Browse files
committed
Reorganize tests and move docs sync tooling
1 parent 64d6ebd commit f7d385b

105 files changed

Lines changed: 1704 additions & 102 deletions

File tree

Some content is hidden

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

deepks/io/input/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -748,7 +748,7 @@ def render_input_parameter_doc():
748748
"- Preferred backend blocks are `scf_pyscf` and `scf_abacus`.",
749749
"- For iterate + ABACUS, `init_scf_abacus` inherits from `scf_abacus` when omitted; legacy `init_scf` dictionaries with ABACUS keys are normalized into `init_scf_abacus` and still trigger bootstrap iteration.",
750750
"- Packaged test configs keep backward-compatible `data_paths <- systems_test` mapping.",
751-
"- Docs can be regenerated in-repo with `python tools/sync_input_parameter_docs.py`.",
751+
"- Docs can be regenerated in-repo with `python -m deepks.tools.sync_input_parameter_docs`.",
752752
]
753753

754754
for section in DOC_SECTIONS:
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from deepks.io.input import render_input_parameter_doc
88

99

10-
DOC_SYNC_TARGET = Path(__file__).resolve().parents[1] / "docs" / "input-parameter.md"
10+
DOC_SYNC_TARGET = Path(__file__).resolve().parents[2] / "docs" / "input-parameter.md"
1111

1212

1313
def sync_input_parameter_docs(output_path=DOC_SYNC_TARGET):

docs/ARCHITECTURE.md

Lines changed: 2 additions & 3 deletions

docs/input-parameter.md

Lines changed: 2 additions & 2 deletions

tests/README.md

Lines changed: 28 additions & 33 deletions

tests/conftest.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,16 @@ def _safe_remove(path: Path) -> None:
2626

2727
def _cleanup_legacy_integral_full_artifacts() -> None:
2828
"""删除 legacy integral 样例在运行中产生的状态文件,避免历史状态污染。"""
29-
root = Path(__file__).resolve().parent / "fixtures" / "legacy_integral_full"
29+
root = Path(__file__).resolve().parent / "integration" / "scenarios" / "legacy_integral_full"
3030
if not root.exists():
3131
return
3232

3333
# Common logs/stderr under sample cases.
3434
cleanup_patterns = {
35-
"01_train": ("log.train", "err"),
36-
"02_test": ("log.test", "err"),
37-
"03_scf": ("log.scf", "err"),
38-
"04_stats": ("log.stats", "err"),
35+
"train": ("log.train", "err"),
36+
"test": ("log.test", "err"),
37+
"scf": ("log.scf", "err"),
38+
"stats": ("log.stats", "err"),
3939
}
4040
for rel_dir, patterns in cleanup_patterns.items():
4141
base = root / rel_dir
@@ -45,7 +45,7 @@ def _cleanup_legacy_integral_full_artifacts() -> None:
4545
for target in base.glob(pattern):
4646
_safe_remove(target)
4747

48-
iter_root = root / "05_iter" / "01_abacus_local"
48+
iter_root = root / "iterate" / "abacus_local"
4949
if iter_root.exists():
5050
for fname in ("log.iter", "err", "RECORD", "share"):
5151
_safe_remove(iter_root / fname)
@@ -75,8 +75,8 @@ def _preclean_generated_artifacts(request):
7575
"""仅在可能写入 legacy fixture 目录的测试中执行预清理。"""
7676
node_path = Path(str(request.fspath)).as_posix()
7777
needs_cleanup = (
78-
"tests/fixtures/legacy_integral_full/" in node_path
79-
or node_path.endswith("tests/integration/test_migrated_integral_samples.py")
78+
"tests/integration/scenarios/legacy_integral_full/" in node_path
79+
or node_path.endswith("tests/integration/scenarios/test_migrated_integral_samples.py")
8080
)
8181
if needs_cleanup:
8282
_cleanup_legacy_integral_full_artifacts()

tests/data/README.md

Lines changed: 11 additions & 0 deletions

tests/data/golden/README.md

Lines changed: 7 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# placeholder
Lines changed: 9 additions & 0 deletions

0 commit comments

Comments
 (0)