Skip to content

Commit

Permalink
Test on Python 3.13
Browse files Browse the repository at this point in the history
Currently this is very slow because some binary wheels are missing for
3.13 (numcodecs being notable) and they need to be compiled before
testing begins.  Additionally, currently wsidicom requires numpy<2,
partly because dicomweb-client isn't numpy 2.x compatible (yet).  Since
numpy < 2 doesn't have wheels for 3.13, this is part of the slowness.
To avoid having CI timeout, this increases tox verbosity.

A few optional packages don't have 3.13 support (scikit-learn,
pillow-jxl-plugin, rawpy), so those are not included in install_requires
options.
  • Loading branch information
manthey committed Oct 9, 2024
1 parent 31527f8 commit de2acd7
Show file tree
Hide file tree
Showing 27 changed files with 88 additions and 31 deletions.
52 changes: 40 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,11 @@ commands:
tox:
description: "Run tox"
parameters:
env:
toxenv:
type: string
environ:
type: string
default: ""
steps:
- run:
name: Upgrade pip
Expand All @@ -25,9 +28,9 @@ commands:
name: Run tests via tox
# Piping through cat does less buffering of the output but can
# consume the exit code
# command: PYTEST_ADDOPTS=--forked tox -e << parameters.env >> | cat; test ${PIPESTATUS[0]} -eq 0
# command: PYTEST_ADDOPTS="--reruns=3 --numprocesses=0" tox -e << parameters.env >> | cat; test ${PIPESTATUS[0]} -eq 0
command: COVERAGE_CORE=sysmon PYTEST_NUMPROCESSES=3 PYTEST_ADDOPTS="--reruns=3" tox -e << parameters.env >> | cat; test ${PIPESTATUS[0]} -eq 0
# command: PYTEST_ADDOPTS=--forked tox -e << parameters.toxenv >> | cat; test ${PIPESTATUS[0]} -eq 0
# command: PYTEST_ADDOPTS="--reruns=3 --numprocesses=0" tox -e << parameters.toxenv >> | cat; test ${PIPESTATUS[0]} -eq 0
command: COVERAGE_CORE=sysmon PYTEST_NUMPROCESSES=3 PYTEST_ADDOPTS="--reruns=3" << parameters.environ >> tox -e << parameters.toxenv >> | cat; test ${PIPESTATUS[0]} -eq 0
switchpython:
description: "Upgrade python"
parameters:
Expand Down Expand Up @@ -163,7 +166,7 @@ jobs:
version: "3.8"
node: v14
- tox:
env: test-py38
toxenv: test-py38
- coverage
- store_artifacts:
path: build/test/artifacts
Expand All @@ -177,7 +180,7 @@ jobs:
version: "3.9"
node: v14
- tox:
env: test-py39
toxenv: test-py39
- coverage
- store_artifacts:
path: build/test/artifacts
Expand All @@ -191,7 +194,7 @@ jobs:
version: "3.10"
node: v14
- tox:
env: test-py310
toxenv: test-py310
- coverage
- store_artifacts:
path: build/test/artifacts
Expand All @@ -205,7 +208,7 @@ jobs:
version: "3.11"
node: v14
- tox:
env: test-py311
toxenv: test-py311
- coverage
- store_artifacts:
path: build/test/artifacts
Expand All @@ -219,7 +222,22 @@ jobs:
version: "3.12"
node: v14
- tox:
env: test-py312
toxenv: test-py312
- coverage
- store_artifacts:
path: build/test/artifacts
py313:
machine:
image: ubuntu-2204:current
resource_class: large
steps:
- checkout
- allservices:
version: "3.13"
node: v14
- tox:
toxenv: test-py313
environ: TOX_VERBOSE=4
- coverage
- store_artifacts:
path: build/test/artifacts
Expand All @@ -234,7 +252,7 @@ jobs:
name: Permissions for link checker
command: find /root -type d -exec chmod 755 {} \+
- tox:
env: docs,lint,lintclient,notebook
toxenv: docs,lint,lintclient,notebook
- store_artifacts:
path: build/docs
- persist_to_workspace:
Expand All @@ -246,7 +264,7 @@ jobs:
steps:
- checkout
- tox:
env: compare-py311
toxenv: compare-py311
- store_artifacts:
path: build/tox/compare.txt
- store_artifacts:
Expand All @@ -257,7 +275,7 @@ jobs:
steps:
- checkout
- tox:
env: type
toxenv: type
wheels:
executor: toxandnode
steps:
Expand Down Expand Up @@ -373,6 +391,13 @@ workflows:
branches:
ignore:
- gh-pages
- py313:
filters:
tags:
only: /^v.*/
branches:
ignore:
- gh-pages
- lint_and_docs:
filters:
tags:
Expand Down Expand Up @@ -416,6 +441,7 @@ workflows:
- py310
- py311
- py312
- py313
- lint_and_docs
- type
- wheels
Expand All @@ -431,6 +457,7 @@ workflows:
- py310
- py311
- py312
- py313
- lint_and_docs
- type
- wheels
Expand All @@ -456,6 +483,7 @@ workflows:
- py310
- py311
- py312
- py313
- lint_and_docs
- type
- compare
Expand Down
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
'girder>=3.1.18',
Expand Down
3 changes: 2 additions & 1 deletion 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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
'jsonschema>=2.5.1',
Expand All @@ -62,7 +63,7 @@ def prerelease_local_scheme(version):
'pandas ; python_version < "3.9"',
'pandas>=2.2 ; python_version >= "3.9"',
'python-calamine ; python_version >= "3.9"',
'umap-learn',
'umap-learn ; python_version < "3.13"',
],
'tasks': [
f'girder-large-image[tasks]{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
'cachetools',
Expand Down
8 changes: 4 additions & 4 deletions slim.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build wheels
FROM python:3.12.7-slim as build
FROM python:3.12-slim as build

# Need git for setuptools_scm
RUN apt-get update \
Expand All @@ -19,7 +19,7 @@ RUN echo "pylibmc>=1.5.1\nmatplotlib\npyvips\nsimplejpeg\n" \


# Geospatial Sources
FROM python:3.12.7-slim as geo
FROM python:3.12-slim as geo
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
Expand All @@ -37,7 +37,7 @@ RUN pip install \


# All Sources
FROM python:3.12.7-slim as all
FROM python:3.12-slim as all
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
Expand All @@ -52,7 +52,7 @@ RUN pip install \


# All Sources and Girder Packages
FROM python:3.12.7-slim as girder
FROM python:3.12-slim as girder
COPY --from=build /opt/build-context/wheels /opt/wheels
LABEL maintainer="Kitware, Inc. <[email protected]>"
LABEL repo="https://github.com/girder/large_image"
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/dicom/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
'jsonschema',
Expand Down
1 change: 1 addition & 0 deletions sources/nd2/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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
5 changes: 3 additions & 2 deletions sources/pil/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,16 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
],
extras_require={
'all': [
'rawpy',
'rawpy ; python_version < "3.13"',
'pillow-heif',
'pillow-jxl-plugin',
'pillow-jxl-plugin ; python_version < "3.13"',
'pillow-jpls',
],
'girder': f'girder-large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/rasterio/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def prerelease_local_scheme(version):
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/tifffile/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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/vips/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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
Expand Down
1 change: 1 addition & 0 deletions sources/zarr/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.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
],
install_requires=[
f'large-image{limit_version}',
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.11 3.8 3.9 3.10 3.12"
PYTHON_VERSIONS="3.11 3.8 3.9 3.10 3.12 3.13"

# Consumers of this package aren't expecting an existing ubuntu user (there
# wasn't one in the ubuntu:22.04 base)
Expand Down
Loading

0 comments on commit de2acd7

Please sign in to comment.