Skip to content
Merged
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
24 changes: 14 additions & 10 deletions .dev/Readme.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
## Install dev venv
`uv sync --extra dev --extra notebook`

## Bumping version
Edit the `fundus_image_toolbox/_version.py``

## Running Tests

This repository uses `unittest` for tests and `tox` for venv-sandboxed testing.

## Auto-testing
As of August 2026, dependabot runs monthly and tox tests are applied to PRs.

## Before PRs into main
- On `dev` branch, install venv: `uv sync --extra dev --extra notebook`
- Run `uv lock --upgrade` to use latest compatible package versions.
- Bump FIT version: Edit the `fundus_image_toolbox/_version.py`
- Run tests on multiple OS: This repository uses `unittest` for tests and `tox` for venv-sandboxed testing. See below how to run.
- Update compatibility table in `README.md`.
- Merge into `main`.

## Testing
### Tox
- Run default unittests via tox in isolated Python venvs:
- `uv run tox`
Expand Down Expand Up @@ -37,3 +39,5 @@ This repository uses `unittest` for tests and `tox` for venv-sandboxed testing.
## Syntax check:
`uv run python -m compileall fundus_image_toolbox`

## New optional dependencies?
If we add deps to extra groups, `.github/dependabot.yml` should be updated accordingly to handle them as what they are: optional extras.
45 changes: 45 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
version: 2

updates:
- package-ecosystem: "uv"
directory: "/"
schedule:
interval: "monthly"
open-pull-requests-limit: 5
reviewers:
- "juliusge"
groups:
# Mirrors the repo's Dependabot auto-triage rules (scope:development,
# package:ipykernel/ipython/jupyter/jupyter-black/notebook-shim):
# bundle the same low-priority extras into one PR instead of one each.
dev-and-notebook-tooling:
patterns:
- "pip"
- "tox"
- "tox-uv"
- "mypy"
- "ipykernel"
- "ipython"
- "jupyter"
- "jupyter-black"
- "notebook-shim"
runtime-dependencies:
patterns:
- "*"
exclude-patterns:
- "pip"
- "tox"
- "tox-uv"
- "mypy"
- "ipykernel"
- "ipython"
- "jupyter"
- "jupyter-black"
- "notebook-shim"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
reviewers:
- "juliusge"
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Tests

on:
pull_request:
branches: [main]

jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 45
continue-on-error: ${{ matrix.os == 'windows-latest' }}
env:
MPLBACKEND: Agg
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:
- uses: actions/checkout@v4

- uses: astral-sh/setup-uv@v10.0.0

- name: Set weights cache directory
shell: bash
run: echo "FIT_CACHE_DIR=${{ runner.temp }}/fit-weights-cache" >> "$GITHUB_ENV"

- name: Cache downloaded model weights
uses: actions/cache@v4
with:
path: ${{ env.FIT_CACHE_DIR }}
key: fit-weights-${{ matrix.os }}-${{ hashFiles('uv.lock') }}
restore-keys: |
fit-weights-${{ matrix.os }}-

- name: Sync dev environment
run: uv sync --extra dev --python 3.12

- name: Run tests via tox (py39-py312; tox-uv provisions interpreters via uv)
run: uv run tox
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[tox]
envlist = py39, py310, py311, py312
envlist = py39, py310, py311, py312, py313

[testenv]
deps =
deps =
passenv = FIT_*, MPLBACKEND
commands = python -m unittest discover -s test/
Loading
Loading