Skip to content
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
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ jobs:
python -m pip install --upgrade pip
pip install -e ".[bioformats,dev]"

# Tests forbid downloads (tests/conftest.py), so the bundle cache is
# filled here, outside pytest, when actions/cache restores nothing.
- name: Prepare the declared Fiji bundle cache
run: python -c "from polystore.imagej_runtime import FIJI_IMAGEJ_RUNTIME; print(FIJI_IMAGEJ_RUNTIME.distribution.materialize().imagej_directory)"

- name: Resolve and initialize the declared Fiji runtime
env:
POLYSTORE_LIVE_IMAGEJ_TEST: "1"
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ dev = [
"pandas>=2.3.1",
"jpype1>=1.4.0",
"roifile",
"setuptools>=77.0",
"black>=23.0.0",
"ruff>=0.1.0",
]
Expand Down
2 changes: 1 addition & 1 deletion src/polystore/atomic.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def _read_json_or_default(
return default_data

try:
with open(file_path) as f:
with open(file_path, encoding="utf-8") as f:
return json.load(f)
except (OSError, json.JSONDecodeError) as e:
logger.warning(f"Failed to read {file_path}, using default: {e}")
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bioformats_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def test_format_probe_closes_failed_reader_and_can_retry(monkeypatch, operation)


def test_format_probe_operations_share_the_context_reader_lifetime():
tree = ast.parse(Path(bioformats_java.__file__).read_text())
tree = ast.parse(Path(bioformats_java.__file__).read_text(encoding="utf-8"))
context = next(
node
for node in tree.body
Expand Down
4 changes: 2 additions & 2 deletions tests/test_publisher_admission.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@


def test_publisher_installs_the_dev_candidate_editably():
workflow = (ROOT / ".github/workflows/publish.yml").read_text()
workflow = (ROOT / ".github/workflows/publish.yml").read_text(encoding="utf-8")
commands = [shlex.split(line.strip()) for line in workflow.splitlines()]
(install,) = [command for command in commands if ".[dev]" in command]
assert install[:4] == ["python", "-m", "pip", "install"]
Expand All @@ -30,7 +30,7 @@ def test_editable_artifact_owns_checkout_path_and_roi_dev_requirement(tmp_path,
assert Path(archive.read(pth).decode().strip()).resolve() == ROOT / "src"
(metadata_name,) = [name for name in archive.namelist() if name.endswith("/METADATA")]
metadata = Parser().parsestr(archive.read(metadata_name).decode())
project = tomllib.loads((ROOT / "pyproject.toml").read_text())["project"]
project = tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))["project"]
assert metadata["Name"] == project["name"]
assert metadata["Version"] == project["version"]
requirements = [Requirement(value) for value in metadata.get_all("Requires-Dist")]
Expand Down
2 changes: 1 addition & 1 deletion tests/test_streaming_return_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
def test_no_consumer_retains_the_deleted_global_ack_alias():
root = Path(__file__).resolve().parents[1] / "src" / "polystore"
for source in root.rglob("*.py"):
tree = ast.parse(source.read_text(), filename=str(source))
tree = ast.parse(source.read_text(encoding="utf-8"), filename=str(source))
assert not any(
isinstance(node, ast.Attribute) and node.attr in {"_send_ack", "_setup_ack_socket"}
for node in ast.walk(tree)
Expand Down
59 changes: 50 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading