From cfc60ec2b0d3132dbd7b8a2358192a4cf52190cc Mon Sep 17 00:00:00 2001 From: Max Gamill Date: Tue, 8 Oct 2024 16:16:57 +0100 Subject: [PATCH 1/2] re-added dnatraing import into conftest --- tests/conftest.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/conftest.py b/tests/conftest.py index 705942ada6..e7bcf1cc24 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,6 +21,7 @@ from topostats.grainstats import GrainStats from topostats.io import LoadScans, read_yaml from topostats.plotting import TopoSum +from topostats.tracing.dnatracing import dnaTrace from topostats.utils import _get_mask, get_mask, get_thresholds # This is required because of the inheritance used throughout From 5ac50edf971a8848dbdfda55ec7d444348481c97 Mon Sep 17 00:00:00 2001 From: Max Gamill Date: Tue, 8 Oct 2024 16:17:37 +0100 Subject: [PATCH 2/2] added disordered trace broad except ValueError comment --- topostats/tracing/disordered_tracing.py | 1 + 1 file changed, 1 insertion(+) diff --git a/topostats/tracing/disordered_tracing.py b/topostats/tracing/disordered_tracing.py index a29f3cce4c..355bf74d46 100644 --- a/topostats/tracing/disordered_tracing.py +++ b/topostats/tracing/disordered_tracing.py @@ -364,6 +364,7 @@ def trace_image_disordered( # pylint: disable=too-many-arguments,too-many-local disordered_trace_crop_data[f"grain_{cropped_image_index}"] = disordered_trace_images disordered_trace_crop_data[f"grain_{cropped_image_index}"]["bbox"] = bboxs[cropped_image_index] + # when skel too small, pruned to 0's, skan -> ValueError -> skipped except Exception as e: # pylint: disable=broad-exception-caught LOGGER.error( f"[{filename}] : Disordered tracing of grain"