Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
934e1d1
:sparkles: Add basic uv support
abdol Apr 30, 2026
f7f43b2
:white_check_mark: Add uv install test
abdol Apr 30, 2026
6821d41
:memo: Update README with uv install steps
abdol Apr 30, 2026
2554195
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol Apr 30, 2026
edd9bfd
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 30, 2026
d77dcbc
:memo: Remove "recommended" from uv install section
abdol Apr 30, 2026
438989e
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
shaneahmed May 8, 2026
ced38d4
Merge branch '1056-add-uv-workflow-to-install-dependencies-and-setup-…
abdol May 13, 2026
6f06173
:fire: Remove uv.lock
abdol May 13, 2026
d1f7024
:fire: Remove requirements text files
abdol May 13, 2026
88ededb
:construction: Update references to requirements
abdol May 13, 2026
4d404ba
:construction: Update conda requirements files
abdol May 13, 2026
44ef863
:construction_worker: Update GitHub workflows
abdol May 13, 2026
b6cf0e8
:construction: Update requirements_consistency script
abdol May 13, 2026
234b925
:white_check_mark: Update uv setup test
abdol May 13, 2026
caa5868
:construction: Update readthedocs config
abdol May 13, 2026
6edf106
:memo: Include uv installation guide in readthedocs
abdol May 13, 2026
3e0831d
:memo: Update CONTRIBUTING.rst
abdol May 13, 2026
fc77482
:memo: Update README
abdol May 13, 2026
336996c
:fire: Remove further references to requirements text files
abdol May 13, 2026
996f37a
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol May 15, 2026
c1da449
:rotating_light: Fix ruff linter error
abdol May 15, 2026
bed5e07
Merge branch '1056-add-uv-workflow-to-install-dependencies-and-setup-…
abdol May 15, 2026
fc24819
:rotating_light: Fix DeepSource errors
abdol May 15, 2026
32d3704
:pushpin: Fix to correct versions of zarr and tifffile
abdol May 19, 2026
40ac8b4
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol May 19, 2026
26c6e63
:hammer: Update generate_conda_env.py to use pyproject.toml
abdol May 19, 2026
152b9f6
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
shaneahmed May 19, 2026
57ede93
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol May 21, 2026
1df8b7a
:bookmark: Update repo version in pyproject.toml
abdol May 21, 2026
a36d4cd
Merge branch '1056-add-uv-workflow-to-install-dependencies-and-setup-…
abdol May 21, 2026
0246f2d
:coffin: Remove outdated python version check
abdol May 21, 2026
18bb045
Merge branch 'develop' of https://github.com/TissueImageAnalytics/tia…
abdol Jun 8, 2026
8877ddc
:pushpin: Add Python 3.14 to pyproject.toml
abdol Jun 8, 2026
2e042ba
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
shaneahmed Jun 9, 2026
0ab091b
:heavy_plus_sign: Add `s3fs` dependency
shaneahmed Jun 9, 2026
e4f5719
:heavy_plus_sign: Add albucore dependency
shaneahmed Jun 12, 2026
d7b2b6e
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol Jun 12, 2026
8ec6b0a
:heavy_plus_sign: Add albucore dependency
shaneahmed Jun 12, 2026
f2d26cd
Merge remote-tracking branch 'origin/1056-add-uv-workflow-to-install-…
shaneahmed Jun 12, 2026
779b1e1
:memo: Improve uv setup instructions
abdol Jun 15, 2026
d4470c2
:fire: Remove static env .yml files
abdol Jun 15, 2026
2963836
:construction_worker: Remove references to static env .yml files from…
abdol Jun 15, 2026
6efea08
:memo: Update README to remove reference to static env .yml file
abdol Jun 15, 2026
5db8cbe
:memo: Update CONTRIBUTING.rst to have conda as the primary installat…
abdol Jun 15, 2026
b10dd68
Merge branch 'develop' into 1056-add-uv-workflow-to-install-dependenc…
abdol Jun 15, 2026
9904e3c
:bug: Fix repo version in pyproject.toml
abdol Jun 15, 2026
e503dda
:white_check_mark: Add mps support test
abdol Jun 16, 2026
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
2 changes: 1 addition & 1 deletion .deepsource.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ exclude_patterns = ["docs/*.py", "**/__init__.py"]
[[analyzers]]
name = "python"
enabled = true
dependency_file_paths = ["requirements/requirements_dev.txt"]
dependency_file_paths = ["pyproject.toml"]

