Skip to content

Commit b99f0e5

Browse files
authored
Merge branch 'develop' into add-slide-data
2 parents 5e8309c + e1eb5bd commit b99f0e5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+278
-145
lines changed

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ jobs:
1515
fail-fast: true
1616
matrix:
1717
include:
18-
- dockerfile: ./docker/3.9/Debian/Dockerfile
19-
mtag: py3.9-debian
20-
- dockerfile: ./docker/3.9/Ubuntu/Dockerfile
21-
mtag: py3.9-ubuntu
2218
- dockerfile: ./docker/3.10/Debian/Dockerfile
2319
mtag: py3.10-debian
2420
- dockerfile: ./docker/3.10/Ubuntu/Dockerfile
@@ -31,7 +27,11 @@ jobs:
3127
mtag: py3.12-debian
3228
- dockerfile: ./docker/3.12/Ubuntu/Dockerfile
3329
mtag: py3.12-ubuntu
34-
- dockerfile: ./docker/3.12/Ubuntu/Dockerfile
30+
- dockerfile: ./docker/3.13/Ubuntu/Dockerfile
31+
mtag: py3.13-debian
32+
- dockerfile: ./docker/3.13/Ubuntu/Dockerfile
33+
mtag: py3.13-ubuntu
34+
- dockerfile: ./docker/3.13/Ubuntu/Dockerfile
3535
mtag: latest
3636
permissions:
3737
contents: read

.github/workflows/mypy-type-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
strategy:
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12"]
19+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2020

2121
steps:
2222

.github/workflows/pip-install.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
python-version: ["3.9", "3.10", "3.11", "3.12"]
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
1818
os: [ubuntu-24.04, windows-latest, macos-latest]
1919
steps:
2020
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
fail-fast: true
1919
matrix:
20-
python-version: ["3.9", "3.10", "3.11", "3.12"]
20+
python-version: ["3.10", "3.11", "3.12", "3.13"]
2121

2222
steps:
2323
- uses: actions/checkout@v3

CONTRIBUTING.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Before you submit a pull request, check that it meets these guidelines:
9898

9999
1. The pull request should include tests.
100100
2. If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the pull request description.
101-
3. The pull request should work for Python 3.9, 3.10, 3.11, and 3.12, and for PyPy. Check https://github.com/TissueImageAnalytics/tiatoolbox/actions/workflows/python-package.yml and make sure that the tests pass for all supported Python versions.
101+
3. The pull request should work for Python 3.10, 3.11, 3.12 and 3.13, and for PyPy. Check https://github.com/TissueImageAnalytics/tiatoolbox/actions/workflows/python-package.yml and make sure that the tests pass for all supported Python versions.
102102

103103
Tips
104104
----

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Prepare a computer as a convenient platform for further development of the Pytho
106106
5. Create virtual environment for TIAToolbox using
107107

108108
```sh
109-
$ conda create -n tiatoolbox-dev python=3.9 # select version of your choice
109+
$ conda create -n tiatoolbox-dev python=3.10 # select version of your choice
110110
$ conda activate tiatoolbox-dev
111111
$ pip install -r requirements/requirements_dev.txt
112112
```

benchmarks/annotation_store.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
" capsize=capsize,\n",
356356
" **kwargs,\n",
357357
" )\n",
358-
" for i, (runs, c) in enumerate(zip(experiments, color)):\n",
358+
" for i, (runs, c) in enumerate(zip(experiments, color, strict=False)):\n",
359359
" plt.text(\n",
360360
" i,\n",
361361
" min(runs),\n",
@@ -2418,7 +2418,7 @@
24182418
" )\n",
24192419
" total = np.sum(counts)\n",
24202420
" frequencies = dict.fromkeys(range(256), 0)\n",
2421-
" for v, x in zip(values, counts):\n",
2421+
" for v, x in zip(values, counts, strict=False):\n",
24222422
" frequencies[v] = x / total\n",
24232423
" frequency_array = np.array(list(frequencies.values()))\n",
24242424
" epsilon = 1e-16\n",

docs/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ MacPorts
5555
Installing Stable Release
5656
=========================
5757

58-
Please note that TIAToolbox is tested for Python versions 3.9, 3.10, 3.11, and 3.12.
58+
Please note that TIAToolbox is tested for Python versions 3.10, 3.11, 3.12 and 3.13.
5959

6060
Recommended
6161
-----------

