Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142{ 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="; };
postPatch = '' substituteInPlace albumentations/core/analytics/settings.py \ --replace-fail '"telemetry": True,' '"telemetry": False,' '';
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"
# Fails due to disabling telemetry in postPatch "tests/test_telemetry.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 ]; };})