From 0e82a7014480b9538eb8b909fee65ea7f64b5fb8 Mon Sep 17 00:00:00 2001 From: Terry McGuinness Date: Fri, 28 Jun 2024 14:09:57 -0400 Subject: [PATCH] fixed lingering HPC_ACCOUT and cleaned up old setup xml test --- .gitmodules | 1 - ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml | 2 +- ci/cases/yamls/gfs_defaults_ci.yaml | 2 +- ci/cases/yamls/gfs_extended_ci.yaml | 2 +- ci/cases/yamls/soca_gfs_defaults_ci.yaml | 2 +- ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml | 2 +- ci/scripts/tests/test_create_experiment.py | 2 +- ci/scripts/tests/test_setup.py | 12 +----------- 8 files changed, 7 insertions(+), 18 deletions(-) diff --git a/.gitmodules b/.gitmodules index 810eb57b68..cdfd0ae82a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -5,7 +5,6 @@ [submodule "sorc/wxflow"] path = sorc/wxflow url = https://github.com/NOAA-EMC/wxflow.git - branch = config_env_bash [submodule "sorc/gfs_utils.fd"] path = sorc/gfs_utils.fd url = https://github.com/NOAA-EMC/gfs-utils diff --git a/ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml b/ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml index 805a279ca6..6d978e25ef 100644 --- a/ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml +++ b/ci/cases/yamls/atmaerosnowDA_defaults_ci.yaml @@ -2,4 +2,4 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml base: DO_JEDISNOWDA: "YES" - ACCOUNT: {{ 'ACCOUNT' | getenv }} + ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }} diff --git a/ci/cases/yamls/gfs_defaults_ci.yaml b/ci/cases/yamls/gfs_defaults_ci.yaml index 1ac09de8c1..d09f78b8b8 100644 --- a/ci/cases/yamls/gfs_defaults_ci.yaml +++ b/ci/cases/yamls/gfs_defaults_ci.yaml @@ -1,4 +1,4 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml base: - ACCOUNT: {{ 'ACCOUNT' | getenv }} + ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }} diff --git a/ci/cases/yamls/gfs_extended_ci.yaml b/ci/cases/yamls/gfs_extended_ci.yaml index 122d8ed5c3..42ee612f3a 100644 --- a/ci/cases/yamls/gfs_extended_ci.yaml +++ b/ci/cases/yamls/gfs_extended_ci.yaml @@ -2,7 +2,7 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml base: - ACCOUNT: {{ 'ACCOUNT' | getenv }} + ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }} DO_GOES: "YES" DO_BUFRSND: "YES" DO_GEMPAK: "YES" diff --git a/ci/cases/yamls/soca_gfs_defaults_ci.yaml b/ci/cases/yamls/soca_gfs_defaults_ci.yaml index cb11a87e0b..3d75cc911a 100644 --- a/ci/cases/yamls/soca_gfs_defaults_ci.yaml +++ b/ci/cases/yamls/soca_gfs_defaults_ci.yaml @@ -1,5 +1,5 @@ defaults: !INC {{ HOMEgfs }}/parm/config/gfs/yaml/defaults.yaml base: - ACCOUNT: {{ 'ACCOUNT' | getenv }} + ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }} DO_JEDIOCNVAR: "YES" diff --git a/ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml b/ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml index acddef96ca..c4fa54dcc8 100644 --- a/ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml +++ b/ci/cases/yamls/ufs_hybatmDA_defaults.ci.yaml @@ -4,7 +4,7 @@ base: DOIAU: "NO" DO_JEDIATMVAR: "YES" DO_JEDIATMENS: "YES" - ACCOUNT: {{ 'ACCOUNT' | getenv }} + ACCOUNT: {{ 'HPC_ACCOUNT' | getenv }} atmanl: LAYOUT_X_ATMANL: 4 LAYOUT_Y_ATMANL: 4 diff --git a/ci/scripts/tests/test_create_experiment.py b/ci/scripts/tests/test_create_experiment.py index d0fb055777..5b4f18213a 100644 --- a/ci/scripts/tests/test_create_experiment.py +++ b/ci/scripts/tests/test_create_experiment.py @@ -18,4 +18,4 @@ def test_create_experiment(): create_experment_script(env=env) assert (create_experment_script.returncode == 0) - rmtree(RUNDIR) \ No newline at end of file + rmtree(RUNDIR) diff --git a/ci/scripts/tests/test_setup.py b/ci/scripts/tests/test_setup.py index 3f1c75ac87..c3f11c1ebc 100755 --- a/ci/scripts/tests/test_setup.py +++ b/ci/scripts/tests/test_setup.py @@ -27,16 +27,8 @@ def test_setup_expt(): def test_setup_xml(): - script_content = '''#!/usr/bin/env bash -#export ACCOUNT=fooman -#export HOMEgfs=foobar -../../../workflow/setup_xml.py "${1}" -''' - with open('run_setup_xml.sh', 'w') as file: - file.write(script_content) - os.chmod('run_setup_xml.sh', 0o755) - setup_xml_script = Executable(os.path.join(HOMEgfs, "ci", "scripts", "tests", "run_setup_xml.sh")) + setup_xml_script = Executable(os.path.join(HOMEgfs, "workflow/setup_xml.py")) setup_xml_script.add_default_arg(f"{RUNDIR}/{pslot}") setup_xml_script() assert (setup_xml_script.returncode == 0) @@ -45,14 +37,12 @@ def test_setup_xml(): base = cfg.parse_config('config.base') assert base.ACCOUNT == account - assert foobar not in base.values() assert "UNKOWN" not in base.values() with open(f"{RUNDIR}/{pslot}/{pslot}.xml", 'r') as file: contents = file.read() assert contents.count(account) > 5 - os.remove('run_setup_xml.sh') rmtree(RUNDIR)