Skip to content

Commit baffb31

Browse files
authored
Merge pull request #721 from bioimage-io/dev
update subprocess calls and avoid shell=True
2 parents 5164afa + 1a60ca1 commit baffb31

21 files changed

+914
-295
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,27 @@ on:
44
push:
55
branches: [main]
66
pull_request:
7-
branches: ["**"]
7+
branches: ['**']
88

99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
python-version: ["3.9", "3.10", "3.11","3.12", "3.13"]
16-
pydantic-version: ["2.10.6", "2.11.9"]
15+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
16+
pydantic-version: ['2.10.6', '2.11.9']
1717
include:
18-
- python-version: "3.10"
19-
pydantic-version: "2.11.9"
18+
- python-version: '3.10'
19+
pydantic-version: '2.11.9'
2020
is-dev-version: true
2121
run-expensive-tests: true
2222
steps:
2323
- uses: actions/checkout@v4
2424
- uses: actions/setup-python@v6
2525
with:
2626
python-version: ${{ matrix.python-version }}
27-
cache: "pip"
27+
cache: 'pip'
2828
- name: Install dependencies
2929
run: |
3030
pip install --upgrade pip
@@ -38,7 +38,7 @@ jobs:
3838
- uses: actions/cache/restore@v4
3939
with:
4040
path: bioimageio_cache
41-
key: "py${{ matrix.python-version }}-${{ steps.get-date.outputs.date }}"
41+
key: 'py${{ matrix.python-version }}-${{ steps.get-date.outputs.date }}'
4242
- name: Check autogenerated imports
4343
run: python scripts/generate_version_submodule_imports.py check
4444
- run: ruff check
@@ -50,11 +50,11 @@ jobs:
5050
run: |
5151
pyright --version
5252
pyright -p pyproject.toml --pythonversion ${{ matrix.python-version }}
53-
- run: pytest --cov bioimageio --cov-append --capture no
53+
- run: pytest -v --cov bioimageio --cov-append --capture no
5454
env:
5555
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
5656
RUN_EXPENSIVE_TESTS: ${{ matrix.run-expensive-tests && 'true' || 'false' }}
57-
- run: pytest --cov bioimageio --cov-append --capture no scripts # also test docstrings in scripts for dev-version
57+
- run: pytest -v --cov bioimageio --cov-append --capture no scripts # also test docstrings in scripts for dev-version
5858
if: ${{matrix.is-dev-version}}
5959
env:
6060
BIOIMAGEIO_CACHE_PATH: bioimageio_cache
@@ -63,7 +63,7 @@ jobs:
6363
# explicit restore/save instead of cache action to cache even if coverage fails
6464
with:
6565
path: bioimageio_cache
66-
key: "py${{ matrix.python-version }}-${{ steps.get-date.outputs.date }}"
66+
key: 'py${{ matrix.python-version }}-${{ steps.get-date.outputs.date }}'
6767

6868
- run: cp .coverage .coverage.${{ matrix.python-version }}-${{ matrix.pydantic-version }}
6969
- uses: actions/upload-artifact@v4
@@ -84,8 +84,9 @@ jobs:
8484
- uses: actions/download-artifact@v4
8585
with:
8686
pattern: .coverage.*
87+
merge-multiple: true
8788
- run: |
88-
ls -l
89+
ls -la .coverage*
8990
coverage combine
9091
coverage xml -o coverage.xml
9192
- uses: orgoro/[email protected]
@@ -106,9 +107,8 @@ jobs:
106107
retention-days: 1
107108
path: dist
108109