[analyzers.meta]
runtime_version = "3.x.x"
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/conda-env-create.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,11 @@ permissions:

on:
push:
paths:
- "requirements/requirements*.txt"
- "requirements/generate_conda_env.py"
- ".github/workflows/conda-env-create.yml"
paths: [ "requirements/generate_conda_env.py", "conda-env-create.yml", "pyproject.toml"]
pull_request:
paths:
- "requirements/requirements*.txt"
- "requirements/generate_conda_env.py"
- ".github/workflows/conda-env-create.yml"
paths: [ "requirements/generate_conda_env.py", "conda-env-create.yml", "pyproject.toml"]
schedule: # Run on the 1st of every month at midnight
Comment on lines 8 to +13
- cron: "0 0 1 * *"

jobs:
conda_solve:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy-type-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
python -m pip install --upgrade pip
pip install uv
uv pip install --system torch torchvision --index-url https://download.pytorch.org/whl/cpu
uv pip install --system -r requirements/requirements_dev.txt
uv pip install --system -e ".[dev]"

- name: Debug typing environment
run: |
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/pip-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ name: pip Install
on:
push:
paths:
- "requirements*.yml"
- "conda-env-create.yml"
- "requirements/requirement*.txt"
- "setup*py"
- "setup*cfg"
- "pyproject*toml"
- "MANIFEST*in"
- ".github/workflows/pip-install.yml"
pull_request:
paths:
- "requirements*.yml"
- "conda-env-create.yml"
- "requirements/requirement*.txt"
- "setup*py"
- "setup*cfg"
- "pyproject*toml"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
python -m pip install ruff==0.15.15 pytest pytest-cov pytest-runner
pip install uv
uv pip install --system torch torchvision --index-url https://download.pytorch.org/whl/cpu
uv pip install --system -r requirements/requirements.txt
uv pip install --system -e .
- name: Cache tiatoolbox static assets
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -114,7 +114,7 @@ jobs:
python -m pip install --upgrade pip
pip install uv
uv pip install --system torch torchvision --index-url https://download.pytorch.org/whl/cpu
uv pip install --system -r requirements/requirements.txt
uv pip install --system -e .
uv pip install --system build
- name: Build package
run: python -m build
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,6 @@ ENV/

# output zarr generated
*.zarr

# uv lockfile
uv.lock
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ repos:
- id: detect-private-key # Detects the presence of private keys.
- id: end-of-file-fixer # Ensures that a file is either empty, or ends with one newline.
- id: mixed-line-ending # Replaces or checks mixed line endings.
- id: requirements-txt-fixer # Sorts entries in requirements.txt.
- id: trailing-whitespace # Trims trailing whitespace.
- id: file-contents-sorter # Sorts the lines in specified files (defaults to alphabetical).
files: whitelist.txt
Expand Down
14 changes: 9 additions & 5 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@ build:
apt_packages:
- libopenjp2-7-dev
- libopenjp2-tools
jobs:
pre_install:
# Install CPU-only PyTorch before the package so pip doesn't pull in CUDA wheels
- pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py

# Optionally set the version of Python and requirements required to build your docs
# Install tiatoolbox with docs extras (pyproject.toml is the single source of truth)
python:
install:
# Install PyTorch CPU version first
- requirements: requirements/requirements_cpu.txt
- requirements: docs/requirements.txt
- requirements: requirements/requirements.txt
- method: pip
path: .
extra_requirements:
- docs
21 changes: 18 additions & 3 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,26 @@ Ready to contribute? Here's how to set up ``tiatoolbox`` for local development.

$ git clone git@github.com:your_name_here/tiatoolbox.git

3. Install your local copy into a virtual environment. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
3. Set up the development environment. Using ``conda``::

$ mkvirtualenv tiatoolbox
$ cd tiatoolbox/
$ python setup.py develop
$ conda create -n tiatoolbox-dev python=3.11
$ conda activate tiatoolbox-dev
$ pip install -e ".[dev]"

Alternatively, using ``uv``::

$ uv sync --extra dev

This creates a ``.venv`` directory with Python 3.11 and all development
dependencies installed. Activate it with::

$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows

For CPU-only machines (no CUDA GPU)::

$ uv sync --extra dev --index pytorch-cpu=https://download.pytorch.org/whl/cpu

