From 64fea529d8f6e76a520bfb5efeeb97e8ff6df37b Mon Sep 17 00:00:00 2001 From: Jan Eglinger Date: Mon, 29 Jul 2024 15:58:15 +0200 Subject: [PATCH] Use lowercase function names everywhere (also in tests) --- pyproject.toml | 2 +- tests/alignment/test_alignment.py | 6 +++--- tests/hcs/cellvoyager/__init__.py | 0 .../{test_StackAcquisition.py => test_stack_acquisition.py} | 0 ...llVoyagerWellAcquisition.py => test_well_acquisition.py} | 0 ...kAcquisition.py => test_z_adjusted_stack_acquisition.py} | 0 tests/hcs/imagexpress/__init__.py | 0 .../{test_ImageXpress.py => test_plate_acquisitions.py} | 0 ...ageXpressWellAcquisition.py => test_well_acquisition.py} | 0 tests/hcs/test_converter.py | 2 +- tests/io/{test_ChannelMetadata.py => test_metadata.py} | 0 tests/io/{test_MetaSeriesTiff.py => test_metaseries.py} | 0 tests/stitching/test_Tile.py | 6 +++--- .../stitching/{test_BoundingBox.py => test_bounding_box.py} | 0 tests/stitching/{test_TileStitcher.py => test_dask.py} | 0 tests/{test_UIntHistogram.py => test_histogram.py} | 0 ...etaSeriesUtils_dask.py => test_metaseries_utils_dask.py} | 0 17 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 tests/hcs/cellvoyager/__init__.py rename tests/hcs/cellvoyager/{test_StackAcquisition.py => test_stack_acquisition.py} (100%) rename tests/hcs/cellvoyager/{test_CellVoyagerWellAcquisition.py => test_well_acquisition.py} (100%) rename tests/hcs/cellvoyager/{test_ZAdjustedStackAcquisition.py => test_z_adjusted_stack_acquisition.py} (100%) create mode 100644 tests/hcs/imagexpress/__init__.py rename tests/hcs/imagexpress/{test_ImageXpress.py => test_plate_acquisitions.py} (100%) rename tests/hcs/imagexpress/{test_ImageXpressWellAcquisition.py => test_well_acquisition.py} (100%) rename tests/io/{test_ChannelMetadata.py => test_metadata.py} (100%) rename tests/io/{test_MetaSeriesTiff.py => test_metaseries.py} (100%) rename tests/stitching/{test_BoundingBox.py => test_bounding_box.py} (100%) rename tests/stitching/{test_TileStitcher.py => test_dask.py} (100%) rename tests/{test_UIntHistogram.py => test_histogram.py} (100%) rename tests/{test_MetaSeriesUtils_dask.py => test_metaseries_utils_dask.py} (100%) diff --git a/pyproject.toml b/pyproject.toml index df115e9f..71c4c5e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -123,7 +123,7 @@ source = "vcs" ignore = ["FA100", "S101"] [tool.ruff.lint.extend-per-file-ignores] -"**/tests/*" = ["F811", "INP001", "N802", "SLF001"] +"**/tests/*" = ["F811", "INP001", "SLF001"] "**/examples/*" = ["INP001"] [tool.setuptools_scm] diff --git a/tests/alignment/test_alignment.py b/tests/alignment/test_alignment.py index 36ea87f0..2293e552 100644 --- a/tests/alignment/test_alignment.py +++ b/tests/alignment/test_alignment.py @@ -38,7 +38,7 @@ def tiles() -> list[Tile]: ] -def test_StageAlignment(tiles): +def test_stage_alignment(tiles): from faim_ipa.alignment import StageAlignment alignment = StageAlignment(tiles) @@ -53,7 +53,7 @@ def test_StageAlignment(tiles): assert tile.position.x in [0, 511, 512, 522] -def test_GridAlignment(tiles): +def test_grid_alignment(tiles): from faim_ipa.alignment import GridAlignment alignment = GridAlignment(tiles) @@ -68,7 +68,7 @@ def test_GridAlignment(tiles): assert tile.position.x in [0, 512] -def test_AbstractAlignment(tiles): +def test_abstract_alignment(tiles): from faim_ipa.alignment.alignment import AbstractAlignment with pytest.raises(TypeError): diff --git a/tests/hcs/cellvoyager/__init__.py b/tests/hcs/cellvoyager/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/hcs/cellvoyager/test_StackAcquisition.py b/tests/hcs/cellvoyager/test_stack_acquisition.py similarity index 100% rename from tests/hcs/cellvoyager/test_StackAcquisition.py rename to tests/hcs/cellvoyager/test_stack_acquisition.py diff --git a/tests/hcs/cellvoyager/test_CellVoyagerWellAcquisition.py b/tests/hcs/cellvoyager/test_well_acquisition.py similarity index 100% rename from tests/hcs/cellvoyager/test_CellVoyagerWellAcquisition.py rename to tests/hcs/cellvoyager/test_well_acquisition.py diff --git a/tests/hcs/cellvoyager/test_ZAdjustedStackAcquisition.py b/tests/hcs/cellvoyager/test_z_adjusted_stack_acquisition.py similarity index 100% rename from tests/hcs/cellvoyager/test_ZAdjustedStackAcquisition.py rename to tests/hcs/cellvoyager/test_z_adjusted_stack_acquisition.py diff --git a/tests/hcs/imagexpress/__init__.py b/tests/hcs/imagexpress/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/hcs/imagexpress/test_ImageXpress.py b/tests/hcs/imagexpress/test_plate_acquisitions.py similarity index 100% rename from tests/hcs/imagexpress/test_ImageXpress.py rename to tests/hcs/imagexpress/test_plate_acquisitions.py diff --git a/tests/hcs/imagexpress/test_ImageXpressWellAcquisition.py b/tests/hcs/imagexpress/test_well_acquisition.py similarity index 100% rename from tests/hcs/imagexpress/test_ImageXpressWellAcquisition.py rename to tests/hcs/imagexpress/test_well_acquisition.py diff --git a/tests/hcs/test_converter.py b/tests/hcs/test_converter.py index 60d4cf43..96c170f7 100644 --- a/tests/hcs/test_converter.py +++ b/tests/hcs/test_converter.py @@ -22,7 +22,7 @@ from faim_ipa.stitching.tile import Tile, TilePosition -def test_NGFFPlate(): +def test_ngff_plate(): root_dir = "/path/to/root_dir" name = "plate_name" layout = PlateLayout.I18 diff --git a/tests/io/test_ChannelMetadata.py b/tests/io/test_metadata.py similarity index 100% rename from tests/io/test_ChannelMetadata.py rename to tests/io/test_metadata.py diff --git a/tests/io/test_MetaSeriesTiff.py b/tests/io/test_metaseries.py similarity index 100% rename from tests/io/test_MetaSeriesTiff.py rename to tests/io/test_metaseries.py diff --git a/tests/stitching/test_Tile.py b/tests/stitching/test_Tile.py index eec4497b..54ea8015 100644 --- a/tests/stitching/test_Tile.py +++ b/tests/stitching/test_Tile.py @@ -94,7 +94,7 @@ def test_get_position(): assert tile.get_yx_position() == (2, 7) -def test_Tile_data_mask(): +def test_tile_data_mask(): tile = Tile( path="path", shape=(10, 10), @@ -106,7 +106,7 @@ def test_Tile_data_mask(): assert mask.all() -def test_CVStackedTile_data_mask(): +def test_cellvoyager_data_mask(): from faim_ipa.hcs.cellvoyager.tile import StackedTile tile = StackedTile( @@ -123,7 +123,7 @@ def test_CVStackedTile_data_mask(): assert mask[2].all() -def test_VisiViewStackedTile_data_mask(): +def test_visiview_data_mask(): from faim_ipa.visiview.acquisition import StackedTile tile = StackedTile( diff --git a/tests/stitching/test_BoundingBox.py b/tests/stitching/test_bounding_box.py similarity index 100% rename from tests/stitching/test_BoundingBox.py rename to tests/stitching/test_bounding_box.py diff --git a/tests/stitching/test_TileStitcher.py b/tests/stitching/test_dask.py similarity index 100% rename from tests/stitching/test_TileStitcher.py rename to tests/stitching/test_dask.py diff --git a/tests/test_UIntHistogram.py b/tests/test_histogram.py similarity index 100% rename from tests/test_UIntHistogram.py rename to tests/test_histogram.py diff --git a/tests/test_MetaSeriesUtils_dask.py b/tests/test_metaseries_utils_dask.py similarity index 100% rename from tests/test_MetaSeriesUtils_dask.py rename to tests/test_metaseries_utils_dask.py