Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test on Python 3.11 #986

Merged
merged 1 commit into from
Nov 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
steps:
- checkout
- allservices:
version: 3.7.14
version: 3.7.15
node: v12
- tox:
env: test-py37
Expand All @@ -149,7 +149,7 @@ jobs:
steps:
- checkout
- allservices:
version: 3.8.14
version: 3.8.15
node: v12
- tox:
env: test-py38
Expand All @@ -162,7 +162,7 @@ jobs:
steps:
- checkout
- allservices:
version: 3.9.14
version: 3.9.15
node: v12
- tox:
env: test-py39
Expand All @@ -175,13 +175,26 @@ jobs:
steps:
- checkout
- allservices:
version: 3.10.7
version: 3.10.8
node: v12
- tox:
env: test-py310
- coverage
- store_artifacts:
path: build/test/artifacts
py311:
machine:
image: ubuntu-2004:202111-02
steps:
- checkout
- allservices:
version: 3.11.0
node: v12
- tox:
env: core-py311
- coverage
- store_artifacts:
path: build/test/artifacts
lint_and_docs:
executor: toxandnode
steps:
Expand Down Expand Up @@ -293,6 +306,13 @@ workflows:
branches:
ignore:
- gh-pages
- py311:
filters:
tags:
only: /^v.*/
branches:
ignore:
- gh-pages
- lint_and_docs:
filters:
tags:
Expand All @@ -306,7 +326,8 @@ workflows:
- py37
- py38
- py39
# - py310
- py310
# - py311
- lint_and_docs
filters:
tags:
Expand All @@ -321,6 +342,7 @@ workflows:
- py38
- py39
- py310
- py311
- lint_and_docs
filters:
tags:
Expand All @@ -334,6 +356,7 @@ workflows:
- py38
- py39
- py310
- py311
- lint_and_docs
filters:
tags:
Expand All @@ -357,5 +380,6 @@ workflows:
- py38
- py39
- py310
- py311
- lint_and_docs
- wheels
1 change: 1 addition & 0 deletions girder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
'girder>=3.0.4',
Expand Down
1 change: 1 addition & 0 deletions girder_annotation/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
'jsonschema>=2.5.1',
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
'cachetools>=3.0.0',
Expand Down
1 change: 1 addition & 0 deletions sources/bioformats/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/deepzoom/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/dummy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/gdal/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/mapnik/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/multi/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
'jsonschema',
Expand Down
3 changes: 2 additions & 1 deletion sources/nd2/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
# 'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
'dask[array]',
'nd2[legacy]>=0.2.3 ; python_version >= "3.7"',
'nd2[legacy]>=0.2.3 ; python_version >= "3.7" and python_version < "3.11"',
'importlib-metadata<5 ; python_version < "3.8"',
],
extras_require={
Expand Down
1 change: 1 addition & 0 deletions sources/ometiff/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/openjpeg/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/openslide/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/pil/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/test/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/tiff/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
5 changes: 3 additions & 2 deletions sources/tifffile/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,13 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
# 'Programming Language :: Python :: 3.11',
],
install_requires=[
f'large-image{limit_version}',
'dask[array]',
'tifffile[all]',
'zarr ; python_version >= "3.8"',
'tifffile[all] ; python_version < "3.11"',
'zarr ; python_version >= "3.8" and python_version < "3.11"',
'zarr<2.11 ; python_version < "3.8"',
'importlib-metadata<5 ; python_version < "3.8"',
],
Expand Down
1 change: 1 addition & 0 deletions sources/vips/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
],
install_requires=[
'large-image',
Expand Down
2 changes: 1 addition & 1 deletion test.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
LANG=en_US.UTF-8 \
PYENV_ROOT="/.pyenv" \
PATH="/.pyenv/bin:/.pyenv/shims:$PATH" \
PYTHON_VERSIONS="3.9.14 3.8.14 3.7.14 3.6.15 3.10.7"
PYTHON_VERSIONS="3.9.15 3.8.15 3.7.15 3.6.15 3.10.8 3.11.0"

RUN apt-get update && \
apt-get install -y --no-install-recommends \
Expand Down
4 changes: 4 additions & 0 deletions test/test_converter.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import os
import shutil
import sys

import large_image_converter
import large_image_converter.__main__ as main
Expand Down Expand Up @@ -247,6 +248,7 @@ def testConverterMainNonImageFile(tmpdir):
assert not os.path.exists(outputPath)


@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires scikit-image')
def testConverterMainStats(tmpdir):
testDir = os.path.dirname(os.path.realpath(__file__))
imagePath = os.path.join(testDir, 'test_files', 'yb10kx5k.png')
Expand All @@ -257,6 +259,7 @@ def testConverterMainStats(tmpdir):
assert 'conversion_stats' in desc['large_image_converter']


@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires scikit-image')
def testConverterMainFullStats(tmpdir):
imagePath = datastore.fetch('sample_Easy1.png')
outputPath = os.path.join(tmpdir, 'out.tiff')
Expand All @@ -266,6 +269,7 @@ def testConverterMainFullStats(tmpdir):
assert 'psnr' in desc['large_image_converter']['conversion_stats']


@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires scikit-image')
def testConverterMainFullStatsWithWebp(tmpdir):
imagePath = datastore.fetch('d042-353.crop.small.float32.tif')
outputPath = os.path.join(tmpdir, 'out.tiff')
Expand Down
7 changes: 5 additions & 2 deletions test/test_source_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,18 @@
'noread': r'\.(nc|nd2|yml|yaml|json|czi|png|svs|scn)$',
'skipTiles': r'(sample_image\.ptif|one_layer_missing_tiles|JK-kidney_B-gal_H3_4C_1-500sec\.jp2|extraoverview)'}, # noqa
}
if sys.version_info >= (3, 7):
if sys.version_info >= (3, 7) and sys.version_info < (3, 11):
SourceAndFiles.update({
'nd2': {'read': r'\.(nd2)$'},
})
if sys.version_info >= (3, 7) and sys.version_info < (3, 11):
SourceAndFiles.update({
'tifffile': {
'read': r'',
'noread': r'\.(nc|nd2|yml|yaml|json|czi|png|jpeg|jp2)$',
},
})
else:
if sys.version_info < (3, 7):
# Python 3.6 has an older version of PIL that won't read some of the
# ome.tif files.
SourceAndFiles['pil']['noread'] = SourceAndFiles['pil']['noread'][:-1] + '|sample.*ome)'
Expand Down
3 changes: 3 additions & 0 deletions test/test_source_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ def testTilesFromMultiSimpleScaling():


