From 1e3956a250c5c9405d05632ac5865293976cc960 Mon Sep 17 00:00:00 2001 From: HaithamGaafer <124836795+HaithamGaafer@users.noreply.github.com> Date: Fri, 25 Oct 2024 20:44:52 +0200 Subject: [PATCH] Overwrote compress function to exclude all .yace files Also made the pacemaker job to compress by default after it's done while excluding `.yace` files --- pyiron_potentialfit/pacemaker/job.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pyiron_potentialfit/pacemaker/job.py b/pyiron_potentialfit/pacemaker/job.py index 88d870b9..b08d9a7b 100644 --- a/pyiron_potentialfit/pacemaker/job.py +++ b/pyiron_potentialfit/pacemaker/job.py @@ -45,6 +45,7 @@ def __init__(self, project, job_name): self.__version__ = "0.2" self._train_job_id_list = [] + self._compress_by_default = True self.input = GenericParameters(table_name="input") self._cutoff = 7.0 @@ -502,3 +503,14 @@ def check_inner_cutoffs(self): plt.xlabel(r"Distance [$\AA$]") plt.ylabel(r"Energy [eV]") return df + + def compress(self, files_to_compress=None): + """ + Compress the output files of a job object. + + Args: + files_to_compress (list): A list of files to compress (optional) + """ + if files_to_compress is None: + files_to_compress = [f for f in self.files.list() if not f.endswith('.yace')] + super(PacemakerJob, self).compress(files_to_compress=files_to_compress)