Skip to content
Draft
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
29 changes: 23 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,25 +103,42 @@ Prepare a computer as a convenient platform for further development of the Pytho
$ cd tiatoolbox
```

5. Create virtual environment for TIAToolbox using
5. Create a virtual environment and install dependencies.

**Using [uv](https://docs.astral.sh/uv/) (recommended):**

```sh
$ uv sync --extra dev
$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows
```

For CPU-only machines (no CUDA GPU):

```sh
$ conda create -n tiatoolbox-dev python=3.11 # select version of your choice
$ uv sync --extra dev --index pytorch-cpu=https://download.pytorch.org/whl/cpu
```

**Using conda:**

```sh
$ conda create -n tiatoolbox-dev python=3.11
$ conda activate tiatoolbox-dev
$ pip install -r requirements/requirements_dev.txt
```

or
or (Linux/macOS only):

```sh
$ conda env create -f requirements/requirements.dev.conda.yml # for linux/mac only.
$ conda env create -f requirements/requirements.dev.conda.yml
$ conda activate tiatoolbox-dev
```

6. To use the packages installed in the environment, run the command:
6. To re-enter the environment in a new terminal:

```sh
$ conda activate tiatoolbox-dev
$ source .venv/bin/activate # uv (Linux/macOS)
$ conda activate tiatoolbox-dev # conda
```

### License
Expand Down
121 changes: 121 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,119 @@
[project]
name = "tiatoolbox"
version = "2.0.1"
description = "Computational pathology toolbox developed by TIA Centre."
readme = "README.md"
license = { text = "BSD-3-Clause" }
authors = [{ name = "TIA Centre", email = "TIA@warwick.ac.uk" }]
requires-python = ">=3.11, <3.14"
classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
]
dependencies = [
# mirror of requirements/requirements.txt — keep in sync
"aiohttp>=3.8.1",
"albumentations>=1.3.0",
"bokeh>=3.8.2",
"click>=8.2.0",
"dask>=2026.1.2",
"defusedxml>=0.7.1",
"filelock>=3.9.0",
"flask>=2.2.2",
"flask-cors>=4.0.0",
"glymur>=0.12.7",
"huggingface_hub>=0.33.3",
"imagecodecs>=2022.9.26",
"ipywidgets>=8.1.7",
"joblib>=1.1.1",
"jupyterlab>=3.5.2",
"matplotlib>=3.6.2",
"numba>=0.57.0",
"numpy>=2.0.0",
"opencv-python>=4.6.0",
"openslide-bin>=4.0.0.2",
"openslide-python>=1.4.0",
"pandas>=2.0.0",
"pillow>=9.3.0",
"pydicom>=2.3.1",
"pyyaml>=6.0",
"requests>=2.28.1",
"scikit-image>=0.26.0",
"scikit-learn>=1.2.0",
"scipy>=1.8",
"shapely>=2.0.0",
"simpleitk>=2.2.1",
"sphinx>=5.3.0,<9.0.0",
"tifffile>=2022.10.10,<=2025.5.10",
"timm>=1.0.3",
"torch>=2.5.0",
"torchvision>=0.15.0",
"tqdm>=4.64.1",
"transformers>=4.51.1",
"umap-learn>=0.5.3",
"wsidicom>=0.18.0",
"zarr>=2.13.3,<3.0.0",
]

[project.optional-dependencies]
docs = [
"furo>=2022.12.7",
"myst-nb>=0.17.1",
"myst-parser>=0.18.1",
"sphinx-copybutton>=0.5.1",
"sphinx-design>=0.3.0",
"sphinx-toolbox>=3.2.0",
]
dev = [
"tiatoolbox[docs]",
"coverage>=7.0.0",
"docutils>=0.18.1",
"mypy>=1.16",
"pip>=22.3",
"poetry-bumpversion>=0.3.1",
"pre-commit>=2.20.0",
"pytest>=7.2.0",
"pytest-cov>=4.0.0",
"pytest-runner>=6.0",
"pytest-xdist[psutil]",
"ruff==0.15.9",
"toml>=0.10.2",
"twine>=4.0.1",
"wheel>=0.37.1",
]

[project.scripts]
tiatoolbox = "tiatoolbox.cli:main"

[project.urls]
Homepage = "https://github.com/TissueImageAnalytics/tiatoolbox"

[tool.uv]

[[tool.uv.index]]
name = "pytorch-cu126"
url = "https://download.pytorch.org/whl/cu126"
explicit = true

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[tool.uv.sources]
# Linux/Windows get CUDA 12.6 wheels; macOS falls through to PyPI (MPS included)
torch = [
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]
torchvision = [
{ index = "pytorch-cu126", marker = "sys_platform == 'linux' or sys_platform == 'win32'" },
]

[tool.pytest.ini_options]
collect_ignore = ["setup.py", "benchmark/"]

Expand Down Expand Up @@ -49,6 +165,11 @@ files = [".github/workflows/docker-publish.yml"]
search = 'TOOLBOX_VER: {current_version}'
replace = 'TOOLBOX_VER: {new_version}'

[[tool.poetry_bumpversion.replacements]]
files = ["pyproject.toml"]
search = 'version = "{current_version}"'
replace = 'version = "{new_version}"'

[tool.ruff]
lint.select = [
"A", # flake8-builtins
Expand Down
Loading
Loading