-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature/ome-metadata-xslt-spec (#289)
* Write generic function for XSLT transformation * Add prop def for ome meta for aicsimage and reader * Passthrough impl for OmeTiffReader * Add basic tests for all readers * Add lxml to deps * Bump min ome-types * Change docstring of NotImplError
- Loading branch information
Jackson Maxfield Brown
authored
Jul 16, 2021
1 parent
fee46ad
commit 3b71939
Showing
7 changed files
with
163 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import pytest | ||
from ome_types import OME | ||
|
||
from aicsimageio import AICSImage | ||
|
||
from ..conftest import get_resource_full_path, host | ||
|
||
############################################################################### | ||
|
||
|
||
@host | ||
@pytest.mark.parametrize( | ||
"filename", | ||
[ | ||
# DefaultReader | ||
pytest.param( | ||
"example.png", | ||
marks=pytest.mark.raises(execeptions=NotImplementedError), | ||
), | ||
# TiffReader | ||
pytest.param( | ||
"s_1_t_10_c_3_z_1.tiff", | ||
marks=pytest.mark.raises(execeptions=NotImplementedError), | ||
), | ||
# OmeTiffReader | ||
("actk.ome.tiff"), | ||
# LifReader | ||
pytest.param( | ||
"tiled.lif", | ||
marks=pytest.mark.raises(execeptions=NotImplementedError), | ||
), | ||
# CziReader | ||
pytest.param( | ||
"s_1_t_1_c_1_z_1.czi", | ||
marks=pytest.mark.raises(execeptions=NotImplementedError), | ||
), | ||
pytest.param( | ||
"RGB-8bit.czi", | ||
marks=pytest.mark.raises(execeptions=NotImplementedError), | ||
), | ||
], | ||
) | ||
def test_ome_metadata(filename: str, host: str) -> None: | ||
# Get full filepath | ||
uri = get_resource_full_path(filename, host) | ||
|
||
# Init image | ||
img = AICSImage(uri) | ||
|
||
# Test the transform | ||
assert isinstance(img.ome_metadata, OME) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters