From c86d7362818bdeef75074f0ecdeea6866dba1eac Mon Sep 17 00:00:00 2001 From: Rahul Mahajan Date: Wed, 12 Jul 2023 15:20:05 -0400 Subject: [PATCH] Replace all instances of `pygw` with `wxflow` (#521) * replace all instances of pygw with wxflow * import directly from wxflow * fix CI for wxflow from pygw (#528) --------- Co-authored-by: Cory Martin --- .github/workflows/unittests.yaml | 10 +++++----- .github/workflows/unittests_g-w.yaml | 17 ++++++++++++----- scripts/exgdas_global_marine_analysis_post.py | 2 +- scripts/exgdas_global_marine_analysis_prep.py | 5 +---- test/aero/genyaml_3dvar.sh | 6 ++---- test/atm/global-workflow/jjob_ens_final.sh | 4 ++-- test/atm/global-workflow/jjob_ens_init.sh | 4 ++-- test/atm/global-workflow/jjob_ens_run.sh | 4 ++-- test/atm/global-workflow/jjob_var_final.sh | 4 ++-- test/atm/global-workflow/jjob_var_init.sh | 4 ++-- test/atm/global-workflow/jjob_var_run.sh | 4 ++-- .../atm/global-workflow/run_jedi_exe_3denvar.sh | 4 ++-- test/atm/global-workflow/run_jedi_exe_3dhofx.sh | 4 ++-- test/atm/global-workflow/run_jedi_exe_3dvar.sh | 4 ++-- test/atm/global-workflow/run_jedi_exe_letkf.sh | 4 ++-- test/check_valid_yaml.py | 2 +- test/soca/CMakeLists.txt | 2 +- test/soca/gw/CMakeLists.txt | 2 +- ush/ioda/gen_bufr2ioda_yaml.py | 3 +-- ush/run_jedi_exe.py | 4 ++-- ush/soca/run_jjobs.py | 2 +- ush/socaincr2mom6.py | 2 +- ush/ufsda/archive.py | 2 +- ush/ufsda/genYAML.py | 3 +-- ush/ufsda/stage.py | 2 +- ush/ufsda/yamltools.py | 4 ++-- 26 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.github/workflows/unittests.yaml b/.github/workflows/unittests.yaml index 2c0ec4d33..2dba08de5 100644 --- a/.github/workflows/unittests.yaml +++ b/.github/workflows/unittests.yaml @@ -24,16 +24,16 @@ jobs: cd solo && pip install . && cd .. cd r2d2 && pip install . && cd .. - - name: Checkout workflow + - name: Checkout wxflow uses: actions/checkout@v3 with: - repository: NOAA-EMC/global-workflow + repository: NOAA-EMC/wxflow ref: develop - path: global-workflow + path: wxflow - - name: Install workflow utils + - name: Install wxflow run: | - cd global-workflow/ush/python/pygw + cd wxflow pip install . - name: Checkout diff --git a/.github/workflows/unittests_g-w.yaml b/.github/workflows/unittests_g-w.yaml index ef65844ad..b187a0de9 100644 --- a/.github/workflows/unittests_g-w.yaml +++ b/.github/workflows/unittests_g-w.yaml @@ -25,18 +25,25 @@ jobs: cd r2d2 && pip install . && cd .. sudo mkdir -p /work/noaa # to trick workflow into thinking this is RDHPCS Orion - - name: Checkout workflow + - name: Checkout wxflow uses: actions/checkout@v3 with: - repository: NOAA-EMC/global-workflow + repository: NOAA-EMC/wxflow ref: develop - path: global-workflow + path: wxflow - - name: Install workflow utils + - name: Install wxflow run: | - cd global-workflow/ush/python/pygw + cd wxflow pip install . + - name: Checkout workflow + uses: actions/checkout@v3 + with: + repository: NOAA-EMC/global-workflow + ref: develop + path: global-workflow + - name: Checkout GDASApp uses: actions/checkout@v3 with: diff --git a/scripts/exgdas_global_marine_analysis_post.py b/scripts/exgdas_global_marine_analysis_post.py index 8e375d9b2..c1a0b4e11 100755 --- a/scripts/exgdas_global_marine_analysis_post.py +++ b/scripts/exgdas_global_marine_analysis_post.py @@ -23,7 +23,7 @@ import shutil import logging from datetime import datetime, timedelta -from pygw.file_utils import FileHandler +from wxflow import FileHandler # TODO: Move this somewhere else? diff --git a/scripts/exgdas_global_marine_analysis_prep.py b/scripts/exgdas_global_marine_analysis_prep.py index e7d7af86a..3147facc6 100755 --- a/scripts/exgdas_global_marine_analysis_prep.py +++ b/scripts/exgdas_global_marine_analysis_prep.py @@ -32,10 +32,7 @@ from netCDF4 import Dataset import xarray as xr import numpy as np -from pygw.attrdict import AttrDict -from pygw.template import Template, TemplateConstants -from pygw.yaml_file import YAMLFile -from pygw.file_utils import FileHandler +from wxflow import (AttrDict, Template, TemplateConstants, YAMLFile, FileHandler) # set up logger logging.basicConfig(format='%(asctime)s:%(levelname)s:%(message)s', level=logging.INFO, datefmt='%Y-%m-%d %H:%M:%S') diff --git a/test/aero/genyaml_3dvar.sh b/test/aero/genyaml_3dvar.sh index f522ba6f6..74ae035a1 100755 --- a/test/aero/genyaml_3dvar.sh +++ b/test/aero/genyaml_3dvar.sh @@ -1,6 +1,6 @@ #!/bin/bash # generate YAML from a template -# using pygw YAML tools +# using wxflow YAML tools bindir=$1 srcdir=$2 @@ -27,9 +27,7 @@ mkdir -p $DATA # run some python code to generate the YAML python3 - <