Skip to content

Commit

Permalink
🔖 Release 1.6.0 (#895)
Browse files Browse the repository at this point in the history
## TIAToolbox v1.6.0 (2024-12-12)

### Major Updates and Feature Improvements

- **Foundation Models Support via `timm` API** (#856, contributed by @GeorgeBatch)
  - Introduced `TimmBackbone` for running additional PyTorch Image Models.
  - Tested models include `UNI`, `Prov-GigaPath`, and `H-optimus-0`.
  - Added an example notebook demonstrating feature extraction with foundation models.
  - `timm` added as a dependency.
- **Performance Enhancements with `torch.compile`** (#716)
  - Improved performance on newer GPUs using `torch.compile`.
- **Multichannel Input Support in `WSIReader`** (#742)
- **AnnotationStore Filtering for Patch Extraction** (#822)
- **Python 3.12 Support**
- **Deprecation of Python 3.8 Support**
- **CLI Response Time Improvements** (#795)

### API Changes

- **Device Specification Update** (#882)
  - Replaced `has_gpu` with `device` for specifying GPU or CPU usage, aligning with PyTorch's `Model.to()` functionality.
- **Windows Compatibility Enhancement** (#769)
  - Replaced `POWER` with explicit multiplication.

### Bug Fixes and Other Changes

- **TIFFWSIReader Bound Reading Adjustment** (#777)
  - Fixed `read_bound` to use adjusted bounds.
  - Reduced code complexity in `WSIReader` (#814).
- **Annotation Rendering Fixes** (#813)
  - Corrected rendering of annotations with holes.
- **Non-Tiled TIFF Support in `WSIReader`** (#807, contributed by @GeorgeBatch)
- **HoVer-Net Documentation Update** (#751)
  - Corrected class output information.
- **Citation File Fix for `cffconvert`** (#869, contributed by @Alon-Alexander)
- **Bokeh Compatibility Updates**
  - Updated `bokeh_app` for compatibility with `bokeh>=3.5.0`.
  - Switched from `size` to `radius` for `bokeh>3.4.0` compatibility (#796).
- **JSON Extraction Fixes** (#772)
  - Restructured SQL expression construction for JSON properties with dots in keys.
- **VahadaneExtractor Warning** (#871)
  - Added warning due to changes in `scikit-learn>0.23.0` dictionary learning (#382).
- **PatchExtractor Error Message Refinement** (#883)
- **Immutable Output Fix in `WSIReader`** (#850)

### Development-Related Changes

- **Mypy Checks Added**
  - Applied to `utils`, `tools`, `data`, `annotation`, and `cli/common`.
- **ReadTheDocs PDF Build Deprecation**
- **Formatter Update**
  - Replaced `black` with `ruff-format`.
- **Dependency Removal**
  - Removed `jinja2`.
- **Test Environment Update**
  - Updated to `Ubuntu 24.04`.
- **Conda Environment Workflow Update**
  - Implemented `micromamba` setup.
- **Codecov Reporting Fix** (#811)
  **Full Changelog:** v1.5.1...v1.6.0

---------

Co-authored-by: John Pocock <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Adam Shephard <[email protected]>
Co-authored-by: Mark Eastwood <[email protected]>
Co-authored-by: Mostafa Jahanifar <[email protected]>
Co-authored-by: Simon Graham <[email protected]>
Co-authored-by: Abdol A <[email protected]>
Co-authored-by: Jiaqi-Lv <[email protected]>
Co-authored-by: Dmitrii Blaginin <[email protected]>
Co-authored-by: behnazelhaminia <[email protected]>
Co-authored-by: George Batchkala <[email protected]>
Co-authored-by: vqdang <[email protected]>
Co-authored-by: Jiaqi Lv <[email protected]>
Co-authored-by: Alon Alexander <[email protected]>
  • Loading branch information
15 people authored Dec 12, 2024
1 parent 490be26 commit e14a4fc
Show file tree
Hide file tree
Showing 162 changed files with 27,651 additions and 24,660 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/conda-env-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
cp ./requirements/requirements*.txt /tmp/
mkdir /tmp/docs/
cp ./docs/requirements*.txt /tmp/docs/
- uses: mamba-org/provision-with-micromamba@main
- uses: mamba-org/setup-micromamba@v1
with:
environment-name: tiatoolbox
environment-file: ${{ matrix.requirements }}
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ env:
REGISTRY: ghcr.io
IMAGE_NAME: TissueImageAnalytics/tiatoolbox
image: ghcr.io/tissueimageanalytics/tiatoolbox
TOOLBOX_VER: 1.5.1
TOOLBOX_VER: 1.6.0

jobs:
build-and-push-image:
Expand All @@ -15,8 +15,6 @@ jobs:
fail-fast: true
matrix:
include:
- dockerfile: ./docker/3.8/Debian/Dockerfile
mtag: py3.8-debian
- dockerfile: ./docker/3.9/Debian/Dockerfile
mtag: py3.9-debian
- dockerfile: ./docker/3.9/Ubuntu/Dockerfile
Expand All @@ -25,7 +23,15 @@ jobs:
mtag: py3.10-debian
- dockerfile: ./docker/3.10/Ubuntu/Dockerfile
mtag: py3.10-ubuntu
- dockerfile: ./docker/3.10/Ubuntu/Dockerfile
- dockerfile: ./docker/3.11/Debian/Dockerfile
mtag: py3.11-debian
- dockerfile: ./docker/3.11/Ubuntu/Dockerfile
mtag: py3.11-ubuntu
- dockerfile: ./docker/3.12/Debian/Dockerfile
mtag: py3.12-debian
- dockerfile: ./docker/3.12/Ubuntu/Dockerfile
mtag: py3.12-ubuntu
- dockerfile: ./docker/3.12/Ubuntu/Dockerfile
mtag: latest
permissions:
contents: read
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/mypy-type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:

build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:

Expand All @@ -28,9 +28,12 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup mypy
- name: Install dependencies
run: |
pip install mypy
sudo apt update
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools
python -m pip install --upgrade pip
pip install -r requirements/requirements_dev.txt
- name: Perform type checking
run: |
Expand All @@ -39,4 +42,8 @@ jobs:
tiatoolbox/__main__.py \
tiatoolbox/typing.py \
tiatoolbox/tiatoolbox.py \
tiatoolbox/utils/*.py
tiatoolbox/utils \
tiatoolbox/tools \
tiatoolbox/data \
tiatoolbox/annotation \
tiatoolbox/cli/common.py
4 changes: 2 additions & 2 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [ubuntu-22.04, windows-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-24.04, windows-latest, macos-latest]
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ on:
jobs:
build:

runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: true
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -30,7 +30,7 @@ jobs:
sudo apt update
sudo apt-get install -y libopenslide-dev openslide-tools libopenjp2-7 libopenjp2-tools
python -m pip install --upgrade pip
python -m pip install ruff==0.0.286 pytest pytest-cov pytest-runner
python -m pip install ruff==0.8.2 pytest pytest-cov pytest-runner
pip install -r requirements/requirements.txt
- name: Cache tiatoolbox static assets
uses: actions/cache@v3
Expand Down Expand Up @@ -58,12 +58,14 @@ jobs:
- name: Test with pytest
run: |
pytest --basetemp={envtmpdir} \
--cov=tiatoolbox --cov-report=term --cov-report=xml \
--cov=tiatoolbox --cov-report=term --cov-report=xml --cov-config=pyproject.toml \
--capture=sys \
--durations=10 --durations-min=1.0 \
--maxfail=1
- name: Report test coverage to Codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
files: coverage.xml
fail_ci_if_error: false
Expand All @@ -78,7 +80,7 @@ jobs:
fail-ci-on-error: false

release:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
timeout-minutes: 15
needs: build
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' || github.ref == 'refs/heads/pre-release' || startsWith(github.ref, 'refs/tags/v')
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,13 @@ ENV/

# IDE settings
.vscode/
.idea/

# Mac generated
.DS_Store

# vim/vi generated
*.swp

# output zarr generated
*.zarr
23 changes: 9 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ci:
autofix_prs: true
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
autoupdate_schedule: 'weekly'
autoupdate_commit_msg: ':technologist: pre-commit autoupdate'
autoupdate_schedule: 'monthly'
repos:
- repo: local
hooks:
Expand All @@ -11,7 +11,7 @@ repos:
files: tests/.*\btest_\w*.py
require_serial: true
language: system
stages: [push]
stages: [pre-push]
- id: notebook-markdown-format
name: notebook markdown format
entry: python pre-commit/notebook_markdown_format.py
Expand All @@ -23,15 +23,15 @@ repos:
- mdformat-black
- mdformat-myst
- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
rev: 0.7.19
hooks:
- id: mdformat
# Optionally add plugins
additional_dependencies:
- mdformat-gfm # GitHub flavoured markdown
- mdformat-black # Black formatting for python verbatim blocks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v5.0.0
hooks:
- id: check-ast # Simply checks whether the files parse as valid Python.
- id: fix-byte-order-marker # Removes utf-8 byte order marker.
Expand All @@ -58,18 +58,13 @@ repos:
- id: rst-backticks # Detect common mistake of using single backticks when writing rst.
- id: rst-directive-colons # Detect mistake of rst directive not ending with double colon.
- id: rst-inline-touching-normal # Detect mistake of inline code touching normal text in rst.
- repo: https://github.com/psf/black
rev: 23.11.0 # Replace with any tag/version: https://github.com/psf/black/tags
hooks:
- id: black
language_version: python3 # Should be a command that runs python3.+
additional_dependencies: ['click==8.0.4'] # Currently >8.0.4 breaks black
- id: black-jupyter
language: python
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.1.7
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
types_or: [python, pyi, jupyter]
# Run the formatter.
- id: ruff-format
types_or: [ python, pyi, jupyter ]
6 changes: 1 addition & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.10"
apt_packages:
Expand All @@ -19,10 +19,6 @@ build:
sphinx:
configuration: docs/conf.py

# Optionally build your docs in additional formats such as PDF
formats:
- pdf

# Optionally set the version of Python and requirements required to build your docs
python:
install:
Expand Down
5 changes: 3 additions & 2 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,19 @@
- Mostafa Jahanifar \<@mostafajahanifar>
- David Epstein \<@DavidBAEpstein>
- Adam Shephard \<@adamshephard>
- Ruqayya Awan \<@ruqayya>
- Abdullah Alsalemi \<@Abdol>
- Ruqayya Awan \<@ruqayya>
- Jiaqi Lv \<@Jiaqi-Lv>
- Dmitrii Blaginin \<@blaginin>
- Srijay Deshpande \<@Srijay-lab>
- Jiaqi Lv\<@Jiaqi-Lv>
- George Hadjigeorgiou \<@ghadjigeorghiou>
- Abishekraj Vinayagar Gnanasambandam \<@AbishekRajVG>
- Wenqi Lu \<@wenqi006>
- Saad Bashir \<@rajasaad>

## Contributors

- George Batchkala \<@GeorgeBatch>
- Rob Jewsbury \<@R-J96>
- Mohsin Bilal \<@mbhahsmi>
- Fayyaz Minhas \<@foxtrotmike>
6 changes: 3 additions & 3 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ authors:
orcid: "https://orcid.org/0000-0003-0969-2990"
- family-names: "Bashir"
given-names: "Raja Muhammad Saad"
orcid: "https://orcid.org/0000-0002-8984-696"
orcid: "https://orcid.org/0000-0002-8984-6963"
- family-names: "Bilal"
given-names: "Mohsin"
orcid: "https://orcid.org/0000-0001-8632-2729"
Expand All @@ -44,7 +44,7 @@ authors:
given-names: "Shan E Ahmed"
orcid: "https://orcid.org/0000-0002-1097-1738"
title: "TIAToolbox as an end-to-end library for advanced tissue image analytics"
version: 1.5.1 # TIAToolbox version
version: 1.6.0 # TIAToolbox version
doi: 10.5281/zenodo.5802442
date-released: 2022-10-20
url: "https://github.com/TissueImageAnalytics/tiatoolbox"
Expand Down Expand Up @@ -74,7 +74,7 @@ preferred-citation:
orcid: "https://orcid.org/0000-0003-0969-2990"
- family-names: "Bashir"
given-names: "Raja Muhammad Saad"
orcid: "https://orcid.org/0000-0002-8984-696"
orcid: "https://orcid.org/0000-0002-8984-6963"
- family-names: "Bilal"
given-names: "Mohsin"
orcid: "https://orcid.org/0000-0001-8632-2729"
Expand Down
Loading

0 comments on commit e14a4fc

Please sign in to comment.