Skip to content

Commit

Permalink
python312Packages.dask: 2024.12.1 -> 2025.1.0; various fixes (#381082)
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCao authored Feb 13, 2025
2 parents 529f6e0 + f038704 commit 63a372c
Show file tree
Hide file tree
Showing 15 changed files with 282 additions and 375 deletions.
4 changes: 2 additions & 2 deletions pkgs/development/python-modules/awkward-cpp/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@

buildPythonPackage rec {
pname = "awkward-cpp";
version = "43";
version = "44";
pyproject = true;

src = fetchPypi {
pname = "awkward_cpp";
inherit version;
hash = "sha256-we11WW7IKvZm2ghLW/gF2bcsg1MtA10rZeB5WQXSXq0=";
hash = "sha256-jcSZKI1tFrLqILUaJ9UEflGiR7aqz8vLOzAsrW08h9g=";
};

build-system = [
Expand Down
49 changes: 29 additions & 20 deletions pkgs/development/python-modules/awkward/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
stdenv,
buildPythonPackage,
pythonOlder,
fetchFromGitHub,

# build-system
Expand All @@ -13,12 +13,9 @@
fsspec,
numpy,
packaging,
typing-extensions,
importlib-metadata,

# checks
# tests
numba,
setuptools,
numexpr,
pandas,
pyarrow,
Expand All @@ -28,30 +25,27 @@

buildPythonPackage rec {
pname = "awkward";
version = "2.7.2";
version = "2.7.4";
pyproject = true;

src = fetchFromGitHub {
owner = "scikit-hep";
repo = "awkward";
tag = "v${version}";
hash = "sha256-nOKMwAQ5t8tc64bEKz0j8JxxoVQQu39Iu8Zr9cqSx7A=";
hash = "sha256-OXSl+8sfrx+JlLu40wHf+98WVNNwm9uxvsnGXRDztDg=";
};

build-system = [
hatch-fancy-pypi-readme
hatchling
];

dependencies =
[
awkward-cpp
fsspec
numpy
packaging
]
++ lib.optionals (pythonOlder "3.11") [ typing-extensions ]
++ lib.optionals (pythonOlder "3.12") [ importlib-metadata ];
dependencies = [
awkward-cpp
fsspec
numpy
packaging
];

dontUseCmakeConfigure = true;

Expand All @@ -60,19 +54,34 @@ buildPythonPackage rec {
nativeCheckInputs = [
fsspec
numba
setuptools
numexpr
pandas
pyarrow
pytest-xdist
pytestCheckHook
];

disabledTestPaths = [
# Need to be run on a GPU platform.
"tests-cuda"
disabledTests = [
# pyarrow.lib.ArrowInvalid
"test_recordarray"
];

disabledTestPaths =
[
# Need to be run on a GPU platform.
"tests-cuda"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# Fatal Python error: Segmentation fault at:
# numba/typed/typedlist.py", line 344 in append
"tests/test_0118_numba_cpointers.py"
"tests/test_0397_arrays_as_constants_in_numba.py"
"tests/test_1677_array_builder_in_numba.py"
"tests/test_2055_array_builder_check.py"
"tests/test_2349_growablebuffer_in_numba.py"
"tests/test_2408_layoutbuilder_in_numba.py"
];

meta = {
description = "Manipulate JSON-like data with NumPy-like idioms";
homepage = "https://github.com/scikit-hep/awkward";
Expand Down
8 changes: 8 additions & 0 deletions pkgs/development/python-modules/coffea/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ buildPythonPackage rec {
hatch-vcs
];

pythonRelaxDeps = [
"dask"
];

dependencies = [
aiohttp
awkward
Expand Down Expand Up @@ -106,6 +110,10 @@ buildPythonPackage rec {
# AssertionError: bug in Awkward Array: attempt to convert TypeTracerArray into a concrete array
"test_apply_to_fileset"
"test_lorentz_behavior"

# ValueError: The array to mask was deleted before it could be masked.
# If you want to construct this mask, you must either keep the array alive or use 'ak.mask' explicitly.
"test_read_nanomc"
];

__darwinAllowLocalNetworking = true;
Expand Down
12 changes: 6 additions & 6 deletions pkgs/development/python-modules/dask-awkward/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# optional-dependencies
pyarrow,

# checks
# tests
dask-histogram,
distributed,
hist,
Expand All @@ -27,14 +27,14 @@

buildPythonPackage rec {
pname = "dask-awkward";
version = "2024.12.2";
version = "2025.2.0";
pyproject = true;

src = fetchFromGitHub {
owner = "dask-contrib";
repo = "dask-awkward";
tag = version;
hash = "sha256-pL1LDW/q78V/c3Bha38k40018MFO+i8X6htYNdcsy7s=";
hash = "sha256-hhAY2cPUOYnP86FGsLvxlMeoEwY+sTrjPMKyuZrO0/M=";
};

build-system = [
Expand All @@ -53,8 +53,8 @@ buildPythonPackage rec {
io = [ pyarrow ];
};

checkInputs = [
dask-histogram
nativeCheckInputs = [
# dask-histogram (circular dependency)
distributed
hist
pandas
Expand Down Expand Up @@ -86,7 +86,7 @@ buildPythonPackage rec {
meta = {
description = "Native Dask collection for awkward arrays, and the library to use it";
homepage = "https://github.com/dask-contrib/dask-awkward";
changelog = "https://github.com/dask-contrib/dask-awkward/releases/tag/${src.tag}";
changelog = "https://github.com/dask-contrib/dask-awkward/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ veprbl ];
};
Expand Down
65 changes: 0 additions & 65 deletions pkgs/development/python-modules/dask-expr/default.nix

This file was deleted.

58 changes: 32 additions & 26 deletions pkgs/development/python-modules/dask-glm/default.nix
Original file line number Diff line number Diff line change
@@ -1,34 +1,46 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,

# build-system
setuptools-scm,

# dependencies
cloudpickle,
dask,
distributed,
fetchPypi,
multipledispatch,
pytestCheckHook,
pythonOlder,
scikit-learn,
scipy,
setuptools-scm,
sparse,
dask,

# tests
pytest-xdist,
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "dask-glm";
version = "0.3.2";
format = "setuptools";
pyproject = true;

disabled = pythonOlder "3.7";

src = fetchPypi {
inherit pname version;
hash = "sha256-yUelZoZmmKAdeZeK5zIzy16DitXq1ghRQ1gsXpMLmko=";
src = fetchFromGitHub {
owner = "dask";
repo = "dask-glm";
tag = version;
hash = "sha256-q98QMmw1toashimS16of54cgZgIPqkua3xGD1FZ1nTc=";
};

nativeBuildInputs = [ setuptools-scm ];
# ValueError: The truth value of an empty array is ambiguous. Use `array.size > 0` to check that an array is not empty.
postPatch = ''
substituteInPlace dask_glm/utils.py \
--replace-fail "if arr:" "if (arr is not None) and (arr.size > 0):"
'';

build-system = [ setuptools-scm ];

propagatedBuildInputs = [
dependencies = [
cloudpickle
distributed
multipledispatch
Expand All @@ -38,30 +50,24 @@ buildPythonPackage rec {
] ++ dask.optional-dependencies.array;

nativeCheckInputs = [
sparse
pytest-xdist
pytestCheckHook
];

pythonImportsCheck = [ "dask_glm" ];

disabledTestPaths = [
# Circular dependency with dask-ml
"dask_glm/tests/test_estimators.py"
# Test tries to imort an obsolete method
"dask_glm/tests/test_utils.py"
];

disabledTests = [
# missing fixture with distributed>=2022.8.0
"test_determinism_distributed"
# ValueError: <class 'bool'> can be computed for one-element arrays only.
"test_dot_with_sparse"
];

__darwinAllowLocalNetworking = true;

meta = with lib; {
meta = {
description = "Generalized Linear Models with Dask";
homepage = "https://github.com/dask/dask-glm/";
license = licenses.bsd3;
maintainers = [ ];
changelog = "https://github.com/dask/dask-glm/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
8 changes: 5 additions & 3 deletions pkgs/development/python-modules/dask-histogram/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@
# dependencies
boost-histogram,
dask,
dask-awkward,

# tests
pytestCheckHook,
}:

buildPythonPackage rec {
pname = "dask-histogram";
version = "2024.12.1";
version = "2025.2.0";
pyproject = true;

src = fetchFromGitHub {
owner = "dask-contrib";
repo = "dask-histogram";
tag = version;
hash = "sha256-chznfEsMFuIioIlTz6uNpVAkjMMoMXjS62R4luKxVZQ=";
hash = "sha256-5Ec/qzVc/7LDG6SJym1e76BbxmbVjKKQHckwtTs1+6M=";
};

build-system = [
Expand All @@ -35,6 +36,7 @@ buildPythonPackage rec {
dependencies = [
boost-histogram
dask
dask-awkward
];

nativeCheckInputs = [ pytestCheckHook ];
Expand All @@ -44,7 +46,7 @@ buildPythonPackage rec {
meta = {
description = "Histograms with task scheduling";
homepage = "https://dask-histogram.readthedocs.io/";
changelog = "https://github.com/dask-contrib/dask-histogram/releases/tag/${src.tag}";
changelog = "https://github.com/dask-contrib/dask-histogram/releases/tag/${version}";
license = with lib.licenses; [ bsd3 ];
maintainers = with lib.maintainers; [ veprbl ];
};
Expand Down
Loading

0 comments on commit 63a372c

Please sign in to comment.