Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
952b890
bump spec
FynnBe Jul 18, 2025
d9874fd
bump spec in dev envs
FynnBe Jul 21, 2025
aea80b4
WIP adapt for spec changes and rename get_test_inputs/outputs
FynnBe Jul 25, 2025
19c3c92
input -> x
FynnBe Aug 8, 2025
94f32a5
fix xarray index with boolen array error using numpy instead
FynnBe Aug 8, 2025
3077120
add softmax proc
FynnBe Aug 8, 2025
fa7760e
bump spec
FynnBe Aug 8, 2025
d92f72f
bump black/ruff python target version
FynnBe Aug 11, 2025
30c236c
remove unused import
FynnBe Aug 11, 2025
8f4e0fc
ignore missing test inputs when creating an example with the CLI
FynnBe Aug 11, 2025
d94cd81
fix pyright's python version to lowest supported
FynnBe Aug 11, 2025
0fa580c
improve compatibility to python 3.8-3.10
FynnBe Aug 11, 2025
2f0509f
bump precommit hooks
FynnBe Aug 12, 2025
8205435
ignore argmax pyright issue
FynnBe Aug 12, 2025
8f20191
Use List annotation in pydantic settings
FynnBe Aug 12, 2025
5745dc1
fix deprecated alias
FynnBe Aug 12, 2025
c5284bd
remove py313 from black target
FynnBe Aug 12, 2025
f8f3ab8
update dev envs
FynnBe Aug 14, 2025
700e6da
select ruff lint rules NPY201
FynnBe Aug 14, 2025
d75806c
make py3.9 primary dev env
FynnBe Aug 22, 2025
4cccdbc
setup.py -> pyproject.toml
FynnBe Aug 22, 2025
dc15d3e
add crick to dev envs
FynnBe Aug 22, 2025
764503e
remove py38 dev env
FynnBe Aug 22, 2025
f5b0420
update build workflow
FynnBe Aug 22, 2025
eb982ad
ignore missing type stubs
FynnBe Aug 22, 2025
b1c44b0
bump pyright
FynnBe Aug 22, 2025
bc12c35
update build matrix
FynnBe Aug 26, 2025
e3c5249
update env creation
FynnBe Aug 26, 2025
485e106
account for tf req py<=3.12
FynnBe Aug 27, 2025
baeb8e8
skip 313 tests for now
FynnBe Aug 27, 2025
8e34b9d
fix cache key?
FynnBe Aug 27, 2025
be8a69e
use py 3.10 as full dev
FynnBe Aug 27, 2025
b6f7664
make softmax compatible with xarray <= 2024.07
FynnBe Aug 29, 2025
3ac62bf
use scipy to avoid custom dask/numpy handling for softmax
FynnBe Aug 29, 2025
7329d22
fix weight-format CLI arg
FynnBe Sep 2, 2025
70cd65f
improve conda env install and caching
FynnBe Sep 2, 2025
f233f13
remove python pin from dev envs
FynnBe Sep 2, 2025
81b6a3b
update typing
FynnBe Sep 2, 2025
db1865c
use pip for dev envs
FynnBe Sep 2, 2025
5195325
fix numpy pin
FynnBe Sep 2, 2025
a4b8f65
only pin major numpy version
FynnBe Sep 2, 2025
98c0562
add pip to build deps
FynnBe Sep 8, 2025
adb950c
add tensorflow to dev deps
FynnBe Sep 8, 2025
09f3c8b
only test hand picked examples here
FynnBe Sep 8, 2025
df13763
bump cache key
FynnBe Sep 8, 2025
1350721
remove black job in prep for ruff
FynnBe Sep 8, 2025
f798aa1
add allow_tracing flag
FynnBe Sep 9, 2025
592c3ed
update sha of test model
FynnBe Sep 9, 2025
a43094a
delay tmp dir cleanup
FynnBe Sep 9, 2025
26a42ae
disable logging on import
FynnBe Sep 10, 2025
c2cb370
enable custom logging for CLI
FynnBe Sep 10, 2025
3a48363
add load_description_and_test overloads for expected_type=model
FynnBe Sep 10, 2025
05bef77
add load_description_and_test overloads for expected_type=dataset
FynnBe Sep 10, 2025
92cdaf6
always return model descr in `add_weights`
FynnBe Sep 10, 2025
a335a70
create converted weighs descr with absolute path to avoid a wrong rel…
FynnBe Sep 10, 2025
0abd936
include weight format in logging message
FynnBe Sep 11, 2025
a3a700e
bump actions/setup-python
FynnBe Sep 11, 2025
0d6e120
update description
FynnBe Sep 16, 2025
f67dd4a
base conda recipe on pyproject.toml
FynnBe Sep 16, 2025
3e4048c
test pip build in PRs as well
FynnBe Sep 16, 2025
fa2f4ae
bump spec version
FynnBe Sep 17, 2025
926b66f
add project readme reference
FynnBe Sep 17, 2025
df2d522
bump spec
FynnBe Sep 17, 2025
229549e
test created conda package
FynnBe Sep 17, 2025
b8e8d13
WIP adopt src-layout
FynnBe Sep 17, 2025
0495f5c
update pyproject.toml for src-layout
FynnBe Sep 17, 2025
229f17d
update conda recipe for src-layout
FynnBe Sep 17, 2025
704830c
remove pooch from show_diff.py
FynnBe Sep 18, 2025
434af41
skip affable-shark testing for now
FynnBe Sep 18, 2025
6d628b6
bump spec
FynnBe Sep 18, 2025
45cb94e
turn pin mismatch into warning
FynnBe Sep 18, 2025
7724d59
update conda recipe
FynnBe Sep 18, 2025
837fce2
bump patch version
FynnBe Sep 18, 2025
c215a98
fix path in version-command
FynnBe Sep 18, 2025
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
152 changes: 44 additions & 108 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@ defaults:
shell: bash -el {0}

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
with:
options: "--check"
src: "."
jupyter: true
version: "24.3"

populate-cache:
runs-on: ubuntu-latest
outputs:
cache-key: ${{steps.cache-key.outputs.cache-key}}
cache-key-light: ${{steps.cache-key.outputs.cache-key}}-light
cache-key: ${{steps.cache-key.outputs.cache-key}}-0
steps:
- name: Get Date
id: get-date
Expand All @@ -48,7 +36,7 @@ jobs:
with:
path: bioimageio_cache
key: ${{steps.cache-key.outputs.cache-key}}
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
if: steps.look-up.outputs.cache-hit != 'true'
with:
python-version: '3.12'
Expand All @@ -72,112 +60,62 @@ jobs:
- python-version: '3.9'
conda-env: dev
spec: conda
- python-version: '3.10'
numpy-version: 1
- python-version: '3.9'
conda-env: dev
spec: conda
- python-version: '3.11'
conda-env: full
spec: main
numpy-version: 2
- python-version: '3.10'
conda-env: full
run-expensive-tests: true
report-coverage: true
save-cache: true
- python-version: '3.12'
conda-env: dev
spec: conda
- python-version: '3.13'
numpy-version: 1
- python-version: '3.11'
conda-env: dev
spec: main
save-cache: true
numpy-version: 2
- python-version: '3.12'
conda-env: dev
spec: conda
numpy-version: 1
# - python-version: '3.13'
# conda-env: '313'
# spec: main
# numpy-version: 2

steps:
- uses: actions/checkout@v4
- id: setup
run: |
echo "env-name=${{ matrix.spec }}-${{ matrix.conda-env }}-${{ matrix.python-version }}"
echo "env-name=${{ matrix.spec }}-${{ matrix.conda-env }}-${{ matrix.python-version }}" >> $GITHUB_OUTPUT
echo "env-file=dev/env-${{ matrix.conda-env }}.yaml"
echo "env-file=dev/env-${{ matrix.conda-env }}.yaml" >> $GITHUB_OUTPUT
- name: check on env-file
shell: python
run: |
from pathlib import Path
from pprint import pprint
if not (env_path:=Path("${{steps.setup.outputs.env-file}}")).exists():
if env_path.parent.exists():
pprint(env_path.parent.glob("*"))
else:
pprint(Path().glob("*"))
raise FileNotFoundError(f"{env_path} does not exist")

- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
auto-activate-base: true
activate-environment: ${{steps.setup.outputs.env-name}}
channel-priority: strict
miniforge-version: latest
- name: Get Date
id: get-date
run: |
echo "today=$(date -u '+%Y%m%d')"
echo "today=$(date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
- name: Restore cached env
uses: actions/cache/restore@v4
- uses: actions/setup-python@v6
with:
path: ${{env.CONDA}}/envs/${{steps.setup.outputs.env-name}}
key: >-
conda-${{runner.os}}-${{runner.arch}}
-${{steps.get-date.outputs.today}}
-${{hashFiles(steps.setup.outputs.env-file)}}
-${{env.CACHE_NUMBER}}
env:
CACHE_NUMBER: 0
id: cache-env
- name: Install env
run: conda env update --name=${{steps.setup.outputs.env-name}} --file=${{steps.setup.outputs.env-file}} python=${{matrix.python-version}}
if: steps.cache-env.outputs.cache-hit != 'true'
- name: Install uncached pip dependencies
python-version: ${{matrix.python-version}}
cache: 'pip'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install --no-deps -e .
- name: Install uncached pip dependencies for 'full' environment
if: matrix.conda-env == 'full'
run: |
pip install git+https://github.com/ChaoningZhang/MobileSAM.git
- name: Cache env
if: steps.cache-env.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: ${{env.CONDA}}/envs/${{steps.setup.outputs.env-name}}
key: >-
conda-${{runner.os}}-${{runner.arch}}
-${{steps.get-date.outputs.today}}
-${{hashFiles(steps.setup.outputs.env-file)}}
-${{env.CACHE_NUMBER}}
env:
CACHE_NUMBER: 0
- run: conda list
pip install -e .[dev] numpy==${{matrix.numpy-version}}.*
- name: Pyright
if: matrix.run-expensive-tests
run: |
pyright --version
pyright -p pyproject.toml --pythonversion ${{ matrix.python-version }}
- name: Restore bioimageio cache ${{matrix.run-expensive-tests && needs.populate-cache.outputs.cache-key || needs.populate-cache.outputs.cache-key-light}}
- name: Restore bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
uses: actions/cache/restore@v4
with:
path: bioimageio_cache
key: ${{matrix.run-expensive-tests && needs.populate-cache.outputs.cache-key || needs.populate-cache.outputs.cache-key-light}}
key: ${{needs.populate-cache.outputs.cache-key}}
- name: pytest
run: pytest --cov bioimageio --cov-report xml --cov-append --capture no --disable-pytest-warnings
env:
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
RUN_EXPENSIVE_TESTS: ${{ matrix.run-expensive-tests && 'true' || 'false' }}
- name: Save bioimageio cache ${{matrix.run-expensive-tests && needs.populate-cache.outputs.cache-key || needs.populate-cache.outputs.cache-key-light}}
- name: Save bioimageio cache ${{needs.populate-cache.outputs.cache-key}}
if: matrix.save-cache
uses: actions/cache/save@v4
with:
path: bioimageio_cache
key: ${{matrix.run-expensive-tests && needs.populate-cache.outputs.cache-key || needs.populate-cache.outputs.cache-key-light}}
key: ${{needs.populate-cache.outputs.cache-key}}

