From b277980e811802f38ea4b01c8effe2eccd6ac662 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Thu, 27 Jun 2024 13:23:51 -0400 Subject: [PATCH 01/15] test --- .github/workflows/pace_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index d09872e..7408199 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -9,3 +9,4 @@ jobs: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: shield_trigger: true + \ No newline at end of file From 67550f1c39aa54b8e88c30ce33d8762b8f7a9ad7 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 09:08:37 -0400 Subject: [PATCH 02/15] test --- .github/workflows/pace_tests.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 7408199..d6b3dc1 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -8,5 +8,7 @@ jobs: pace_unit_tests: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: - shield_trigger: true + component_trigger: true + compooent_repository: ${{github.ref}} + component_branch: ${{github.head_ref}} \ No newline at end of file From 49023c9371fcc467729e3735ac9f29ec204f7319 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 09:10:02 -0400 Subject: [PATCH 03/15] test --- .github/workflows/pace_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index d6b3dc1..3f6bb92 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -9,6 +9,6 @@ jobs: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: component_trigger: true - compooent_repository: ${{github.ref}} + component_repository: ${{github.ref}} component_branch: ${{github.head_ref}} \ No newline at end of file From 85a7cf066cecab8fe37fdc837e6ea87474ead08a Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 09:50:35 -0400 Subject: [PATCH 04/15] test --- .github/workflows/pace_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 3f6bb92..9ede0f1 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -9,6 +9,6 @@ jobs: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: component_trigger: true - component_repository: ${{github.ref}} - component_branch: ${{github.head_ref}} + component_repository: ${{github.repository}} + component_branch: ${{github.sha}} \ No newline at end of file From 265b5d9aa11a4e9cdd902464f119cb9f00b97fbb Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 11:11:46 -0400 Subject: [PATCH 05/15] add location --- .github/workflows/pace_tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 9ede0f1..e9428d6 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -11,4 +11,5 @@ jobs: component_trigger: true component_repository: ${{github.repository}} component_branch: ${{github.sha}} + component_location: PySHiELD \ No newline at end of file From dade4fd1b0f4196d440f1b5794edc25dc66d1ddb Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 14:26:36 -0400 Subject: [PATCH 06/15] test --- .github/workflows/pace_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index e9428d6..4326706 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -11,5 +11,5 @@ jobs: component_trigger: true component_repository: ${{github.repository}} component_branch: ${{github.sha}} - component_location: PySHiELD + component_location: pace/PySHiELD \ No newline at end of file From 4d9ad488460a2807b701d0705ea0349ed07fa8f9 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 14:32:05 -0400 Subject: [PATCH 07/15] test --- .github/workflows/pace_tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 4326706..e9428d6 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -11,5 +11,5 @@ jobs: component_trigger: true component_repository: ${{github.repository}} component_branch: ${{github.sha}} - component_location: pace/PySHiELD + component_location: PySHiELD \ No newline at end of file From c93ddc40458d78003ca178d0aaf99212dc404c9d Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 15:19:37 -0400 Subject: [PATCH 08/15] test --- .github/workflows/pace_tests.yaml | 2 +- .github/workflows/translate.yaml | 74 +++++++++++++++++-------------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index e9428d6..e436e46 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -11,5 +11,5 @@ jobs: component_trigger: true component_repository: ${{github.repository}} component_branch: ${{github.sha}} - component_location: PySHiELD + component_location: pySHiELD \ No newline at end of file diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index 0ad5876..f9858dd 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -2,13 +2,21 @@ name: "pySHiELD Translate test" on: workflow_call: inputs: - fv3_trigger: - type: boolean + component_trigger: + type: boolean default: false required: false - ndsl_trigger: - type: boolean - default: false + component_repository: + type: string + default: 'None' + required: false + component_branch: + type: string + default: 'None' + required: false + component_location: + type: string + default: 'None' required: false push: pull_request: @@ -19,9 +27,6 @@ concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true -env: - github_repository: ${{github.event.repository.name}} - jobs: pyshield_translate_tests: runs-on: ubuntu-latest @@ -29,44 +34,47 @@ jobs: image: ghcr.io/noaa-gfdl/miniforge:mpich steps: - - name: Checkout repository for externally triggered workflow - if: ${{inputs.ndsl_trigger || inputs.fv3_trigger}} + - name: Checkout pace for externally triggered + if: ${{inputs.component_trigger}} uses: actions/checkout@v4 with: - repository: 'noaa-gfdl/PySHiELD' submodules: 'recursive' - path: PySHiELD + repository: NOAA-GFDL/pace + path: pace + ref: develop - - name: Checkout repository + - name: Checkout component for externally triggered + if: ${{inputs.component_trigger}} uses: actions/checkout@v4 with: submodules: 'recursive' - path: ${{env.github_repository}} + path: pace/${{inputs.component_location}} - - name: prep directory for externally triggered workflow - if: ${{inputs.ndsl_trigger || inputs.fv3_trigger}} - run : | - cd ${GITHUB_WORKSPACE} - mv ${{env.github_repository}} PySHiELD/. + - name: Checkout pyshield repository for internally triggered + if: ${{!inputs.component_trigger}} + uses: actions/checkout@v4 + with: + submodules: 'recursive' + path: pySHiELD - - name: Install packages for ndsl_trigger - if : ${{inputs.ndsl_trigger}} + - name: Install packages for FV3 triggered + if : ${{contains(inputs.component_location, 'FV3')}} run : | - cd ${GITHUB_WORKSPACE}/PySHiELD/ + cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_location}} pip3 install --upgrade pip setuptools wheel - cd NDSL && pip3 install .[test] - cd ../ && pip3 install .[pyFV3,test] + pip3 install .[test] + cd ../ && pip3 install .[ndsl,test] - - name: Install packages for pyFV3 trigger - if: ${{inputs.fv3_trigger}} + - name: Install packages for NDSL trigger + if : ${{contains(inputs.component_location, 'NDSL')}} run: | - cd ${GITHUB_WORKSPACE}/PySHiELD + cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_location}} pip3 install --upgrade pip setuptools wheel - cd PyFV3 && pip3 install .[test] - cd ../ && pip3 install .[ndsl,test] + pip3 install .[test] + cd ../ && pip3 install .[pyFV3,test] - name: Install PySHiELD Python packages - if: ${{ !inputs.fv3_trigger && !inputs.ndsl_trigger}} + if: ${{ !inputs.component_trigger}} run: | cd ${GITHUB_WORKSPACE}/PySHiELD pip3 install --upgrade pip setuptools wheel @@ -74,7 +82,7 @@ jobs: - name: Download data run: | - cd ${GITHUB_WORKSPACE}/PySHiELD + cd ${GITHUB_WORKSPACE}/pySHiELD mkdir -p test_data cd test_data wget https://portal.nccs.nasa.gov/datashare/astg/smt/pace-regression-data/8.1.3_c12_6ranks_baroclinic.physics.tar.gz @@ -82,7 +90,7 @@ jobs: - name: Numpy Translate Test run: | - cd ${GITHUB_WORKSPACE}/PySHiELD + cd ${GITHUB_WORKSPACE}/pySHiELD pytest \ -v -s --data_path=./test_data/8.1.3/c12_6ranks_baroclinic/physics \ --backend=numpy \ @@ -91,7 +99,7 @@ jobs: - name: Orchestrated dace:cpu Translate Test run: | - cd ${GITHUB_WORKSPACE}/PySHiELD + cd ${GITHUB_WORKSPACE}/pySHiELD export FV3_DACEMODE=BuildAndRun export PACE_FLOAT_PRECISION=64 export PACE_TEST_N_THRESHOLD_SAMPLES=0 From 77e9dca3b2f259e9a17bbf00e340533c3c444441 Mon Sep 17 00:00:00 2001 From: MiKyung Lee <58964324+mlee03@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:21:24 -0400 Subject: [PATCH 09/15] Update translate.yaml --- .github/workflows/translate.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index f9858dd..765ed28 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -7,7 +7,7 @@ on: default: false required: false component_repository: - type: string + type: string default: 'None' required: false component_branch: From 4a50da8a88ceab1238113f814f2e90aa0e3fa739 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 15:23:03 -0400 Subject: [PATCH 10/15] caps --- .github/workflows/translate.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index 765ed28..8e8e5df 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -73,10 +73,10 @@ jobs: pip3 install .[test] cd ../ && pip3 install .[pyFV3,test] - - name: Install PySHiELD Python packages + - name: Install pySHiELD Python packages if: ${{ !inputs.component_trigger}} run: | - cd ${GITHUB_WORKSPACE}/PySHiELD + cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel pip3 install .[ndsl,pyFV3,test] From 559d8b4fee9a714829a02d330714ed7a992ffecd Mon Sep 17 00:00:00 2001 From: mlee03 Date: Mon, 1 Jul 2024 15:29:05 -0400 Subject: [PATCH 11/15] test --- .github/workflows/pace_tests.yaml | 4 +--- .github/workflows/translate.yaml | 26 +++++++++----------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index e436e46..0307a40 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -9,7 +9,5 @@ jobs: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: component_trigger: true - component_repository: ${{github.repository}} - component_branch: ${{github.sha}} - component_location: pySHiELD + component_name: pySHiELD \ No newline at end of file diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index 8e8e5df..c5da54b 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -6,15 +6,7 @@ on: type: boolean default: false required: false - component_repository: - type: string - default: 'None' - required: false - component_branch: - type: string - default: 'None' - required: false - component_location: + component_name: type: string default: 'None' required: false @@ -34,13 +26,13 @@ jobs: image: ghcr.io/noaa-gfdl/miniforge:mpich steps: - - name: Checkout pace for externally triggered + - name: Checkout pySHiELD for externally triggered if: ${{inputs.component_trigger}} uses: actions/checkout@v4 with: submodules: 'recursive' - repository: NOAA-GFDL/pace - path: pace + repository: NOAA-GFDL/PySHiELD + path: pySHiELD ref: develop - name: Checkout component for externally triggered @@ -48,7 +40,7 @@ jobs: uses: actions/checkout@v4 with: submodules: 'recursive' - path: pace/${{inputs.component_location}} + path: pySHiELD/${{inputs.component_name}} - name: Checkout pyshield repository for internally triggered if: ${{!inputs.component_trigger}} @@ -58,17 +50,17 @@ jobs: path: pySHiELD - name: Install packages for FV3 triggered - if : ${{contains(inputs.component_location, 'FV3')}} + if : ${{contains(inputs.component_name, 'FV3')}} run : | - cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_location}} + cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_name}} pip3 install --upgrade pip setuptools wheel pip3 install .[test] cd ../ && pip3 install .[ndsl,test] - name: Install packages for NDSL trigger - if : ${{contains(inputs.component_location, 'NDSL')}} + if : ${{contains(inputs.component_name, 'NDSL')}} run: | - cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_location}} + cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_name}} pip3 install --upgrade pip setuptools wheel pip3 install .[test] cd ../ && pip3 install .[pyFV3,test] From 136baa0be9f1ff4dbf374c4eed59c535b149e9aa Mon Sep 17 00:00:00 2001 From: mlee03 Date: Tue, 2 Jul 2024 07:54:25 -0400 Subject: [PATCH 12/15] test --- .github/workflows/translate.yaml | 30 +++++++++++------------------- setup.py | 2 +- 2 files changed, 12 insertions(+), 20 deletions(-) diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index c5da54b..91bbd3a 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -1,4 +1,4 @@ -name: "pySHiELD Translate test" +name: "PySHiELD Translate Tests" on: workflow_call: inputs: @@ -8,7 +8,7 @@ on: required: false component_name: type: string - default: 'None' + default: '' required: false push: pull_request: @@ -26,7 +26,7 @@ jobs: image: ghcr.io/noaa-gfdl/miniforge:mpich steps: - - name: Checkout pySHiELD for externally triggered + - name: external trigger Checkout pySHiELD if: ${{inputs.component_trigger}} uses: actions/checkout@v4 with: @@ -35,37 +35,29 @@ jobs: path: pySHiELD ref: develop - - name: Checkout component for externally triggered - if: ${{inputs.component_trigger}} + - name: Checkout hash that triggered CI uses: actions/checkout@v4 with: submodules: 'recursive' path: pySHiELD/${{inputs.component_name}} - - name: Checkout pyshield repository for internally triggered - if: ${{!inputs.component_trigger}} - uses: actions/checkout@v4 - with: - submodules: 'recursive' - path: pySHiELD - - - name: Install packages for FV3 triggered + - name: external trigger Install packages for FV3 component if : ${{contains(inputs.component_name, 'FV3')}} run : | - cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_name}} + cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel - pip3 install .[test] + cd ${{inputs.component_name}} && pip3 install .[test] && cd .. cd ../ && pip3 install .[ndsl,test] - - name: Install packages for NDSL trigger + - name: external trigger Install packages for NDSL component if : ${{contains(inputs.component_name, 'NDSL')}} run: | - cd ${GITHUB_WORKSPACE}/pySHiELD/${{inputs.component_name}} + cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel - pip3 install .[test] + cd ${{inputs.component_name}} && pip3 install .[test] && cd .. cd ../ && pip3 install .[pyFV3,test] - - name: Install pySHiELD Python packages + - name: Install pySHiELD packages if: ${{ !inputs.component_trigger}} run: | cd ${GITHUB_WORKSPACE}/pySHiELD diff --git a/setup.py b/setup.py index 597e7b3..4177baf 100755 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ setup( author="Vulcan Technologies LLC", author_email="elynnw@vulcan.com", - python_requires=">=3.8", + python_requires=">=3.11.7", classifiers=[ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", From 8913881c16956ed23fcffe26c7355e3efff60303 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Tue, 2 Jul 2024 08:06:52 -0400 Subject: [PATCH 13/15] test --- .github/workflows/pace_tests.yaml | 4 ++-- .github/workflows/translate.yaml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 0307a40..af48f27 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -1,11 +1,11 @@ -name: "Pace unit tests" +name: "Pace main tests" on: push: pull_request: types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] jobs: - pace_unit_tests: + pace_main_tests: uses: mlee03/pace/.github/workflows/main_unit_tests.yaml@reusable_workflow with: component_trigger: true diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index 91bbd3a..b296f2c 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -47,7 +47,7 @@ jobs: cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel cd ${{inputs.component_name}} && pip3 install .[test] && cd .. - cd ../ && pip3 install .[ndsl,test] + pip3 install .[ndsl,test] - name: external trigger Install packages for NDSL component if : ${{contains(inputs.component_name, 'NDSL')}} @@ -55,7 +55,7 @@ jobs: cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel cd ${{inputs.component_name}} && pip3 install .[test] && cd .. - cd ../ && pip3 install .[pyFV3,test] + pip3 install .[pyFV3,test] - name: Install pySHiELD packages if: ${{ !inputs.component_trigger}} From b0fd9ade7d13473110e5590187035445bda76a0f Mon Sep 17 00:00:00 2001 From: mlee03 Date: Tue, 2 Jul 2024 12:02:36 -0400 Subject: [PATCH 14/15] fix caps --- .github/workflows/translate.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index b296f2c..8324805 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -1,4 +1,4 @@ -name: "PySHiELD Translate Tests" +name: "PySHiELD translate tests" on: workflow_call: inputs: @@ -12,7 +12,6 @@ on: required: false push: pull_request: - types: [opened, synchronize, reopened, ready_for_review, labeled, unlabeled] # cancel running jobs if theres a newer push concurrency: From 4609e468c5c351a64302cb674645b9e7d21c5f13 Mon Sep 17 00:00:00 2001 From: mlee03 Date: Tue, 2 Jul 2024 12:07:04 -0400 Subject: [PATCH 15/15] lint --- .github/workflows/pace_tests.yaml | 1 - .github/workflows/translate.yaml | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pace_tests.yaml b/.github/workflows/pace_tests.yaml index 5c841bb..2c889af 100644 --- a/.github/workflows/pace_tests.yaml +++ b/.github/workflows/pace_tests.yaml @@ -8,4 +8,3 @@ jobs: with: component_trigger: true component_name: pySHiELD - \ No newline at end of file diff --git a/.github/workflows/translate.yaml b/.github/workflows/translate.yaml index 55e2aa7..20b4620 100644 --- a/.github/workflows/translate.yaml +++ b/.github/workflows/translate.yaml @@ -40,15 +40,15 @@ jobs: path: pySHiELD/${{inputs.component_name}} - name: external trigger Install packages for FV3 component - if : ${{contains(inputs.component_name, 'FV3')}} + if : ${{contains(inputs.component_name, 'FV3')}} run : | cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel cd ${{inputs.component_name}} && pip3 install .[test] && cd .. pip3 install .[ndsl,test] - + - name: external trigger Install packages for NDSL component - if : ${{contains(inputs.component_name, 'NDSL')}} + if : ${{contains(inputs.component_name, 'NDSL')}} run: | cd ${GITHUB_WORKSPACE}/pySHiELD pip3 install --upgrade pip setuptools wheel