diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 6d5f94f8c..c4ccd21f8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,7 +28,7 @@ concurrency: jobs: cpp-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -38,7 +38,7 @@ jobs: if: github.ref_type == 'branch' needs: [python-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.12 with: arch: "amd64" branch: ${{ inputs.branch }} @@ -51,7 +51,7 @@ jobs: python-build: needs: [cpp-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -60,7 +60,7 @@ jobs: upload-conda: needs: [cpp-build, python-build] secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-upload-packages.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -68,7 +68,7 @@ jobs: sha: ${{ inputs.sha }} wheel-build: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} @@ -78,7 +78,7 @@ jobs: wheel-publish: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-publish.yaml@branch-24.12 with: build_type: ${{ inputs.build_type || 'branch' }} branch: ${{ inputs.branch }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 7b0c112c4..84e2e937a 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -20,32 +20,32 @@ jobs: - wheel-build - wheel-tests secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/pr-builder.yaml@branch-24.12 checks: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/checks.yaml@branch-24.12 conda-cpp-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-cpp-build.yaml@branch-24.12 with: build_type: pull-request conda-python-build: needs: conda-cpp-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-build.yaml@branch-24.12 with: build_type: pull-request conda-python-tests: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 with: build_type: pull-request docs-build: needs: conda-python-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/custom-job.yaml@branch-24.12 with: build_type: pull-request node_type: "gpu-v100-latest-1" @@ -55,14 +55,14 @@ jobs: wheel-build: needs: checks secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-build.yaml@branch-24.12 with: build_type: pull-request script: ci/build_wheel.sh wheel-tests: needs: wheel-build secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 with: build_type: pull-request script: ci/test_wheel.sh diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a28f40187..157fda3f3 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -16,7 +16,7 @@ on: jobs: conda-python-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/conda-python-tests.yaml@branch-24.12 with: build_type: nightly branch: ${{ inputs.branch }} @@ -24,7 +24,7 @@ jobs: sha: ${{ inputs.sha }} wheel-tests: secrets: inherit - uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.10 + uses: rapidsai/shared-workflows/.github/workflows/wheels-test.yaml@branch-24.12 with: build_type: nightly branch: ${{ inputs.branch }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 547381341..075867364 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: - id: verify-alpha-spec args: ["--fix", "--mode=release"] - repo: https://github.com/rapidsai/dependency-file-generator - rev: v1.13.11 + rev: v1.16.0 hooks: - id: rapids-dependency-file-generator args: ["--clean"] diff --git a/CHANGELOG.md b/CHANGELOG.md index 00191a0e9..370881f0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +# cucim 24.12.00 (11 Dec 2024) + +## 🚨 Breaking Changes + +- Deprecations: carry out removals scheduled for release 24.12 ([#786](https://github.com/rapidsai/cucim/pull/786)) [@grlee77](https://github.com/grlee77) + +## 🛠️ Improvements + +- allow path conflicts in conda builds ([#801](https://github.com/rapidsai/cucim/pull/801)) [@jameslamb](https://github.com/jameslamb) +- enforce wheel size limits, README formatting in CI ([#797](https://github.com/rapidsai/cucim/pull/797)) [@jameslamb](https://github.com/jameslamb) +- build wheels without build isolation, print sccache stats in builds ([#792](https://github.com/rapidsai/cucim/pull/792)) [@jameslamb](https://github.com/jameslamb) +- make conda installs in CI stricter ([#791](https://github.com/rapidsai/cucim/pull/791)) [@jameslamb](https://github.com/jameslamb) +- Deprecations: carry out removals scheduled for release 24.12 ([#786](https://github.com/rapidsai/cucim/pull/786)) [@grlee77](https://github.com/grlee77) + # cucim 24.10.00 (9 Oct 2024) ## 🐛 Bug Fixes diff --git a/VERSION b/VERSION index 7c7ba0443..af28c42b5 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -24.10.00 +24.12.00 diff --git a/ci/build_cpp.sh b/ci/build_cpp.sh index 9b419b816..7ecb59306 100755 --- a/ci/build_cpp.sh +++ b/ci/build_cpp.sh @@ -15,8 +15,14 @@ rapids-print-env rapids-logger "Begin cpp build" -conda config --set path_conflict prevent +# this can be set back to 'prevent' once the xorg-* migrations are completed +# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457 +conda config --set path_conflict warn + +sccache --zero-stats RAPIDS_PACKAGE_VERSION=$(rapids-generate-version) rapids-conda-retry mambabuild conda/recipes/libcucim +sccache --show-adv-stats + rapids-upload-conda-to-s3 cpp diff --git a/ci/build_docs.sh b/ci/build_docs.sh index 4bc3e63f2..38936c08a 100755 --- a/ci/build_docs.sh +++ b/ci/build_docs.sh @@ -2,11 +2,11 @@ set -euo pipefail -export RAPIDS_VERSION_NUMBER="$(rapids-version-major-minor)" - rapids-logger "Create test conda environment" . /opt/conda/etc/profile.d/conda.sh +RAPIDS_VERSION="$(rapids-version)" + rapids-dependency-file-generator \ --output conda \ --file-key docs \ @@ -24,7 +24,8 @@ PYTHON_CHANNEL=$(rapids-download-conda-from-s3 python) rapids-mamba-retry install \ --channel "${CPP_CHANNEL}" \ --channel "${PYTHON_CHANNEL}" \ - cucim libcucim + "cucim=${RAPIDS_VERSION}" \ + "libcucim=${RAPIDS_VERSION}" export RAPIDS_DOCS_DIR="$(mktemp -d)" @@ -35,4 +36,4 @@ mkdir -p "${RAPIDS_DOCS_DIR}/cucim/"html mv _html/* "${RAPIDS_DOCS_DIR}/cucim/html" popd -rapids-upload-docs +RAPIDS_VERSION_NUMBER="$(rapids-version-major-minor)" rapids-upload-docs diff --git a/ci/build_python.sh b/ci/build_python.sh index 25925f906..13f9d8ed0 100755 --- a/ci/build_python.sh +++ b/ci/build_python.sh @@ -16,10 +16,15 @@ rapids-print-env rapids-generate-version > ./VERSION rapids-logger "Begin py build" -conda config --set path_conflict prevent + +# this can be set back to 'prevent' once the xorg-* migrations are completed +# ref: https://github.com/rapidsai/cucim/issues/800#issuecomment-2529593457 +conda config --set path_conflict warn CPP_CHANNEL=$(rapids-download-conda-from-s3 cpp) +sccache --zero-stats + # TODO: Remove `--no-test` flag once importing on a CPU # node works correctly RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ @@ -27,4 +32,6 @@ RAPIDS_PACKAGE_VERSION=$(head -1 ./VERSION) rapids-conda-retry mambabuild \ --channel "${CPP_CHANNEL}" \ conda/recipes/cucim +sccache --show-adv-stats + rapids-upload-conda-to-s3 python diff --git a/ci/build_wheel.sh b/ci/build_wheel.sh index 4005c36d4..e467a6985 100755 --- a/ci/build_wheel.sh +++ b/ci/build_wheel.sh @@ -5,7 +5,6 @@ set -euo pipefail package_name="cucim" package_dir="python/cucim" -package_src_dir="${package_dir}/src/${package_name}" CMAKE_BUILD_TYPE="release" @@ -16,24 +15,47 @@ rapids-generate-version > ./VERSION RAPIDS_PY_CUDA_SUFFIX="$(rapids-wheel-ctk-name-gen ${RAPIDS_CUDA_VERSION})" -PACKAGE_CUDA_SUFFIX="-${RAPIDS_PY_CUDA_SUFFIX}" +rapids-logger "Generating build requirements" -# Install pip build dependencies (not yet using pyproject.toml) rapids-dependency-file-generator \ - --file-key "py_build" \ - --output "requirements" \ - --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" | tee build_requirements.txt -pip install -r build_requirements.txt + --output requirements \ + --file-key "py_build_${package_name}" \ + --file-key "py_rapids_build_${package_name}" \ + --matrix "cuda=${RAPIDS_CUDA_VERSION%.*};arch=$(arch);py=${RAPIDS_PY_VERSION}" \ +| tee /tmp/requirements-build.txt + +rapids-logger "Installing build requirements" +python -m pip install \ + -v \ + --prefer-binary \ + -r /tmp/requirements-build.txt + +sccache --zero-stats # First build the C++ lib using CMake via the run script ./run build_local all ${CMAKE_BUILD_TYPE} +sccache --show-adv-stats + cd "${package_dir}" -python -m pip wheel . -w dist -vvv --no-deps --disable-pip-version-check +sccache --zero-stats + +rapids-logger "Building '${package_name}' wheel" +python -m pip wheel \ + -w dist \ + -v \ + --no-build-isolation \ + --no-deps \ + --disable-pip-version-check \ + . + +sccache --show-adv-stats mkdir -p final_dist python -m auditwheel repair -w final_dist dist/* ls -1 final_dist | grep -vqz 'none' +../../ci/validate_wheel.sh final_dist + RAPIDS_PY_WHEEL_NAME="${package_name}_${RAPIDS_PY_CUDA_SUFFIX}" rapids-upload-wheels-to-s3 final_dist diff --git a/ci/validate_wheel.sh b/ci/validate_wheel.sh new file mode 100755 index 000000000..60a80fce6 --- /dev/null +++ b/ci/validate_wheel.sh @@ -0,0 +1,18 @@ +#!/bin/bash +# Copyright (c) 2024, NVIDIA CORPORATION. + +set -euo pipefail + +wheel_dir_relative_path=$1 + +rapids-logger "validate packages with 'pydistcheck'" + +pydistcheck \ + --inspect \ + "$(echo ${wheel_dir_relative_path}/*.whl)" + +rapids-logger "validate packages with 'twine'" + +twine check \ + --strict \ + "$(echo ${wheel_dir_relative_path}/*.whl)" diff --git a/cucim.code-workspace b/cucim.code-workspace index 3c395fb16..7407deb1e 100644 --- a/cucim.code-workspace +++ b/cucim.code-workspace @@ -33,7 +33,7 @@ "CUCIM_TESTDATA_FOLDER": "${workspaceDirectory}/test_data", // Add cuslide plugin's library path to LD_LIBRARY_PATH "LD_LIBRARY_PATH": "${workspaceDirectory}/build-debug/lib:${workspaceDirectory}/cpp/plugins/cucim.kit.cuslide/build-debug/lib:${workspaceDirectory}/temp/cuda/lib64:${os_env:LD_LIBRARY_PATH}", - "CUCIM_TEST_PLUGIN_PATH": "cucim.kit.cuslide@24.10.00.so" + "CUCIM_TEST_PLUGIN_PATH": "cucim.kit.cuslide@24.12.00.so" }, "cwd": "${workspaceDirectory}", "catch2": { @@ -226,7 +226,7 @@ }, { "name": "CUCIM_TEST_PLUGIN_PATH", - "value": "cucim.kit.cuslide@24.10.00.so" + "value": "cucim.kit.cuslide@24.12.00.so" } ], "console": "externalTerminal", @@ -254,7 +254,7 @@ }, { "name": "CUCIM_TEST_PLUGIN_PATH", - "value": "cucim.kit.cuslide@24.10.00.so" + "value": "cucim.kit.cuslide@24.12.00.so" } ], "console": "externalTerminal", @@ -286,7 +286,7 @@ }, { "name": "CUCIM_TEST_PLUGIN_PATH", - "value": "cucim.kit.cuslide@24.10.00.so" + "value": "cucim.kit.cuslide@24.12.00.so" } ], "console": "externalTerminal", diff --git a/dependencies.yaml b/dependencies.yaml index e25c6f909..5ffab20b2 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -31,14 +31,14 @@ files: - cuda_version - docs - py_version - py_build: + py_build_cucim: output: pyproject pyproject_dir: python/cucim extras: table: build-system includes: - rapids_build_setuptools - py_rapids_build: + py_rapids_build_cucim: output: pyproject pyproject_dir: python/cucim extras: diff --git a/python/cucim/pyproject.toml b/python/cucim/pyproject.toml index 25248b3b2..8b54160a5 100644 --- a/python/cucim/pyproject.toml +++ b/python/cucim/pyproject.toml @@ -115,6 +115,14 @@ where = ["src"] [tool.setuptools.package-data] mypkg = ["*.pyi", "*.h", "*.cu", "VERSION"] +[tool.pydistcheck] +select = [ + "distro-too-large-compressed", +] + +# PyPI limit is 100 MiB, fail CI before we get too close to that +max_allowed_size_compressed = '75M' + [tool.pytest.ini_options] # If a pytest section is found in one of the possible config files # (pytest.ini, tox.ini or setup.cfg), then pytest will not look for any others, diff --git a/python/cucim/src/cucim/skimage/__init__.py b/python/cucim/src/cucim/skimage/__init__.py index 70ec2c791..6bed31765 100644 --- a/python/cucim/src/cucim/skimage/__init__.py +++ b/python/cucim/src/cucim/skimage/__init__.py @@ -80,4 +80,3 @@ def __dir__(): img_as_ubyte, img_as_uint, ) -from .util.lookfor import lookfor diff --git a/python/cucim/src/cucim/skimage/data/_binary_blobs.py b/python/cucim/src/cucim/skimage/data/_binary_blobs.py index 4659c798e..9141879f9 100644 --- a/python/cucim/src/cucim/skimage/data/_binary_blobs.py +++ b/python/cucim/src/cucim/skimage/data/_binary_blobs.py @@ -1,20 +1,14 @@ import cupy as cp from .._shared.filters import gaussian -from .._shared.utils import DEPRECATED, deprecate_parameter -@deprecate_parameter( - "seed", new_name="rng", start_version="23.12.00", stop_version="24.12.00" -) def binary_blobs( length=512, blob_size_fraction=0.1, n_dim=2, volume_fraction=0.5, rng=None, - *, - seed=DEPRECATED, ): """ Generate synthetic binary image with several rounded blob-like objects. diff --git a/python/cucim/src/cucim/skimage/data/tests/test_data.py b/python/cucim/src/cucim/skimage/data/tests/test_data.py index 2a7d8f528..eb92b2294 100644 --- a/python/cucim/src/cucim/skimage/data/tests/test_data.py +++ b/python/cucim/src/cucim/skimage/data/tests/test_data.py @@ -1,5 +1,4 @@ import cupy as cp -import pytest from numpy.testing import assert_almost_equal from cucim.skimage import data @@ -16,8 +15,3 @@ def test_binary_blobs(): length=32, volume_fraction=0.25, n_dim=3 ) assert not cp.all(blobs == other_realization) - - -def test_binary_blobs_futurewarning(): - with pytest.warns(FutureWarning): - data.binary_blobs(length=128, seed=5) diff --git a/python/cucim/src/cucim/skimage/morphology/_skeletonize.py b/python/cucim/src/cucim/skimage/morphology/_skeletonize.py index 4abe6c1c7..53d55b6f4 100644 --- a/python/cucim/src/cucim/skimage/morphology/_skeletonize.py +++ b/python/cucim/src/cucim/skimage/morphology/_skeletonize.py @@ -5,7 +5,6 @@ import cucim.skimage._vendored.ndimage as ndi from cucim.core.operations.morphology import distance_transform_edt -from cucim.skimage._shared.utils import DEPRECATED, deprecate_parameter from .._shared.utils import check_nD from ._medial_axis_lookup import ( @@ -168,12 +167,7 @@ def _get_tiebreaker(n, seed): return tiebreaker -@deprecate_parameter( - "seed", new_name="rng", start_version="23.12", stop_version="24.12" -) -def medial_axis( - image, mask=None, return_distance=False, *, seed=DEPRECATED, rng=None -): +def medial_axis(image, mask=None, return_distance=False, *, rng=None): """Compute the medial axis transform of a binary image. Parameters diff --git a/python/cucim/src/cucim/skimage/morphology/tests/test_skeletonize.py b/python/cucim/src/cucim/skimage/morphology/tests/test_skeletonize.py index 03c012e60..d4b414544 100644 --- a/python/cucim/src/cucim/skimage/morphology/tests/test_skeletonize.py +++ b/python/cucim/src/cucim/skimage/morphology/tests/test_skeletonize.py @@ -122,11 +122,6 @@ def test_rng_cupy(self): def test_rng_int(self): self._test_vertical_line(dtype=bool, rng=15) - def test_vertical_line_seed(self): - """seed was deprecated (now use rng)""" - with pytest.warns(FutureWarning): - self._test_vertical_line(dtype=bool, seed=15) - def test_01_01_rectangle(self): """Test skeletonize on a rectangle""" image = cp.zeros((9, 15), bool) diff --git a/python/cucim/src/cucim/skimage/restoration/deconvolution.py b/python/cucim/src/cucim/skimage/restoration/deconvolution.py index 41572359b..0f1ea85d8 100644 --- a/python/cucim/src/cucim/skimage/restoration/deconvolution.py +++ b/python/cucim/src/cucim/skimage/restoration/deconvolution.py @@ -5,9 +5,7 @@ import numpy as np from .._shared.utils import ( - DEPRECATED, _supported_float_type, - deprecate_parameter, ) from . import uft @@ -151,18 +149,6 @@ def wiener(image, psf, balance, reg=None, is_real=True, clip=True): return deconv -@deprecate_parameter( - "random_state", - new_name="rng", - start_version="23.08.00", - stop_version="24.12.00", -) -@deprecate_parameter( - "seed", - new_name="rng", - start_version="23.08.00", - stop_version="24.12.00", -) def unsupervised_wiener( image, psf, @@ -172,8 +158,6 @@ def unsupervised_wiener( clip=True, *, rng=None, - random_state=DEPRECATED, - seed=DEPRECATED, ): """Unsupervised Wiener-Hunt deconvolution. diff --git a/python/cucim/src/cucim/skimage/util/lookfor.py b/python/cucim/src/cucim/skimage/util/lookfor.py deleted file mode 100644 index b3baf1d18..000000000 --- a/python/cucim/src/cucim/skimage/util/lookfor.py +++ /dev/null @@ -1,40 +0,0 @@ -import sys - -from cucim.skimage._shared.utils import deprecate_func - -try: - from numpy import lookfor as np_lookfor -except ImportError: - np_lookfor = None - - -@deprecate_func( - deprecated_version="24.06", - removed_version="24.12", -) -def lookfor(what): - """Do a keyword search on scikit-image docstrings. - - Parameters - ---------- - what : str - Words to look for. - - Notes - ----- - This untested search function is not currently working as expected will be - removed as it is unneeded. - - Examples - -------- - >>> import cucim.skimage - >>> cucim.skimage.lookfor('median') # doctest: +SKIP - Search results for 'median' - --------------------------- - Nothing found. - """ - if np_lookfor is None: - raise RuntimeError( - "lookfor unavailable (numpy.lookfor was removed in numpy 2.0)" - ) - return np_lookfor(what, sys.modules[__name__.split(".")[0]]) diff --git a/python/cucim/src/cucim/skimage/util/noise.py b/python/cucim/src/cucim/skimage/util/noise.py index fb7d9dc28..675dac293 100644 --- a/python/cucim/src/cucim/skimage/util/noise.py +++ b/python/cucim/src/cucim/skimage/util/noise.py @@ -1,6 +1,5 @@ import cupy as cp -from .._shared.utils import DEPRECATED, deprecate_parameter from .dtype import img_as_float __all__ = ["random_noise"] @@ -54,12 +53,7 @@ def _bernoulli(p, shape, *, rng): return rng.random(shape) <= p -@deprecate_parameter( - "seed", new_name="rng", start_version="23.12", stop_version="24.12" -) -def random_noise( - image, mode="gaussian", rng=None, clip=True, *, seed=DEPRECATED, **kwargs -): +def random_noise(image, mode="gaussian", rng=None, clip=True, **kwargs): """ Function to add random noise of various types to a floating-point image. diff --git a/python/cucim/src/cucim/skimage/util/tests/test_random_noise.py b/python/cucim/src/cucim/skimage/util/tests/test_random_noise.py index 43383113f..6dcc0578c 100644 --- a/python/cucim/src/cucim/skimage/util/tests/test_random_noise.py +++ b/python/cucim/src/cucim/skimage/util/tests/test_random_noise.py @@ -16,14 +16,6 @@ def test_set_seed(): assert_array_equal(test, random_noise(cam, rng=seed)) -def test_random_noise_futurewarning(): - seed = 42 - cam = cp.asarray(camerad) - with pytest.warns(FutureWarning): - test = random_noise(cam, seed=seed) - assert_array_equal(test, random_noise(cam, rng=seed)) - - def test_salt(): amount = 0.15 cam = img_as_float(camerad)