Skip to content

Commit 9703394

Browse files
authored
Make testing methods private
1 parent f67898e commit 9703394

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/atomate2/utils/testing/vasp.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,16 +144,16 @@ def fake_run_vasp(
144144
logger.info("Running fake VASP.")
145145

146146
if "incar" in check_inputs:
147-
check_incar(ref_path, incar_settings, incar_exclude)
147+
_check_incar(ref_path, incar_settings, incar_exclude)
148148

149149
if "kpoints" in check_inputs:
150-
check_kpoints(ref_path)
150+
_check_kpoints(ref_path)
151151

152152
if "poscar" in check_inputs:
153-
check_poscar(ref_path)
153+
_check_poscar(ref_path)
154154

155155
if "potcar" in check_inputs:
156-
check_potcar(ref_path)
156+
_check_potcar(ref_path)
157157

158158
# This is useful to check if the WAVECAR has been copied
159159
if "wavecar" in check_inputs and not Path("WAVECAR").exists():
@@ -162,15 +162,15 @@ def fake_run_vasp(
162162
logger.info("Verified inputs successfully")
163163

164164
if clear_inputs:
165-
clear_vasp_inputs()
165+
_clear_vasp_inputs()
166166

167-
copy_vasp_outputs(ref_path)
167+
_copy_vasp_outputs(ref_path)
168168

169169
# pretend to run VASP by copying pre-generated outputs from reference dir
170170
logger.info("Generated fake vasp outputs")
171171

172172

173-
def check_incar(
173+
def _check_incar(
174174
ref_path: Path,
175175
incar_settings: Sequence[str] | None,
176176
incar_exclude: Sequence[str] | None,
@@ -194,7 +194,7 @@ def check_incar(
194194
)
195195

196196

197-
def check_kpoints(ref_path: Path) -> None:
197+
def _check_kpoints(ref_path: Path) -> None:
198198
"""Check that KPOINTS file is consistent with the reference calculation."""
199199
user_kpoints_exists = (user_kpt_path := zpath("KPOINTS")).exists()
200200
ref_kpoints_exists = (
@@ -234,7 +234,7 @@ def check_kpoints(ref_path: Path) -> None:
234234
)
235235

236236

237-
def check_poscar(ref_path: Path) -> None:
237+
def _check_poscar(ref_path: Path) -> None:
238238
"""Check that POSCAR information is consistent with the reference calculation."""
239239
user_poscar_path = zpath("POSCAR")
240240
ref_poscar_path = zpath(ref_path / "inputs" / "POSCAR")
@@ -263,7 +263,7 @@ def check_poscar(ref_path: Path) -> None:
263263
)
264264

265265

266-
def check_potcar(ref_path: Path) -> None:
266+
def _check_potcar(ref_path: Path) -> None:
267267
"""Check that POTCAR information is consistent with the reference calculation."""
268268
potcars = {"reference": None, "user": None}
269269
paths = {"reference": ref_path / "inputs", "user": Path(".")}
@@ -283,7 +283,7 @@ def check_potcar(ref_path: Path) -> None:
283283
)
284284

285285

286-
def clear_vasp_inputs() -> None:
286+
def _clear_vasp_inputs() -> None:
287287
"""Clean up VASP input files."""
288288
for vasp_file in (
289289
"INCAR",
@@ -300,7 +300,7 @@ def clear_vasp_inputs() -> None:
300300
logger.info("Cleared vasp inputs")
301301

302302

303-
def copy_vasp_outputs(ref_path: Path) -> None:
303+
def _copy_vasp_outputs(ref_path: Path) -> None:
304304
"""Copy VASP output files from the reference directory."""
305305
output_path = ref_path / "outputs"
306306
for output_file in output_path.iterdir():

0 commit comments

Comments
 (0)