From 7a17c2a4e30b691cc8df885ae3e58262f44bee15 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 15:56:15 +0200 Subject: [PATCH 01/19] [cicd] rewrite recipe to use conda-incubator/setup-miniconda@v3 --- .github/workflows/python-package-conda.yml | 31 +++++----------------- 1 file changed, 7 insertions(+), 24 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index ef12749..c4bbaeb 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -3,37 +3,20 @@ name: conda build on: [ push ] jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - ubuntu-latest - - windows-latest - - macos-latest + linux: + runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.10 - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: + miniconda-version: "latest" python-version: '3.10' - - name: Set paths and variables windows - if: startsWith(matrix.os, 'windows') - run: | - echo "$env:CONDA\condabin" | Out-File -FilePath $env:GITHUB_PATH -Append - echo "$env:CONDA\Scripts" | Out-File -FilePath $env:GITHUB_PATH -Append - echo "$env:CONDA\Library\bin" | Out-File -FilePath $env:GITHUB_PATH -Append - echo "PROJ_DATA=$env:CONDA\Library\share\proj" | Out-File -FilePath $env:GITHUB_ENV -Append + environment-file: environment.yml + shell: bash -el {0} - name: Set paths and variables - if: ${{ ! startsWith(matrix.os, 'windows') }} run: | - echo "$CONDA/bin" >> $GITHUB_PATH echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV - - name: Install dependencies - run: | - conda env update --file environment.yml --name base - name: Lint with flake8 - if: startsWith(matrix.os, 'ubuntu') run: | conda install flake8 # stop the build if there are Python syntax errors or undefined names From 45b7ac056f98a858d6f8a7edc947835bdd0307e1 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:00:11 +0200 Subject: [PATCH 02/19] [cicd] conda build update --- .github/workflows/python-package-conda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index c4bbaeb..7f15b8d 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -12,11 +12,11 @@ jobs: miniconda-version: "latest" python-version: '3.10' environment-file: environment.yml - shell: bash -el {0} - name: Set paths and variables run: | echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV - name: Lint with flake8 + shell: bash -el {0} run: | conda install flake8 # stop the build if there are Python syntax errors or undefined names @@ -27,6 +27,7 @@ jobs: run: | pip install . - name: Test with pytest + shell: bash -el {0} run: | conda install pytest coverage coverage run -m pytest From 34c7b4d243e5c5535df02e9d1a0d6810d81ffbf1 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:15:19 +0200 Subject: [PATCH 03/19] [cicd] add temporary print messages --- .github/workflows/python-package-conda.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 7f15b8d..75bd160 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -25,6 +25,8 @@ jobs: flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics - name: Install package run: | + echo $(pwd) + echo $(which pip) pip install . - name: Test with pytest shell: bash -el {0} From 7e662a7949eb5058fed8d66810cad5c6797711e3 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:22:00 +0200 Subject: [PATCH 04/19] [cicd] activate env in conda build --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 75bd160..29d7118 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,6 +10,7 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" + activate-environment: test python-version: '3.10' environment-file: environment.yml - name: Set paths and variables From b539885e8d94deb6b44086868f2803f8cff88b15 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:30:45 +0200 Subject: [PATCH 05/19] [cicd] conda build revert to actions/checkout@v3 --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 29d7118..5719db6 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -6,7 +6,7 @@ jobs: linux: runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" From 798567eda311a02726ac54d96d9db4c231bbf599 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:36:51 +0200 Subject: [PATCH 06/19] [cicd] conda build specify shell for pip install --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 5719db6..fd02931 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -25,6 +25,7 @@ jobs: # 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: Install package + shell: bash -el {0} run: | echo $(pwd) echo $(which pip) From 4313f20334acebcd96d5cc87aa86340ad04034b1 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:40:22 +0200 Subject: [PATCH 07/19] require numpy<2.0 --- environment-doc.yml | 2 +- environment.yml | 2 +- requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/environment-doc.yml b/environment-doc.yml index baf5d7d..e6729f0 100644 --- a/environment-doc.yml +++ b/environment-doc.yml @@ -6,7 +6,7 @@ dependencies: - python>=3.8 - progressbar2 - pathos>=0.2 - - numpy + - numpy<2.0 - matplotlib-base - tblib - pyyaml diff --git a/environment.yml b/environment.yml index f10264a..776a5cf 100644 --- a/environment.yml +++ b/environment.yml @@ -6,7 +6,7 @@ dependencies: - python>=3.8 - progressbar2 - pathos>=0.2 - - numpy + - numpy<2.0 - matplotlib-base - tblib - pyyaml diff --git a/requirements.txt b/requirements.txt index b8a5807..d2dc049 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ progressbar2 pathos>=0.2 -numpy +numpy<2.0 tblib pyyaml dill From 0b87a0d87a0c746780e3ca257a623bc7a00d9fa3 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:42:38 +0200 Subject: [PATCH 08/19] [cicd] conda build: remove 'activate-environment: test' --- .github/workflows/python-package-conda.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index fd02931..cc65cf1 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -10,7 +10,6 @@ jobs: - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" - activate-environment: test python-version: '3.10' environment-file: environment.yml - name: Set paths and variables @@ -27,8 +26,6 @@ jobs: - name: Install package shell: bash -el {0} run: | - echo $(pwd) - echo $(which pip) pip install . - name: Test with pytest shell: bash -el {0} From 8c4817adc0739515b0b0e91ad62f530803eced51 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 16:52:40 +0200 Subject: [PATCH 09/19] [cicd] conda build: do not set path to proj_data --- .github/workflows/python-package-conda.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index cc65cf1..b0e5e32 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -12,9 +12,6 @@ jobs: miniconda-version: "latest" python-version: '3.10' environment-file: environment.yml - - name: Set paths and variables - run: | - echo "PROJ_DATA=$CONDA/share/proj" >> $GITHUB_ENV - name: Lint with flake8 shell: bash -el {0} run: | From c26c81e74eb3550b9a68b98e4589dc7ce52574bd Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:02:46 +0200 Subject: [PATCH 10/19] [cicd] conda build: increase versions --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index b0e5e32..bfec118 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -6,7 +6,7 @@ jobs: linux: runs-on: "ubuntu-latest" steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: conda-incubator/setup-miniconda@v3 with: miniconda-version: "latest" @@ -30,6 +30,6 @@ jobs: conda install pytest coverage coverage run -m pytest - name: Publish to coveralls.io - uses: coverallsapp/github-action@v2 + uses: coverallsapp/github-action@v2.3.0 with: github-token: ${{ github.token }} From 9dc19d3eaafbc41bf3ff2090ec8f1d7459a6b45e Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:13:52 +0200 Subject: [PATCH 11/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index bfec118..40479d3 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -1,6 +1,6 @@ name: conda build -on: [ push ] +on: ["push", "pull_request"] jobs: linux: From 11b7f69f18cba8c5ea9181bb79206e6142d5620b Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:22:36 +0200 Subject: [PATCH 12/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 40479d3..3138272 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -29,6 +29,10 @@ jobs: run: | conda install pytest coverage coverage run -m pytest + - name: list directory content + shell: bash -el {0} + run: | + ls -lha - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: From 3a090d538f69fd4e5cecfbdc59b4a3ca1325a140 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:29:03 +0200 Subject: [PATCH 13/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 3138272..88b1868 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -33,6 +33,7 @@ jobs: shell: bash -el {0} run: | ls -lha + cat .coverage - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: From abfc90f24ec148332db0a85a8509becc2aa1df06 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:36:25 +0200 Subject: [PATCH 14/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 88b1868..3e1df6b 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -1,6 +1,6 @@ name: conda build -on: ["push", "pull_request"] +on: [ "push"] jobs: linux: @@ -33,8 +33,7 @@ jobs: shell: bash -el {0} run: | ls -lha - cat .coverage - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: - github-token: ${{ github.token }} + github-token: ${{ secrets.GITHUB_TOKEN }} From c8eb64739b42125e68655f936d5c233f45ebe1b0 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:39:55 +0200 Subject: [PATCH 15/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 3e1df6b..b48631b 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -1,6 +1,6 @@ name: conda build -on: [ "push"] +on: [ "push" ] jobs: linux: @@ -29,6 +29,8 @@ jobs: run: | conda install pytest coverage coverage run -m pytest + coverage report + coverage xml - name: list directory content shell: bash -el {0} run: | @@ -36,4 +38,5 @@ jobs: - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: + path-to-lcov: ./coverage.xml github-token: ${{ secrets.GITHUB_TOKEN }} From a8824a8e1066597ede66cae600097ad4090d0712 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:45:34 +0200 Subject: [PATCH 16/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index b48631b..58483f8 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -29,7 +29,6 @@ jobs: run: | conda install pytest coverage coverage run -m pytest - coverage report coverage xml - name: list directory content shell: bash -el {0} @@ -38,5 +37,5 @@ jobs: - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: - path-to-lcov: ./coverage.xml + path-to-lcov: coverage.xml github-token: ${{ secrets.GITHUB_TOKEN }} From 84bc1363431626e219d19710e391eabbefd43956 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:48:42 +0200 Subject: [PATCH 17/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 58483f8..1d48ef6 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -29,12 +29,7 @@ jobs: run: | conda install pytest coverage coverage run -m pytest - coverage xml - - name: list directory content - shell: bash -el {0} - run: | - ls -lha - - name: Publish to coveralls.io + - name: Publish to .coverage uses: coverallsapp/github-action@v2.3.0 with: path-to-lcov: coverage.xml From 424f8f6bffcbc158a46a30a63f1422886baff170 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:49:30 +0200 Subject: [PATCH 18/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 1d48ef6..15ff783 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -29,8 +29,8 @@ jobs: run: | conda install pytest coverage coverage run -m pytest - - name: Publish to .coverage + - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: - path-to-lcov: coverage.xml + path-to-lcov: .coverage github-token: ${{ secrets.GITHUB_TOKEN }} From 494c0611b6cc4509f2c6a62c51211d9830e2a1e8 Mon Sep 17 00:00:00 2001 From: John Truckenbrodt Date: Wed, 3 Jul 2024 17:52:39 +0200 Subject: [PATCH 19/19] [cicd] conda build: update --- .github/workflows/python-package-conda.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index 15ff783..331fc15 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -29,8 +29,9 @@ jobs: run: | conda install pytest coverage coverage run -m pytest + coverage xml - name: Publish to coveralls.io uses: coverallsapp/github-action@v2.3.0 with: - path-to-lcov: .coverage + path-to-lcov: coverage.xml github-token: ${{ secrets.GITHUB_TOKEN }}