From 00fb4cf3604f7dc2afd9041392b194e608d5cd7b Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 15:12:54 +0200 Subject: [PATCH 01/22] Fix missing font issue --- src/proteus/utils/plot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proteus/utils/plot.py b/src/proteus/utils/plot.py index d7c22532..c3080d3c 100644 --- a/src/proteus/utils/plot.py +++ b/src/proteus/utils/plot.py @@ -302,7 +302,7 @@ def set_properties( self, nrows, ncols, width, height ): # Set main font properties font_d = { 'size': 10.0, - 'family': ['Arial','sans-serif'] + 'family': ['sans-serif'] } # fonts = fm.findSystemFonts(fontpaths=None, fontext='ttf') From 20b0ebc02e7be59f145e7bd46f4f776886eb8c58 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 15:13:25 +0200 Subject: [PATCH 02/22] Add integration test --- tests/integration/test_proteus_start.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tests/integration/test_proteus_start.py diff --git a/tests/integration/test_proteus_start.py b/tests/integration/test_proteus_start.py new file mode 100644 index 00000000..64cae1d9 --- /dev/null +++ b/tests/integration/test_proteus_start.py @@ -0,0 +1,23 @@ +from __future__ import annotations + +from pathlib import Path + +from helpers import PROTEUS_ROOT + +from proteus import Proteus + + +def test_dummy_run(): + config_path = PROTEUS_ROOT / 'input' / 'dummy.toml' + + runner = Proteus(config_path=config_path) + + runner.config['log_level'] = 'WARNING' + runner.config['plot_iterfreq'] = 0 + runner.config['iter_max'] = 0 + + runner.start() + + output = Path(runner.directories['output']) + + assert 'Completed' in (output / 'status').read_text() From d91de8c3d09f4f837b223b06db03ff7b6492e848 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 16:34:19 +0200 Subject: [PATCH 03/22] Install MORS, JANUS, SOCRATES --- .github/workflows/tests.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 770c4f30..8bec9157 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -44,6 +44,29 @@ jobs: run: | python -m pip install -e .[develop] + - name: Install JANUS+MORS + run: | + python -m pip install git+https://github.com/FormingWorlds/JANUS + python -m pip install git+https://github.com/FormingWorlds/MORS + + - uses: actions/cache@v3 + id: cache-socrates + with: + path: | + SOCRATES/bin + SOCRATES/sbin + SOCRATES/set_rad_env + key: socrates-${{ hashFiles('SOCRATES/version') }} + + - name: Build SOCRATES + if: steps.cache-socrates.outputs.cache-hit != 'true' + run: | + export LD_LIBRARY_PATH="" + cd SOCRATES + ./configure + ./build_code + cd .. + - uses: actions/cache@v3 id: cache-fwl-data with: @@ -55,6 +78,7 @@ jobs: source PROTEUS.env export FWL_DATA="/home/runner/work/fwl_data" export RAD_DIR="./SOCRATES" + export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 coverage run -m pytest - name: Report coverage From 2710abd608d098ec300f04e0797036b7caa4626a Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 16:36:27 +0200 Subject: [PATCH 04/22] Add socrates dependencies --- .github/workflows/tests.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8bec9157..d44a28bb 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,6 +49,11 @@ jobs: python -m pip install git+https://github.com/FormingWorlds/JANUS python -m pip install git+https://github.com/FormingWorlds/MORS + - name: Setup system for SOCRATES + run: | + sudo apt-get update + sudo apt-get install libnetcdff-dev netcdf-bin + - uses: actions/cache@v3 id: cache-socrates with: From 9b748c2f8efe20983b812d2490466857d3982034 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 16:47:46 +0200 Subject: [PATCH 05/22] Download frostflow --- .github/workflows/tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d44a28bb..204825ca 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -84,6 +84,8 @@ jobs: export FWL_DATA="/home/runner/work/fwl_data" export RAD_DIR="./SOCRATES" export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 + + janus download spectral -n Frostflow -b 48 coverage run -m pytest - name: Report coverage From dd411124b02cd91301a088b936d061d43c5d7014 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 16:47:55 +0200 Subject: [PATCH 06/22] Download SOCRATES --- .github/workflows/tests.yaml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 204825ca..5a860cbc 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -26,7 +26,7 @@ jobs: steps: - uses: actions/checkout@v3 with: - submodules: 'true' + submodules: 'false' - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -54,6 +54,12 @@ jobs: sudo apt-get update sudo apt-get install libnetcdff-dev netcdf-bin + - name: Get SOCRATES + uses: actions/checkout@v4 + with: + repository: 'FormingWorlds/SOCRATES' + path: 'SOCRATES' + - uses: actions/cache@v3 id: cache-socrates with: From 5356d5c242c7cb057d2e979ab61f449a75a44104 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:08:45 +0200 Subject: [PATCH 07/22] Pre-download all files --- .github/workflows/tests.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 5a860cbc..0bc117be 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -91,7 +91,13 @@ jobs: export RAD_DIR="./SOCRATES" export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 + mors download all + janus download stellar + janus download spectral janus download spectral -n Frostflow -b 48 + + ls $FWL_DATA + coverage run -m pytest - name: Report coverage From ee91b260f75a0d03fb087c0802b910b282a291fe Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:16:06 +0200 Subject: [PATCH 08/22] Fix mors: command not found --- .github/workflows/tests.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0bc117be..1f6c562c 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -91,10 +91,10 @@ jobs: export RAD_DIR="./SOCRATES" export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 - mors download all - janus download stellar - janus download spectral - janus download spectral -n Frostflow -b 48 + python -m mors download all + python -m janus download stellar + python -m janus download spectral + python -m janus download spectral -n Frostflow -b 48 ls $FWL_DATA From c70d2e05a2b6905e9e8c50f54d163c6ef8152d93 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:19:33 +0200 Subject: [PATCH 09/22] Fix mors: command not found --- .github/workflows/tests.yaml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 1f6c562c..d23e1bcf 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -86,17 +86,16 @@ jobs: - name: Test with pytest run: | - source PROTEUS.env export FWL_DATA="/home/runner/work/fwl_data" - export RAD_DIR="./SOCRATES" - export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 - python -m mors download all - python -m janus download stellar - python -m janus download spectral - python -m janus download spectral -n Frostflow -b 48 + mors download all + janus download stellar + janus download spectral + janus download spectral -n Frostflow -b 48 - ls $FWL_DATA + export RAD_DIR="./SOCRATES" + export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 + source PROTEUS.env coverage run -m pytest From 6b74be1697ea0709536e4e8e95717b5ea74e9894 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:22:43 +0200 Subject: [PATCH 10/22] Add sanity check --- .github/workflows/tests.yaml | 65 ++++++++++++++++++++---------------- 1 file changed, 36 insertions(+), 29 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d23e1bcf..d6f49f1b 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -49,34 +49,37 @@ jobs: python -m pip install git+https://github.com/FormingWorlds/JANUS python -m pip install git+https://github.com/FormingWorlds/MORS - - name: Setup system for SOCRATES - run: | - sudo apt-get update - sudo apt-get install libnetcdff-dev netcdf-bin - - - name: Get SOCRATES - uses: actions/checkout@v4 - with: - repository: 'FormingWorlds/SOCRATES' - path: 'SOCRATES' - - - uses: actions/cache@v3 - id: cache-socrates - with: - path: | - SOCRATES/bin - SOCRATES/sbin - SOCRATES/set_rad_env - key: socrates-${{ hashFiles('SOCRATES/version') }} - - - name: Build SOCRATES - if: steps.cache-socrates.outputs.cache-hit != 'true' - run: | - export LD_LIBRARY_PATH="" - cd SOCRATES - ./configure - ./build_code - cd .. + # - name: Setup system for SOCRATES + # run: | + # sudo apt-get update + # sudo apt-get install libnetcdff-dev netcdf-bin + + # - name: Get SOCRATES + # uses: actions/checkout@v4 + # with: + # repository: 'FormingWorlds/SOCRATES' + # path: 'SOCRATES' + + # - uses: actions/cache@v3 + # id: cache-socrates + # with: + # path: | + # SOCRATES/bin + # SOCRATES/sbin + # SOCRATES/set_rad_env + # key: socrates-${{ hashFiles('SOCRATES/version') }} + + # - name: Build SOCRATES + # if: steps.cache-socrates.outputs.cache-hit != 'true' + # run: | + # export LD_LIBRARY_PATH="" + # cd SOCRATES + # ./configure + # ./build_code + # cd .. + + - name: Sanity check + run: which mors - uses: actions/cache@v3 id: cache-fwl-data @@ -84,7 +87,8 @@ jobs: path: /home/runner/work/fwl_data key: fwl-data-1 - - name: Test with pytest + - name: Install dependencies + if: steps.cache-fwl-data.cache-hit != 'true' run: | export FWL_DATA="/home/runner/work/fwl_data" @@ -93,6 +97,9 @@ jobs: janus download spectral janus download spectral -n Frostflow -b 48 + - name: Test with pytest + run: | + export FWL_DATA="/home/runner/work/fwl_data" export RAD_DIR="./SOCRATES" export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 source PROTEUS.env From fe9d333bd64b4075e1aa79aaa8fa50d8427e0d7c Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:28:58 +0200 Subject: [PATCH 11/22] Switch JANUS/MORS install order --- .github/workflows/tests.yaml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d6f49f1b..d6f533a6 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -46,8 +46,8 @@ jobs: - name: Install JANUS+MORS run: | - python -m pip install git+https://github.com/FormingWorlds/JANUS python -m pip install git+https://github.com/FormingWorlds/MORS + python -m pip install git+https://github.com/FormingWorlds/JANUS # - name: Setup system for SOCRATES # run: | @@ -78,14 +78,11 @@ jobs: # ./build_code # cd .. - - name: Sanity check - run: which mors - - uses: actions/cache@v3 id: cache-fwl-data with: path: /home/runner/work/fwl_data - key: fwl-data-1 + key: fwl-data-2 - name: Install dependencies if: steps.cache-fwl-data.cache-hit != 'true' From 47279a37ba50c8dba3ea8389d1404815bf0a4ad5 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:34:16 +0200 Subject: [PATCH 12/22] Try entire workflow --- .github/workflows/tests.yaml | 69 ++++++++++++++++++------------------ 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index d6f533a6..7fb28f35 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -23,6 +23,11 @@ jobs: matrix: python-version: ['3.10'] + env: + FWL_DATA: /home/runner/work/fwl_data + RAD_DIR: ./SOCRATES + SOCRATES: ./SOCRATES # https://github.com/FormingWorlds/JANUS/issues/51 + steps: - uses: actions/checkout@v3 with: @@ -49,46 +54,44 @@ jobs: python -m pip install git+https://github.com/FormingWorlds/MORS python -m pip install git+https://github.com/FormingWorlds/JANUS - # - name: Setup system for SOCRATES - # run: | - # sudo apt-get update - # sudo apt-get install libnetcdff-dev netcdf-bin - - # - name: Get SOCRATES - # uses: actions/checkout@v4 - # with: - # repository: 'FormingWorlds/SOCRATES' - # path: 'SOCRATES' - - # - uses: actions/cache@v3 - # id: cache-socrates - # with: - # path: | - # SOCRATES/bin - # SOCRATES/sbin - # SOCRATES/set_rad_env - # key: socrates-${{ hashFiles('SOCRATES/version') }} - - # - name: Build SOCRATES - # if: steps.cache-socrates.outputs.cache-hit != 'true' - # run: | - # export LD_LIBRARY_PATH="" - # cd SOCRATES - # ./configure - # ./build_code - # cd .. + - name: Setup system for SOCRATES + run: | + sudo apt-get update + sudo apt-get install libnetcdff-dev netcdf-bin + + - name: Get SOCRATES + uses: actions/checkout@v4 + with: + repository: 'FormingWorlds/SOCRATES' + path: 'SOCRATES' + + - uses: actions/cache@v3 + id: cache-socrates + with: + path: | + SOCRATES/bin + SOCRATES/sbin + SOCRATES/set_rad_env + key: socrates-${{ hashFiles('SOCRATES/version') }} + + - name: Build SOCRATES + if: steps.cache-socrates.outputs.cache-hit != 'true' + run: | + export LD_LIBRARY_PATH="" + cd SOCRATES + ./configure + ./build_code + cd .. - uses: actions/cache@v3 id: cache-fwl-data with: - path: /home/runner/work/fwl_data + path: $FWL_DATA key: fwl-data-2 - name: Install dependencies if: steps.cache-fwl-data.cache-hit != 'true' run: | - export FWL_DATA="/home/runner/work/fwl_data" - mors download all janus download stellar janus download spectral @@ -96,11 +99,7 @@ jobs: - name: Test with pytest run: | - export FWL_DATA="/home/runner/work/fwl_data" - export RAD_DIR="./SOCRATES" - export SOCRATES="./SOCRATES" # https://github.com/FormingWorlds/JANUS/issues/51 source PROTEUS.env - coverage run -m pytest - name: Report coverage From 3e8762d69610485ab515c75dd438469c6fbf1f52 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:42:47 +0200 Subject: [PATCH 13/22] Fix env var --- .github/workflows/tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 7fb28f35..da48087e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -86,10 +86,10 @@ jobs: - uses: actions/cache@v3 id: cache-fwl-data with: - path: $FWL_DATA + path: ${{ env.FWL_DATA }} key: fwl-data-2 - - name: Install dependencies + - name: Pre-download fwl data if: steps.cache-fwl-data.cache-hit != 'true' run: | mors download all From 6f99f03b3e998c4d91168fd1686968c3cdf53097 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:43:31 +0200 Subject: [PATCH 14/22] Download SPIDER --- .github/workflows/tests.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index da48087e..636f37c8 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -83,6 +83,12 @@ jobs: ./build_code cd .. + - name: Get SPIDER + uses: actions/checkout@v4 + with: + repository: 'djbower/SPIDER' + path: 'SPIDER' + - uses: actions/cache@v3 id: cache-fwl-data with: From eafa4109b360aadb58634a3f5d7b51993174195b Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:49:18 +0200 Subject: [PATCH 15/22] Build SPIDER --- .github/workflows/tests.yaml | 66 ++++++++++++++++++++++-------------- 1 file changed, 40 insertions(+), 26 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 636f37c8..59d9d824 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -54,34 +54,34 @@ jobs: python -m pip install git+https://github.com/FormingWorlds/MORS python -m pip install git+https://github.com/FormingWorlds/JANUS - - name: Setup system for SOCRATES + - name: Setup system for SOCRATES/SPIDER run: | sudo apt-get update - sudo apt-get install libnetcdff-dev netcdf-bin - - - name: Get SOCRATES - uses: actions/checkout@v4 - with: - repository: 'FormingWorlds/SOCRATES' - path: 'SOCRATES' - - - uses: actions/cache@v3 - id: cache-socrates - with: - path: | - SOCRATES/bin - SOCRATES/sbin - SOCRATES/set_rad_env - key: socrates-${{ hashFiles('SOCRATES/version') }} - - - name: Build SOCRATES - if: steps.cache-socrates.outputs.cache-hit != 'true' - run: | - export LD_LIBRARY_PATH="" - cd SOCRATES - ./configure - ./build_code - cd .. + sudo apt-get install libnetcdff-dev netcdf-bin petsc-dev + + # - name: Get SOCRATES + # uses: actions/checkout@v4 + # with: + # repository: 'FormingWorlds/SOCRATES' + # path: 'SOCRATES' + + # - uses: actions/cache@v3 + # id: cache-socrates + # with: + # path: | + # SOCRATES/bin + # SOCRATES/sbin + # SOCRATES/set_rad_env + # key: socrates-${{ hashFiles('SOCRATES/version') }} + + # - name: Build SOCRATES + # if: steps.cache-socrates.outputs.cache-hit != 'true' + # run: | + # export LD_LIBRARY_PATH="" + # cd SOCRATES + # ./configure + # ./build_code + # cd .. - name: Get SPIDER uses: actions/checkout@v4 @@ -89,6 +89,20 @@ jobs: repository: 'djbower/SPIDER' path: 'SPIDER' + # - uses: actions/cache@v3 + # id: cache-spider + # with: + # path: | + # ... + # key: spider-${{ hashFiles('SPIDER/version') }} + + - name: Build SPIDER + # if: steps.cache-spider.outputs.cache-hit != 'true' + run: | + cd SPIDER + make -j + cd .. + - uses: actions/cache@v3 id: cache-fwl-data with: From 657dd4156fed69776918b0dd0c59d7dd9d3aebf6 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:56:35 +0200 Subject: [PATCH 16/22] Set PETSC_DIR --- .github/workflows/tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 59d9d824..fe4fc09d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -100,6 +100,8 @@ jobs: # if: steps.cache-spider.outputs.cache-hit != 'true' run: | cd SPIDER + export PETSC_DIR="/usr/lib/petscdir" + export PETSC_ARCH="arch-linux-c-opt" make -j cd .. From ae9d2c5025db495ac5b1982263a2738da28582c0 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Mon, 26 Aug 2024 17:58:39 +0200 Subject: [PATCH 17/22] Try other PETSC_DIR --- .github/workflows/tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index fe4fc09d..0bf4f657 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -100,7 +100,7 @@ jobs: # if: steps.cache-spider.outputs.cache-hit != 'true' run: | cd SPIDER - export PETSC_DIR="/usr/lib/petscdir" + export PETSC_DIR="/usr/lib/petsc" export PETSC_ARCH="arch-linux-c-opt" make -j cd .. From 0cb25561099749400ebe54362191f838350f2910 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Tue, 27 Aug 2024 09:40:31 +0200 Subject: [PATCH 18/22] Fix make command --- .github/workflows/tests.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 0bf4f657..030bd955 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -100,6 +100,7 @@ jobs: # if: steps.cache-spider.outputs.cache-hit != 'true' run: | cd SPIDER + sed -i 's/clean ::/clean :/g' Makefile export PETSC_DIR="/usr/lib/petsc" export PETSC_ARCH="arch-linux-c-opt" make -j From 69120f72b62eb6fd6bdfd85bd392349704d47bf7 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Tue, 27 Aug 2024 10:14:16 +0200 Subject: [PATCH 19/22] Avoid installing petsc/spider --- .github/workflows/tests.yaml | 67 ++++++++----------------- tests/integration/test_proteus_start.py | 5 ++ 2 files changed, 27 insertions(+), 45 deletions(-) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 030bd955..da48087e 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -54,56 +54,33 @@ jobs: python -m pip install git+https://github.com/FormingWorlds/MORS python -m pip install git+https://github.com/FormingWorlds/JANUS - - name: Setup system for SOCRATES/SPIDER + - name: Setup system for SOCRATES run: | sudo apt-get update - sudo apt-get install libnetcdff-dev netcdf-bin petsc-dev - - # - name: Get SOCRATES - # uses: actions/checkout@v4 - # with: - # repository: 'FormingWorlds/SOCRATES' - # path: 'SOCRATES' - - # - uses: actions/cache@v3 - # id: cache-socrates - # with: - # path: | - # SOCRATES/bin - # SOCRATES/sbin - # SOCRATES/set_rad_env - # key: socrates-${{ hashFiles('SOCRATES/version') }} - - # - name: Build SOCRATES - # if: steps.cache-socrates.outputs.cache-hit != 'true' - # run: | - # export LD_LIBRARY_PATH="" - # cd SOCRATES - # ./configure - # ./build_code - # cd .. - - - name: Get SPIDER + sudo apt-get install libnetcdff-dev netcdf-bin + + - name: Get SOCRATES uses: actions/checkout@v4 with: - repository: 'djbower/SPIDER' - path: 'SPIDER' - - # - uses: actions/cache@v3 - # id: cache-spider - # with: - # path: | - # ... - # key: spider-${{ hashFiles('SPIDER/version') }} - - - name: Build SPIDER - # if: steps.cache-spider.outputs.cache-hit != 'true' + repository: 'FormingWorlds/SOCRATES' + path: 'SOCRATES' + + - uses: actions/cache@v3 + id: cache-socrates + with: + path: | + SOCRATES/bin + SOCRATES/sbin + SOCRATES/set_rad_env + key: socrates-${{ hashFiles('SOCRATES/version') }} + + - name: Build SOCRATES + if: steps.cache-socrates.outputs.cache-hit != 'true' run: | - cd SPIDER - sed -i 's/clean ::/clean :/g' Makefile - export PETSC_DIR="/usr/lib/petsc" - export PETSC_ARCH="arch-linux-c-opt" - make -j + export LD_LIBRARY_PATH="" + cd SOCRATES + ./configure + ./build_code cd .. - uses: actions/cache@v3 diff --git a/tests/integration/test_proteus_start.py b/tests/integration/test_proteus_start.py index 64cae1d9..027d6597 100644 --- a/tests/integration/test_proteus_start.py +++ b/tests/integration/test_proteus_start.py @@ -1,11 +1,16 @@ from __future__ import annotations +import os from pathlib import Path +import pytest from helpers import PROTEUS_ROOT from proteus import Proteus +if os.getenv('CI'): + pytest.skip(reason='No way of currently testing this on the CI.') + def test_dummy_run(): config_path = PROTEUS_ROOT / 'input' / 'dummy.toml' From 95912ac30c906d89b5a42b49bf575aabfb3e1937 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Tue, 27 Aug 2024 10:24:08 +0200 Subject: [PATCH 20/22] Fix skip --- tests/integration/test_proteus_start.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/test_proteus_start.py b/tests/integration/test_proteus_start.py index 027d6597..ed5fb1cc 100644 --- a/tests/integration/test_proteus_start.py +++ b/tests/integration/test_proteus_start.py @@ -9,7 +9,7 @@ from proteus import Proteus if os.getenv('CI'): - pytest.skip(reason='No way of currently testing this on the CI.') + pytest.skip(reason='No way of currently testing this on the CI.', allow_module_level=True) def test_dummy_run(): From 4cb5673e6230d416be83858ae8f467062229abe3 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Tue, 27 Aug 2024 10:31:37 +0200 Subject: [PATCH 21/22] Trigger workflow From 0fa6c106e1b504e8a1f088d2b878d632997893d1 Mon Sep 17 00:00:00 2001 From: Stef Smeets Date: Tue, 27 Aug 2024 10:36:29 +0200 Subject: [PATCH 22/22] Add comment to tests --- tests/integration/test_proteus_start.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/integration/test_proteus_start.py b/tests/integration/test_proteus_start.py index ed5fb1cc..6fba8bb3 100644 --- a/tests/integration/test_proteus_start.py +++ b/tests/integration/test_proteus_start.py @@ -9,6 +9,7 @@ from proteus import Proteus if os.getenv('CI'): + # https://github.com/FormingWorlds/PROTEUS/pull/149 pytest.skip(reason='No way of currently testing this on the CI.', allow_module_level=True)