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

Remove pytest-lazy-fixture due to incompatibility with pytest v8.0.0 #369

Merged
merged 14 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
test:
needs: [linting, manifest]
name: Run package tests
timeout-minutes: 20
runs-on: ${{ matrix.os }}
strategy:
matrix:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,4 @@ benchmarks/env
*/_version.py

.idea/
.vscode/
8 changes: 4 additions & 4 deletions cellfinder/core/detect/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
5 changes: 5 additions & 0 deletions cellfinder/core/detect/filters/volume/volume_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -191,6 +195,7 @@ def get_results(self) -> List[Cell]:
)
)

logger.debug("Finished splitting cell clusters.")
return cells


Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ dev = [
"pre-commit",
"pyinstrument",
"pytest-cov",
"pytest-lazy-fixture",
"pytest-mock",
"pytest-qt",
"pytest-timeout",
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions tests/core/test_integration/test_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Loading