Files
nixpkgs/pkgs/development/python-modules/dask-image/default.nix
T
Peder Bergebakken Sundt 5aba99242e treewide: fix typos in comments
Made with

```shell
git restore .
fd '\.nix$' pkgs/ --type f -j1 -x bash -xc "$(cat <<"EOF"
    typos --no-check-filenames --write-changes "$1"
    git diff --exit-code "$1" && exit
    #( git diff "$1" | grep -qE "^\+ +[^# ]") && git restore "$1"
    count1="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> ' | wc -l )"
    count2="$( bat --language nix --diff --style changes "$1" --theme "Monokai Extended" --color always | aha --no-header | grep -E '^<span style="color:olive;">~</span> (<span style="color:#f8f8f2;"> *</span>)?<span style="color:#75715e;">.*</span>$' | wc -l )"
    [[ $count1 -ne $count2 ]] && git restore "$1"
EOF
)" -- {}
```

and filtered with `GIT_DIFF_OPTS='--unified=15' git -c interactive.singleKey=true add --patch`

I initially tried using the tree-sitter cli, python bindings and even ast-grep through various means, but this is what I ended up with.
2025-02-24 10:44:41 +01:00

79 lines
1.5 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
setuptools-scm,
# dependencies
dask,
numpy,
scipy,
pandas,
pims,
# tests
pyarrow,
pytestCheckHook,
scikit-image,
}:
buildPythonPackage rec {
pname = "dask-image";
version = "2024.5.3";
pyproject = true;
src = fetchFromGitHub {
owner = "dask";
repo = "dask-image";
tag = "v${version}";
hash = "sha256-kXCAqJ2Zgo/2Khvo2YcK+n4oGM219GyQ2Hsq9re1Lac=";
};
postPatch = ''
substituteInPlace dask_image/ndinterp/__init__.py \
--replace-fail "out_bounds.ptp(axis=1)" "np.ptp(out_bounds, axis=1)"
'';
build-system = [
setuptools
setuptools-scm
];
dependencies = [
dask
numpy
scipy
pandas
pims
];
nativeCheckInputs = [
pyarrow
pytestCheckHook
scikit-image
];
pythonImportsCheck = [ "dask_image" ];
disabledTests = [
# The following tests are from 'tests/test_dask_image/test_ndmeasure/test_find_objects.py' and
# fail because of errors on numpy slices
# AttributeError: 'str' object has no attribute 'start'
"test_find_objects"
"test_3d_find_objects"
# AssertionError (comparing slices)
"test_find_objects_with_empty_chunks"
];
meta = {
description = "Distributed image processing";
homepage = "https://github.com/dask/dask-image";
changelog = "https://github.com/dask/dask-image/releases/tag/v${version}";
license = lib.licenses.bsdOriginal;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}