Skip to content

Commit 8900561

Browse files
authored
reorganize tests directory (#3196)
``` - source - tests - common - tf - pt ``` --------- Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
1 parent 0bb44f3 commit 8900561

203 files changed

Lines changed: 552 additions & 480 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.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ test-command = [
130130
"python -m deepmd -h",
131131
"dp -h",
132132
"dp_ipi",
133-
"pytest {project}/source/tests/test_lammps.py"
133+
"pytest {project}/source/tests/tf/test_lammps.py"
134134
]
135135
test-extras = ["cpu", "test", "lmp", "ipi"]
136136
build = ["cp310-*"]

source/tests/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: LGPL-3.0-or-later

source/tests/common/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: LGPL-3.0-or-later

source/tests/common/common.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# SPDX-License-Identifier: LGPL-3.0-or-later
2+
import pathlib
3+
4+
tests_path = pathlib.Path(__file__).parent.absolute()
5+
infer_path = (tests_path.parent / "infer").absolute()

source/tests/test_argument_parser.py renamed to source/tests/common/test_argument_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
Union,
2222
)
2323

24-
from deepmd.tf.entrypoints.main import (
24+
from deepmd.main import (
2525
get_ll,
2626
parse_args,
2727
)
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@
77
Path,
88
)
99

10-
from deepmd.tf.common import (
10+
from deepmd.common import (
1111
j_loader,
1212
)
13-
from deepmd.tf.utils.argcheck import (
13+
from deepmd.utils.argcheck import (
1414
normalize,
1515
)
1616

17-
p_examples = Path(__file__).parent.parent.parent / "examples"
17+
p_examples = Path(__file__).parent.parent.parent.parent / "examples"
1818

1919
input_files = (
2020
p_examples / "water" / "se_e2_a" / "input.json",
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import numpy as np
55

6-
from deepmd.tf.common import (
6+
from deepmd.common import (
77
select_idx_map,
88
)
99

0 commit comments

Comments
 (0)