109-
110110
deploy:
111-
needs: [test,coverage]
111+
needs: [test, coverage]
112112
runs-on: ubuntu-latest
113113
steps:
114114
- uses: actions/checkout@v4
@@ -118,8 +118,8 @@ jobs:
118118
path: dist
119119
- uses: actions/setup-python@v6
120120
with:
121-
python-version: "3.12"
122-
cache: "pip"
121+
python-version: '3.12'
122+
cache: 'pip'
123123
- name: Install dependencies
124124
run: |
125125
pip install --upgrade pip
@@ -128,13 +128,13 @@ jobs:
128128
run: python scripts/generate_spec_documentation.py --dist dist/user_docs
129129
- name: Generate interactive documentation
130130
env:
131-
PYTHONPATH: "./scripts"
131+
PYTHONPATH: './scripts'
132132
run: python -m interactive_docs
133133
- name: Generate JSON schema documentation
134134
run: python scripts/generate_json_schema_documentation.py
135135
- name: Generate developer docs
136136
run: ./scripts/pdoc/run.sh
137-
- name: copy legacy file until BioImage.IO-packager is updated # TODO: remove if packager does not depend on it anymore
137+
- name: copy legacy file until BioImage.IO-packager is updated # TODO: remove if packager does not depend on it anymore
138138
run: cp weight_formats_spec.json ./dist/weight_formats_spec.json
139139
- name: Get branch name to deploy to
140140
id: get_branch
@@ -159,7 +159,7 @@ jobs:
159159
with:
160160
auto-update-conda: true
161161
auto-activate-base: true
162-
activate-environment: ""
162+
activate-environment: ''
163163
channel-priority: strict
164164
miniforge-version: latest
165165
conda-solver: libmamba
@@ -177,15 +177,15 @@ jobs:
177177
mkdir -p ./pkgs/noarch
178178
conda-build -c conda-forge conda-recipe --output-folder ./pkgs
179179
180-
# rattler-build:
181-
# name: Build package
182-
# runs-on: ubuntu-latest
183-
# steps:
184-
# - uses: actions/checkout@v4
185-
# - name: Build conda package
186-
# uses: prefix-dev/[email protected]
187-
# with:
188-
# recipe-path: conda-recipe/recipe.yaml
180+
# rattler-build:
181+
# name: Build package
182+
# runs-on: ubuntu-latest
183+
# steps:
184+
# - uses: actions/checkout@v4
185+
# - name: Build conda package
186+
# uses: prefix-dev/[email protected]
187+
# with:
188+
# recipe-path: conda-recipe/recipe.yaml
189189

190190
pip-build:
191191
name: Build and publish to PyPI
@@ -237,14 +237,14 @@ jobs:
237237
uses: pypa/gh-action-pypi-publish@release/v1.12
238238
with:
239239
user: __token__
240-
password: "${{ secrets.PYPI_TOKEN }}"
240+
password: '${{ secrets.PYPI_TOKEN }}'
241241
packages-dir: dist/
242242

243243
- name: Publish the release notes
244244
if: github.ref == 'refs/heads/main'
245245
uses: release-drafter/[email protected]
246246
with:
247247
publish: "${{ steps.tag-version.outputs.new_tag != '' }}"
248-
tag: "${{ steps.tag-version.outputs.new_tag }}"
248+
tag: '${{ steps.tag-version.outputs.new_tag }}'
249249
env:
250-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
250+
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@ user_docs/
1616
scripts/pdoc/original.py
1717
scripts/pdoc/patched.py
1818
bioimageio_cache/
19+
example/my_bioimageio_dataset.zip
20+
example/my_model.zip

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@ In this file we log both:
1010

1111
This changelog includes implementation details and my reference the [changes to the Resource Description Format](#changes-to-the-resource-description-format), e.g. in entry [bioimageio.spec 0.5.2](#bioimageiospec-052).
1212

13+
#### bioimageio.spec 0.5.5.5
14+
15+
- use OS specific conda command to fix conda subprocess issues
16+
- keep track of original source name for prettier validation summary display
17+
1318
#### bioimageio.spec 0.5.5.4
1419

1520
- include bioimageio_schema.json in python package

example/dataset_creation.ipynb

Lines changed: 182 additions & 23 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)