python3Packages.pims: fix tests (#526365)

This commit is contained in:
Yohann Boniface 2026-06-03 00:11:01 +00:00 committed by GitHub
commit 8a570f5d13
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,30 +7,54 @@
pytestCheckHook,
scikit-image,
slicerator,
packaging,
tifffile,
jinja2,
jpype1,
matplotlib,
moviepy,
setuptools,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "pims";
version = "0.7";
format = "setuptools";
pyproject = true;
src = fetchFromGitHub {
owner = "soft-matter";
repo = "pims";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-3SBZk11w6eTZFmETMRJaYncxY38CYne1KzoF5oRgzuY=";
};
propagatedBuildInputs = [
build-system = [
setuptools
];
dependencies = [
slicerator
imageio
numpy
packaging
tifffile # imported within try-excet block so optional but setup.py requires it.
];
optional-dependencies = {
# CI says its extras
extras = [
jinja2
jpype1
matplotlib
moviepy
scikit-image
];
};
nativeCheckInputs = [
pytestCheckHook
scikit-image
];
]
++ finalAttrs.passthru.optional-dependencies.extras;
pythonImportsCheck = [ "pims" ];
@ -46,13 +70,16 @@ buildPythonPackage rec {
disabledTestPaths = [
# AssertionError: Tuples differ: (377, 505, 4) != (384, 512, 4)
"pims/tests/test_display.py"
# tests require internet connection
"pims/tests/test_bioformats.py"
];
meta = {
description = "Module to load video and sequential images in various formats";
homepage = "https://github.com/soft-matter/pims";
changelog = "https://github.com/soft-matter/pims/releases/tag/v${version}";
changelog = "https://github.com/soft-matter/pims/releases/tag/v${finalAttrs.version}";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}
})