Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
keithchev committed Sep 13, 2024
1 parent 8feec3b commit d90f9b0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Load environment variables from the `.env` file if it exists.
ifneq (,$(wildcard .env))
include .env
endif

.PHONY: lint
lint:
ruff check --exit-zero .
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The following is a summary of recent and planned changes to the `readlif` packag
- [Done] Use ruff for formatting and linting.
- [Done] migrate to pyproject.toml for package configuration.
- [Planned] add support for reading 32-bit images.
- [Planned] add support for extracting relevant metadata from the raw XML metadata embedded in LIFF files.
- [Planned] add support for extracting relevant metadata from the raw XML metadata embedded in LIF files.
- [Planned] refactor the `get_plane` method to make it easier to use.
- [Planned] improve tests using realistic test files from internal sources.

Expand Down
2 changes: 1 addition & 1 deletion readlif/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.6.5"
__version__ = "0.0.0"
3 changes: 1 addition & 2 deletions readlif/reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import xml.etree.ElementTree as ET
from collections import namedtuple
from functools import reduce
from itertools import compress

import numpy as np
from PIL import Image
Expand Down Expand Up @@ -829,8 +830,6 @@ def __init__(self, filename):
if len(self.offsets) - len(self.image_list) > 0:
is_image_bool_list = self._recursive_memblock_is_image(self.xml_root)
if False in is_image_bool_list:
from itertools import compress

self.offsets = list(compress(self.offsets, is_image_bool_list))

if len(self.image_list) != len(self.offsets) and not truncated:
Expand Down

0 comments on commit d90f9b0

Please sign in to comment.