From 7bb64f3393ab9039ebdbf1a744ae6adb66768f51 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Fri, 13 Feb 2026 18:53:32 +0000 Subject: [PATCH 1/3] Updating Workflows to Fix Missing `pkg_resources` Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 27 +++++++-------------------- .github/workflows/guidelines.yml | 27 +++++++-------------------- .github/workflows/pep8.yml | 27 +++++++-------------------- .github/workflows/test-modified.yml | 15 ++++++++------- 4 files changed, 29 insertions(+), 67 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 03a8a74065..eedc363995 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -8,34 +8,21 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) copyright: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - python -m pip install -r requirements.txt + pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + pip install -r requirements.txt - name: Copyright check run: | $(pwd)/runner.sh --no-run --no-checks --copyright diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 34540731df..50a6699a41 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -8,34 +8,21 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) guidelines: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - python -m pip install -r requirements.txt + pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + pip install -r requirements.txt - name: Guidelines notebook format check run: | $(pwd)/runner.sh --no-run --no-checks --cell-standard diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 2c48786f97..f33a7818a4 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -8,34 +8,21 @@ on: pull_request: jobs: - # caching of these jobs: - # - docker-20-03-py3-pip- (shared) - # - ubuntu py37 pip- - # - os-latest-pip- (shared) pep8: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.9 - uses: actions/setup-python@v3 + - uses: actions/checkout@v6 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 with: - python-version: 3.9 - - name: cache weekly timestamp - id: pip-cache - run: | - echo "::set-output name=datew::$(date '+%Y-%V')" - - name: cache for pip - uses: actions/cache@v3 - id: cache - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ steps.pip-cache.outputs.datew }} + python-version: 3.10 + cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - python -m pip install -r requirements.txt + pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + pip install -r requirements.txt - name: PEP8 check run: | $(pwd)/runner.sh --no-run diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index 7ba65e228a..f50cdc3bf4 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -16,11 +16,12 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up Python 3.10 - uses: actions/setup-python@v3 + uses: actions/setup-python@v6 with: python-version: '3.10' + cache: 'pip' - name: Install MONAI id: monai-install env: @@ -33,14 +34,14 @@ jobs: python -m pip install -U pip wheel # Force CPU-only PyTorch wheels so we don't download huge CUDA/nvidia-* wheels in CI. # Keep PyPI available for torch's dependencies. - python -m pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio + pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio - python -m pip install -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - python -m pip install -r requirements.txt + pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt + pip install -r requirements.txt # Avoid PEP517 build isolation (which can re-install torch and pull CUDA wheels). - BUILD_MONAI=0 python -m pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI#egg=MONAI - python -m pip list + BUILD_MONAI=0 pip install --no-build-isolation git+https://github.com/Project-MONAI/MONAI#egg=MONAI + pip list - name: Notebook quick check shell: bash run: | From a96e886e09046837f0669ebffabbf0bba8fc30ef Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:01:29 +0000 Subject: [PATCH 2/3] Fixes for Python version and wheel-stub Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 4 ++-- .github/workflows/guidelines.yml | 4 ++-- .github/workflows/pep8.yml | 4 ++-- .github/workflows/test-modified.yml | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index eedc363995..5384ebdaa1 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -15,12 +15,12 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip wheel wheel-stub pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt pip install -r requirements.txt - name: Copyright check diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index 50a6699a41..de63de0493 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -15,12 +15,12 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip wheel wheel-stub pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt pip install -r requirements.txt - name: Guidelines notebook format check diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index f33a7818a4..041fa0993f 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -15,12 +15,12 @@ jobs: - name: Set up Python 3.10 uses: actions/setup-python@v6 with: - python-version: 3.10 + python-version: '3.10' cache: 'pip' - name: Install dependencies run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; - python -m pip install --upgrade pip wheel + python -m pip install --upgrade pip wheel wheel-stub pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt pip install -r requirements.txt - name: PEP8 check diff --git a/.github/workflows/test-modified.yml b/.github/workflows/test-modified.yml index f50cdc3bf4..974c27be1a 100644 --- a/.github/workflows/test-modified.yml +++ b/.github/workflows/test-modified.yml @@ -31,7 +31,7 @@ jobs: find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; df -h which python - python -m pip install -U pip wheel + python -m pip install -U pip wheel wheel-stub # Force CPU-only PyTorch wheels so we don't download huge CUDA/nvidia-* wheels in CI. # Keep PyPI available for torch's dependencies. pip install --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple torch torchvision torchaudio From e3384a6471ac579eceb46d94e3494689035a6b81 Mon Sep 17 00:00:00 2001 From: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> Date: Fri, 13 Feb 2026 19:11:50 +0000 Subject: [PATCH 3/3] Remove Unneeded Installations Signed-off-by: Eric Kerfoot <17726042+ericspod@users.noreply.github.com> --- .github/workflows/copyright.yml | 3 +-- .github/workflows/guidelines.yml | 3 +-- .github/workflows/pep8.yml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/copyright.yml b/.github/workflows/copyright.yml index 5384ebdaa1..3cf47bc3b2 100644 --- a/.github/workflows/copyright.yml +++ b/.github/workflows/copyright.yml @@ -21,8 +21,7 @@ jobs: run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel wheel-stub - pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - pip install -r requirements.txt + python -m pip install -r requirements.txt - name: Copyright check run: | $(pwd)/runner.sh --no-run --no-checks --copyright diff --git a/.github/workflows/guidelines.yml b/.github/workflows/guidelines.yml index de63de0493..3127e6eeeb 100644 --- a/.github/workflows/guidelines.yml +++ b/.github/workflows/guidelines.yml @@ -21,8 +21,7 @@ jobs: run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel wheel-stub - pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - pip install -r requirements.txt + python -m pip install -r requirements.txt - name: Guidelines notebook format check run: | $(pwd)/runner.sh --no-run --no-checks --cell-standard diff --git a/.github/workflows/pep8.yml b/.github/workflows/pep8.yml index 041fa0993f..800edd56b4 100644 --- a/.github/workflows/pep8.yml +++ b/.github/workflows/pep8.yml @@ -21,8 +21,7 @@ jobs: run: | find /opt/hostedtoolcache/* -maxdepth 0 ! -name 'Python' -exec rm -rf {} \; python -m pip install --upgrade pip wheel wheel-stub - pip install --no-build-isolation -r https://raw.githubusercontent.com/Project-MONAI/MONAI/dev/requirements-dev.txt - pip install -r requirements.txt + python -m pip install -r requirements.txt - name: PEP8 check run: | $(pwd)/runner.sh --no-run