From c12e11c3dcaef7785a43caf659fa9947adad4ae7 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:04:27 -0600 Subject: [PATCH 01/36] Update python-app.yml --- .github/workflows/python-app.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 69eade2..8ef443b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -5,9 +5,9 @@ name: visualCaseGen CI tests on: push: - branches: [ "main" ] + branches: [ "main", "ci" ] pull_request: - branches: [ "main" ] + branches: [ "main", "ci" ] permissions: contents: read @@ -23,8 +23,8 @@ jobs: - name: Set up Miniconda uses: conda-incubator/setup-miniconda@v3 with: + auto-update-conda: true python-version: 3.10 # Replace with your desired Python version - conda-channels: conda-forge # Add your preferred channels - name: Create visualCaseGen conda env From c020bc09965caac23f84439b28e7822a4f4edcaa Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:07:39 -0600 Subject: [PATCH 02/36] Update python-app.yml --- .github/workflows/python-app.yml | 45 ++++++++++++-------------------- 1 file changed, 17 insertions(+), 28 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 8ef443b..0c370f9 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -13,33 +13,22 @@ permissions: contents: read jobs: - test: - - runs-on: ubuntu-latest - + example-3: + name: Ex3 Linux + runs-on: "ubuntu-latest" + defaults: + run: + shell: bash -el {0} steps: - - uses: actions/checkout@v3 - - - name: Set up Miniconda - uses: conda-incubator/setup-miniconda@v3 - with: - auto-update-conda: true - python-version: 3.10 # Replace with your desired Python version + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 + with: + activate-environment: anaconda-client-env + environment-file: etc/example-environment.yml + python-version: 3.5 + condarc-file: etc/example-condarc.yml + auto-activate-base: false + - run: | + conda info + conda list - - - name: Create visualCaseGen conda env - run: | - run: | - conda env create --file environment.yml - conda activate visualCaseGen - - #- name: Lint with flake8 - # run: | - # # stop the build if there are Python syntax errors or undefined names - # flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics - # # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide - # flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - - - name: Run CI tests - run: | - pytest tests/1_unit From ae6a4a1a11fab1448abad101ac61e20fca27caee Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:09:03 -0600 Subject: [PATCH 03/36] Update python-app.yml --- .github/workflows/python-app.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0c370f9..6783e7e 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -24,10 +24,9 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: anaconda-client-env - environment-file: etc/example-environment.yml - python-version: 3.5 - condarc-file: etc/example-condarc.yml - auto-activate-base: false + python-version: 3.10 + auto-activate-base: true + environment-file: environment.yml - run: | conda info conda list From 0436da36f40e98485e490d5e3f924c1e5014a376 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:10:29 -0600 Subject: [PATCH 04/36] Update python-app.yml --- .github/workflows/python-app.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6783e7e..5c2f2c7 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -16,17 +16,12 @@ jobs: example-3: name: Ex3 Linux runs-on: "ubuntu-latest" - defaults: - run: - shell: bash -el {0} steps: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: - activate-environment: anaconda-client-env python-version: 3.10 auto-activate-base: true - environment-file: environment.yml - run: | conda info conda list From fb6423eb404e940fc46be4c74b472e7c2ac26a8f Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:15:06 -0600 Subject: [PATCH 05/36] Update python-app.yml --- .github/workflows/python-app.yml | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 5c2f2c7..eef8afd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -9,9 +9,6 @@ on: pull_request: branches: [ "main", "ci" ] -permissions: - contents: read - jobs: example-3: name: Ex3 Linux @@ -20,9 +17,5 @@ jobs: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: - python-version: 3.10 - auto-activate-base: true - - run: | - conda info - conda list + activate-environment: whatever From 1c6ce4c56216e20b09213e50695f4e0cc38f5af1 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:16:16 -0600 Subject: [PATCH 06/36] Update python-app.yml --- .github/workflows/python-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index eef8afd..386fbec 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -17,5 +17,6 @@ jobs: - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: + environment-file: environment.yml activate-environment: whatever From 652185a2156a150884be846f9dc9715191683763 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:17:28 -0600 Subject: [PATCH 07/36] Update python-app.yml --- .github/workflows/python-app.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 386fbec..0fa43ba 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -18,5 +18,4 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml - activate-environment: whatever From bc51b9deed22e27421834752c7168fa2100e9153 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:21:32 -0600 Subject: [PATCH 08/36] Update python-app.yml --- .github/workflows/python-app.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0fa43ba..9a79edd 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -9,6 +9,9 @@ on: pull_request: branches: [ "main", "ci" ] +permissions: + contents: write + jobs: example-3: name: Ex3 Linux From cb29e819978652b7ae8ffc9ca7ab8a4f8d84f85e Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:23:25 -0600 Subject: [PATCH 09/36] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 0d790df..30d95fe 100644 --- a/environment.yml +++ b/environment.yml @@ -9,6 +9,6 @@ dependencies: #- xesmf - pip - pip: - - -e ./external/mom6_bathy/ + #- -e ./external/mom6_bathy/ - -e ./external/ipyfilechooser/ - -e ./ # visualCaseGen From 6adafd6c95d785c52158578faf1a555cfd07590a Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:25:04 -0600 Subject: [PATCH 10/36] Update environment.yml --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index 30d95fe..40e3e9b 100644 --- a/environment.yml +++ b/environment.yml @@ -10,5 +10,5 @@ dependencies: - pip - pip: #- -e ./external/mom6_bathy/ - - -e ./external/ipyfilechooser/ + #- -e ./external/ipyfilechooser/ - -e ./ # visualCaseGen From 6b0f67adf2f5f128d90aee91e016fdce9bbe013c Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:28:53 -0600 Subject: [PATCH 11/36] Update environment.yml --- environment.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/environment.yml b/environment.yml index 40e3e9b..0d790df 100644 --- a/environment.yml +++ b/environment.yml @@ -9,6 +9,6 @@ dependencies: #- xesmf - pip - pip: - #- -e ./external/mom6_bathy/ - #- -e ./external/ipyfilechooser/ + - -e ./external/mom6_bathy/ + - -e ./external/ipyfilechooser/ - -e ./ # visualCaseGen From 229750ffd05fca41215e25a93bf966d689bc143c Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:29:36 -0600 Subject: [PATCH 12/36] Update python-app.yml --- .github/workflows/python-app.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 9a79edd..27dbaae 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -18,6 +18,8 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v4 + with: + submodules: 'true' - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml From 8c7dcb27852739bdf886cc959db558170746f73a Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:31:41 -0600 Subject: [PATCH 13/36] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 27dbaae..3dc4d7d 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -19,7 +19,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: 'true' + submodules: recursive - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml From 56f95984425df32915780da3e4f56539967072a1 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:39:50 -0600 Subject: [PATCH 14/36] Update python-app.yml --- .github/workflows/python-app.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3dc4d7d..dc6e418 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -9,12 +9,12 @@ on: pull_request: branches: [ "main", "ci" ] -permissions: - contents: write +#permissions: +# contents: write jobs: - example-3: - name: Ex3 Linux + ci_tests: + name: visualCaseGen CI tests runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v4 @@ -23,4 +23,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: environment-file: environment.yml + - name: Run unittests + run: pytest tests/1_unit + From 3cca51a0c02633dc16d6690d6b137bc982cea95c Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:43:20 -0600 Subject: [PATCH 15/36] Update python-app.yml --- .github/workflows/python-app.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index dc6e418..b061ff1 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,8 +21,10 @@ jobs: with: submodules: recursive - uses: conda-incubator/setup-miniconda@v3 - with: - environment-file: environment.yml + - name: Create visualCaseGen conda env + run: | + conda env create --file environment.yml + conda activate visualCaseGen - name: Run unittests run: pytest tests/1_unit From 2ce05739907cfba0405572c4e6cdee437aa5a309 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:45:19 -0600 Subject: [PATCH 16/36] Update python-app.yml --- .github/workflows/python-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b061ff1..4005f83 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,6 +23,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 - name: Create visualCaseGen conda env run: | + conda init conda env create --file environment.yml conda activate visualCaseGen - name: Run unittests From fe218556671d04df7d182cbe7b2d5c629751463d Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:48:06 -0600 Subject: [PATCH 17/36] Update python-app.yml --- .github/workflows/python-app.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4005f83..6af1830 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -21,9 +21,10 @@ jobs: with: submodules: recursive - uses: conda-incubator/setup-miniconda@v3 + with: + auto-activate-base: true - name: Create visualCaseGen conda env run: | - conda init conda env create --file environment.yml conda activate visualCaseGen - name: Run unittests From 8941957e362c4adb689ee19e0b70d39a75684c42 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:50:15 -0600 Subject: [PATCH 18/36] Update python-app.yml --- .github/workflows/python-app.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 6af1830..50f12f4 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -24,6 +24,7 @@ jobs: with: auto-activate-base: true - name: Create visualCaseGen conda env + shell: bash -el {0} run: | conda env create --file environment.yml conda activate visualCaseGen From 8fffcefe4d57f7c321b6d8798f4967d9571009c6 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:53:04 -0600 Subject: [PATCH 19/36] Update python-app.yml --- .github/workflows/python-app.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 50f12f4..445340f 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -16,6 +16,9 @@ jobs: ci_tests: name: visualCaseGen CI tests runs-on: "ubuntu-latest" + defaults: + run: + shell: bash -el {0} steps: - uses: actions/checkout@v4 with: @@ -24,11 +27,11 @@ jobs: with: auto-activate-base: true - name: Create visualCaseGen conda env - shell: bash -el {0} run: | conda env create --file environment.yml conda activate visualCaseGen - - name: Run unittests - run: pytest tests/1_unit + pytest tests/1_unit + #- name: Run unittests + # run: pytest tests/1_unit From 22f152ddc622d9fa0d112bcb8f0cb20a95d57ab2 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 10:59:52 -0600 Subject: [PATCH 20/36] Update python-app.yml --- .github/workflows/python-app.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 445340f..3b27ecf 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,15 +22,17 @@ jobs: steps: - uses: actions/checkout@v4 with: - submodules: recursive - - uses: conda-incubator/setup-miniconda@v3 - with: - auto-activate-base: true - - name: Create visualCaseGen conda env - run: | - conda env create --file environment.yml - conda activate visualCaseGen - pytest tests/1_unit + name: alperaltuntas/CESM + ref: refs/heads/cesm2_3_alpha17b_gui + #submodules: recursive + #- uses: conda-incubator/setup-miniconda@v3 + # with: + # auto-activate-base: true + #- name: Create visualCaseGen conda env + # run: | + # conda env create --file environment.yml + # conda activate visualCaseGen + # pytest tests/1_unit #- name: Run unittests # run: pytest tests/1_unit From 83f84a16716fdd5ac11e7a965fb6cb76816888e7 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:01:25 -0600 Subject: [PATCH 21/36] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3b27ecf..1caa597 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -23,7 +23,7 @@ jobs: - uses: actions/checkout@v4 with: name: alperaltuntas/CESM - ref: refs/heads/cesm2_3_alpha17b_gui + ref: cesm2_3_alpha17b_gui #submodules: recursive #- uses: conda-incubator/setup-miniconda@v3 # with: From 3ee833989e1d92b3ce379a45c95103d7d07b2577 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:02:55 -0600 Subject: [PATCH 22/36] Update python-app.yml --- .github/workflows/python-app.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 1caa597..891ab04 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -22,7 +22,7 @@ jobs: steps: - uses: actions/checkout@v4 with: - name: alperaltuntas/CESM + repository: alperaltuntas/CESM ref: cesm2_3_alpha17b_gui #submodules: recursive #- uses: conda-incubator/setup-miniconda@v3 From 5ee1e4912beda0386c0ebdacac31a11be4a6bcfe Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:04:33 -0600 Subject: [PATCH 23/36] Update python-app.yml --- .github/workflows/python-app.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 891ab04..a59ba82 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -25,6 +25,10 @@ jobs: repository: alperaltuntas/CESM ref: cesm2_3_alpha17b_gui #submodules: recursive + - name: checkout CESM + run: | + cd cesm + ./manage_externals/checkout_externals -o #- uses: conda-incubator/setup-miniconda@v3 # with: # auto-activate-base: true From 97025755fa5a6ce6cb52d565e25e8c542e7374c2 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:05:20 -0600 Subject: [PATCH 24/36] Update python-app.yml --- .github/workflows/python-app.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index a59ba82..0876c52 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,8 +27,9 @@ jobs: #submodules: recursive - name: checkout CESM run: | - cd cesm - ./manage_externals/checkout_externals -o + ls + #cd cesm + #./manage_externals/checkout_externals -o #- uses: conda-incubator/setup-miniconda@v3 # with: # auto-activate-base: true From d3a6bc914387cb5e608f17aaa95ddd9a0a44d672 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:06:03 -0600 Subject: [PATCH 25/36] Update python-app.yml --- .github/workflows/python-app.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 0876c52..b9511ef 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -27,9 +27,7 @@ jobs: #submodules: recursive - name: checkout CESM run: | - ls - #cd cesm - #./manage_externals/checkout_externals -o + ./manage_externals/checkout_externals -o #- uses: conda-incubator/setup-miniconda@v3 # with: # auto-activate-base: true From 52988ce563ddeaae02a7dee414929b464796e7ef Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:09:17 -0600 Subject: [PATCH 26/36] Update python-app.yml --- .github/workflows/python-app.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index b9511ef..4afff79 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -20,22 +20,31 @@ jobs: run: shell: bash -el {0} steps: + + # clone CESM - uses: actions/checkout@v4 with: repository: alperaltuntas/CESM ref: cesm2_3_alpha17b_gui #submodules: recursive + + # Run manage_Externals - name: checkout CESM run: | ./manage_externals/checkout_externals -o - #- uses: conda-incubator/setup-miniconda@v3 - # with: - # auto-activate-base: true - #- name: Create visualCaseGen conda env - # run: | - # conda env create --file environment.yml - # conda activate visualCaseGen - # pytest tests/1_unit + + # set up conda + - uses: conda-incubator/setup-miniconda@v3 + with: + auto-activate-base: true + + # visualCaseGen conda env + - name: Create visualCaseGen conda env + run: | + cd visualCaseGen/ + conda env create --file environment.yml + conda activate visualCaseGen + pytest tests/1_unit #- name: Run unittests # run: pytest tests/1_unit From 09cd7f0f9623d4a318f181d1a894cb3c81e02297 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 11:16:25 -0600 Subject: [PATCH 27/36] Update python-app.yml --- .github/workflows/python-app.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 4afff79..a060d2a 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -1,7 +1,6 @@ -# This workflow will install Python dependencies, run tests and lint with a single version of Python -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python +# This workflow will install CESM, create visualCaseGen conda env, and run all CI tests. -name: visualCaseGen CI tests +name: visualCaseGen CI on: push: @@ -9,9 +8,6 @@ on: pull_request: branches: [ "main", "ci" ] -#permissions: -# contents: write - jobs: ci_tests: name: visualCaseGen CI tests @@ -44,8 +40,14 @@ jobs: cd visualCaseGen/ conda env create --file environment.yml conda activate visualCaseGen - pytest tests/1_unit - #- name: Run unittests - # run: pytest tests/1_unit - + + # Run all tests + - name: Unit + run: pytest tests/1_unit + - name: Integration + run: pytest tests/2_integration + - name: System + run: pytest tests/3_system + - name: Static + run: pytest tests/4_static From c4f422ffa42f5fc9f3f100c6cfc6c482d6531c90 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 11:26:20 -0600 Subject: [PATCH 28/36] update workflows --- .github/workflows/{python-app.yml => ci-tests.yml} | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename .github/workflows/{python-app.yml => ci-tests.yml} (95%) diff --git a/.github/workflows/python-app.yml b/.github/workflows/ci-tests.yml similarity index 95% rename from .github/workflows/python-app.yml rename to .github/workflows/ci-tests.yml index a060d2a..980569c 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/ci-tests.yml @@ -31,8 +31,8 @@ jobs: # set up conda - uses: conda-incubator/setup-miniconda@v3 - with: - auto-activate-base: true + #with: + # auto-activate-base: true # visualCaseGen conda env - name: Create visualCaseGen conda env From 4f881ef7090b935452c857236e6727ae3b0140fa Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 11:32:12 -0600 Subject: [PATCH 29/36] update workflows --- .github/workflows/ci-tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 980569c..6da2d76 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -31,7 +31,8 @@ jobs: # set up conda - uses: conda-incubator/setup-miniconda@v3 - #with: + with: + activate-environment: visualCaseGen # auto-activate-base: true # visualCaseGen conda env From d1fc1e27671dde63015aad3428e2cd95633d2339 Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 11:36:15 -0600 Subject: [PATCH 30/36] update workflows --- .github/workflows/ci-tests.yml | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 6da2d76..3fc6115 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -31,9 +31,6 @@ jobs: # set up conda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: visualCaseGen - # auto-activate-base: true # visualCaseGen conda env - name: Create visualCaseGen conda env @@ -43,12 +40,8 @@ jobs: conda activate visualCaseGen # Run all tests - - name: Unit - run: pytest tests/1_unit - - name: Integration - run: pytest tests/2_integration - - name: System - run: pytest tests/3_system - - name: Static - run: pytest tests/4_static + - name: Run tests + run: | + conda activate visualCaseGen + pytest tests From d7a94c52184da00f471240c6585ca840df47fdec Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 11:41:52 -0600 Subject: [PATCH 31/36] update workflows --- .github/workflows/ci-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 3fc6115..19084d4 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -42,6 +42,7 @@ jobs: # Run all tests - name: Run tests run: | + cd visualCaseGen/ conda activate visualCaseGen pytest tests From ba1892779817f9ae037cde0245f4c69b3c47608d Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 11:50:24 -0600 Subject: [PATCH 32/36] update workflows --- .github/workflows/ci-tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 19084d4..de9a3da 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -17,6 +17,9 @@ jobs: shell: bash -el {0} steps: + - name: Install xmllint + run: sudo apt-get install -y libxml2-utils + # clone CESM - uses: actions/checkout@v4 with: From bb4b04ef92ef8923ffe58e4222da9b81f60897ef Mon Sep 17 00:00:00 2001 From: alperaltuntas Date: Wed, 27 Mar 2024 12:43:37 -0600 Subject: [PATCH 33/36] update workflows --- .github/workflows/ci-tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index de9a3da..b801c41 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -41,10 +41,16 @@ jobs: cd visualCaseGen/ conda env create --file environment.yml conda activate visualCaseGen - + # Run all tests - name: Run tests + env: + CIME_MODEL: "cesm" + CIME_DRIVER: "nuopc" + CIME_TEST_PLATFORM: ubuntu-latest run: | + export SRC_PATH="${GITHUB_WORKSPACE}" + echo $SRC_PATH cd visualCaseGen/ conda activate visualCaseGen pytest tests From dc0c28412b35eda8b7bf23e8279ac1df2b4e54a1 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 12:54:33 -0600 Subject: [PATCH 34/36] create CIME_OUTPUT_ROOT if it doesn't exist --- visualCaseGen/cime_interface.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/visualCaseGen/cime_interface.py b/visualCaseGen/cime_interface.py index 408dc49..2878dbc 100644 --- a/visualCaseGen/cime_interface.py +++ b/visualCaseGen/cime_interface.py @@ -526,9 +526,11 @@ def _retrieve_machines(self): f"Couldn't determine CIME_OUTPUT_ROOT for {self.machine}" ) if not os.path.exists(self.cime_output_root): - logger.error( - f"CIME_OUTPUT_ROOT doesn't exist: {self.cime_output_root}" + logger.warning( + f"CIME_OUTPUT_ROOT doesn't exist. Creating it at {self.cime_output_root}" ) + # recursively create the directory + os.makedirs(self.cime_output_root) # Determine DIN_LOC_ROOT din_loc_root_node = machines_obj.get_child( @@ -542,7 +544,7 @@ def _retrieve_machines(self): logger.error(f"DIN_LOC_ROOT doesn't exist: {self.din_loc_root}") break - + # Keep a record of whether a project id is required for each machine for machine in self.machines: machines_obj = Machines(machs_file, machine=machine) From a5b7c481b5030a4ef8c4515b6299468fe5a428ac Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 13:02:57 -0600 Subject: [PATCH 35/36] update ci --- .github/workflows/ci-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index b801c41..a8ed990 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -50,7 +50,7 @@ jobs: CIME_TEST_PLATFORM: ubuntu-latest run: | export SRC_PATH="${GITHUB_WORKSPACE}" - echo $SRC_PATH + mkdir scratch cd visualCaseGen/ conda activate visualCaseGen pytest tests From d6ab064909512982f3c3e4f44839702f024ec591 Mon Sep 17 00:00:00 2001 From: Alper Altuntas Date: Wed, 27 Mar 2024 13:09:55 -0600 Subject: [PATCH 36/36] update ci --- .github/workflows/ci-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index a8ed990..ea7d799 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -50,7 +50,7 @@ jobs: CIME_TEST_PLATFORM: ubuntu-latest run: | export SRC_PATH="${GITHUB_WORKSPACE}" - mkdir scratch + mkdir -p /home/runner/cesm/scratch cd visualCaseGen/ conda activate visualCaseGen pytest tests