Skip to content

Commit 22761f0

Browse files
authored
Actions Updates For pkg_resources Fix (#775)
### Description This fixes any potential issues in the Actions scripts relating to the missing `pkg_resources` module. This was fixed in Core by forcing pip to build in the install environment rather than in an isolated one so that it's forced to use an older version of `setuptools`, thus avoiding errors with `pkg_resources` not being present in PyPI anymore. Here this doesn't occur directly in the scripts as an issue but can if models require certain dependencies which cannot be installed because of this error (eg. MetricsReloaded). See Project-MONAI/MONAI#8536. ### Status **Ready** ### Please ensure all the checkboxes: <!--- Put an `x` in all the boxes that apply, and remove the not applicable items --> - [x] Codeformat tests passed locally by running `./runtests.sh --codeformat`. - [ ] In-line docstrings updated. - [ ] Update `version` and `changelog` in `metadata.json` if changing an existing bundle. - [ ] Please ensure the naming rules in config files meet our requirements (please refer to: `CONTRIBUTING.md`). - [ ] Ensure versions of packages such as `monai`, `pytorch` and `numpy` are correct in `metadata.json`. - [ ] Descriptions should be consistent with the content, such as `eval_metrics` of the provided weights and TorchScript modules. - [ ] Files larger than 25MB are excluded and replaced by providing download links in `large_file.yml`. - [ ] Avoid using path that contains personal information within config files (such as use `/home/your_name/` for `"bundle_root"`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI/CD pipeline workflows to use newer GitHub Actions versions and consolidated dependency caching configurations for improved build reliability and efficiency. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com>
1 parent 6f3d339 commit 22761f0

4 files changed

Lines changed: 22 additions & 58 deletions

File tree

.github/workflows/code-format-check.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,20 @@ jobs:
1616
flake8-py3:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: Set up Python 3.10
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.10.14
24-
- name: cache weekly timestamp
25-
id: pip-cache
26-
run: |
27-
echo "::set-output name=datew::$(date '+%Y-%V')"
28-
- name: cache for pip
29-
uses: actions/cache@v4
30-
id: cache
31-
with:
32-
path: ~/.cache/pip
33-
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
23+
python-version: '3.10'
24+
cache: 'pip'
3425
- name: Install dependencies
3526
run: |
36-
python -m pip install --upgrade pip wheel
27+
python -m pip install --upgrade pip wheel wheel-stub
3728
python -m pip install --upgrade setuptools
3829
python -m pip install -r requirements-dev.txt
3930
- name: type check
4031
run: |
4132
# clean up temporary files
4233
$(pwd)/runtests.sh --clean
43-
# Git hub actions have 2 cores, so parallize pytype
34+
# Git hub actions have 2 cores, so parallelize pytype
4435
$(pwd)/runtests.sh --codeformat -j 2

.github/workflows/premerge-cpu.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,15 @@ jobs:
1616
premerge-cpu:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: Set up Python 3.10
21-
uses: actions/setup-python@v4
21+
uses: actions/setup-python@v6
2222
with:
23-
python-version: 3.10.14
24-
- name: cache weekly timestamp
25-
id: pip-cache
26-
run: |
27-
echo "::set-output name=datew::$(date '+%Y-%V')"
28-
- name: cache for pip
29-
uses: actions/cache@v4
30-
id: cache
31-
with:
32-
path: ~/.cache/pip
33-
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
23+
python-version: '3.10'
24+
cache: 'pip'
3425
- name: Install dependencies
3526
run: |
36-
python -m pip install --upgrade pip wheel
27+
python -m pip install --upgrade pip wheel wheel-stub
3728
python -m pip install --upgrade setuptools
3829
- name: check
3930
run: |

.github/workflows/update-model-info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
permissions: write-all
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v6
1616
with:
1717
fetch-depth: 2
1818
- name: update model info

.github/workflows/weekly-tests-cpu.yml

Lines changed: 10 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,24 +11,15 @@ jobs:
1111
get-list:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- uses: actions/checkout@v6
1515
- name: Set up Python 3.10
16-
uses: actions/setup-python@v4
16+
uses: actions/setup-python@v6
1717
with:
18-
python-version: 3.10.14
19-
- name: cache weekly timestamp
20-
id: pip-cache
21-
run: |
22-
echo "datew=$(date '+%Y-%V')" >> $GITHUB_OUTPUT
23-
- name: cache for pip
24-
uses: actions/cache@v4
25-
id: cache
26-
with:
27-
path: ~/.cache/pip
28-
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
18+
python-version: '3.10'
19+
cache: 'pip'
2920
- name: Install dependencies
3021
run: |
31-
python -m pip install --upgrade pip wheel
22+
python -m pip install --upgrade pip wheel wheel-stub
3223
python -m pip install --upgrade setuptools
3324
python -m pip install -r requirements.txt
3425
- name: get bundle list
@@ -47,24 +38,15 @@ jobs:
4738
bundle: ${{ fromJson(needs.get-list.outputs.list) }}
4839
runs-on: ubuntu-latest
4940
steps:
50-
- uses: actions/checkout@v4
41+
- uses: actions/checkout@v6
5142
- name: Set up Python 3.10
52-
uses: actions/setup-python@v4
53-
with:
54-
python-version: 3.10.14
55-
- name: cache weekly timestamp
56-
id: pip-cache
57-
run: |
58-
echo "::set-output name=datew::$(date '+%Y-%V')"
59-
- name: cache for pip
60-
uses: actions/cache@v4
61-
id: cache
43+
uses: actions/setup-python@v6
6244
with:
63-
path: ~/.cache/pip
64-
key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }}
45+
python-version: '3.10'
46+
cache: 'pip'
6547
- name: Install dependencies
6648
run: |
67-
python -m pip install --upgrade pip wheel
49+
python -m pip install --upgrade pip wheel wheel-stub
6850
python -m pip install --upgrade setuptools
6951
- name: check
7052
run: |

0 commit comments

Comments
 (0)