From f60bc170be8fd4df6f5ac5b40b0af516cd578030 Mon Sep 17 00:00:00 2001 From: Almar Klein Date: Fri, 29 Mar 2024 09:49:21 +0100 Subject: [PATCH] bump version and fix ci (#61) * bump version * Also fix test * test for new py versions on ci * lets drop 37 too --- .circleci/config.yml | 2 +- .github/workflows/ci.yml | 24 ++++++++++++++---------- dash_slicer/__init__.py | 2 +- dash_slicer/utils.py | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5243653..ee1a9e5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,7 @@ version: 2.0 jobs: deploy_to_playground: docker: - - image: circleci/python:3.6-stretch + - image: circleci/python:3.12-stretch steps: - checkout - run: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 96bf2de..0aef203 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,26 +13,30 @@ jobs: name: ${{ matrix.name }} runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: include: - - name: Linux py36 - os: ubuntu-16.04 - pyversion: '3.6' - - name: Linux py37 - os: ubuntu-latest - pyversion: '3.7' - name: Linux py38 os: ubuntu-latest pyversion: '3.8' - name: Linux py39 os: ubuntu-latest pyversion: '3.9' - - name: MacOS py38 + - name: Linux py310 + os: ubuntu-latest + pyversion: '3.10' + - name: Linux py311 + os: ubuntu-latest + pyversion: '3.11' + - name: Linux py312 + os: ubuntu-latest + pyversion: '3.12' + - name: MacOS py312 os: macos-latest - pyversion: '3.8' - - name: Windows py38 + pyversion: '3.12' + - name: Windows py312 os: windows-latest - pyversion: '3.8' + pyversion: '3.12' steps: - uses: actions/checkout@v2 diff --git a/dash_slicer/__init__.py b/dash_slicer/__init__.py index 6d19f01..1f34e0b 100644 --- a/dash_slicer/__init__.py +++ b/dash_slicer/__init__.py @@ -5,5 +5,5 @@ from .slicer import VolumeSlicer # noqa: F401 -__version__ = "0.3.0" +__version__ = "0.3.1" version_info = tuple(map(int, __version__.split("."))) diff --git a/dash_slicer/utils.py b/dash_slicer/utils.py index 64e0516..81db7cb 100644 --- a/dash_slicer/utils.py +++ b/dash_slicer/utils.py @@ -81,7 +81,7 @@ def mask_to_coloured_slices(mask, axis, color=None): # Check the mask if not isinstance(mask, np.ndarray): raise TypeError("Mask must be an ndarray or None.") - elif mask.dtype not in (np.bool, np.uint8): + elif mask.dtype not in (bool, np.uint8): raise ValueError(f"Mask must have bool or uint8 dtype, not {mask.dtype}.") mask = mask.astype(np.uint8, copy=False) # need int to index