Closed nthndy closed 1 year ago
Looks like the tests are failing - specifically this one which tests whether a 3D (volumetric) input can be used. Your code now throws an error when given an image volume, causing the test to fail:
=================================== FAILURES ===================================
___________________________ test_intensity_image[3] ____________________________
default_rng = Generator(PCG64) at 0x7F974E7F4580, ndim = 3
@pytest.mark.parametrize("ndim", [2, 3])
def test_intensity_image(default_rng, ndim):
"""Test using an intensity image."""
img, centroids = create_test_image(ndim=ndim, binary=True)
intensity_image = img * default_rng.uniform(size=img.shape)
> objects = utils.segmentation_to_objects(
img[np.newaxis, ...],
intensity_image=intensity_image[np.newaxis, ...],
use_weighted_centroid=True,
properties=("max_intensity",),
)
tests/test_utils.py:124:
you can look at the log here: https://github.com/quantumjot/BayesianTracker/actions/runs/3437960703/jobs/5733408248#step:6:122
trying an alternate approach to assessing whether an input intensity image is multichannel or not: the previous method could read a TZXY image as multichannel hence the test failing. Afaik there's not rigorous way of assessing whether the last dimension encodes the image channels without having a separate parameter to define. Still need to fix some other ways the localisation could fail though, just wanted to check this first.
Base: 86.93% // Head: 86.88% // Decreases project coverage by -0.05%
:warning:
Coverage data is based on head (
f728294
) compared to base (86ec60b
). Patch coverage: 66.66% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
Preview page for your plugin is ready here: https://preview.napari-hub.org/quantumjot/BayesianTracker/188 Updated: 2023-01-19T17:17:50.164015
@nthndy - try merging with main now. That should fix the tests failing.
Lmk if you'd rather this just switched
USE_WEIGHTED = False
, thought it more sensible to warn the user than redefine their input parameters.