Skip to content

Commit 6f6d14e

Browse files
committed
use default or mamba env python
1 parent 0e2a225 commit 6f6d14e

File tree

2 files changed

+48
-16
lines changed

2 files changed

+48
-16
lines changed

.github/workflows/auto_update_main.yaml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ jobs:
5858
with:
5959
cache-downloads: true
6060
cache-env: true
61+
channels: conda-forge
6162
extra-specs: | # script dependencies
6263
bioimageio.spec
6364
lxml
@@ -124,8 +125,19 @@ jobs:
124125
ref: gh-pages
125126
path: gh-pages
126127
- name: install script deps
127-
run: pip install typer bioimageio.spec boltons lxml requests
128+
uses: mamba-org/provision-with-micromamba@main
129+
with:
130+
cache-downloads: true
131+
cache-env: true
132+
channels: conda-forge
133+
extra-specs: | # script dependencies
134+
bioimageio.spec
135+
boltons
136+
lxml
137+
requests
138+
typer
128139
- name: generate collection rdf
140+
shell: bash -l {0}
129141
run: python scripts/generate_collection_rdf.py
130142
- name: Upload preview of collection.json
131143
if: github.event_name == 'pull_request'
@@ -179,8 +191,6 @@ jobs:
179191
mkdir -p "collection/${{ matrix.update.resource_id }}"
180192
cp -r "collection-update/${{ matrix.update.resource_id }}"/* "collection/${{ matrix.update.resource_id }}"
181193
rm -rf collection-update
182-
- name: install script deps
183-
run: pip install requests
184194
- name: get urls of previous PRs
185195
id: pr_urls
186196
run: python scripts/get_previous_pr_urls.py ${{ matrix.update.resource_id }}

.github/workflows/validate_resources.yaml

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,20 @@ jobs:
3939
ref: gh-pages
4040
path: gh-pages
4141
- name: install script deps
42-
run: pip install typer bioimageio.spec lxml bioimageio.core packaging
42+
uses: mamba-org/provision-with-micromamba@main
43+
with:
44+
cache-downloads: true
45+
cache-env: true
46+
channels: conda-forge
47+
extra-specs: | # script dependencies
48+
bioimageio.core
49+
bioimageio.spec
50+
lxml
51+
packaging
52+
typer
4353
- name: update RDFs
4454
id: update_rdfs
55+
shell: bash -l {0}
4556
run: python scripts/update_rdfs.py --branch ${{ github.head_ref || github.ref }}
4657
- name: check pending versions limit
4758
if: inputs.check_validation == 'yes' && steps.pending.outputs.retrigger == 'yes'
@@ -50,6 +61,7 @@ jobs:
5061
- name: static validation
5162
if: steps.update_rdfs.outputs.has_pending_matrix_bioimageio == 'yes'
5263
id: static_validation
64+
shell: bash -l {0}
5365
run: python scripts/static_validation.py '${{ steps.update_rdfs.outputs.pending_matrix_bioimageio }}'
5466
- name: Upload static validation summaries and conda envs
5567
if: steps.update_rdfs.outputs.has_pending_matrix_bioimageio == 'yes'
@@ -60,6 +72,7 @@ jobs:
6072
retention-days: 1
6173
- name: check if validation passed
6274
if: steps.update_rdfs.outputs.has_pending_matrix_bioimageio == 'yes' && inputs.check_validation == 'yes'
75+
shell: bash -l {0}
6376
run: python scripts/check_validation_passed.py dist/static_validation_artifact
6477

6578
dynamic-validation:
@@ -86,33 +99,29 @@ jobs:
8699
environment-file: artifacts/static_validation_artifact/${{ matrix.resource_id }}/${{ matrix.version_id }}/conda_env_${{ matrix.weight_format }}.yaml
87100
extra-specs: | # script dependencies
88101
typer
89-
bioimageio.spec
102+
conda-forge::bioimageio.spec
90103
continue-on-error: true # we inspect this step's outcome in dynamic_validation.py
91104
timeout-minutes: 60
92-
# atm bioimageio.core imports directly from tqdm, PR to import from spec is on the way...
93-
# todo: remove tqdm to avoid spamming logs
94-
# - name: remove tqdm to avoid spamming logs
95-
# shell: bash -l {0}
96-
# run: conda remove --yes --force tqdm
97-
# continue-on-error: true
105+
- name: remove tqdm to avoid spamming logs
106+
shell: bash -l {0}
107+
run: conda remove --yes --force tqdm
108+
continue-on-error: true
98109
- name: get artifact name wo forward slashes
99110
id: artifact_name
100111
run: echo ::set-output name=name::dynamic_validation_artifact_$(echo ${{ matrix.resource_id }}_${{ matrix.version_id }}_${{ matrix.weight_format }} | sed 's#/##g')
101112
- name: dynamic validation
102113
shell: bash -l {0}
103-
timeout-minutes: 60
104114
run: python scripts/dynamic_validation.py dist/dynamic_validation_artifact ${{ matrix.resource_id }} ${{ matrix.version_id }} ${{ matrix.weight_format }} --create-env-outcome ${{ steps.create_env.outcome }} --${{ contains(inputs.deploy_to, 'gh-pages') && 'no-ignore' || 'ignore' }}-rdf-source-field-in-validation
115+
timeout-minutes: 60
105116
- name: Upload validation summary
106117
uses: actions/upload-artifact@v3
107118
with:
108119
name: ${{ steps.artifact_name.outputs.name }}
109120
path: dist/dynamic_validation_artifact/${{ matrix.resource_id }}/${{ matrix.version_id }}/${{ matrix.weight_format }}
110121
retention-days: 1
111-
- name: install script deps
112-
if: steps.create_env.outcome == 'success' && inputs.check_validation == 'yes'
113-
run: pip install typer bioimageio.spec
114122
- name: check if validation passed
115123
if: inputs.check_validation == 'yes'
124+
shell: bash -l {0}
116125
run: python scripts/check_validation_passed.py dist/dynamic_validation_artifact/${{ matrix.resource_id }}/${{ matrix.version_id }}/${{ matrix.weight_format }}
117126

118127
deploy:
@@ -131,10 +140,22 @@ jobs:
131140
with:
132141
path: artifacts
133142
- name: install script deps
134-
run: pip install typer packaging numpy bioimageio.spec lxml
143+
uses: mamba-org/provision-with-micromamba@main
144+
with:
145+
cache-downloads: true
146+
cache-env: true
147+
channels: conda-forge
148+
extra-specs: | # script dependencies
149+
bioimageio.spec
150+
lxml
151+
numpy
152+
packaging
153+
typer
135154
- name: download partner test summaries
155+
shell: bash -l {0}
136156
run: python scripts/download_partner_test_summaries.py
137157
- name: prepare to deploy
158+
shell: bash -l {0}
138159
run: python scripts/prepare_to_deploy.py --branch ${{ github.head_ref || github.ref }}
139160
- name: Deploy to gh-pages 🚀
140161
if: contains(inputs.deploy_to, 'gh-pages')
@@ -145,6 +166,7 @@ jobs:
145166
folder: dist/gh_pages_update
146167
- name: add documentation files to preview
147168
if: contains(inputs.deploy_to, 'preview') # only download documentation for preview to ease review
169+
shell: bash -l {0}
148170
run: python scripts/download_documentation.py --folder dist/gh_pages_update
149171
- name: Upload preview
150172
if: contains(inputs.deploy_to, 'preview')

0 commit comments

Comments
 (0)