From bcece4375e41cc5c76360ec88b057606423ac13f Mon Sep 17 00:00:00 2001 From: Valentin Seitz Date: Tue, 28 Nov 2023 07:59:59 +0100 Subject: [PATCH] make autopep happy and trigger wf once :) --- .../generate_reference_results_manual.yml | 5 +++++ tools/tests/generate_reference_results.py | 18 ++++++++---------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/generate_reference_results_manual.yml b/.github/workflows/generate_reference_results_manual.yml index bca10cf4a..382448643 100644 --- a/.github/workflows/generate_reference_results_manual.yml +++ b/.github/workflows/generate_reference_results_manual.yml @@ -21,6 +21,11 @@ on: - 'WARNING' - 'ERROR' - 'CRITICAL' + push: + branches: + - 'add-wf-reference-results' + + jobs: generate_reference_results_manual: diff --git a/tools/tests/generate_reference_results.py b/tools/tests/generate_reference_results.py index e024e1f3d..def90d6c0 100644 --- a/tools/tests/generate_reference_results.py +++ b/tools/tests/generate_reference_results.py @@ -18,7 +18,6 @@ import time - def create_tar_gz(source_folder: Path, output_filename: Path): with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_folder, arcname=output_filename.name.replace(".tar.gz", "")) @@ -31,20 +30,20 @@ def command_is_avail(command: str): except FileNotFoundError: return False - return rc==0 - uname_info="uname not available on the machine the systemtests were executed." - lscpu_info="lscpu not available on the machine the systemtests were executed." - if(command_is_avail("uname")): + return rc == 0 + uname_info = "uname not available on the machine the systemtests were executed." + lscpu_info = "lscpu not available on the machine the systemtests were executed." + if (command_is_avail("uname")): result = subprocess.run(["uname", "-a"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - if result.returncode==0: + if result.returncode == 0: uname_info = result.stdout - if(command_is_avail("lscpu")): + if (command_is_avail("lscpu")): result = subprocess.run(["lscpu"], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True) - if result.returncode==0: + if result.returncode == 0: lscpu_info = result.stdout - return (uname_info,lscpu_info) + return (uname_info, lscpu_info) def render_reference_results_info( @@ -70,7 +69,6 @@ def sha256sum(filename): 'lscpu': lscpu, } - jinja_env = Environment(loader=FileSystemLoader(PRECICE_TESTS_DIR)) template = jinja_env.get_template("reference_results.metadata.template") return template.render(render_dict)