Skip to content

Commit

Permalink
Test on recent python versions (#13)
Browse files Browse the repository at this point in the history
* Test on recent python versions

* Bump pre-commit versions

* Fix dtype issue

* Remove straggling mention of 3.7
  • Loading branch information
dstansby authored Jan 31, 2023
1 parent 5cbc6a3 commit b2dc8dd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 16 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Run all supported Python versions on linux
python-version: ["3.7", "3.8", "3.9"]
os: [ubuntu-latest]
# Include one windows and macos run
# Run across a mixture of Python versions and operating systems
include:
- os: ubuntu-latest
python-version: "3.11"
- os: macos-latest
python-version: "3.9"
python-version: "3.10"
- os: windows-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.8"

steps:
- uses: brainglobe/actions/test@v1
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/pycqa/isort
rev: 5.10.1
rev: 5.12.0
hooks:
- id: isort
types: [text]
types_or: [python, cython]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
rev: v4.4.0
hooks:
- id: check-docstring-first
- id: check-executables-have-shebangs
Expand All @@ -20,16 +20,16 @@ repos:
# bump2version produces whitespace in setup.cfg, so exclude to
# not inferfere with versioning
exclude: setup.cfg
- repo: https://gitlab.com/pycqa/flake8
rev: 3.9.2
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 22.12.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.931
rev: v0.991
hooks:
- id: mypy
additional_dependencies:
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"flake8",
]
},
python_requires=">=3.7",
python_requires=">=3.8",
packages=find_packages(exclude=("tests", "tests.*")),
include_package_data=True,
url="https://github.com/brainglobe/imio",
Expand All @@ -48,10 +48,10 @@
"Development Status :: 3 - Alpha",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
],
Expand Down
2 changes: 1 addition & 1 deletion tests/tests/test_imio.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

@pytest.fixture()
def layer():
return np.tile(np.array([1, 2, 3, 4]), (4, 1))
return np.tile(np.array([1, 2, 3, 4], dtype=np.int32), (4, 1))


@pytest.fixture()
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
[tox]
envlist = py{37,38,39}
envlist = py{38,39,310,311}

[gh-actions]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
extras =
Expand Down

0 comments on commit b2dc8dd

Please sign in to comment.