Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GitHub Actions Workflows. #471

Merged
merged 29 commits into from
Jan 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e334c78
Standardizing conda recipes.
bdice Dec 22, 2022
f0612f8
Draft of GitHub Actions.
bdice Dec 22, 2022
9136ebb
Update pre-commit configuration.
bdice Dec 22, 2022
27a1629
Update test scripts and style.
bdice Dec 22, 2022
6aace33
Add flake8 config path.
bdice Dec 22, 2022
65d1571
Fix style checks.
bdice Dec 22, 2022
43cc750
Update dependencies.yaml.
bdice Dec 22, 2022
4080dde
Update dependencies.
bdice Dec 22, 2022
0943a58
Retry CI.
bdice Dec 22, 2022
33277eb
Update opencv dependency.
bdice Dec 22, 2022
afcad76
Skip notebook tests.
bdice Dec 22, 2022
b0f9292
Fix pr.yaml, add workarounds for Jenkins compat, sccache vars.
bdice Dec 22, 2022
4e6a72b
Require cupy 10 to avoid issues with latest numpy.
bdice Dec 22, 2022
99b57b6
Use same testing script as other repos; enable pytest-xdist.
bdice Dec 22, 2022
82ec7f7
Minimize dependencies.yaml. [skip ci]
bdice Dec 22, 2022
d5ab7a9
Rerun CI.
bdice Dec 22, 2022
2fbb855
Update dependencies.
bdice Dec 22, 2022
0bb6559
Exit with proper code.
bdice Dec 22, 2022
0193e8b
fix/reorder `mamba install` pkgs
ajschmidt8 Jan 1, 2023
b4d69bd
sort recipe lists
ajschmidt8 Jan 1, 2023
83752e9
rm extraneous YAML anchors in `dependencies.yaml`
ajschmidt8 Jan 1, 2023
df15e1a
enable `recently_updated` plugin
ajschmidt8 Jan 1, 2023
ec8af4a
update nightly workflows [skip ci]
ajschmidt8 Jan 2, 2023
6045729
use `opencv-python-headless` for tests
ajschmidt8 Jan 3, 2023
97b48a4
Remove notebook testing.
bdice Jan 4, 2023
eba8628
Mark tests as xfail on ARM until they can be fixed.
bdice Jan 6, 2023
772e580
Merge remote-tracking branch 'upstream/branch-23.02' into gha
bdice Jan 6, 2023
b91daf5
Add yasm to build dependencies.
bdice Jan 6, 2023
93c2c1e
Remove .pre-commit-config.yaml from MANIFEST.in.
bdice Jan 7, 2023
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
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import platform
import warnings

import cupy as cp
Expand All @@ -14,6 +15,10 @@
from cucim.skimage.exposure.exposure import intensity_range
from cucim.skimage.util.dtype import dtype_range

# TODO: Some tests fail unexpectedly on ARM.
ON_AARCH64 = platform.machine() == "aarch64"
ON_AARCH64_REASON = "TODO: Test fails unexpectedly on ARM."
Comment on lines +18 to +20
Copy link
Member

@jakirkham jakirkham Jan 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We decided to skip these after discussing with @grlee77 offline. Noting this here for clarity. Also for reference in a follow up issue ( #473 )


# Test integer histograms
# =======================

Expand All @@ -26,6 +31,7 @@ def test_wrong_source_range():
)


@pytest.mark.xfail(ON_AARCH64, reason=ON_AARCH64_REASON)
def test_negative_overflow():
im = cp.array([-1, 100], dtype=cp.int8)
frequencies, bin_centers = exposure.histogram(im)
Expand Down Expand Up @@ -294,6 +300,7 @@ def test_rescale_in_range_clip():

@pytest.mark.parametrize('dtype', [cp.int8, cp.int32, cp.float16, cp.float32,
cp.float64])
@pytest.mark.xfail(ON_AARCH64, reason=ON_AARCH64_REASON)
def test_rescale_out_range(dtype):
"""Check that output range is correct.

Expand Down Expand Up @@ -383,13 +390,15 @@ def test_rescale_output_dtype(out_range, out_dtype):
assert output_image.dtype == out_dtype


@pytest.mark.xfail(ON_AARCH64, reason=ON_AARCH64_REASON)
def test_rescale_no_overflow():
image = cp.array([-128, 0, 127], dtype=cp.int8)
output_image = exposure.rescale_intensity(image, out_range=cp.uint8)
cp.testing.assert_array_equal(output_image, [0, 128, 255])
assert output_image.dtype == cp.uint8


@pytest.mark.xfail(ON_AARCH64, reason=ON_AARCH64_REASON)
def test_rescale_float_output():
image = cp.array([-128, 0, 127], dtype=cp.int8)
output_image = exposure.rescale_intensity(image, out_range=(0, 255))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import platform

import cupy as cp
import numpy as np
import pytest

from cucim.skimage._shared import testing
from cucim.skimage._shared._warnings import expected_warnings
Expand All @@ -10,6 +13,10 @@
# SciPy >= 1.8 is installed.
cupy_warning = r"Please use `spmatrix` from the `scipy.sparse` |\A\Z"

# TODO: Some tests fail unexpectedly on ARM.
ON_AARCH64 = platform.machine() == "aarch64"
ON_AARCH64_REASON = "TODO: Test fails unexpectedly on ARM."


def make_2d_syntheticdata(lx, ly=None):
if ly is None:
Expand Down Expand Up @@ -325,6 +332,7 @@ def test_spacing_1():
assert (labels_aniso2[26:34, 13:17, 13:17] == 2).all()


@pytest.mark.xfail(ON_AARCH64, reason=ON_AARCH64_REASON)
def test_trivial_cases():
# When all voxels are labeled
img = cp.ones((10, 10))
Expand Down