Skip to content

Commit 099d784

Browse files
authored
Merge pull request #346 from bioimage-io/spec_v0_5
Update to bioimageio.spec=0.5
2 parents 7f26c9b + b84d33b commit 099d784

File tree

129 files changed

+8499
-7007
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+8499
-7007
lines changed

.github/workflows/build.yaml

Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
name: Test and Deploy bioimageio.core
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ "**" ]
8+
9+
defaults:
10+
run:
11+
shell: micromamba-shell {0}
12+
13+
jobs:
14+
black:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- uses: psf/black@stable
19+
with:
20+
options: "--check --verbose"
21+
src: "."
22+
jupyter: true
23+
version: "24.3"
24+
25+
test-spec-conda:
26+
runs-on: ubuntu-latest
27+
strategy:
28+
matrix:
29+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Install Conda environment with Micromamba
33+
if: matrix.python-version != '3.8'
34+
uses: mamba-org/setup-micromamba@v1
35+
with:
36+
cache-downloads: true
37+
cache-environment: true
38+
environment-file: dev/env-wo-python.yaml
39+
create-args: >-
40+
python=${{ matrix.python-version }}
41+
post-cleanup: 'all'
42+
- name: Install py3.8 environment
43+
if: matrix.python-version == '3.8'
44+
uses: mamba-org/setup-micromamba@v1
45+
with:
46+
cache-downloads: true
47+
cache-environment: true
48+
environment-file: dev/env-py38.yaml
49+
post-cleanup: 'all'
50+
- name: additional setup
51+
run: pip install --no-deps -e .
52+
- name: pytest-spec-conda
53+
run: pytest --disable-pytest-warnings
54+
55+
test-spec-main:
56+
runs-on: ubuntu-latest
57+
strategy:
58+
matrix:
59+
python-version: ['3.8', '3.12']
60+
steps:
61+
- uses: actions/checkout@v4
62+
- name: Install Conda environment with Micromamba
63+
if: matrix.python-version != '3.8'
64+
uses: mamba-org/setup-micromamba@v1
65+
with:
66+
cache-downloads: true
67+
cache-environment: true
68+
environment-file: dev/env-wo-python.yaml
69+
create-args: >-
70+
python=${{ matrix.python-version }}
71+
post-cleanup: 'all'
72+
- name: Install py3.8 environment
73+
if: matrix.python-version == '3.8'
74+
uses: mamba-org/setup-micromamba@v1
75+
with:
76+
cache-downloads: true
77+
cache-environment: true
78+
environment-file: dev/env-py38.yaml
79+
post-cleanup: 'all'
80+
- name: additional setup
81+
run: |
82+
conda remove --yes --force bioimageio.spec || true # allow failure for cached env
83+
pip install --no-deps git+https://github.com/bioimage-io/spec-bioimage-io
84+
pip install --no-deps -e .
85+
- name: pytest-spec-main
86+
run: pytest --disable-pytest-warnings
87+
88+
test-tf:
89+
runs-on: ubuntu-latest
90+
strategy:
91+
matrix:
92+
python-version: ['3.9', '3.11']
93+
steps:
94+
- uses: actions/checkout@v4
95+
- name: Install Conda environment with Micromamba
96+
uses: mamba-org/setup-micromamba@v1
97+
with:
98+
cache-downloads: true
99+
cache-environment: true
100+
environment-file: dev/env-tf.yaml
101+
condarc: |
102+
channel-priority: flexible
103+
create-args: >-
104+
python=${{ matrix.python-version }}
105+
post-cleanup: 'all'
106+
- name: additional setup
107+
run: pip install --no-deps -e .
108+
- name: pytest-spec-tf
109+
run: pytest --disable-pytest-warnings
110+
111+
conda-build:
112+
runs-on: ubuntu-latest
113+
needs: test-spec-conda
114+
steps:
115+
- name: checkout
116+
uses: actions/checkout@v4
117+
with:
118+
fetch-depth: 0
119+
- name: Install Conda environment with Micromamba
120+
uses: mamba-org/setup-micromamba@v1
121+
with:
122+
cache-downloads: true
123+
cache-environment: true
124+
environment-name: build-env
125+
condarc: |
126+
channels:
127+
- conda-forge
128+
create-args: |
129+
boa
130+
- name: linux conda build
131+
run: |
132+
conda mambabuild -c conda-forge conda-recipe
133+
134+
docs:
135+
if: github.ref == 'refs/heads/main'
136+
runs-on: ubuntu-latest
137+
steps:
138+
- uses: actions/checkout@v4
139+
- uses: actions/setup-python@v5
140+
with:
141+
python-version: '3.12'
142+
cache: 'pip'
143+
- run: pip install -e .[dev]
144+
- id: get_version
145+
run: python -c 'import bioimageio.core;print(f"version={bioimageio.core.__version__}")' >> $GITHUB_OUTPUT
146+
- name: Generate developer docs
147+
run: |
148+
pdoc \
149+
--logo https://bioimage.io/static/img/bioimage-io-logo.svg \
150+
--logo-link https://bioimage.io/ \
151+
--favicon https://bioimage.io/static/img/bioimage-io-icon-small.svg \
152+
--footer-text 'bioimageio.core ${{steps.get_version.outputs.version}}' \
153+
-o ./dist bioimageio.core
154+
- run: cp README.md ./dist/README.md
155+
- name: Deploy to gh-pages 🚀
156+
uses: JamesIves/github-pages-deploy-action@v4
157+
with:
158+
branch: gh-pages
159+
folder: dist

.github/workflows/build.yml

Lines changed: 0 additions & 140 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
- name: Check if there is a parent commit
3636
id: check-parent-commit
3737
run: |
38-
echo "::set-output name=sha::$(git rev-parse --verify --quiet HEAD^)"
38+
echo "sha=$(git rev-parse --verify --quiet HEAD^)" >> $GITHUB_OUTPUT
3939
4040
- name: Detect new version
4141
id: check-version

.gitignore

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
build/
2-
dist/
31
.idea/
4-
*.egg-info/
5-
cache
6-
**/tmp
72
.tox/
3+
*.egg-info/
84
*.pyc
5+
**/tmp
6+
build/
7+
cache
8+
dist/
9+
docs/
10+
typings/pooch/

.markdownlint.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"default": true,
3+
"MD013": {
4+
"line_length": 120
5+
},
6+
"MD033": false,
7+
"MD041": false
8+
}

.pre-commit-config.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
repos:
22
- repo: https://github.com/ambv/black
3-
rev: 23.1.0
3+
rev: 24.2.0
44
hooks:
5-
- id: black
5+
- id: black-jupyter
6+
- repo: https://github.com/astral-sh/ruff-pre-commit
7+
rev: v0.3.2
8+
hooks:
9+
- id: ruff
10+
args: [--fix]
11+
- repo: local
12+
hooks:
13+
- id: pyright
14+
name: pyright
15+
entry: pyright
16+
language: system
17+
always_run: true
18+
pass_filenames: true
19+
files: ^.*\.py$

.vscode/settings.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"window.title": "bioimageio.core",
3+
"python.analysis.extraPaths": [
4+
"../spec-bioimage-io",
5+
],
6+
"python.testing.unittestArgs": [
7+
"-v",
8+
"-s",
9+
"./tests",
10+
"-p",
11+
"test_*.py"
12+
],
13+
"python.testing.pytestEnabled": true,
14+
"python.testing.unittestEnabled": false,
15+
}

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
include bioimageio/core/VERSION
2+
include README.md
3+
include LICENSE

0 commit comments

Comments
 (0)