Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
09cc398
Merge pull request #455 from Dana-Farber-AIOS/dev
jamesgwen Sep 8, 2025
576b993
updating torch to 2.8.0
jamesgwen Sep 8, 2025
ae92a88
Merge pull request #456 from Dana-Farber-AIOS/torch_update_sep25
jamesgwen Sep 8, 2025
be319a0
Update README.md w/ new reference manuscript
renato-umeton Sep 28, 2025
002653c
Update CITATION.cff w/ new reference article
renato-umeton Sep 28, 2025
7429bff
redoing tqdm update
jamesgwen Oct 22, 2025
e1ac452
moving coverage to pip
jamesgwen Oct 22, 2025
7a63cc5
changing torch package
jamesgwen Oct 22, 2025
a98f2de
change file path for torch file
jamesgwen Oct 22, 2025
ab8688b
changing coverage input
jamesgwen Oct 22, 2025
8e86735
taking coverage out
jamesgwen Oct 22, 2025
da3676d
adding back numba
jamesgwen Oct 22, 2025
33d256c
adding new yml test files
jamesgwen Oct 22, 2025
81ea1a2
forcing numpy to be ok
jamesgwen Oct 22, 2025
a326c22
taking pytest-cov out
jamesgwen Oct 22, 2025
de88ec5
pulling coverage out of pip
jamesgwen Oct 23, 2025
dce32f6
trying another method in test yml
jamesgwen Oct 23, 2025
6d443ce
redoing test yaml
jamesgwen Oct 23, 2025
2df59d5
adjusting the numpy reinstall
jamesgwen Oct 23, 2025
7617014
adjusting workflows
jamesgwen Oct 23, 2025
3dd9b60
adjusting coverage files to reduce memory load
jamesgwen Oct 23, 2025
91ae4cd
changing URL checking one to avoid secrurity issues
jamesgwen Oct 23, 2025
998a523
fixing format of test manuscript file
jamesgwen Oct 23, 2025
5145353
changing format of test script
jamesgwen Oct 23, 2025
d10bd08
separating jobs for linux
jamesgwen Oct 23, 2025
279a360
changing to artifact@4
jamesgwen Oct 23, 2025
365b282
adjusting linux
jamesgwen Oct 23, 2025
1c3fbf1
fixing tilestitching test
jamesgwen Oct 23, 2025
3e949b8
fixing trigger
jamesgwen Oct 23, 2025
915a148
fixing paths
jamesgwen Oct 23, 2025
356ff65
dynamically adjusting artifact names
jamesgwen Oct 23, 2025
f3e3316
changing backend tests
jamesgwen Oct 23, 2025
21abf9f
changing test
jamesgwen Oct 23, 2025
ba663ac
fixing test
jamesgwen Oct 23, 2025
57e81ff
re linting
jamesgwen Oct 23, 2025
17834e6
redoing merge over coverage
jamesgwen Oct 23, 2025
461c4fd
redoing merging
jamesgwen Oct 23, 2025
6339d47
changing the merge process again
jamesgwen Oct 23, 2025
7f6c72e
fixing python reference
jamesgwen Oct 24, 2025
534bdd8
combining processes again
jamesgwen Oct 24, 2025
bf46f8d
changing workflow in mamba
jamesgwen Oct 24, 2025
83dffd7
reverting
jamesgwen Oct 24, 2025
b7d874a
adjusting memory handling
jamesgwen Oct 24, 2025
92d9938
adjusting workflow wrt coverage trigger
jamesgwen Oct 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
266 changes: 107 additions & 159 deletions .github/workflows/tests-linux.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests linux
name: Tests Linux (Low Memory)

on:
workflow_dispatch:
Expand All @@ -15,165 +15,113 @@ jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
# Limit concurrency to reduce memory pressure
max-parallel: 2
matrix:
python-version: ["3.9", "3.10"]
timeout-minutes: 60 # add a timeout
timeout-minutes: 60

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
shell: bash -l {0}
run: |
sudo apt-get update
sudo apt-get install openslide-tools
sudo apt-get install pandoc
- name: Setup Micromamba
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.6-0'
environment-name: pathml
environment-file: requirements/environment_test.yml
init-shell: >-
bash
create-args: >-
python=${{ matrix.python-version }}
- name: Debugging
run: |
echo "Printing the environment.yml file..."
cat requirements/environment_test.yml
echo "Checking the status of micro mamba..."
micromamba config
echo "Checking the available disk space..."
df -h

# - name: Install dependencies with micromamba
# shell: bash -l {0}
# run: micromamba env update --file requirements/environment_test.yml --name pathml

- name: Micromamba info
shell: bash -l {0}
run: |
micromamba info
micromamba config
micromamba list

- name: Set default Temurin JDK 17
run: |
sudo update-java-alternatives --set temurin-17-jdk-amd64 || true
java -version

- name: Install PathML
shell: bash -l {0}
run: pip install -e .

- name: Install torchvision
shell: bash -l {0}
run: pip install torchvision==0.14.1

- name: disk usage
shell: bash -l {0}
run: |
sudo df -h
sudo du -h

# - name: free disk space
# run: |
# sudo swapoff -a
# sudo rm -f /swapfile
# sudo apt clean
# docker rmi $(docker image ls -aq)
# sudo df -h
# sudo du -h

- name: free disk space
run: |
sudo swapoff -a
sudo rm -f /swapfile
sudo apt-get clean
if [ "$(docker image ls -aq)" ]; then
docker rmi $(docker image ls -aq)
else
echo "No Docker images to remove."
fi
sudo df -h
sudo du -h

# - name: Check Coverage Command
# run: |
# which coverage
# coverage --version

# - name: Test with pytest for tile_stitcher
# run: |
# java -version
# python -m pytest tests/preprocessing_tests/test_tilestitcher.py

# - name: Test with pytest and generate coverage report
# shell: bash -l {0}
# run: |
# coverage run -m pytest -m "not slow and not exclude"
# coverage xml
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: ./coverage.xml
# name: codecov-umbrella
# verbose: true

- 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: List Files in Directory
shell: bash -l {0}
run: |
ls -la

- 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: Combine coverage data
# shell: bash -l {0}
# run: |
# coverage combine coverage_tilestitcher.xml coverage_others.xml
# coverage xml -o coverage_combined.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
- 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
8 changes: 8 additions & 0 deletions .github/workflows/tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ jobs:
- name: Install torchvision
shell: bash -l {0}
run: pip install torchvision==0.14.1

- 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
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}
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,14 @@ jobs:
run: echo "OPENSLIDE_PATH=D:\a\pathml\pathml\openslide-binaries\openslide-win64-20231011\bin" >> $GITHUB_ENV
shell: pwsh

- 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
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: |
Expand Down
Loading