From 40871652071c9402169a9d9460f048ec9b7a10c5 Mon Sep 17 00:00:00 2001 From: github-actions Date: Thu, 21 Sep 2023 09:06:56 +0000 Subject: [PATCH] GitHub Action: Apply Pep8-formatting --- jobs/cosmo.py | 3 ++- jobs/int2lm.py | 3 +-- jobs/online_vprm.py | 7 +++---- run_chain.py | 1 + 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/jobs/cosmo.py b/jobs/cosmo.py index 6f52de7c..3223c1f5 100644 --- a/jobs/cosmo.py +++ b/jobs/cosmo.py @@ -142,7 +142,8 @@ def main(starttime, hstart, hstop, cfg, model_cfg): tools.create_dir(cfg.cosmo_restart_out, "cosmo_restart_out") # Copy cosmo executable - tools.copy_file(cfg.cosmo_bin, os.path.join(cfg.cosmo_work, cfg.cosmo['execname'])) + tools.copy_file(cfg.cosmo_bin, + os.path.join(cfg.cosmo_work, cfg.cosmo['execname'])) # Prepare namelist and submit job tracer_csvfile = os.path.join(cfg.chain_src_dir, 'cases', cfg.casename, diff --git a/jobs/int2lm.py b/jobs/int2lm.py index 24f6061c..b57da79a 100644 --- a/jobs/int2lm.py +++ b/jobs/int2lm.py @@ -119,8 +119,7 @@ def main(starttime, hstart, hstop, cfg, model_cfg): multi_layer = ".TRUE." output_file = os.path.join(cfg.int2lm_work, "INPUT") with open(output_file, "w") as outf: - outf.write(to_write.format(cfg=cfg, - multi_layer=multi_layer)) + outf.write(to_write.format(cfg=cfg, multi_layer=multi_layer)) # Prepare runscript with open(cfg.int2lm_runjob) as input_file: diff --git a/jobs/online_vprm.py b/jobs/online_vprm.py index dcc374e3..7917a49b 100644 --- a/jobs/online_vprm.py +++ b/jobs/online_vprm.py @@ -33,13 +33,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg): tools.create_dir(dest_dir, "input data for vprm") modis_data_nc = os.path.join(src_dir, cfg.online_vprm['modis_filename']) - logging.info("Copying MODIS file from {} to {}".format( - src_dir, dest_dir)) + logging.info("Copying MODIS file from {} to {}".format(src_dir, dest_dir)) tools.copy_file(modis_data_nc, os.path.join(dest_dir, dest_modis)) - vegetation_data_nc = os.path.join(src_dir, cfg.online_vprm['vegetation_filename']) + vegetation_data_nc = os.path.join(src_dir, + cfg.online_vprm['vegetation_filename']) logging.info("Copying vegetation class fraction file from {} to {}".format( src_dir, dest_dir)) tools.copy_file(vegetation_data_nc, os.path.join(dest_dir, dest_vegetation)) - diff --git a/run_chain.py b/run_chain.py index 7820d488..3b9c1654 100755 --- a/run_chain.py +++ b/run_chain.py @@ -88,6 +88,7 @@ def parse_arguments(): class Config(): + def __init__(self, casename): # Global attributes (initialized with default values) self.user_name = os.environ['USER']