From 2c51b55593310c88abe0efcb7f384691df623a91 Mon Sep 17 00:00:00 2001 From: luiz Date: Fri, 23 Aug 2024 13:52:40 +0200 Subject: [PATCH] tests --- .github/workflows/run_tests.yaml | 46 +++++++++++++++++++++----------- requirements.txt | 9 ++++--- 2 files changed, 36 insertions(+), 19 deletions(-) diff --git a/.github/workflows/run_tests.yaml b/.github/workflows/run_tests.yaml index 7cee3d6..44be4d3 100644 --- a/.github/workflows/run_tests.yaml +++ b/.github/workflows/run_tests.yaml @@ -33,6 +33,7 @@ jobs: java-version: '21' distribution: temurin + # https://github.com/marketplace/actions/setup-apache-spark - uses: vemonet/setup-spark@v1 with: spark-version: ${{ matrix.spark }} @@ -40,18 +41,33 @@ jobs: - run: spark-submit --version - # - name: Install dependencies - # run: | - # python -m pip install --upgrade pip - # pip install pytest pytest-cov - - # - name: Run tests with pytest - # run: | - # pytest --cov=voluseg --cov-report=term-missing - - # - name: Upload coverage report - # if: success() - # uses: actions/upload-artifact@v3 - # with: - # name: coverage-report - # path: htmlcov/ + # Download and install ANTs + - name: Install ANTs + run: | + wget https://github.com/ANTsX/ANTs/releases/download/v2.5.3/ants-2.5.3-ubuntu-20.04-X64-gcc.zip + unzip ants-2.5.3-ubuntu-20.04-X64-gcc.zip -d / + rm ants-2.5.3-ubuntu-20.04-X64-gcc.zip + echo "ANTs installed successfully" + + - name: Install test dependencies + run: | + python -m pip install --upgrade pip + pip install -r tests/requirements.txt --no-cache-dir + + - name: Install voluseg + run: | + pip install . --no-cache-dir + + - name: Run tests with pytest + env: + ANTS_PATH: /ants-2.5.3/bin + INPUT_PATH: /path/to/input # Set this to the actual input path + run: | + pytest --cov=voluseg --cov-report=term-missing + + - name: Upload coverage report + if: success() + uses: actions/upload-artifact@v3 + with: + name: coverage-report + path: htmlcov/ diff --git a/requirements.txt b/requirements.txt index fb18ff3..d2e9db5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,9 @@ -h5py scipy scikit-image scikit-learn matplotlib -nibabel -numpy>=1.13 -pandas>=0.2 \ No newline at end of file +h5py>=3.0 +nibabel>=5.0 +numpy>=2.0 +pandas>=2.2 +pyspark==3.4.0 \ No newline at end of file