diff --git a/.github/workflows/test_and_deploy.yml b/.github/workflows/test_and_deploy.yml index 79e765b4..4f941175 100644 --- a/.github/workflows/test_and_deploy.yml +++ b/.github/workflows/test_and_deploy.yml @@ -35,6 +35,7 @@ jobs: test: needs: [linting, manifest] name: Run package tests + timeout-minutes: 60 runs-on: ${{ matrix.os }} strategy: matrix: diff --git a/.gitignore b/.gitignore index 7a8b1bc9..31dec9e3 100644 --- a/.gitignore +++ b/.gitignore @@ -143,3 +143,4 @@ benchmarks/env */_version.py .idea/ +.vscode/ diff --git a/cellfinder/core/detect/detect.py b/cellfinder/core/detect/detect.py index cd4e22c5..7c614d4e 100644 --- a/cellfinder/core/detect/detect.py +++ b/cellfinder/core/detect/detect.py @@ -179,11 +179,11 @@ def main( # processes. cells = mp_3d_filter.process(async_results, locks, callback=callback) - print( - "Detection complete - all planes done in : {}".format( - datetime.now() - start_time - ) + time_elapsed = datetime.now() - start_time + logger.debug( + f"All Planes done. Found {len(cells)} cells in {format(time_elapsed)}" ) + print("Detection complete - all planes done in : {}".format(time_elapsed)) return cells diff --git a/cellfinder/core/detect/filters/volume/volume_filter.py b/cellfinder/core/detect/filters/volume/volume_filter.py index a3e4d98f..d64ae71a 100644 --- a/cellfinder/core/detect/filters/volume/volume_filter.py +++ b/cellfinder/core/detect/filters/volume/volume_filter.py @@ -142,6 +142,10 @@ def get_results(self) -> List[Cell]: ) cells = [] + + logger.debug( + f"Processing {len(self.cell_detector.coords_maps.items())} cells" + ) for cell_id, cell_points in self.cell_detector.coords_maps.items(): cell_volume = len(cell_points) @@ -191,6 +195,7 @@ def get_results(self) -> List[Cell]: ) ) + logger.debug("Finished splitting cell clusters.") return cells diff --git a/pyproject.toml b/pyproject.toml index 92cad582..17f6d235 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,6 @@ dev = [ "pre-commit", "pyinstrument", "pytest-cov", - "pytest-lazy-fixture", "pytest-mock", "pytest-qt", "pytest-timeout", @@ -125,7 +124,6 @@ commands = python -m pytest -v --color=yes deps = pytest pytest-cov - pytest-lazy-fixture pytest-mock pytest-timeout # Even though napari is a requirement for cellfinder.napari, we have to diff --git a/tests/core/test_integration/test_detection.py b/tests/core/test_integration/test_detection.py index ed289d10..a29ada9f 100644 --- a/tests/core/test_integration/test_detection.py +++ b/tests/core/test_integration/test_detection.py @@ -45,13 +45,14 @@ def background_array(): # FIXME: This isn't a very good example @pytest.mark.slow @pytest.mark.parametrize( - "n_free_cpus", + "free_cpus", [ - pytest.lazy_fixture("no_free_cpus"), - pytest.lazy_fixture("run_on_one_cpu_only"), + pytest.param("no_free_cpus", id="No free CPUs"), + pytest.param("run_on_one_cpu_only", id="One CPU"), ], ) -def test_detection_full(signal_array, background_array, n_free_cpus): +def test_detection_full(signal_array, background_array, free_cpus, request): + n_free_cpus = request.getfixturevalue(free_cpus) cells_test = main( signal_array, background_array,