- if: matrix.report-coverage && github.event_name == 'pull_request'
uses: orgoro/[email protected]
Expand Down Expand Up @@ -223,7 +161,7 @@ jobs:
shell: bash -l {0}
run: |
mkdir -p ./pkgs/noarch
conda-build -c conda-forge conda-recipe --no-test --output-folder ./pkgs
conda-build -c conda-forge conda-recipe --output-folder ./pkgs

docs:
needs: test
Expand All @@ -235,7 +173,7 @@ jobs:
with:
name: coverage
path: dist
- uses: actions/setup-python@v5
- uses: actions/setup-python@v6
with:
python-version: '3.12'
cache: 'pip'
Expand All @@ -253,10 +191,9 @@ jobs:
branch: gh-pages
folder: dist

publish-pypi:
name: Publish to PyPI
pip-build:
name: Build with pip and publish to PyPI
needs: test
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Check out the repository
Expand All @@ -265,16 +202,18 @@ jobs:
fetch-depth: 2

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Upgrade pip
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip --version
pip install wheel .[tests]
- name: run tests
run: pytest --disable-pytest-warnings
pip install --upgrade build
pip install .
- name: Build package
run: |
python -m build

- name: Check if there is a parent commit
id: check-parent-commit
Expand All @@ -283,34 +222,31 @@ jobs:

- name: Detect new version
id: check-version
if: steps.check-parent-commit.outputs.sha
if: github.ref == 'refs/heads/main' && steps.check-parent-commit.outputs.sha
uses: salsify/[email protected]
with:
create-tag: false
version-command: |
bash -o pipefail -c "cat bioimageio/core/VERSION | jq -r '.version'"
python -c "from pathlib import Path;p = p_src if (p_src:=Path('src/bioimageio/core/__init__.py')).exists() else Path('bioimageio/core/__init__.py');print(p.read_text().split('__version__ = \"')[1].split('\"')[0])"

- name: Push tag
id: tag-version
if: steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
if: github.ref == 'refs/heads/main' && steps.check-version.outputs.previous-version != steps.check-version.outputs.current-version
uses: mathieudutour/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
custom_tag: ${{ steps.check-version.outputs.current-version }}

- name: Build package
run: |
python setup.py sdist bdist_wheel

- name: Publish package on PyPI
if: steps.tag-version.outputs.new_tag
if: github.ref == 'refs/heads/main' && steps.tag-version.outputs.new_tag
uses: pypa/gh-action-pypi-publish@release/v1.12
with:
user: __token__
password: "${{ secrets.PYPI_TOKEN }}"
packages-dir: dist/
verbose: true
- name: Publish the release notes
if: github.ref == 'refs/heads/main'
uses: release-drafter/[email protected]
with:
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
repos:
- repo: https://github.com/ambv/black
rev: 24.2.0
rev: 25.1.0
hooks:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.2
rev: v0.12.8
hooks:
- id: ruff
- id: ruff-check
args: [--fix, --show-fixes]
- repo: local
hooks:
Expand Down
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include bioimageio/core/VERSION
include README.md
include LICENSE
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ may be controlled with the `LOGURU_LEVEL` environment variable.

## Changelog

### next release
### 0.9.1

- fixes:
- CLI
Expand Down
3 changes: 0 additions & 3 deletions bioimageio/core/VERSION

This file was deleted.

10 changes: 0 additions & 10 deletions bioimageio/core/__main__.py

This file was deleted.

19 changes: 0 additions & 19 deletions bioimageio/core/utils/__init__.py

This file was deleted.

Loading
Loading