examples/full-pipelines/slide-graph.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
"import warnings\n",
134134
"from collections import OrderedDict\n",
135135
"from pathlib import Path\n",
136-
"from typing import TYPE_CHECKING, Callable\n",
136+
"from typing import TYPE_CHECKING\n",
137137
"\n",
138138
"# Third party imports\n",
139139
"import joblib\n",
@@ -192,7 +192,7 @@
192192
")\n",
193193
"\n",
194194
"if TYPE_CHECKING: # pragma: no cover\n",
195-
" from collections.abc import Iterator\n",
195+
" from collections.abc import Callable, Iterator\n",
196196
"\n",
197197
"warnings.filterwarnings(\"ignore\")\n",
198198
"mpl.rcParams[\"figure.dpi\"] = 300 # for high resolution figure in notebook"
@@ -394,7 +394,7 @@
394394
"patient_uids = patient_uids[sel]\n",
395395
"patient_labels = patient_labels_[sel]\n",
396396
"assert len(patient_uids) == len(patient_labels) # noqa: S101\n",
397-
"clinical_info = OrderedDict(list(zip(patient_uids, patient_labels)))\n",
397+
"clinical_info = OrderedDict(list(zip(patient_uids, patient_labels, strict=False)))\n",
398398
"\n",
399399
"# Retrieve patient code of each WSI, this is based on TCGA barcodes:\n",
400400
"# https://docs.gdc.cancer.gov/Encyclopedia/pages/TCGA_Barcode/\n",
@@ -412,7 +412,7 @@
412412
"wsi_names = np.array(wsi_names)[sel]\n",
413413
"wsi_labels = np.array(wsi_labels)[sel]\n",
414414
"\n",
415-
"label_df = list(zip(wsi_names, wsi_labels))\n",
415+
"label_df = list(zip(wsi_names, wsi_labels, strict=False))\n",
416416
"label_df = pd.DataFrame(label_df, columns=[\"WSI-CODE\", \"LABEL\"])"
417417
]
418418
},
@@ -529,9 +529,9 @@
529529
"\n",
530530
" splits.append(\n",
531531
" {\n",
532-
" \"train\": list(zip(train_x, train_y)),\n",
533-
" \"valid\": list(zip(valid_x, valid_y)),\n",
534-
" \"test\": list(zip(test_x, test_y)),\n",
532+
" \"train\": list(zip(train_x, train_y, strict=False)),\n",
533+
" \"valid\": list(zip(valid_x, valid_y, strict=False)),\n",
534+
" \"test\": list(zip(test_x, test_y, strict=False)),\n",
535535
" },\n",
536536
" )\n",
537537
" return splits"
@@ -2025,7 +2025,7 @@
20252025
" output = [np.split(v, batch_size, axis=0) for v in output]\n",
20262026
" # pairing such that it will be\n",
20272027
" # N batch size x H head list\n",
2028-
" output = list(zip(*output))\n",
2028+
" output = list(zip(*output, strict=False))\n",
20292029
" step_output.extend(output)\n",
20302030
" pbar.update()\n",
20312031
" pbar.close()\n",
@@ -2042,7 +2042,7 @@
20422042
" ):\n",
20432043
" # Expand the list of N dataset size x H heads\n",
20442044
" # back to a list of H Head each with N samples.\n",
2045-
" output = list(zip(*step_output))\n",
2045+
" output = list(zip(*step_output, strict=False))\n",
20462046
" logit, true = output\n",
20472047
" logit = np.squeeze(np.array(logit))\n",
20482048
" true = np.squeeze(np.array(true))\n",

examples/inference-pipelines/slide-graph.ipynb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
"import shutil\n",
220220
"import warnings\n",
221221
"from pathlib import Path\n",
222-
"from typing import TYPE_CHECKING, Callable\n",
222+
"from typing import TYPE_CHECKING\n",
223223
"\n",
224224
"# Third party imports\n",
225225
"import joblib\n",
@@ -260,6 +260,8 @@
260260
"from tiatoolbox.wsicore.wsireader import WSIReader\n",
261261
"\n",
262262
"if TYPE_CHECKING:\n",
263+
" from collections.abc import Callable\n",
264+
"\n",
263265
" from tiatoolbox.wsicore.wsimeta import Resolution, Units\n",
264266
"\n",
265267
"warnings.filterwarnings(\"ignore\")\n",

0 commit comments

Comments
 (0)