Skip to content

Commit 5231f9d

Browse files
authored
🔖 Release 1.4.0 (#599)
## 1.4.0 (2023-04-24) ### Major Updates and Feature Improvements - Adds Python 3.11 support \[experimental\] #500 - Python 3.11 is not fully supported by `pytorch` pytorch/pytorch#86566 and `openslide` openslide/openslide-python#188 - Removes Python 3.7 support - This allows upgrading all the dependencies which were dependent on an older version of Python. - Adds Neighbourhood Querying Support To AnnotationStore #540 - This enables easy and efficient querying of annotations within a neighbourhood of other annotations. - Adds `MultiTaskSegmentor` engine #424 - Fixes an issue with stain augmentation to apply augmentation to only tissue regions. - #546 contributed by @navidstuv - Filters logger output to stdout instead of stderr. - Fixes #255 - Allows import of some modules at higher level for improved usability - `WSIReader` can now be imported as `from tiatoolbox.wsicore import WSIReader` - `WSIMeta` can now be imported as `from tiatoolbox.wsicore import WSIMeta` - `HoVerNet`, `HoVerNetPlus`, `IDaRS`, `MapDe`, `MicroNet`, `NuClick`, `SCCNN` can now be imported as \`from tiatoolbox.models import HoVerNet, HoVerNetPlus, IDaRS, MapDe, MicroNet, NuClick, SCCNN - Improves `PatchExtractor` performance. Updates `WSIPatchDataset` to be consistent. #571 - Updates documentation for `License` for clarity on source code and model weights license. ### Changes to API - Updates SCCNN architecture to make it consistent with other models. #544 ### Bug Fixes and Other Changes - Fixes Parsing Missing Omero Version NGFF Metadata #568 - Fixes #535 raised by @benkamphaus - Fixes reading of DICOM WSIs at the correct level #564 - Fixes #529 - Fixes `scipy`, `matplotlib`, `scikit-image` deprecated code - Fixes breaking changes in `DICOMWSIReader` to make it compatible with latest `wsidicom` version. #539, #580 - Updates `shapely` dependency to version >=2.0.0 and fixes any breaking changes. - Fixes bug with `DictionaryStore.bquery` and `geometry=None`, i.e. only a where predicate given. - Partly Fixes #532 raised by @blaginin - Fixes local tests for Windows/Linux - Fixes `flake8`, `deepsource` errors. - Uses `logger` instead of `warnings` and `print` statements to properly log runs. ### Development related changes - Upgrades dependencies which are dependent on Python 3.7 - Moves `requirements*.txt` files to `requirements` folder - Removes `tox` - Uses `pyproject.toml` for `bdist_wheel`, `pytest` and `isort` - Adds `joblib` and `numba` as dependencies.
1 parent d548b33 commit 5231f9d

File tree

122 files changed

+13993
-10652
lines changed

Some content is hidden

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

122 files changed

+13993
-10652
lines changed

.deepsource.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ exclude_patterns = ["docs/*.py", "**/__init__.py"]
77
[[analyzers]]
88
name = "python"
99
enabled = true
10-
dependency_file_paths = ["requirements_dev.txt"]
10+
dependency_file_paths = ["requirements/requirements_dev.txt"]
1111

1212
[analyzers.meta]
1313
runtime_version = "3.x.x"

.github/workflows/conda-env-create.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ name: Solve Conda Environment
44

55
on:
66
push:
7-
paths: [ "requirements*.yml", "conda-env-create.yml", "requirement*.txt"]
7+
paths: [ "requirements/requirements*.yml", "conda-env-create.yml", "requirement*.txt"]
88
pull_request:
9-
paths: [ "requirements*.yml", "conda-env-create.yml", "requirement*.txt"]
9+
paths: [ "requirements/requirements*.yml", "conda-env-create.yml", "requirement*.txt"]
1010
schedule: # Run on the 1st of every month at midnight
1111
- cron: "0 0 1 * *"
1212

@@ -20,24 +20,24 @@ jobs:
2020
include:
2121
- os: ubuntu-latest
2222
kind: prod
23-
requirements: requirements.conda.yml
23+
requirements: requirements/requirements.conda.yml
2424
- os: ubuntu-latest
2525
kind: dev
26-
requirements: requirements.dev.conda.yml
26+
requirements: requirements/requirements.dev.conda.yml
2727
- os: windows-latest
2828
kind: prod
29-
requirements: requirements.win64.conda.yml
29+
requirements: requirements/requirements.win64.conda.yml
3030
- os: windows-latest
3131
kind: dev
32-
requirements: requirements.win64.dev.conda.yml
32+
requirements: requirements/requirements.win64.dev.conda.yml
3333
runs-on: ${{ matrix.os }}
3434
timeout-minutes: 20
3535
steps:
3636
- uses: actions/checkout@v2
3737
- name: Copy requirements files
3838
shell: bash
3939
run: |
40-
cp ./requirements*.txt /tmp/
40+
cp ./requirements/requirements*.txt /tmp/
4141
mkdir /tmp/docs/
4242
cp ./docs/requirements*.txt /tmp/docs/
4343
- uses: mamba-org/provision-with-micromamba@main

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ env:
66
REGISTRY: ghcr.io
77
IMAGE_NAME: TissueImageAnalytics/tiatoolbox
88
image: ghcr.io/tissueimageanalytics/tiatoolbox
9-
TOOLBOX_VER: 1.3.3
9+
TOOLBOX_VER: 1.4.0
1010

1111
jobs:
1212
build-and-push-image:
@@ -15,8 +15,6 @@ jobs:
1515
fail-fast: true
1616
matrix:
1717
include:
18-
- dockerfile: ./docker/3.7/Debian/Dockerfile
19-
mtag: py3.7-debian
2018
- dockerfile: ./docker/3.8/Debian/Dockerfile
2119
mtag: py3.8-debian
2220
- dockerfile: ./docker/3.9/Debian/Dockerfile

.github/workflows/pip-install.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ name: pip Install
44

55
on:
66
push:
7-
paths: [ "requirements*.yml", "conda-env-create.yml", "requirement*.txt", "setup*py", "setup*cfg", "pytproject*toml", "MANIFEST*in"]
7+
paths: [ "requirements*.yml", "conda-env-create.yml", "requirements/requirement*.txt", "setup*py", "setup*cfg", "pytproject*toml", "MANIFEST*in"]
88

99
jobs:
1010
build:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
python-version: ["3.7", "3.8", "3.9", "3.10"]
15+
python-version: ["3.8", "3.9", "3.10", "3.11"]
1616
os: [ubuntu-22.04, windows-latest, macos-latest]
1717
steps:
1818
- name: Set up Python ${{ matrix.python-version }}

.github/workflows/python-package.yml

Lines changed: 3 additions & 3 deletions
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.7", "3.8", "3.9", "3.10"]
20+
python-version: ["3.8", "3.9", "3.10", "3.11"]
2121

2222
steps:
2323
- uses: actions/checkout@v3
@@ -31,7 +31,7 @@ jobs:
3131
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools
3232
python -m pip install --upgrade pip
3333
python -m pip install flake8 pytest pytest-cov pytest-runner
34-
pip install -r requirements.txt
34+
pip install -r requirements/requirements.txt
3535
- name: Print Version Information
3636
run: |
3737
echo "---SQlite---"
@@ -93,7 +93,7 @@ jobs:
9393
run: |
9494
sudo apt-get install -y libopenslide-dev libopenjp2-7
9595
python -m pip install --upgrade pip
96-
pip install -r requirements.txt
96+
pip install -r requirements/requirements.txt
9797
pip install build
9898
- name: Build package
9999
run: python -m build

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ pip-delete-this-directory.txt
3939

4040
# Unit test / coverage reports
4141
htmlcov/
42-
.tox/
4342
.coverage
4443
.coverage.*
4544
.cache

.pre-commit-config.yaml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
ci:
2+
autofix_prs: true
3+
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
4+
autoupdate_schedule: 'weekly'
15
repos:
26
- repo: local
37
hooks:
@@ -32,7 +36,7 @@ repos:
3236
- mdformat-gfm # GitHub flavoured markdown
3337
- mdformat-black # Black formatting for python verbatim blocks
3438
- repo: https://github.com/pre-commit/pre-commit-hooks
35-
rev: v4.3.0
39+
rev: v4.4.0
3640
hooks:
3741
- id: check-ast # Simply checks whether the files parse as valid Python.
3842
- id: fix-byte-order-marker # Removes utf-8 byte order marker.
@@ -54,20 +58,20 @@ repos:
5458
- id: debug-statements # Checks for debugger imports and py37+ `breakpoint()` calls in python source.
5559
- id: pretty-format-json # Sets a standard for formatting JSON files.
5660
- repo: https://github.com/pre-commit/pygrep-hooks
57-
rev: v1.9.0
61+
rev: v1.10.0
5862
hooks:
5963
- id: rst-backticks # Detect common mistake of using single backticks when writing rst.
6064
- id: rst-directive-colons # Detect mistake of rst directive not ending with double colon.
6165
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst.
6266
- repo: https://github.com/pycqa/isort
63-
rev: 5.10.1
67+
rev: 5.12.0
6468
hooks:
6569
- id: isort
6670
- repo: https://github.com/psf/black
67-
rev: 22.10.0 # Replace with any tag/version: https://github.com/psf/black/tags
71+
rev: 23.3.0 # Replace with any tag/version: https://github.com/psf/black/tags
6872
hooks:
6973
- id: black
70-
language_version: python3 # Should be a command that runs python3.7+
74+
language_version: python3 # Should be a command that runs python3.+
7175
additional_dependencies: ['click==8.0.4'] # Currently >8.0.4 breaks black
7276
- id: black-jupyter
7377
language: python

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ formats:
2626
# Optionally set the version of Python and requirements required to build your docs
2727
python:
2828
install:
29-
- requirements: requirements.txt
29+
- requirements: requirements/requirements.txt
3030
- requirements: docs/requirements.txt

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ authors:
4444
given-names: "Shan E Ahmed"
4545
orcid: "https://orcid.org/0000-0002-1097-1738"
4646
title: "TIAToolbox as an end-to-end library for advanced tissue image analytics"
47-
version: 1.3.3 # TIAToolbox version
47+
version: 1.4.0 # TIAToolbox version
4848
doi: 10.5281/zenodo.5802442
4949
date-released: 2022-10-20
5050
url: "https://github.com/TissueImageAnalytics/tiatoolbox"

CONTRIBUTING.rst

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,12 @@ Ready to contribute? Here's how to set up ``tiatoolbox`` for local development.
7777
Now you can make your changes locally.
7878

7979
5. When you're done making changes, check that your changes pass flake8 and the
80-
tests, including testing other Python versions with tox::
80+
tests::
8181

8282
$ flake8 tiatoolbox tests
8383
$ python setup.py test or pytest
84-
$ tox
8584

86-
To get flake8 and tox, just pip install them into your virtualenv.
85+
To get flake8, just pip install them into your virtualenv.
8786

8887
6. Commit your changes and push your branch to GitHub::
8988

@@ -102,7 +101,7 @@ Before you submit a pull request, check that it meets these guidelines:
102101
2. If the pull request adds functionality, the docs should be updated. Put
103102
your new functionality into a function with a docstring, and add the
104103
feature to the list in README.rst.
105-
3. The pull request should work for Python 3.7, 3.8, 3.9 and 3.10, and for PyPy. Check
104+
3. The pull request should work for Python 3.8, 3.9 and 3.10, and for PyPy. Check
106105
https://travis-ci.com/tialab/tiatoolbox/pull_requests
107106
and make sure that the tests pass for all supported Python versions.
108107

HISTORY.md

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,54 @@
11
# History
22

3+
## 1.4.0 (2023-04-24)
4+
5+
### Major Updates and Feature Improvements
6+
7+
- Adds Python 3.11 support \[experimental\] #500
8+
- Python 3.11 is not fully supported by `pytorch` https://github.com/pytorch/pytorch/issues/86566 and `openslide` https://github.com/openslide/openslide-python/pull/188
9+
- Removes Python 3.7 support
10+
- This allows upgrading all the dependencies which were dependent on an older version of Python.
11+
- Adds Neighbourhood Querying Support To AnnotationStore #540
12+
- This enables easy and efficient querying of annotations within a neighbourhood of other annotations.
13+
- Adds `MultiTaskSegmentor` engine #424
14+
- Fixes an issue with stain augmentation to apply augmentation to only tissue regions.
15+
- #546 contributed by @navidstuv
16+
- Filters logger output to stdout instead of stderr.
17+
- Fixes #255
18+
- Allows import of some modules at higher level for improved usability
19+
- `WSIReader` can now be imported as `from tiatoolbox.wsicore import WSIReader`
20+
- `WSIMeta` can now be imported as `from tiatoolbox.wsicore import WSIMeta`
21+
- `HoVerNet`, `HoVerNetPlus`, `IDaRS`, `MapDe`, `MicroNet`, `NuClick`, `SCCNN` can now be imported as \`from tiatoolbox.models import HoVerNet, HoVerNetPlus, IDaRS, MapDe, MicroNet, NuClick, SCCNN
22+
- Improves `PatchExtractor` performance. Updates `WSIPatchDataset` to be consistent. #571
23+
- Updates documentation for `License` for clarity on source code and model weights license.
24+
25+
### Changes to API
26+
27+
- Updates SCCNN architecture to make it consistent with other models. #544
28+
29+
### Bug Fixes and Other Changes
30+
31+
- Fixes Parsing Missing Omero Version NGFF Metadata #568
32+
- Fixes #535 raised by @benkamphaus
33+
- Fixes reading of DICOM WSIs at the correct level #564
34+
- Fixes #529
35+
- Fixes `scipy`, `matplotlib`, `scikit-image` deprecated code
36+
- Fixes breaking changes in `DICOMWSIReader` to make it compatible with latest `wsidicom` version. #539, #580
37+
- Updates `shapely` dependency to version >=2.0.0 and fixes any breaking changes.
38+
- Fixes bug with `DictionaryStore.bquery` and `geometry=None`, i.e. only a where predicate given.
39+
- Partly Fixes #532 raised by @blaginin
40+
- Fixes local tests for Windows/Linux
41+
- Fixes `flake8`, `deepsource` errors.
42+
- Uses `logger` instead of `warnings` and `print` statements to properly log runs.
43+
44+
### Development related changes
45+
46+
- Upgrades dependencies which are dependent on Python 3.7
47+
- Moves `requirements*.txt` files to `requirements` folder
48+
- Removes `tox`
49+
- Uses `pyproject.toml` for `bdist_wheel`, `pytest` and `isort`
50+
- Adds `joblib` and `numba` as dependencies.
51+
352
## 1.3.3 (2023-03-02)
453

554
### Major Updates and Feature Improvements
@@ -18,7 +67,6 @@ None
1867

1968
- Restricts dependency versions for compatibility
2069

21-
2270
## 1.3.2 (2023-02-17)
2371

2472
### Major Updates and Feature Improvements
@@ -37,7 +85,6 @@ None
3785

3886
- Restricts wsidicom version to \<0.7.0 for compatibility
3987

40-
4188
## 1.3.1 (2022-12-20)
4289

4390
### Major Updates and Feature Improvements

LICENSE

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
BSD 3-Clause License
22

3-
Copyright (c) 2022, Tissue Image Analytics (TIA) Centre
3+
Model weights are provided under a different license. For details, please see
4+
https://tia-toolbox.readthedocs.io/en/latest/pretrained.html
5+
6+
Copyright (c) 2023, Tissue Image Analytics (TIA) Centre
47
All rights reserved.
58

69
Redistribution and use in source and binary forms, with or without

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ include CONTRIBUTING.rst
33
include HISTORY.md
44
include LICENSE
55
include README.md
6-
include requirements.txt
6+
include requirements/requirements.txt
77
include make.bat
88
include Makefile
99
include conf.py

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ clean-pyc: ## remove Python file artifacts
4242
find . -name '__pycache__' -exec rm -fr {} +
4343

4444
clean-test: ## remove test and coverage artifacts
45-
rm -fr .tox/
4645
rm -f .coverage
4746
rm -fr htmlcov/
4847
rm -fr .pytest_cache
@@ -62,9 +61,6 @@ lint: ## check style with flake8
6261
test: ## run tests quickly with the default Python
6362
pytest
6463

65-
test-all: ## run tests on every Python version with tox
66-
tox
67-
6864
coverage: ## check code coverage quickly with the default Python
6965
pytest --cov=tiatoolbox --cov-report=term --cov-report=html --cov-report=xml
7066
$(BROWSER) htmlcov/index.html
@@ -88,3 +84,6 @@ dist: clean ## builds source and wheel package
8884

8985
install: clean ## install the package to the active Python's site-packages
9086
python setup.py install
87+
88+
update-notebook-urls: # Recursively update the notebook URLs in ./examples
89+
find ./examples -name "*.ipynb" | sort | xargs python pre-commit/notebook_urls.py

README.md

Lines changed: 8 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
<img src="https://readthedocs.org/projects/tia-toolbox/badge/?version=latest" alt="Documentation Status" />
2323
</a>
2424
<br>
25-
<a href="https://github.com/TissueImageAnalytics/tiatoolbox/blob/develop/LICENSE">
26-
<img alt="GitHub license" src="https://img.shields.io/github/license/TissueImageAnalytics/tiatoolbox"></a>
25+
<a href="#license">
26+
<img alt="GitHub license" src="https://img.shields.io/static/v1?label=license&message=BSD-3-Clause&color=green"></a>
2727
<br>
2828
<br>
2929
<a href="https://github.com/TissueImageAnalytics/tiatoolbox/actions/workflows/pip-install.yml">
@@ -85,7 +85,7 @@ tiatoolbox supports various features through command line. For more information,
8585

8686
Prepare a computer as a convenient platform for further development of the Python package `tiatoolbox` and related programs as follows.
8787

88-
1. Install [pre-requisite software](https://tia-toolbox.readthedocs.io/en/latest/installation.html)
88+
1. Install [pre-requisite software](https://tia-toolbox.readthedocs.io/en/latest/installation.html#prerequisites)
8989
1. Open a terminal window<br/>
9090

9191
```sh
@@ -107,16 +107,16 @@ Prepare a computer as a convenient platform for further development of the Pytho
107107
5. Create virtual environment for TIAToolbox using
108108

109109
```sh
110-
$ conda env create -f requirements.dev.conda.yml # for linux/mac only.
110+
$ conda create -n tiatoolbox-dev python=3.8 # select version of your choice
111111
$ conda activate tiatoolbox-dev
112+
$ pip install -r requirements/requirements_dev.txt
112113
```
113114

114115
or
115116

116117
```sh
117-
$ conda create -n tiatoolbox-dev python=3.8 # select version of your choice
118+
$ conda env create -f requirements/requirements.dev.conda.yml # for linux/mac only.
118119
$ conda activate tiatoolbox-dev
119-
$ pip install -r requirements_dev.txt
120120
```
121121

122122
6. To use the packages installed in the environment, run the command:
@@ -127,9 +127,9 @@ or
127127

128128
### License
129129

130-
The source code TIA Toolbox (tiatoolbox) as hosted on GitHub is released under the [The 3-Clause BSD License].
130+
The source code TIA Toolbox (tiatoolbox) as hosted on GitHub is released under the [BSD-3-Clause license](https://github.com/TissueImageAnalytics/tiatoolbox/blob/develop/LICENSE). The full text of the licence is included in [LICENSE](https://raw.githubusercontent.com/TissueImageAnalytics/tiatoolbox/develop/LICENSE).
131131

132-
The full text of the licence is included in [LICENSE](https://raw.githubusercontent.com/TissueImageAnalytics/tiatoolbox/develop/LICENSE).
132+
Models weights are dependent on the datasets that they were trained on. Please refer to the [documentation](https://tia-toolbox.readthedocs.io/en/latest/pretrained.html) for more details.
133133

134134
### Cite this repository
135135

@@ -152,13 +152,3 @@ If you find TIAToolbox useful or use it in your research, please consider citing
152152
year = {2022}
153153
}
154154
```
155-
156-
### Auxiliary Files
157-
158-
Auxiliary files, such as pre-trained model weights downloaded from the TIA Centre webpage (https://warwick.ac.uk/tia/), are provided under the [Creative Commons Attribution-NonCommercial-ShareAlike Version 4 (CC BY-NC-SA 4.0) license](https://creativecommons.org/licenses/by-nc-sa/4.0/).
159-
160-
### Dual License
161-
162-
If you would like to use any of the source code or auxiliary files (e.g. pre-trained model weights) under a different license agreement please contact the Tissue Image Analytics (TIA) Centre at the University of Warwick (tia@dcs.warwick.ac.uk).
163-
164-
[the 3-clause bsd license]: https://opensource.org/licenses/BSD-3-Clause

0 commit comments

Comments
 (0)