4. Create a branch for local development::

Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ include CONTRIBUTING.rst
include HISTORY.md
include LICENSE
include README.md
include requirements/requirements.txt
include make.bat
include Makefile
include conf.py
Expand Down
40 changes: 32 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,21 @@ The [bash](https://www.gnu.org/software/bash) shell is available on all commonly

### Install Python package

#### Using `pip`

If you wish to use our programs, perhaps without developing them further, run the command `pip install tiatoolbox` or `pip install --ignore-installed --upgrade tiatoolbox` to upgrade from an existing installation.

#### Using `uv`

Alternatively, you can install the latest stable release with [uv](https://docs.astral.sh/uv/):

```sh
$ uv venv
$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows
$ uv pip install tiatoolbox
```

Detailed installation instructions can be found in the [documentation](https://tia-toolbox.readthedocs.io/en/latest/installation.html).

To understand better how the programs work, study the jupyter notebooks referred to under the heading **Examples Taster**.
Expand Down Expand Up @@ -103,25 +117,35 @@ 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/):**

```sh
$ conda create -n tiatoolbox-dev python=3.11 # select version of your choice
$ conda activate tiatoolbox-dev
$ pip install -r requirements/requirements_dev.txt
$ uv sync --extra dev
$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows
```

or
For CPU-only machines (no CUDA GPU):

```sh
$ conda env create -f requirements/requirements.dev.conda.yml # for linux/mac only.
$ conda activate tiatoolbox-dev
$ uv sync --extra dev --index pytorch-cpu=https://download.pytorch.org/whl/cpu
```

6. To use the packages installed in the environment, run the command:
**Using conda:**

```sh
$ conda create -n tiatoolbox-dev python=3.11
$ conda activate tiatoolbox-dev
$ pip install -e ".[dev]"
```

6. To re-enter the environment in a new terminal:

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

### License
Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"_build",
"Thumbs.db",
".DS_Store",
"requirements/requirements*.txt",
]

# The name of the Pygments (syntax highlighting) style to use.
Expand Down
34 changes: 32 additions & 2 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,43 @@ An alternate way to install using conda on Windows could be to install it in `WS
Using uv
--------

To install using `uv <https://docs.astral.sh/uv/>`_, a fast Python package and project manager, written in Rust.
`uv <https://docs.astral.sh/uv/>`_ is a Python package and project manager. First, install uv by following the `official installation guide <https://docs.astral.sh/uv/getting-started/installation/#installing-uv>`_ for your platform (macOS, Linux, and Windows).

**End-user installation**

Create a virtual environment and install the latest stable release from PyPI:

.. code-block:: console

$ pip install uv
$ uv venv
$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows
$ uv pip install tiatoolbox

To upgrade an existing installation to the latest stable release:

.. code-block:: console

$ uv pip install --upgrade tiatoolbox

**Development setup (from source)**

Clone the repository and create a virtual environment with all development dependencies:

.. code-block:: console

$ git clone https://github.com/TissueImageAnalytics/tiatoolbox.git
$ cd tiatoolbox
$ uv sync --extra dev
$ source .venv/bin/activate # Linux/macOS
$ .venv\Scripts\activate # Windows

On CPU-only machines (no CUDA GPU):

.. code-block:: console

$ uv sync --extra dev --index pytorch-cpu=https://download.pytorch.org/whl/cpu

From Sources
------------

Expand Down
6 changes: 0 additions & 6 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
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>=4.2.0
9 changes: 1 addition & 8 deletions pre-commit/missing_imports.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,7 @@
"ipython": ["IPython"],
}

REQUIREMENTS_FILES = (
"requirements/requirements.txt",
"requirements/requirements_dev.txt",
"requirements/requirements.conda.yml",
"requirements/requirements.dev.conda.yml",
"requirements/requirements.win64.conda.yml",
"setup.py",
)
REQUIREMENTS_FILES = ("setup.py",)


def find_source_files(base_dir: Path) -> list[Path]:
Expand Down
4 changes: 0 additions & 4 deletions pre-commit/requirements_consistency.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
from pkg_resources import Requirement

REQUIREMENTS_FILES = [
("requirements/requirements.txt", "requirements/requirements_dev.txt"),
("requirements/requirements.conda.yml", "requirements/requirements.dev.conda.yml"),
("requirements/requirements.win64.conda.yml", None),
("docs/requirements.txt", None),
("setup.py", None),
]

Expand Down
Loading
Loading