From 3627fbb46848a0de8f941363471ab6107ff710db Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 9 Aug 2024 17:05:48 +0200 Subject: [PATCH 1/6] Try switching to GitHub Actions for continuous integration testing --- .github/workflows/requirements-middle.txt | 2 + .github/workflows/requirements-newest.txt | 2 + .github/workflows/requirements-oldest.txt | 2 + .github/workflows/test.yml | 61 +++++++++++++++++++++++ .travis.yml | 27 ---------- bitbucket-pipelines.yml | 16 ------ setup.py | 2 +- 7 files changed, 68 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/requirements-middle.txt create mode 100644 .github/workflows/requirements-newest.txt create mode 100644 .github/workflows/requirements-oldest.txt create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml delete mode 100644 bitbucket-pipelines.yml diff --git a/.github/workflows/requirements-middle.txt b/.github/workflows/requirements-middle.txt new file mode 100644 index 0000000..c569737 --- /dev/null +++ b/.github/workflows/requirements-middle.txt @@ -0,0 +1,2 @@ +numpy==1.19.4 +scipy==1.5.4 diff --git a/.github/workflows/requirements-newest.txt b/.github/workflows/requirements-newest.txt new file mode 100644 index 0000000..208cccd --- /dev/null +++ b/.github/workflows/requirements-newest.txt @@ -0,0 +1,2 @@ +numpy==1.22.1 +scipy==1.7.3 diff --git a/.github/workflows/requirements-oldest.txt b/.github/workflows/requirements-oldest.txt new file mode 100644 index 0000000..bef6c0e --- /dev/null +++ b/.github/workflows/requirements-oldest.txt @@ -0,0 +1,2 @@ +numpy==1.13.1 +scipy==0.19.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..9cd3123 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,61 @@ +name: Run all tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + python-version: ["3.6", "3.9", "3.10"] + req-version: ["oldest", "middle", "newest"] + os: ["ubuntu-latest"] + exclude: + - python-version: "3.6" + req-version: "newest" + - python-version: "3.9" + req-version: "oldest" + - python-version: "3.10" + req-version: "oldest" + - python-version: "3.10" + req-version: "middle" + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install requirements ${{ matrix.req-version }} + run: | + python -m pip install --upgrade pip + pip install -r .github/workflows/requirements-${{ matrix.req-version }}.txt + pip install pytest pytest-cov + pip install . + - name: Run tests + run: | + pytest --cov=lazyarray -v + # - name: Upload coverage data + # run: | + # coveralls --service=github + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # COVERALLS_FLAG_NAME: ${{ matrix.test-name }} + # COVERALLS_PARALLEL: true + # coveralls: + # name: Indicate completion to coveralls.io + # needs: test + # runs-on: ubuntu-latest + # container: python:3-slim + # steps: + # - name: Finished + # run: | + # pip3 install --upgrade coveralls + # coveralls --service=github --finish + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 154bac9..0000000 --- a/.travis.yml +++ /dev/null @@ -1,27 +0,0 @@ -dist: focal -language: python -sudo: false -python: - - "3.6" - - "3.9" - - "3.10" -env: - - NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" - - NUMPY_VERSION="1.19.4" SCIPY_VERSION="1.5.4" - - NUMPY_VERSION="1.22.1" SCIPY_VERSION="1.7.3" -matrix: - exclude: - - python: "3.6" - env: NUMPY_VERSION="1.22.1" SCIPY_VERSION="1.7.3" - - python: "3.9" - env: NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" - - python: "3.10" - env: NUMPY_VERSION="1.13.1" SCIPY_VERSION="0.19.1" - - python: "3.10" - env: NUMPY_VERSION="1.19.4" SCIPY_VERSION="1.5.4" -install: - - pip install "numpy==$NUMPY_VERSION" "scipy==$SCIPY_VERSION" coverage coveralls pytest pytest-cov -script: - - pytest --cov=lazyarray -v -after_success: - - coveralls diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml deleted file mode 100644 index a5ce4fa..0000000 --- a/bitbucket-pipelines.yml +++ /dev/null @@ -1,16 +0,0 @@ -# This is a sample build configuration for Python. -# Check our guides at https://confluence.atlassian.com/x/x4UWN for more examples. -# Only use spaces to indent your .yml configuration. -# ----- -# You can specify a custom docker image from Docker Hub as your build environment. -image: python:3.5.1 - -pipelines: - default: - - step: - caches: - - pip - script: - - pip install -r requirements.txt - - pip install nose - - nosetests \ No newline at end of file diff --git a/setup.py b/setup.py index ea5eecc..388a0a2 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ setup( name='lazyarray', - version='0.5.2', + version='0.5.3.dev', py_modules=['lazyarray'], license='Modified BSD', author="Andrew P. Davison", From 5824adf0336569744dc1102760c1a3afb6738459 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Fri, 9 Aug 2024 17:21:09 +0200 Subject: [PATCH 2/6] Trying an Ubuntu version that has support for all tested Python versions --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9cd3123..f90b696 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,11 +13,11 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.6", "3.9", "3.10"] + python-version: ["3.7", "3.9", "3.10"] req-version: ["oldest", "middle", "newest"] - os: ["ubuntu-latest"] + os: ["ubuntu-22.04"] exclude: - - python-version: "3.6" + - python-version: "3.7" req-version: "newest" - python-version: "3.9" req-version: "oldest" From 73f37a618da5c2c7e46fe98b2970f5e8ec15ef3f Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Mon, 12 Aug 2024 16:11:15 +0200 Subject: [PATCH 3/6] test with more recent Python/numpy/scipy versions --- .github/workflows/requirements-middle.txt | 4 ++-- .github/workflows/requirements-newest.txt | 4 ++-- .github/workflows/requirements-oldest.txt | 4 ++-- .github/workflows/test.yml | 12 ++++-------- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/requirements-middle.txt b/.github/workflows/requirements-middle.txt index c569737..80ba09b 100644 --- a/.github/workflows/requirements-middle.txt +++ b/.github/workflows/requirements-middle.txt @@ -1,2 +1,2 @@ -numpy==1.19.4 -scipy==1.5.4 +numpy==1.23.5 +scipy==1.9.3 diff --git a/.github/workflows/requirements-newest.txt b/.github/workflows/requirements-newest.txt index 208cccd..ec114b4 100644 --- a/.github/workflows/requirements-newest.txt +++ b/.github/workflows/requirements-newest.txt @@ -1,2 +1,2 @@ -numpy==1.22.1 -scipy==1.7.3 +numpy==1.26.4 +scipy==1.12.0 diff --git a/.github/workflows/requirements-oldest.txt b/.github/workflows/requirements-oldest.txt index bef6c0e..9d540a1 100644 --- a/.github/workflows/requirements-oldest.txt +++ b/.github/workflows/requirements-oldest.txt @@ -1,2 +1,2 @@ -numpy==1.13.1 -scipy==0.19.1 +numpy==1.20.3 +scipy==1.6.3 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f90b696..c0c5015 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,18 +13,14 @@ jobs: strategy: fail-fast: true matrix: - python-version: ["3.7", "3.9", "3.10"] + python-version: ["3.8", "3.10", "3.12"] req-version: ["oldest", "middle", "newest"] - os: ["ubuntu-22.04"] + os: ["ubuntu-24.04"] exclude: - - python-version: "3.7" + - python-version: "3.8" req-version: "newest" - - python-version: "3.9" + - python-version: "3.12" req-version: "oldest" - - python-version: "3.10" - req-version: "oldest" - - python-version: "3.10" - req-version: "middle" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From 8201c994ce269e01c4ae851572584dd4aaf8bfd3 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Mon, 12 Aug 2024 21:20:16 +0200 Subject: [PATCH 4/6] Python 3.12 breaks a lot of older stuff due to missing distutils --- .github/workflows/test.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c0c5015..dc14e75 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ on: jobs: test: - name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} + name: Test with Python ${{ matrix.python-version }} and ${{ matrix.req-version }} requirements on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: true @@ -21,6 +21,8 @@ jobs: req-version: "newest" - python-version: "3.12" req-version: "oldest" + - python-version: "3.12" + req-version: "middle" steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} From ee81795869a93770d779c98dbc6c56dfdd130477 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Mon, 12 Aug 2024 22:01:00 +0200 Subject: [PATCH 5/6] tweaks for version compatibility --- .github/workflows/requirements-oldest.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/requirements-oldest.txt b/.github/workflows/requirements-oldest.txt index 9d540a1..6b9bd11 100644 --- a/.github/workflows/requirements-oldest.txt +++ b/.github/workflows/requirements-oldest.txt @@ -1,2 +1,2 @@ numpy==1.20.3 -scipy==1.6.3 +scipy==1.7.3 From 596e9d85743368fd24e82879e6b37523afe4d08c Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Mon, 12 Aug 2024 22:11:33 +0200 Subject: [PATCH 6/6] another try --- .github/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dc14e75..233b463 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,6 +19,8 @@ jobs: exclude: - python-version: "3.8" req-version: "newest" + - python-version: "3.10" + req-version: "oldest" - python-version: "3.12" req-version: "oldest" - python-version: "3.12"