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

Fix well naming case mismatch bug #254

Merged
merged 7 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion iohub/ngff/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def __delitem__(self, key):

def __contains__(self, key):
key = normalize_storage_path(key)
return key in self._member_names
return key.lower() in [name.lower() for name in self._member_names]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I consider this a bug if a key in node is True does not guarantee that node[key] succeeds on all platforms.


def __iter__(self):
yield from self._member_names
Expand Down
9 changes: 5 additions & 4 deletions tests/ngff/test_ngff.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,17 +681,18 @@ def test_position_scale(channels_and_random_5d):
assert dataset.scale == scale


@pytest.mark.skip(reason="https://github.com/czbiohub-sf/iohub/issues/255")
def test_combine_fovs_to_hcs():
fovs = {}
fov_paths = ("A/1/0", "B/1/0", "H/12/9")
for path in fov_paths:
with open_ome_zarr(hcs_ref) as hcs_store:
with open_ome_zarr(hcs_ref) as hcs_store:
for path in fov_paths:
fovs[path] = hcs_store["B/03/0"]
with TemporaryDirectory() as temp_dir:
store_path = os.path.join(temp_dir, "combined.zarr")
combined_plate = Plate.from_positions(store_path, fovs)
Plate.from_positions(store_path, fovs).close()
# read data with an external reader
ext_reader = Reader(parse_url(combined_plate.zgroup.store.path))
ext_reader = Reader(parse_url(store_path))
node = list(ext_reader())[0]
plate_meta = node.metadata["metadata"]["plate"]
assert len(plate_meta["rows"]) == 3
Expand Down
4 changes: 2 additions & 2 deletions tests/ngff/test_ngff_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ def test_create_empty_plate(plate_setup, extra_channels):
setup=apply_transform_czyx_setup(),
constant=st.integers(min_value=1, max_value=5),
)
@settings(max_examples=5, deadline=1200)
@settings(max_examples=5, deadline=None)
def test_apply_transform_to_zyx_and_save(setup, constant):
(
position_keys,
Expand Down Expand Up @@ -562,7 +562,7 @@ def test_apply_transform_to_zyx_and_save(setup, constant):
constant=st.integers(min_value=1, max_value=3),
num_processes=st.integers(min_value=1, max_value=3),
)
@settings(max_examples=3, deadline=2000)
@settings(max_examples=3, deadline=None)
def test_process_single_position(setup, constant, num_processes):
# def test_process_single_position(setup, constant, num_processes):
(
Expand Down
Loading