Skip to content

Commit

Permalink
install imagecodecs and openslide-python dependencies so additional t…
Browse files Browse the repository at this point in the history
…ests will run (#634)

This MR may initially fail during wheel testing due to #626, as a few test cases relying on these packages were not being run at the time #619 was merged.

Authors:
  - Gregory Lee (https://github.com/grlee77)
  - https://github.com/jakirkham

Approvers:
  - Ray Douglass (https://github.com/raydouglass)
  - Gigon Bae (https://github.com/gigony)
  - https://github.com/jakirkham

URL: #634
  • Loading branch information
grlee77 authored Dec 4, 2023
1 parent 12037d8 commit 69c0099
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
15 changes: 13 additions & 2 deletions ci/test_wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,21 @@ RAPIDS_PY_WHEEL_NAME="cucim_${RAPIDS_PY_CUDA_SUFFIX}" rapids-download-wheels-fro
# echo to expand wildcard before adding `[extra]` requires for pip
python -m pip install $(echo ./dist/cucim*.whl)[test]

CUDA_MAJOR_VERSION=${RAPIDS_CUDA_VERSION:0:2}

# Run smoke tests for aarch64 pull requests
if [[ "$(arch)" == "aarch64" && ${RAPIDS_BUILD_TYPE} == "pull-request" ]]; then
python ./ci/wheel_smoke_test.py
else
# TODO: revisit enabling imagecodecs package during testing
python -m pytest ./python/cucim

DEBIAN_FRONTEND=noninteractive apt update
DEBIAN_FRONTEND=noninteractive apt install -y --no-install-recommends libopenslide0

if [[ ${CUDA_MAJOR_VERSION} == "11" ]]; then
# Omit I/O-related tests in ./python/cucim/tests due to known CUDA bug
# with dynamic loading of libcufile.
python -m pytest ./python/cucim/src/
else
python -m pytest ./python/cucim
fi
fi
7 changes: 3 additions & 4 deletions dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,9 @@ dependencies:
- opencv-python-headless>=4.6
- output_types: [requirements, pyproject]
packages:
# temporarily remove imagecodecs / openslide-python from wheel tests
# # skip packages on arm64 that don't provide a wheel
# - imagecodecs>=2021.6.8; platform_machine=='x86_64'
# - openslide-python>=1.1.2; platform_machine=='x86_64'
# skip packages on arm64 that don't provide a wheel
- imagecodecs>=2021.6.8; platform_machine=='x86_64'
- openslide-python>=1.1.2; platform_machine=='x86_64'
- matplotlib
- opencv-python-headless>=4.6
- click
2 changes: 2 additions & 0 deletions python/cucim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ Tracker = "https://github.com/rapidsai/cucim/issues"
test = [
"GPUtil>=1.4.0",
"click",
"imagecodecs>=2021.6.8; platform_machine=='x86_64'",
"matplotlib",
"opencv-python-headless>=4.6",
"openslide-python>=1.1.2; platform_machine=='x86_64'",
"pooch>=1.6.0",
"psutil>=5.8.0",
"pytest-cov>=2.12.1",
Expand Down
1 change: 1 addition & 0 deletions python/cucim/tests/unit/clara/test_image_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def test_reserve_more_cache_memory():
assert cache.miss_count == 0


@pytest.mark.skip(reason="currently fails (gh-626)")
def test_cache_hit_miss(testimg_tiff_stripe_32x24_16_jpeg):
from cucim import CuImage
from cucim.clara.cache import preferred_memory_capacity
Expand Down

0 comments on commit 69c0099

Please sign in to comment.