@pytest.mark.skipif(sys.version_info < (3, 7), reason='requires python >= 3.7 for a sub-source')
@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires python3.11 wheels')
def testTilesFromMultiMultiSource(multiSourceImagePath):
imagePath = multiSourceImagePath
source = large_image_source_multi.open(imagePath)
Expand Down Expand Up @@ -124,6 +125,7 @@ def testTilesFromMultiString():


@pytest.mark.skipif(sys.version_info < (3, 7), reason='requires python >= 3.7 for a sub-source')
@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires python3.11 wheels')
def testInternalMetadata(multiSourceImagePath):
imagePath = multiSourceImagePath
source = large_image_source_multi.open(imagePath)
Expand All @@ -132,6 +134,7 @@ def testInternalMetadata(multiSourceImagePath):


@pytest.mark.skipif(sys.version_info < (3, 7), reason='requires python >= 3.7 for a sub-source')
@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires python3.11 wheels')
def testAssociatedImages(multiSourceImagePath):
imagePath = multiSourceImagePath
source = large_image_source_multi.open(imagePath)
Expand Down
2 changes: 2 additions & 0 deletions test/test_source_nd2.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@


@pytest.mark.skipif(sys.version_info < (3, 7), reason='requires python3.7 or higher')
@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires python3.11 wheels')
def testTilesFromND2():
imagePath = datastore.fetch('ITGA3Hi_export_crop2.nd2')
source = large_image_source_nd2.open(imagePath)
Expand All @@ -31,6 +32,7 @@ def testTilesFromND2():


@pytest.mark.skipif(sys.version_info < (3, 7), reason='requires python3.7 or higher')
@pytest.mark.skipif(sys.version_info >= (3, 11), reason='requires python3.11 wheels')
def testInternalMetadata():
imagePath = datastore.fetch('ITGA3Hi_export_crop2.nd2')
source = large_image_source_nd2.open(imagePath)
Expand Down
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
envlist =
test-py{36,37,38,39,310}
test-py{36,37,38,39,310,311}
docs
flake8
lintclient
Expand Down Expand Up @@ -50,7 +50,7 @@ setenv =
PIP_FIND_LINKS=https://girder.github.io/large_image_wheels
GDAL_PAM_ENABLED=no

[testenv:test-py{36,37,38,39,310}]
[testenv:test-py{36,37,38,39,310,311}]
deps = {[testenv:test]deps}
whitelist_externals = {[testenv:test]whitelist_externals}
commands = {[testenv:test]commands}
Expand All @@ -63,7 +63,7 @@ commands =
pytest -m 'singular and not girder_client' --cov-config tox.ini --suppress-no-test-exit-code {posargs}
pytest --numprocesses logical -m 'not singular and not girder_client' --cov-config tox.ini --cov-append --suppress-no-test-exit-code {posargs}

[testenv:server-py{36,37,38,39,310}]
[testenv:server-py{36,37,38,39,310,311}]
deps = {[testenv:server]deps}
commands = {[testenv:server]commands}

Expand All @@ -84,7 +84,7 @@ commands =
pytest -m 'singular and not girder' --cov-config tox.ini --suppress-no-test-exit-code {posargs}
pytest --numprocesses logical -m 'not singular and not girder' --cov-config tox.ini --cov-append --suppress-no-test-exit-code {posargs}

[testenv:core-py{36,37,38,39,310}]
[testenv:core-py{36,37,38,39,310,311}]
deps = {[testenv:core]deps}
commands = {[testenv:core]commands}

Expand Down
Loading