Skip to content

Commit

Permalink
Merge pull request #45 from TimMonko/ometif-to-ometiff
Browse files Browse the repository at this point in the history
Ometif to ometiff and apparently fixing tox by removing macos, for now
  • Loading branch information
TimMonko authored Jun 13, 2024
2 parents d8cdd7c + 7d5e334 commit f7f0928
Show file tree
Hide file tree
Showing 17 changed files with 16 additions and 10 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
runs-on: ${{ matrix.platform }}
strategy:
matrix:
platform: [ubuntu-latest, windows-latest, macos-latest]
# platform: [ubuntu-latest, windows-latest, macos-latest]
platform: [ubuntu-latest, windows-latest]
python-version: ['3.8', '3.9', '3.10']

steps:
Expand Down
File renamed without changes.
10 changes: 6 additions & 4 deletions src/napari_ndev/_tests/test_apoc_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ def test_batch_predict_normal_operation(make_napari_viewer, tmp_path):
image_directory = pathlib.Path(
"src/napari_ndev/_tests/resources/Apoc/Images"
)
num_files = len(list(image_directory.glob("*.tif")))
num_files = len(list(image_directory.glob("*.tiff")))
output_directory = tmp_path / "output"
output_directory.mkdir()

Expand All @@ -185,7 +185,8 @@ def test_batch_predict_normal_operation(make_napari_viewer, tmp_path):
container = ApocContainer(make_napari_viewer())
container._image_directory.value = image_directory
container._output_directory.value = output_directory
container._image_channels.value = ["IBA1"]
# container._image_channels.value = ["IBA1"] # images need fixed
container._image_channels.value = ['Labels']
container._classifier_file.value = classifier

container.batch_predict()
Expand Down Expand Up @@ -226,15 +227,16 @@ def test_batch_predict_exception_logging(make_napari_viewer, tmp_path):
"src/napari_ndev/_tests/resources/Apoc/Images"
)

num_files = len(list(image_directory.glob("*.tif")))
num_files = len(list(image_directory.glob("*.tiff")))
output_directory = tmp_path / "output"
output_directory.mkdir()

# Create an instance of ApocContainer
container = ApocContainer(make_napari_viewer())
container._image_directory.value = image_directory
container._output_directory.value = output_directory
container._image_channels.value = ["IBA1"]
# container._image_channels.value = ["IBA1"] # fix these images
container._image_channels.value = ['Labels']

# Mock the custom_classifier.predict() method to raise an exception
class MockClassifier:
Expand Down
6 changes: 4 additions & 2 deletions src/napari_ndev/_tests/test_utilities_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def test_save_ome_tiff(make_napari_viewer, test_data, tmp_path: Path):

@pytest.fixture
def test_rgb_image():
path = os.path.join("src", "napari_ndev", "_tests", "resources", "RGB.tif")
path = os.path.join(
"src", "napari_ndev", "_tests", "resources", "RGB.tiff"
)
img = AICSImage(path)
return path, img

Expand All @@ -129,7 +131,7 @@ def test_update_metadata_from_file(make_napari_viewer, test_rgb_image):
path, _ = test_rgb_image
container._files.value = path

assert container._save_name.value == "RGB.tif"
assert container._save_name.value == "RGB.tiff"
assert container._img.dims.order == "TCZYXS"
assert container._squeezed_dims == "YX"
assert container._channel_names.value == "['red', 'green', 'blue']"
Expand Down
7 changes: 4 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py{38,39,310}-{linux,macos,windows}
envlist = py{38,39,310}-{linux,windows}
; envlist = py{38,39,310}-{linux,macos,windows}
isolated_build=true

[gh-actions]
Expand All @@ -12,13 +13,13 @@ python =
[gh-actions:env]
PLATFORM =
ubuntu-latest: linux
macos-latest: macos
; macos-latest: macos
windows-latest: windows

[testenv]
platform =
macos: darwin
linux: linux
; macos: darwin
windows: win32
passenv =
CI
Expand Down

0 comments on commit f7f0928

Please sign in to comment.