Skip to content

Commit bacd312

Browse files
author
Han Wang
committed
fix(test): use real path for PT water data, remove unused API
Use ``pt/model/water`` instead of the ``pt/water`` symlink in test_fitting_stat.py to avoid FileNotFoundError on CI. Remove unused ``get_numb_attn_layer()`` from DescrptDPA1.
1 parent 23eb6dd commit bacd312

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

source/tests/pt_expt/fitting/test_fitting_stat.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,17 @@ def _get_weighted_fitting_stat(
117117
return weighted_avg, weighted_std
118118

119119

120-
# Paths to the water data used by PT tests
121-
_PT_DATA = str(Path(__file__).parent.parent.parent / "pt" / "water" / "data" / "data_0")
120+
# Paths to the water data used by PT tests.
121+
# ``source/tests/pt/water`` is a symlink to ``model/water``; use the real
122+
# path so CI checkouts that materialise symlinks as text files still work.
123+
_PT_DATA = str(
124+
Path(__file__).parent.parent.parent / "pt" / "model" / "water" / "data" / "data_0"
125+
)
122126
_PT_DATA_NO_FPARAM = str(
123-
Path(__file__).parent.parent.parent / "pt" / "water" / "data" / "data_1"
127+
Path(__file__).parent.parent.parent / "pt" / "model" / "water" / "data" / "data_1"
124128
)
125129
_PT_DATA_SINGLE = str(
126-
Path(__file__).parent.parent.parent / "pt" / "water" / "data" / "single"
130+
Path(__file__).parent.parent.parent / "pt" / "model" / "water" / "data" / "single"
127131
)
128132

129133
_descriptor_se_e2_a = {

0 commit comments

Comments
 (0)