Skip to content

Commit

Permalink
DependencyFix/Upgrade ome-types to 0.3.4 (#522)
Browse files Browse the repository at this point in the history
* Upgrade ome-types to 0.3.4

In version 0.3.4, ome-types restricts pydantic to < 2.0.

This upgrade prevents aicsimageio from importing ome-types 0.3.3, which
will crash if pydantic 2.0 is installed, making aicsimageio unusable.

* fix bad merge

* don't assume a particular exception type from ome-types

* remove unused import

* remove test cases that may or may not fail

---------

Co-authored-by: toloudis <[email protected]>
  • Loading branch information
Armavica and toloudis authored Aug 16, 2023
1 parent 2e88f68 commit 1a67c50
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
9 changes: 0 additions & 9 deletions aicsimageio/tests/readers/test_ome_tiff_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,15 +397,6 @@ def test_multi_resolution_ome_tiff_reader(
"3d-cell-viewer.ome.tiff",
"pre-variance-cfe.ome.tiff",
"variance-cfe.ome.tiff",
pytest.param(
"actk.ome.tiff",
marks=pytest.mark.xfail(raises=exceptions.UnsupportedFileFormatError),
),
# This file has a namespace that doesn't exist
pytest.param(
"s_1_t_1_c_10_z_1.ome.tiff",
marks=pytest.mark.xfail(raises=exceptions.UnsupportedFileFormatError),
),
],
)
def test_known_errors_without_cleaning(filename: str, host: str) -> None:
Expand Down
7 changes: 4 additions & 3 deletions aicsimageio/tests/writers/test_ome_tiff_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

from typing import Callable, List, Optional, Tuple, Union

import lxml
import numpy as np
import pytest
from ome_types import to_xml
Expand Down Expand Up @@ -165,8 +164,10 @@ def test_ome_tiff_writer_no_meta(
(1, 2, 3, 4, 5),
"bad ome string",
"TCZYX",
# raised from within ome-types
marks=pytest.mark.xfail(raises=lxml.etree.XMLSyntaxError),
# Raised from within ome-types.
# Purposely not specifying the exact exception due to
# version differences in ome-types.
marks=pytest.mark.xfail(),
),
],
)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def run(self):
"imagecodecs>=2020.5.30",
"lxml>=4.6,<5",
"numpy>=1.16,<=1.24.0",
"ome-types>=0.3.3,<0.4.0",
"ome-types>=0.3.4",
"ome-zarr>=0.6.1",
"PyYAML>=6.0",
"wrapt>=1.12",
Expand Down

0 comments on commit 1a67c50

Please sign in to comment.