Skip to content

Pydicom update

Pydicom update #160

Workflow file for this run

name: Tests Linux (Low Memory)
on:
workflow_dispatch:
pull_request:
branches:
- dev
- master
push:
branches:
- dev
- master
jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
# Limit concurrency to reduce memory pressure
max-parallel: 2
matrix:
python-version: ["3.10", "3.11", "3.12"]
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install minimal system dependencies
run: |
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends openslide-tools pandoc
sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
- name: Set up Micromamba (cached)
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: "1.5.6-0"
environment-name: pathml
environment-file: requirements/environment_test.yml
init-shell: bash
cache-environment: true
create-args: >-
python=${{ matrix.python-version }}
env:
MAMBA_NO_BANNER: 1
- name: Show environment info
run: |
micromamba info
micromamba list | head -n 20
df -h
- name: Set default Temurin JDK 17
run: |
sudo update-java-alternatives --set temurin-17-jdk-amd64 || true
java -version
- name: Install PathML (editable)
shell: bash -l {0}
run: pip install -e .
- name: Install lightweight torchvision
shell: bash -l {0}
run: pip install torchvision==0.14.1 --no-cache-dir
- name: Aggressive disk cleanup
run: |
echo "Freeing disk space..."
sudo swapoff -a || true
sudo rm -f /swapfile || true
docker system prune -af || true
sudo apt-get clean
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
df -h
- name: Fix coverage-numba incompatibility
shell: bash -l {0}
run: |
micromamba activate pathml
pip install "numpy==1.23.5" "coverage<7.3" "numba==0.59.1" --force-reinstall --no-cache-dir
python -m coverage --version
python -c "import numba; print('Numba version:', numba.__version__)"
- name: Test other modules with pytest and generate coverage
shell: bash -l {0}
run: |
COVERAGE_FILE=.coverage_others coverage run -m pytest -m "not slow and not exclude"
- name: Test tile_stitcher with pytest and generate coverage
shell: bash -l {0}
run: |
COVERAGE_FILE=.coverage_tilestitcher coverage run -m pytest tests/preprocessing_tests/test_tilestitcher.py
- name: Combine Coverage Data
shell: bash -l {0}
run: |
coverage combine .coverage_tilestitcher .coverage_others
- name: Generate Combined Coverage Report
shell: bash -l {0}
run: |
coverage xml -o combined_coverage.xml
- name: Upload combined coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
env_vars: OS,PYTHON
fail_ci_if_error: true
files: ./combined_coverage.xml
name: codecov-umbrella
verbose: true
- name: Compile docs
shell: bash -l {0}
run: |
cd docs
pip install -r readthedocs-requirements.txt
make html