From f26445dc51be2e40a7d3ea90f8adafcb66448a53 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 11:30:28 +0100 Subject: [PATCH 01/40] CI: add `os: osx` build job - and comment out linux job matrix for now --- .travis.yml | 43 ++++++++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19e3eef9..d27b93e5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,26 +3,34 @@ version: ~> 1.0 # require the branch name to be master if: branch = master -language: python -python: - # https://docs.travis-ci.com/user/languages/python/#python-versions - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12-dev" -matrix: - fast_finish: true +# # temporarily skip linux job matrix +# language: python +# python: +# # https://docs.travis-ci.com/user/languages/python/#python-versions +# - "3.8" +# - "3.9" +# - "3.10" +# - "3.11" +# - "3.12-dev" +# matrix: +# fast_finish: true -arch: arm64 -virt: lxd -os: linux -dist: focal -sudo: false +# arch: arm64 +# virt: lxd +# os: linux +# dist: focal +# sudo: false + +jobs: + include: + - os: osx + osx_image: xcode12.2 + language: shell # 'language: python' is an error on Travis CI macOS before_install: # Python package manager - - travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - bash miniconda.sh -b -p $HOME/miniconda - export PATH="$HOME/miniconda/bin:$PATH"; hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no @@ -39,7 +47,8 @@ install: - travis_retry conda create -n test-env - eval "$(conda shell.bash hook)" - conda activate test-env - - travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev} + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=3.11; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all From 2ba8e664f824c307fb9e7dccc618543003144ed3 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 11:58:25 +0100 Subject: [PATCH 02/40] CI: fixup f26445d --- .travis.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d27b93e5..cd9c9cf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ install: - eval "$(conda shell.bash hook)" - conda activate test-env - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=3.11; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry conda install -c conda-forge python=3.11; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all @@ -62,10 +62,14 @@ install: before_script: # limit parallel processes to available cores (error if pattern not found) - - sed -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py - - sed -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg - - sed -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml - - sed -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi + - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi script: # package From b1ae3c03868589e2454f79d6e362590e30980d6b Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 12:11:46 +0100 Subject: [PATCH 03/40] CI: fixup 2ba8e66 - remove `sed` commands for macos build - try refactoring job matrix, including linux jobs again --- .travis.yml | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.travis.yml b/.travis.yml index cd9c9cf1..114d69bb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,25 +4,28 @@ version: ~> 1.0 if: branch = master # # temporarily skip linux job matrix -# language: python -# python: -# # https://docs.travis-ci.com/user/languages/python/#python-versions -# - "3.8" -# - "3.9" -# - "3.10" -# - "3.11" -# - "3.12-dev" -# matrix: -# fast_finish: true - -# arch: arm64 -# virt: lxd -# os: linux -# dist: focal -# sudo: false +language: python +os: + - linux + - osx +python: + # https://docs.travis-ci.com/user/languages/python/#python-versions + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12-dev" +matrix: + fast_finish: true jobs: include: + - os: linux + arch: arm64 + virt: lxd + os: linux + dist: focal + sudo: false - os: osx osx_image: xcode12.2 language: shell # 'language: python' is an error on Travis CI macOS @@ -66,10 +69,6 @@ before_script: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then sed -i '' '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi script: # package From 23bf91a1d21736f7e0fa0a7f8b24cae3dbe9cfbe Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 12:17:14 +0100 Subject: [PATCH 04/40] CI: fixup - remove linux jobs again, try finishing osx first --- .travis.yml | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 114d69bb..9d6690c7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,28 +4,25 @@ version: ~> 1.0 if: branch = master # # temporarily skip linux job matrix -language: python -os: - - linux - - osx -python: - # https://docs.travis-ci.com/user/languages/python/#python-versions - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12-dev" -matrix: - fast_finish: true +# language: python +# python: +# # https://docs.travis-ci.com/user/languages/python/#python-versions +# - "3.8" +# - "3.9" +# - "3.10" +# - "3.11" +# - "3.12-dev" +# matrix: +# fast_finish: true + +# arch: arm64 +# virt: lxd +# os: linux +# dist: focal +# sudo: false jobs: include: - - os: linux - arch: arm64 - virt: lxd - os: linux - dist: focal - sudo: false - os: osx osx_image: xcode12.2 language: shell # 'language: python' is an error on Travis CI macOS From 7609f9b07e73787ece9c67ac424ced5c50f46b7e Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 13:35:16 +0100 Subject: [PATCH 05/40] CI: now try windows --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9d6690c7..cf2b94f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,15 +23,19 @@ if: branch = master jobs: include: - - os: osx - osx_image: xcode12.2 - language: shell # 'language: python' is an error on Travis CI macOS + # - os: osx + # osx_image: xcode12.2 + # language: shell # 'language: python' is not available on Travis CI macOS + - os: windows + language: shell + before_install: # Python package manager - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - - bash miniconda.sh -b -p $HOME/miniconda + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then miniconda.exe; else bash miniconda.sh -b -p $HOME/miniconda; fi - export PATH="$HOME/miniconda/bin:$PATH"; hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda @@ -47,8 +51,7 @@ install: - travis_retry conda create -n test-env - eval "$(conda shell.bash hook)" - conda activate test-env - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry conda install -c conda-forge python=3.11; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.11; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all From 0b876985f14baabd1950a8ebefa466d5541124d9 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 13:45:29 +0100 Subject: [PATCH 06/40] CI: fixup 7609f9b --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cf2b94f0..becd9970 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ before_install: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - if [ "$TRAVIS_OS_NAME" = "windows" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe; fi - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then miniconda.exe; else bash miniconda.sh -b -p $HOME/miniconda; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ./miniconda.exe; else bash miniconda.sh -b -p $HOME/miniconda; fi - export PATH="$HOME/miniconda/bin:$PATH"; hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda From e9c28bcf03a141be6e862da0512607ffe34cfb97 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 14:29:19 +0100 Subject: [PATCH 07/40] CI: fixup 0b87698 --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index becd9970..fd594370 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,15 +28,15 @@ jobs: # language: shell # 'language: python' is not available on Travis CI macOS - os: windows language: shell - + before_install: + - travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + - ./miniconda.exe /InstallationType=JustMe /AddToPath=1 /S /D=$HOME\miniconda before_install: # Python package manager - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe; fi - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then ./miniconda.exe; else bash miniconda.sh -b -p $HOME/miniconda; fi - - export PATH="$HOME/miniconda/bin:$PATH"; hash -r + - if [ "$TRAVIS_OS_NAME" -ne "windows" ]; then bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; hash -r; fi - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From 6ef407d47a0750650fbe91f4d7bbb4511ff94fae Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 15:06:42 +0100 Subject: [PATCH 08/40] CI: fixup e9c28bc --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fd594370..44d2ca58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,7 @@ jobs: - os: windows language: shell before_install: - - travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - - ./miniconda.exe /InstallationType=JustMe /AddToPath=1 /S /D=$HOME\miniconda + - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath:1 /S /D=%UserProfile%\miniconda'" before_install: # Python package manager From 691c5e39fda9bd2aa1c8e81d2ed504139748b7e6 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Fri, 12 Jan 2024 15:10:48 +0100 Subject: [PATCH 09/40] CI: fixup 6ef407d --- .travis.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 44d2ca58..25ba822c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,12 +30,20 @@ jobs: language: shell before_install: - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath:1 /S /D=%UserProfile%\miniconda'" + - conda config --set quiet yes --set always_yes yes --set changeps1 no + - travis_retry conda update -n base -c defaults conda + - travis_retry conda update --all + - conda config --set solver libmamba + # debugging info + - conda info -a + - conda list before_install: # Python package manager - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - - if [ "$TRAVIS_OS_NAME" -ne "windows" ]; then bash miniconda.sh -b -p $HOME/miniconda; export PATH="$HOME/miniconda/bin:$PATH"; hash -r; fi + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH"; hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From 514d6fe7e51d859fd5e609634478c1fd7176d321 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 11:41:58 +0100 Subject: [PATCH 10/40] CI: try `miniconda.exe` again --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25ba822c..e1546261 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,14 +29,12 @@ jobs: - os: windows language: shell before_install: - - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath:1 /S /D=%UserProfile%\miniconda'" + - travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all - conda config --set solver libmamba - # debugging info - - conda info -a - - conda list before_install: # Python package manager From 36c107e8bd441ce16bec258d4d689d88cd9bf6d6 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 11:54:12 +0100 Subject: [PATCH 11/40] CI: try curl instead of wget - and remove install options --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1546261..5d061742 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,8 @@ jobs: - os: windows language: shell before_install: - - travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda + - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe + - start /wait "" miniconda.exe /S - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From fe538c9c920db5c08995469106786bd57c7b6b49 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 12:06:39 +0100 Subject: [PATCH 12/40] CI: try wget again ... --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5d061742..b465705f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,8 +29,8 @@ jobs: - os: windows language: shell before_install: - - curl https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -o miniconda.exe - - start /wait "" miniconda.exe /S + - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + - travis_retry start /wait "" miniconda.exe /S - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From 5145e49d52e5428f41b46142e9851e6ed5dcdfb1 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 15:19:20 +0100 Subject: [PATCH 13/40] CI: forget windows for now, try combining linux and macos jobs first --- .travis.yml | 47 +++++++++++++++++++---------------------------- 1 file changed, 19 insertions(+), 28 deletions(-) diff --git a/.travis.yml b/.travis.yml index b465705f..7e91ae86 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,38 +3,29 @@ version: ~> 1.0 # require the branch name to be master if: branch = master -# # temporarily skip linux job matrix -# language: python -# python: -# # https://docs.travis-ci.com/user/languages/python/#python-versions -# - "3.8" -# - "3.9" -# - "3.10" -# - "3.11" -# - "3.12-dev" -# matrix: -# fast_finish: true +language: python +python: + # https://docs.travis-ci.com/user/languages/python/#python-versions + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12-dev" +matrix: + fast_finish: true -# arch: arm64 -# virt: lxd -# os: linux -# dist: focal -# sudo: false +arch: arm64 +virt: lxd +os: linux +dist: focal +sudo: false jobs: include: - # - os: osx - # osx_image: xcode12.2 - # language: shell # 'language: python' is not available on Travis CI macOS - - os: windows - language: shell - before_install: - - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - - travis_retry start /wait "" miniconda.exe /S - - conda config --set quiet yes --set always_yes yes --set changeps1 no - - travis_retry conda update -n base -c defaults conda - - travis_retry conda update --all - - conda config --set solver libmamba + - python: "3.11" + os: osx + osx_image: xcode12.2 + language: shell # 'language: python' is not available on Travis CI macOS before_install: # Python package manager From f66d3e3a77437b1b3e291f71d146b5df9a4fd08d Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 15:25:21 +0100 Subject: [PATCH 14/40] CI: include all jobs explicitly - as adding to build matrix not working somehow --- .travis.yml | 55 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 36 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7e91ae86..f2354406 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,27 +3,44 @@ version: ~> 1.0 # require the branch name to be master if: branch = master -language: python -python: - # https://docs.travis-ci.com/user/languages/python/#python-versions - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12-dev" -matrix: - fast_finish: true - -arch: arm64 -virt: lxd -os: linux -dist: focal -sudo: false - jobs: include: - - python: "3.11" - os: osx + - os: linux + dist: focal + arch: arm64 + virt: lxd + sudo: false + language: python + python: "3.8" + - os: linux + dist: focal + arch: arm64 + virt: lxd + sudo: false + language: python + python: "3.9" + - os: linux + dist: focal + arch: arm64 + virt: lxd + sudo: false + language: python + python: "3.10" + - os: linux + dist: focal + arch: arm64 + virt: lxd + sudo: false + language: python + python: "3.11" + - os: linux + dist: focal + arch: arm64 + virt: lxd + sudo: false + language: python + python: "3.12-dev" + - os: osx osx_image: xcode12.2 language: shell # 'language: python' is not available on Travis CI macOS From 4846eb3dde889ae51b9f29c2cce850fb6af6154a Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 15:48:16 +0100 Subject: [PATCH 15/40] CI: now try windows again - found a typo in the choco install, try that one again now --- .travis.yml | 88 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 50 insertions(+), 38 deletions(-) diff --git a/.travis.yml b/.travis.yml index f2354406..f4079fb9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,44 +5,56 @@ if: branch = master jobs: include: - - os: linux - dist: focal - arch: arm64 - virt: lxd - sudo: false - language: python - python: "3.8" - - os: linux - dist: focal - arch: arm64 - virt: lxd - sudo: false - language: python - python: "3.9" - - os: linux - dist: focal - arch: arm64 - virt: lxd - sudo: false - language: python - python: "3.10" - - os: linux - dist: focal - arch: arm64 - virt: lxd - sudo: false - language: python - python: "3.11" - - os: linux - dist: focal - arch: arm64 - virt: lxd - sudo: false - language: python - python: "3.12-dev" - - os: osx - osx_image: xcode12.2 - language: shell # 'language: python' is not available on Travis CI macOS + # # linux jobs + # - os: linux + # dist: focal + # arch: arm64 + # virt: lxd + # sudo: false + # language: python + # python: "3.8" + # - os: linux + # dist: focal + # arch: arm64 + # virt: lxd + # sudo: false + # language: python + # python: "3.9" + # - os: linux + # dist: focal + # arch: arm64 + # virt: lxd + # sudo: false + # language: python + # python: "3.10" + # - os: linux + # dist: focal + # arch: arm64 + # virt: lxd + # sudo: false + # language: python + # python: "3.11" + # - os: linux + # dist: focal + # arch: arm64 + # virt: lxd + # sudo: false + # language: python + # python: "3.12-dev" + # # macOS job + # - os: osx + # osx_image: xcode12.2 + # language: shell # 'language: python' is not available on Travis CI macOS + # Windows job + - os: windows + language: shell + before_install: + - choco install miniconda3 --params="'/S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda'" + - refreshenv; path + - conda config --set quiet yes --set always_yes yes --set changeps1 no + - travis_retry conda update -n base -c defaults conda + - travis_retry conda update --all + - conda config --set solver libmamba before_install: # Python package manager From 46615ecf721f41921f74f715e97d5539703ab0da Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 15:51:09 +0100 Subject: [PATCH 16/40] CI: fixup 4846eb3 - cut `refrenshenv` command --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f4079fb9..c4cc3124 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,7 +50,6 @@ jobs: language: shell before_install: - choco install miniconda3 --params="'/S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda'" - - refreshenv; path - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From 8db98d049ae93c49bb6671a2178a74ccb7df6e88 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 15 Jan 2024 15:59:40 +0100 Subject: [PATCH 17/40] CI: try `refreshenv` again - and put `path` in new line --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4cc3124..297f610d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,6 +50,8 @@ jobs: language: shell before_install: - choco install miniconda3 --params="'/S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda'" + - refreshenv + - path - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all @@ -75,7 +77,7 @@ install: - travis_retry conda create -n test-env - eval "$(conda shell.bash hook)" - conda activate test-env - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.11; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.9; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all From 5012e2bc1088cab446bbcbe81f053edfb90878b1 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 10:43:58 +0100 Subject: [PATCH 18/40] CI: try choco again - with commands from example scripts --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 297f610d..5a64f229 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,9 +49,12 @@ jobs: - os: windows language: shell before_install: - - choco install miniconda3 --params="'/S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda'" - - refreshenv - - path + - export MINICONDA=$HOME/miniconda + - MINICONDA_WIN=$(cygpath --windows $MINICONDA) + - choco install openssl.light + - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" + - source $MINICONDA/etc/profile.d/conda.sh + - hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all From aa64a0b1799e91432d324196fe2549a93361c31b Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 11:14:36 +0100 Subject: [PATCH 19/40] CI: try installing from `.exe` again --- .travis.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5a64f229..1f1dffa9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,16 +49,20 @@ jobs: - os: windows language: shell before_install: - - export MINICONDA=$HOME/miniconda - - MINICONDA_WIN=$(cygpath --windows $MINICONDA) - - choco install openssl.light - - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" - - source $MINICONDA/etc/profile.d/conda.sh - - hash -r - - conda config --set quiet yes --set always_yes yes --set changeps1 no - - travis_retry conda update -n base -c defaults conda - - travis_retry conda update --all - - conda config --set solver libmamba + # - export MINICONDA=$HOME/miniconda + # - MINICONDA_WIN=$(cygpath --windows $MINICONDA) + # - choco install openssl.light + # - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" + # - source $MINICONDA/etc/profile.d/conda.sh + # - hash -r + # - conda config --set quiet yes --set always_yes yes --set changeps1 no + # - travis_retry conda update -n base -c defaults conda + # - travis_retry conda update --all + # - conda config --set solver libmamba + + - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + - wait + - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda before_install: # Python package manager From ef23c955e7a563858c7b563db128c1b478a215b1 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 11:23:42 +0100 Subject: [PATCH 20/40] CI: try choco again, fixup 5012e2b --- .travis.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f1dffa9..ee4d855d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,20 +49,26 @@ jobs: - os: windows language: shell before_install: - # - export MINICONDA=$HOME/miniconda - # - MINICONDA_WIN=$(cygpath --windows $MINICONDA) - # - choco install openssl.light - # - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" - # - source $MINICONDA/etc/profile.d/conda.sh - # - hash -r - # - conda config --set quiet yes --set always_yes yes --set changeps1 no - # - travis_retry conda update -n base -c defaults conda - # - travis_retry conda update --all - # - conda config --set solver libmamba + - export MINICONDA=$HOME/miniconda + - MINICONDA_WIN=$(cygpath --windows $MINICONDA) + - choco install openssl.light + - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" + - echo original PATH $PATH + - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/bin||') + - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin||') + - echo manipulated PATH $PATH + - source $MINICONDA/Scripts/activate + - source $MINICONDA/etc/profile.d/conda.sh + - hash -r + - conda config --set quiet yes --set always_yes yes --set changeps1 no + - travis_retry conda update -n base -c defaults conda + - travis_retry conda update --all + - conda config --set solver libmamba - - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - - wait - - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda + # install via exe + # - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + # - echo 'downloaded miniconda.exe' + # - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda before_install: # Python package manager From 0757abfc59a74bbea1519f84bce3bb8725582187 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 11:58:29 +0100 Subject: [PATCH 21/40] CI: try another `choco` script --- .travis.yml | 39 +++++++++++++++++++++++++++------------ 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index ee4d855d..5ff90a8a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,21 +49,36 @@ jobs: - os: windows language: shell before_install: - - export MINICONDA=$HOME/miniconda - - MINICONDA_WIN=$(cygpath --windows $MINICONDA) + # - export MINICONDA=$HOME/miniconda + # - MINICONDA_WIN=$(cygpath --windows $MINICONDA) + # - choco install openssl.light + # - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" + # - echo original PATH $PATH + # - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/bin||') + # - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin||') + # - echo manipulated PATH $PATH + # - source $MINICONDA/Scripts/activate + # - source $MINICONDA/etc/profile.d/conda.sh + # - hash -r + # - conda config --set quiet yes --set always_yes yes --set changeps1 no + # - travis_retry conda update -n base -c defaults conda + # - travis_retry conda update --all + # - conda config --set solver libmamba + + - export MINICONDA_PATH=$HOME/miniconda + - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` + - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts + - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - choco install openssl.light - - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" - - echo original PATH $PATH - - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/bin||') - - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin||') - - echo manipulated PATH $PATH - - source $MINICONDA/Scripts/activate - - source $MINICONDA/etc/profile.d/conda.sh + - echo "folder $MINICONDA_SUB_PATH does not exist" + - echo "installing miniconda for windows" + - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" + - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" + - echo "checking if folder $MINICONDA_SUB_PATH exists" + - if [[ -d $MINICONDA_SUB_PATH ]]; then echo "folder $MINICONDA_SUB_PATH exists"; else echo "folder $MINICONDA_SUB_PATH does not exist"; fi + - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r - conda config --set quiet yes --set always_yes yes --set changeps1 no - - travis_retry conda update -n base -c defaults conda - - travis_retry conda update --all - - conda config --set solver libmamba # install via exe # - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe From 3355814f00148161914a3c5de0f4b4d36c44d64f Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 12:06:22 +0100 Subject: [PATCH 22/40] CI: install worked! now fixup 0757abf --- .travis.yml | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5ff90a8a..b952f2f1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,41 +49,20 @@ jobs: - os: windows language: shell before_install: - # - export MINICONDA=$HOME/miniconda - # - MINICONDA_WIN=$(cygpath --windows $MINICONDA) - # - choco install openssl.light - # - choco install miniconda3 --params="'/InstallationType=JustMe /AddToPath=1 /D=MINICONDA_WIN'" - # - echo original PATH $PATH - # - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/bin||') - # - PATH=$(echo "$PATH" | sed -e 's|:/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw64/bin||') - # - echo manipulated PATH $PATH - # - source $MINICONDA/Scripts/activate - # - source $MINICONDA/etc/profile.d/conda.sh - # - hash -r - # - conda config --set quiet yes --set always_yes yes --set changeps1 no - # - travis_retry conda update -n base -c defaults conda - # - travis_retry conda update --all - # - conda config --set solver libmamba - - export MINICONDA_PATH=$HOME/miniconda - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - choco install openssl.light - - echo "folder $MINICONDA_SUB_PATH does not exist" - - echo "installing miniconda for windows" - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - - echo "checking if folder $MINICONDA_SUB_PATH exists" - - if [[ -d $MINICONDA_SUB_PATH ]]; then echo "folder $MINICONDA_SUB_PATH exists"; else echo "folder $MINICONDA_SUB_PATH does not exist"; fi - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r + - python --version - conda config --set quiet yes --set always_yes yes --set changeps1 no - - # install via exe - # - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - # - echo 'downloaded miniconda.exe' - # - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=%UserProfile%\miniconda + - travis_retry conda update -n base -c defaults conda + - travis_retry conda update --all + - conda config --set solver libmamba before_install: # Python package manager From 7698e853ab0430ee2e521f7c346913f58385f09d Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 12:11:20 +0100 Subject: [PATCH 23/40] CI: fixup 3355814 - setting libmamba solver failed, comment out for now --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b952f2f1..c363679a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,7 +62,7 @@ jobs: - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all - - conda config --set solver libmamba + - # conda config --set solver libmamba # libmamba solver is not available somehow before_install: # Python package manager From 6adfb5cfb2ee54799e9a03eb972fc104b11ac5c4 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 13:44:31 +0100 Subject: [PATCH 24/40] CI: try `python=3.11` --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c363679a..b667055f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: # Windows job - os: windows language: shell - before_install: + before_install: - export MINICONDA_PATH=$HOME/miniconda - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts @@ -62,7 +62,6 @@ jobs: - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all - - # conda config --set solver libmamba # libmamba solver is not available somehow before_install: # Python package manager @@ -84,7 +83,7 @@ install: - travis_retry conda create -n test-env - eval "$(conda shell.bash hook)" - conda activate test-env - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.9; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.11; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all From 36ccf714601e2f8b77ac5d4ca8c99bfd825cad9b Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 14:07:31 +0100 Subject: [PATCH 25/40] CI: try updating matplotlib --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b667055f..2c574f31 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,8 +53,10 @@ jobs: - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - - choco install openssl.light - - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" + # - choco install openssl.light + # - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" + - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe + - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=$MINICONDA_PATH_WIN - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r @@ -83,13 +85,14 @@ install: - travis_retry conda create -n test-env - eval "$(conda shell.bash hook)" - conda activate test-env - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.11; fi + - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.9; fi - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - travis_retry conda update -c conda-forge --all # testing dependencies - travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov - travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx + - travis_retry conda update -c conda-forge --all # debugging info - conda info -a From 5fc023a4a7ceb51d72a7e5863b72404018d6a2b4 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 14:09:36 +0100 Subject: [PATCH 26/40] CI: fixup 36ccf71 --- .travis.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2c574f31..b1d0c0a8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,10 +53,8 @@ jobs: - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - # - choco install openssl.light - # - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - - wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe -O miniconda.exe - - start /wait "" miniconda.exe /S /InstallationType=JustMe /AddToPath=1 /D=$MINICONDA_PATH_WIN + - choco install openssl.light + - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r From 022f22b07bd7f75739109f3b5b588cc25bcae231 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 14:33:19 +0100 Subject: [PATCH 27/40] CI: remove `matplotlib` preinstall --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b1d0c0a8..94da83e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -89,7 +89,7 @@ install: # testing dependencies - travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov - - travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx + - travis_retry conda install -c conda-forge networkx cartopy sphinx - travis_retry conda update -c conda-forge --all # debugging info From 6f870772d844220cf91a8157e7184c7b3badf72c Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 15:12:47 +0100 Subject: [PATCH 28/40] CI: try installing everything via pip --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94da83e7..10daf488 100644 --- a/.travis.yml +++ b/.travis.yml @@ -62,6 +62,12 @@ jobs: - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all + install: + # runtime dependencies + - travis_retry conda create -n test-env + - eval "$(conda shell.bash hook)" + - conda activate test-env + - travis_retry conda install -c conda-forge python=3.9 before_install: # Python package manager @@ -89,8 +95,7 @@ install: # testing dependencies - travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov - - travis_retry conda install -c conda-forge networkx cartopy sphinx - - travis_retry conda update -c conda-forge --all + - travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx # debugging info - conda info -a From df33978e160732887eab678b503122f8fe5908ee Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 15:42:18 +0100 Subject: [PATCH 29/40] CI: try setting `WINDIR` manually --- .travis.yml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 10daf488..b4a9f9a6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,6 +53,7 @@ jobs: - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin + - export WINDIR=%SystemRoot% - choco install openssl.light - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" @@ -62,12 +63,6 @@ jobs: - conda config --set quiet yes --set always_yes yes --set changeps1 no - travis_retry conda update -n base -c defaults conda - travis_retry conda update --all - install: - # runtime dependencies - - travis_retry conda create -n test-env - - eval "$(conda shell.bash hook)" - - conda activate test-env - - travis_retry conda install -c conda-forge python=3.9 before_install: # Python package manager From 73b1d27925d383ce895a229ced4a712dc3ed4084 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 15:56:36 +0100 Subject: [PATCH 30/40] CI: try the same but later --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index b4a9f9a6..30395cea 100644 --- a/.travis.yml +++ b/.travis.yml @@ -53,10 +53,11 @@ jobs: - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - - export WINDIR=%SystemRoot% - choco install openssl.light - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" + - echo $PATH + - export WINDIR=%SystemRoot% - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r - python --version @@ -108,6 +109,7 @@ script: - travis_retry pip install -v -e ".[testing,docs]" # test suite + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then export WINDIR=%SystemRoot%; fi - tox -v after_success: From 0a8d058d613d0316ded81be93360b09acdfbe424 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 16:14:20 +0100 Subject: [PATCH 31/40] CI: just check WINDIR is set --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 30395cea..bfedcffd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,8 +56,8 @@ jobs: - choco install openssl.light - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - - echo $PATH - - export WINDIR=%SystemRoot% + - echo "$PATH" | wc -l + - echo $WINDIR - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r - python --version From 147a406858c077f2bb585ab774a997276a50ef0c Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 16:19:36 +0100 Subject: [PATCH 32/40] CI: check again --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index bfedcffd..81321c23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,7 +56,7 @@ jobs: - choco install openssl.light - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - - echo "$PATH" | wc -l + - echo "$PATH" | wc -c - echo $WINDIR - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r @@ -109,7 +109,7 @@ script: - travis_retry pip install -v -e ".[testing,docs]" # test suite - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then export WINDIR=%SystemRoot%; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then echo $WINDIR; fi - tox -v after_success: From 7bb42d16ef2cf64f9daecba3426281cbd416ff32 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 16:36:13 +0100 Subject: [PATCH 33/40] CI: different spelling --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81321c23..f770a31c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,7 +57,7 @@ jobs: - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - echo "$PATH" | wc -c - - echo $WINDIR + - echo %WINDIR% - source $MINICONDA_PATH/etc/profile.d/conda.sh - hash -r - python --version @@ -109,7 +109,7 @@ script: - travis_retry pip install -v -e ".[testing,docs]" # test suite - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then echo $WINDIR; fi + - if [ "$TRAVIS_OS_NAME" = "windows" ]; then echo %WINDIR%; fi - tox -v after_success: From 3bb5ec1a58b44cd4beb256f62215928af6aaca4b Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 16:55:01 +0100 Subject: [PATCH 34/40] CI: try pip with no conda --- .travis.yml | 35 +++++++++++++++++++---------------- 1 file changed, 19 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index f770a31c..2c15ecdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -49,21 +49,25 @@ jobs: - os: windows language: shell before_install: - - export MINICONDA_PATH=$HOME/miniconda - - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - - choco install openssl.light - - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - - echo "$PATH" | wc -c - - echo %WINDIR% - - source $MINICONDA_PATH/etc/profile.d/conda.sh - - hash -r - - python --version - - conda config --set quiet yes --set always_yes yes --set changeps1 no - - travis_retry conda update -n base -c defaults conda - - travis_retry conda update --all + # - export MINICONDA_PATH=$HOME/miniconda + # - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` + # - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts + # - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin + # - choco install openssl.light + # - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" + # - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" + # - source $MINICONDA_PATH/etc/profile.d/conda.sh + # - hash -r + # - python --version + # - conda config --set quiet yes --set always_yes yes --set changeps1 no + # - travis_retry conda update -n base -c defaults conda + # - travis_retry conda update --all + + - choco install python --version 3.11 + - python -m pip install --upgrade pip + env: PATH=/c/Python38:/c/Python38/Scripts:$PATH + install: + - echo "trying pip install right away" before_install: # Python package manager @@ -109,7 +113,6 @@ script: - travis_retry pip install -v -e ".[testing,docs]" # test suite - - if [ "$TRAVIS_OS_NAME" = "windows" ]; then echo %WINDIR%; fi - tox -v after_success: From d9a6d97df17cc62791cea7bb5295024e52c206f2 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 16:59:03 +0100 Subject: [PATCH 35/40] CI: fixup 3bb5ec1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2c15ecdd..11ade1c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -65,7 +65,7 @@ jobs: - choco install python --version 3.11 - python -m pip install --upgrade pip - env: PATH=/c/Python38:/c/Python38/Scripts:$PATH + env: PATH=/c/Python311:/c/Python311/Scripts:$PATH install: - echo "trying pip install right away" From be120dd8a179575fc2bb5f5eaccf79ce097229d1 Mon Sep 17 00:00:00 2001 From: fkuehlein Date: Mon, 22 Jan 2024 17:13:33 +0100 Subject: [PATCH 36/40] CI: set `WINDIR` globally --- .travis.yml | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 11ade1c4..b5f7d745 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,26 +48,14 @@ jobs: # Windows job - os: windows language: shell + env: + - PATH=/c/Python311:/c/Python311/Scripts:$PATH + - WINDIR=C:\Windows before_install: - # - export MINICONDA_PATH=$HOME/miniconda - # - export MINICONDA_PATH_WIN=`cygpath --windows $MINICONDA_PATH` - # - export MINICONDA_SUB_PATH=$MINICONDA_PATH/Scripts - # - export MINICONDA_LIB_BIN_PATH=$MINICONDA_PATH/Library/bin - # - choco install openssl.light - # - choco install miniconda3 --params="'/JustMe /AddToPath:1 /D:$MINICONDA_PATH_WIN'" - # - export PATH="$MINICONDA_PATH:$MINICONDA_SUB_PATH:$MINICONDA_LIB_BIN_PATH:$PATH" - # - source $MINICONDA_PATH/etc/profile.d/conda.sh - # - hash -r - # - python --version - # - conda config --set quiet yes --set always_yes yes --set changeps1 no - # - travis_retry conda update -n base -c defaults conda - # - travis_retry conda update --all - - - choco install python --version 3.11 + - choco install python --version 3.11.6 - python -m pip install --upgrade pip - env: PATH=/c/Python311:/c/Python311/Scripts:$PATH install: - - echo "trying pip install right away" + - echo using pip install on windows before_install: # Python package manager From 104db178c07d400580eeeb3978ad415793512f0f Mon Sep 17 00:00:00 2001 From: ntfrgl Date: Wed, 31 Jan 2024 18:37:01 -0800 Subject: [PATCH 37/40] CI: Refactor & debug build config - consolidate build matrix - remove `language: python` - macOS: force GNU `sed` - Windows: pass `$WINDIR` into `tox` --- .travis.yml | 209 ++++++++++++++++++++++++++-------------------------- README.rst | 11 +-- setup.cfg | 11 +-- 3 files changed, 118 insertions(+), 113 deletions(-) diff --git a/.travis.yml b/.travis.yml index b5f7d745..a4cba78c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,112 +1,115 @@ + +# ----------------------------------------------------------------------------- +# documentation & validation +# ----------------------------------------------------------------------------- + +# - https://docs.travis-ci.com/user/reference/overview +# - https://docs.travis-ci.com/user/build-matrix/ +# - https://docs.travis-ci.com/user/multi-os/ + +# - https://docs.travis-ci.com/user/build-config-validation/ +# - https://config.travis-ci.com/explore + +# ----------------------------------------------------------------------------- +# meta +# ----------------------------------------------------------------------------- + +# enable build config validation version: ~> 1.0 -# require the branch name to be master +# save Travis budget if: branch = master -jobs: - include: - # # linux jobs - # - os: linux - # dist: focal - # arch: arm64 - # virt: lxd - # sudo: false - # language: python - # python: "3.8" - # - os: linux - # dist: focal - # arch: arm64 - # virt: lxd - # sudo: false - # language: python - # python: "3.9" - # - os: linux - # dist: focal - # arch: arm64 - # virt: lxd - # sudo: false - # language: python - # python: "3.10" - # - os: linux - # dist: focal - # arch: arm64 - # virt: lxd - # sudo: false - # language: python - # python: "3.11" - # - os: linux - # dist: focal - # arch: arm64 - # virt: lxd - # sudo: false - # language: python - # python: "3.12-dev" - # # macOS job - # - os: osx - # osx_image: xcode12.2 - # language: shell # 'language: python' is not available on Travis CI macOS - # Windows job - - os: windows - language: shell - env: - - PATH=/c/Python311:/c/Python311/Scripts:$PATH - - WINDIR=C:\Windows - before_install: - - choco install python --version 3.11.6 - - python -m pip install --upgrade pip - install: - - echo using pip install on windows +# report outcomes +notifications: + email: + on_success: change + on_failure: always + +# ----------------------------------------------------------------------------- +# default jobs: Linux, all Python versions +# ----------------------------------------------------------------------------- + +os: linux +dist: focal +arch: arm64 +virt: lxd +language: generic +env: + global: + - ARCH=Linux-aarch64 + - SED=sed + + jobs: + - PYTHON=3.12 + - PYTHON=3.11 + - PYTHON=3.10 + - PYTHON=3.9 + - PYTHON=3.8 before_install: - # Python package manager - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh -O miniconda.sh; fi - - if [ "$TRAVIS_OS_NAME" = "osx" ]; then travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh; fi - - bash miniconda.sh -b -p $HOME/miniconda - - export PATH="$HOME/miniconda/bin:$PATH"; hash -r - - conda config --set quiet yes --set always_yes yes --set changeps1 no - - travis_retry conda update -n base -c defaults conda - - travis_retry conda update --all - - conda config --set solver libmamba - - # debugging info - - conda info -a - - conda list + - | # install Python via Miniconda + travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-${ARCH}.sh -O miniconda.sh + bash miniconda.sh -b -p $HOME/miniconda + export PATH="$HOME/miniconda/bin:$PATH"; hash -r + conda config --set quiet yes --set always_yes yes --set changeps1 no + - | + travis_retry conda update -n base -c defaults conda + travis_retry conda update --all + conda config --set solver libmamba + conda info -a + conda list + travis_retry conda create -n test-env + eval "$(conda shell.bash hook)" + conda activate test-env + travis_retry conda install -c conda-forge python=${PYTHON} + + - | # install dependencies + travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm + travis_retry conda update -c conda-forge --all + travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov + travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx + conda info -a + conda list install: - # runtime dependencies - - travis_retry conda create -n test-env - - eval "$(conda shell.bash hook)" - - conda activate test-env - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then travis_retry conda install -c conda-forge python=${TRAVIS_PYTHON_VERSION%-dev}; else travis_retry conda install -c conda-forge python=3.9; fi - - travis_retry conda install -c conda-forge numpy scipy python-igraph h5netcdf tqdm - - travis_retry conda update -c conda-forge --all - - # testing dependencies - - travis_retry conda install -c conda-forge tox flake8 pylint pytest-xdist pytest-cov codecov - - travis_retry conda install -c conda-forge networkx matplotlib cartopy sphinx - - # debugging info - - conda info -a - - conda list - -before_script: - # limit parallel processes to available cores (error if pattern not found) - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then sed -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml; fi - -script: - # package - - travis_retry pip install -v -e ".[testing,docs]" - - # test suite - - tox -v - -after_success: - - codecov + - | # limit procs to available cores (use GNU `sed`, fail if pattern not found) + [ "${TRAVIS_OS_NAME}" = "osx" ] && brew install gnu-sed || true + ${SED} -i "/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}" setup.py + ${SED} -i "/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}" setup.cfg + ${SED} -i "/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}" pyproject.toml + ${SED} -i "/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}" pyproject.toml -notifications: - email: - on_success: change - on_failure: always + # install self (and dependencies, if on Windows) + - travis_retry pip install -v -e ".[tests,docs]" + +# run test suite +script: tox -v + +# report statistics +after_success: codecov + +# ----------------------------------------------------------------------------- +# modified jobs: OSX + Windows, newest Python version +# (inherit only 1st `env.jobs` entry) +# ----------------------------------------------------------------------------- + +jobs: + fast_finish: true + include: + - os: osx + osx_image: xcode14 + language: shell + env: + - ARCH=MacOSX-x86_64 + - SED=gsed + + - os: windows + language: shell + env: + - ARCH=Windows-x86_64 + - PATH=/c/Python${PYTHON/.}:/c/Python${PYTHON/.}/Scripts:${PATH} + before_install: + - | # install Python via Chocolatey + travis_retry choco install python --version ${PYTHON} + travis_retry python -m pip install --upgrade pip diff --git a/README.rst b/README.rst index 69a89cf4..61f2479c 100644 --- a/README.rst +++ b/README.rst @@ -78,10 +78,11 @@ Installation Dependencies ............ ``pyunicorn`` is implemented in `Python 3 `_ and -`Cython 3 `_, and is tested on *Linux*, *macOS* and -*Windows*. It relies on the following open source or freely available packages, -which need to be installed on your machine. For exact dependency information, -see ``setup.cfg``. +`Cython 3 `_, and is `tested +`_ on *Linux*, *macOS* +and *Windows*. It relies on the following open source or freely available +packages, which need to be installed on your machine. For exact dependency +information, see ``setup.cfg``. Required at runtime: - `numpy `_ @@ -154,7 +155,7 @@ please make sure that all tests pass. The test suite is managed by `tox `_ and is configured to use system-wide packages when available. Install the test dependencies as follows:: - $> pip install .[testing] + $> pip install .[tests] The test suite can be run from anywhere in the project tree by issuing:: diff --git a/setup.cfg b/setup.cfg index bc3701db..15a5671d 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,7 +65,7 @@ dev = Cython >= 3.0 docs = sphinx >= 7.0 -testing = +tests = tox >= 4.3 flake8 >= 6.0 pylint >= 2.17 @@ -93,7 +93,7 @@ envlist = [testenv] extras = - testing + tests sitepackages = true changedir = {toxinidir} setenv = @@ -107,7 +107,7 @@ allowlist_externals = [testenv:style] skipsdist = true commands = - flake8 + flake8 src/pyunicorn tests [testenv:lint] skipsdist = true @@ -115,12 +115,14 @@ commands = pylint src/pyunicorn tests [testenv:test] +passenv = WINDIR commands = pytest --cov [testenv:docs] extras = docs +passenv = WINDIR commands = sphinx-build -j 8 -W -b html -d {envtmpdir}/doctrees docs/source {envtmpdir}/html @@ -128,8 +130,7 @@ commands = [flake8] extend-exclude = - .git, .cache, .tox, .ropeproject, build, - docs/source/conf.py + .git, .cache, .tox, .ropeproject, build, docs/source/conf.py extend-ignore = E121, E123, E126, E226, E24, E704, E731, F401, F403, F405, F812, F841, W503 per-file-ignores = From fdc95a254fb0fae2878f70327d81204507d35bb2 Mon Sep 17 00:00:00 2001 From: ntfrgl Date: Wed, 31 Jan 2024 19:39:11 -0800 Subject: [PATCH 38/40] CI: Fixup - set env vars in `before_install` phase - remove a layer of quoting in `sed` args --- .travis.yml | 34 +++++++++++++++------------------- 1 file changed, 15 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index a4cba78c..dd667b61 100644 --- a/.travis.yml +++ b/.travis.yml @@ -36,10 +36,6 @@ arch: arm64 virt: lxd language: generic env: - global: - - ARCH=Linux-aarch64 - - SED=sed - jobs: - PYTHON=3.12 - PYTHON=3.11 @@ -47,7 +43,9 @@ env: - PYTHON=3.9 - PYTHON=3.8 -before_install: +before_install: export ARCH=Linux-aarch64 SED=sed + +install: - | # install Python via Miniconda travis_retry wget https://repo.anaconda.com/miniconda/Miniconda3-latest-${ARCH}.sh -O miniconda.sh bash miniconda.sh -b -p $HOME/miniconda @@ -72,19 +70,18 @@ before_install: conda info -a conda list -install: +script: - | # limit procs to available cores (use GNU `sed`, fail if pattern not found) - [ "${TRAVIS_OS_NAME}" = "osx" ] && brew install gnu-sed || true - ${SED} -i "/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}" setup.py - ${SED} -i "/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}" setup.cfg - ${SED} -i "/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}" pyproject.toml - ${SED} -i "/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}" pyproject.toml + ${SED} -i '/nthreads=./{s//nthreads=2/;h}; ${x;/./{x;q0};x;q1}' setup.py + ${SED} -i '/-j ./ {s//-j 2/; h}; ${x;/./{x;q0};x;q1}' setup.cfg + ${SED} -i '/-n auto/ {s//-n 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml + ${SED} -i '/jobs = ./ {s//jobs = 2/; h}; ${x;/./{x;q0};x;q1}' pyproject.toml # install self (and dependencies, if on Windows) - travis_retry pip install -v -e ".[tests,docs]" -# run test suite -script: tox -v + # run test suite + - tox -v # report statistics after_success: codecov @@ -100,16 +97,15 @@ jobs: - os: osx osx_image: xcode14 language: shell - env: - - ARCH=MacOSX-x86_64 - - SED=gsed + before_install: export ARCH=MacOSX-x86_64 SED=gsed + before_script: brew install gnu-sed - os: windows language: shell - env: - - ARCH=Windows-x86_64 - - PATH=/c/Python${PYTHON/.}:/c/Python${PYTHON/.}/Scripts:${PATH} before_install: + - export ARCH=Windows-x86_64 SED=sed + - export PATH=/c/Python${PYTHON/.}:/c/Python${PYTHON/.}/Scripts:${PATH} + install: - | # install Python via Chocolatey travis_retry choco install python --version ${PYTHON} travis_retry python -m pip install --upgrade pip From 0040db9a41b4d9bd65cf74ae2fa9734bd54c8ee5 Mon Sep 17 00:00:00 2001 From: ntfrgl Date: Wed, 31 Jan 2024 21:10:35 -0800 Subject: [PATCH 39/40] CI: Speed up - Tox: skip package installation inside venv (packaging & Cython have matured) - Travis: avoid `brew update` --- .travis.yml | 34 ++++++++++++++++++++-------------- setup.cfg | 14 ++++++-------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/.travis.yml b/.travis.yml index dd667b61..e15e3d12 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,10 @@ +# This file is part of pyunicorn. +# Copyright (C) 2008--2024 Jonathan F. Donges and pyunicorn authors +# URL: +# License: BSD (3-clause) -# ----------------------------------------------------------------------------- -# documentation & validation -# ----------------------------------------------------------------------------- + +# documentation & validation ================================================== # - https://docs.travis-ci.com/user/reference/overview # - https://docs.travis-ci.com/user/build-matrix/ @@ -10,9 +13,8 @@ # - https://docs.travis-ci.com/user/build-config-validation/ # - https://config.travis-ci.com/explore -# ----------------------------------------------------------------------------- -# meta -# ----------------------------------------------------------------------------- + +# meta ======================================================================== # enable build config validation version: ~> 1.0 @@ -26,9 +28,8 @@ notifications: on_success: change on_failure: always -# ----------------------------------------------------------------------------- -# default jobs: Linux, all Python versions -# ----------------------------------------------------------------------------- + +# default jobs: Linux, all Python versions ==================================== os: linux dist: focal @@ -86,10 +87,14 @@ script: # report statistics after_success: codecov -# ----------------------------------------------------------------------------- -# modified jobs: OSX + Windows, newest Python version + +# modified jobs: OSX + Windows, newest Python version ========================= # (inherit only 1st `env.jobs` entry) -# ----------------------------------------------------------------------------- + +addons: + homebrew: + update: false + packages: gnu-sed jobs: fast_finish: true @@ -97,8 +102,9 @@ jobs: - os: osx osx_image: xcode14 language: shell - before_install: export ARCH=MacOSX-x86_64 SED=gsed - before_script: brew install gnu-sed + before_install: + - export ARCH=MacOSX-x86_64 SED=gsed + - export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 - os: windows language: shell diff --git a/setup.cfg b/setup.cfg index 15a5671d..11af02c7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -65,6 +65,7 @@ dev = Cython >= 3.0 docs = sphinx >= 7.0 + matplotlib tests = tox >= 4.3 flake8 >= 6.0 @@ -92,12 +93,13 @@ envlist = docs [testenv] -extras = - tests +skip_install = true +skipsdist = true sitepackages = true changedir = {toxinidir} setenv = PYTHONPATH = {toxinidir}/src +passenv = WINDIR, LC_ALL allowlist_externals = flake8 pylint @@ -105,24 +107,20 @@ allowlist_externals = sphinx-build [testenv:style] -skipsdist = true commands = flake8 src/pyunicorn tests [testenv:lint] -skipsdist = true commands = pylint src/pyunicorn tests [testenv:test] -passenv = WINDIR +extras = tests commands = pytest --cov [testenv:docs] -extras = - docs -passenv = WINDIR +extras = docs commands = sphinx-build -j 8 -W -b html -d {envtmpdir}/doctrees docs/source {envtmpdir}/html From 138a4454291a17e3e5f2e065a8a7c835d2922f94 Mon Sep 17 00:00:00 2001 From: ntfrgl Date: Wed, 31 Jan 2024 21:37:02 -0800 Subject: [PATCH 40/40] CI: Fixup - don't trust the documentation --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index e15e3d12..cf8b77cc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -91,11 +91,6 @@ after_success: codecov # modified jobs: OSX + Windows, newest Python version ========================= # (inherit only 1st `env.jobs` entry) -addons: - homebrew: - update: false - packages: gnu-sed - jobs: fast_finish: true include: @@ -105,6 +100,7 @@ jobs: before_install: - export ARCH=MacOSX-x86_64 SED=gsed - export HOMEBREW_NO_AUTO_UPDATE=1 HOMEBREW_NO_INSTALL_CLEANUP=1 + - travis_retry brew install gnu-sed - os: windows language: shell