python3Packages.albumentationx: init at 2.3.3

This commit is contained in:
Gaetan Lepage
2026-07-21 13:02:33 +00:00
parent 21641d653f
commit 7cd3db8921
2 changed files with 135 additions and 0 deletions
@@ -0,0 +1,133 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
hatchling,
# dependencies
albucore,
numpy,
pydantic,
pyyaml,
scipy,
typing-extensions,
# optional-dependencies
opencv-contrib-python,
opencv-python,
opencv-python-headless,
huggingface-hub,
pillow,
torch,
pyvips,
# tests
deepdiff,
defusedxml,
gitMinimal,
hypothesis,
pytest-mock,
pytestCheckHook,
scikit-image,
scikit-learn,
torchvision,
}:
buildPythonPackage (finalAttrs: {
pname = "albumentationsx";
version = "2.3.3";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "albumentations-team";
repo = "AlbumentationsX";
tag = finalAttrs.version;
hash = "sha256-exCQwduQM29K5Omb48KYIqm2D4yfOKFFEr37zhIvACY=";
};
build-system = [
hatchling
];
dependencies = [
albucore
numpy
pydantic
pyyaml
scipy
typing-extensions
];
optional-dependencies = {
contrib = [
opencv-contrib-python
];
contrib-headless = [
# opencv-contrib-python-headless
];
gui = [
opencv-python
];
headless = [
opencv-python-headless
];
hub = [
huggingface-hub
];
pillow = [
pillow
];
pytorch = [
torch
];
pyvips = [
pyvips
];
text = [
pillow
];
};
pythonImportsCheck = [ "albumentations" ];
nativeCheckInputs = [
deepdiff
defusedxml
gitMinimal
hypothesis
pillow
pytest-mock
pytestCheckHook
scikit-image
scikit-learn
torch
torchvision
];
disabledTests = [
# ImportError: cannot import name 'benchmark_coverage' from 'tools'
"test_direct_script_ignores_unrelated_tools_package"
# AssertionError: Arrays are not almost equal to 6 decimals
"test_pca_inverse_transform"
];
disabledTestPaths = [
# Infinite recursion with albu-spec
"tests/test_type_consistency.py"
# Requires unfree google-docstring-parser
"tests/test_docstrings.py"
];
meta = {
description = "Python library for image augmentation";
homepage = "https://github.com/albumentations-team/AlbumentationsX";
changelog = "https://github.com/albumentations-team/AlbumentationsX/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
})
+2
View File
@@ -658,6 +658,8 @@ self: super: with self; {
albucore = callPackage ../development/python-modules/albucore { };
albumentationsx = callPackage ../development/python-modules/albumentationsx { };
ale-py = callPackage ../development/python-modules/ale-py { };
alectryon = callPackage ../development/python-modules/alectryon { };