Skip to content

Commit

Permalink
switch to existing gzip_files function
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetretto committed Aug 15, 2023
1 parent 4bcee34 commit 5711de0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 43 deletions.
37 changes: 0 additions & 37 deletions src/atomate2/utils/shutil.py

This file was deleted.

7 changes: 3 additions & 4 deletions src/atomate2/vasp/jobs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from emmet.core.tasks import TaskDoc
from jobflow import Maker, Response, job
from monty.serialization import dumpfn
from monty.shutil import gzip_dir
from pymatgen.core.trajectory import Trajectory
from pymatgen.electronic_structure.bandstructure import (
BandStructure,
Expand All @@ -20,7 +19,7 @@
from pymatgen.io.vasp import Chgcar, Locpot, Wavecar

from atomate2 import SETTINGS
from atomate2.utils.shutil import gzip_files
from atomate2.common.files import gzip_files
from atomate2.vasp.files import copy_vasp_outputs, write_vasp_input_set
from atomate2.vasp.run import run_vasp, should_stop_children
from atomate2.vasp.sets.base import VaspInputGenerator
Expand Down Expand Up @@ -223,9 +222,9 @@ def make(self, structure: Structure, prev_vasp_dir: str | Path | None = None):

# gzip folder
if SETTINGS.VASP_ZIP_FILES == "atomate":
gzip_files(_FILES_TO_ZIP)
gzip_files(include_files=_FILES_TO_ZIP, allow_missing=True, force=True)
elif SETTINGS.VASP_ZIP_FILES:
gzip_dir(".")
gzip_files(force=True)

Check warning on line 227 in src/atomate2/vasp/jobs/base.py

View check run for this annotation

Codecov / codecov/patch

src/atomate2/vasp/jobs/base.py#L227

Added line #L227 was not covered by tests

return Response(
stop_children=stop_children,
Expand Down
4 changes: 2 additions & 2 deletions tests/vasp/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ def mock_vasp(monkeypatch, vasp_test_dir):
reference files will be copied into the directory instead. As we do not want to
test whether VASP is giving the correct output rather that the calculation inputs
are generated correctly and that the outputs are parsed properly, this should be
sufficient for our needs. An other potential issue is that the POTCAR files
distribute with VASP are not present on the testing server due to licensing
sufficient for our needs. Another potential issue is that the POTCAR files
distributed with VASP are not present on the testing server due to licensing
constraints. Accordingly, VaspInputSet.write_inputs will fail unless the
"potcar_spec" option is set to True, in which case a POTCAR.spec file will be
written instead. This fixture solves both of these issues.
Expand Down

0 comments on commit 5711de0

Please sign in to comment.