From 5cdfd8acfb6f8312f35c58e1dd7336eea9f4480f Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 28 Jun 2023 01:10:05 -0400 Subject: [PATCH 1/3] python310Packages.dask-histogram: init at 2023.6.0 --- .../python-modules/dask-histogram/default.nix | 49 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 51 insertions(+) create mode 100644 pkgs/development/python-modules/dask-histogram/default.nix diff --git a/pkgs/development/python-modules/dask-histogram/default.nix b/pkgs/development/python-modules/dask-histogram/default.nix new file mode 100644 index 000000000000..6b2fbb01d270 --- /dev/null +++ b/pkgs/development/python-modules/dask-histogram/default.nix @@ -0,0 +1,49 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, boost-histogram +, dask +, hatchling +, hatch-vcs +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "dask-histogram"; + version = "2023.6.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "dask-contrib"; + repo = "dask-histogram"; + rev = "refs/tags/${version}"; + hash = "sha256-9b2+vrUH8lZYsEbJg+GmY5zHZ+7PyA9NV2h5VAN0J1s="; + }; + + nativeBuildInputs = [ + hatchling + hatch-vcs + ]; + + propagatedBuildInputs = [ + boost-histogram + dask + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "dask_histogram" + ]; + + meta = with lib; { + description = "Histograms with task scheduling"; + homepage = "https://dask-histogram.readthedocs.io/"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index ad48d07ba5d8..63bff8760544 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2351,6 +2351,8 @@ self: super: with self; { dask-glm = callPackage ../development/python-modules/dask-glm { }; + dask-histogram = callPackage ../development/python-modules/dask-histogram { }; + dask-image = callPackage ../development/python-modules/dask-image { }; dask-jobqueue = callPackage ../development/python-modules/dask-jobqueue { }; From e7c7d9284503e20de502572aa8ff0ac5a72599a7 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 28 Jun 2023 01:10:38 -0400 Subject: [PATCH 2/3] python310Packages.correctionlib: init at 2.2.2 --- .../python-modules/correctionlib/default.nix | 64 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 66 insertions(+) create mode 100644 pkgs/development/python-modules/correctionlib/default.nix diff --git a/pkgs/development/python-modules/correctionlib/default.nix b/pkgs/development/python-modules/correctionlib/default.nix new file mode 100644 index 000000000000..41ac4a8f8f36 --- /dev/null +++ b/pkgs/development/python-modules/correctionlib/default.nix @@ -0,0 +1,64 @@ +{ lib +, buildPythonPackage +, fetchPypi +, cmake +, numpy +, scikit-build +, setuptools +, setuptools-scm +, pybind11 +, pydantic +, pytestCheckHook +, rich +, scipy +, zlib +}: + +buildPythonPackage rec { + pname = "correctionlib"; + version = "2.2.2"; + format = "pyproject"; + + src = fetchPypi { + inherit pname version; + hash = "sha256-h3eggtPLSF/8ShQ5xzowZW1KSlcI/YBsPu3lsSyzHkw="; + }; + + nativeBuildInputs = [ + cmake + numpy + scikit-build + setuptools + setuptools-scm + pybind11 + ]; + + buildInputs = [ + zlib + ]; + + propagatedBuildInputs = [ + pydantic + rich + ]; + + dontUseCmakeConfigure = true; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeCheckInputs = [ + pytestCheckHook + scipy + ]; + + pythonImportsCheck = [ + "correctionlib" + ]; + + meta = with lib; { + description = "Provides a well-structured JSON data format for a wide variety of ad-hoc correction factors encountered in a typical HEP analysis"; + homepage = "https://cms-nanoaod.github.io/correctionlib/"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 63bff8760544..338753baf120 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1719,6 +1719,8 @@ self: super: with self; { connio = callPackage ../development/python-modules/connio { }; + correctionlib = callPackage ../development/python-modules/correctionlib { }; + coqpit = callPackage ../development/python-modules/coqpit { }; cepa = callPackage ../development/python-modules/cepa { }; From 0937381495f2cbb16b7ed719546a1cbdaf6ed51d Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Wed, 28 Jun 2023 01:11:18 -0400 Subject: [PATCH 3/3] python310Packages.coffea: init at 2023.6.0.rc1 --- .../python-modules/coffea/default.nix | 97 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 99 insertions(+) create mode 100644 pkgs/development/python-modules/coffea/default.nix diff --git a/pkgs/development/python-modules/coffea/default.nix b/pkgs/development/python-modules/coffea/default.nix new file mode 100644 index 000000000000..ac0c293e29ab --- /dev/null +++ b/pkgs/development/python-modules/coffea/default.nix @@ -0,0 +1,97 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, hatchling +, hatch-vcs +, awkward +, uproot +, dask +, dask-awkward +, dask-histogram +, correctionlib +, pyarrow +, fsspec +, matplotlib +, numba +, numpy +, scipy +, tqdm +, lz4 +, cloudpickle +, toml +, mplhep +, packaging +, pandas +, hist +, cachetools +, distributed +, pyinstrument +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "coffea"; + version = "2023.6.0.rc1"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "CoffeaTeam"; + repo = pname; + rev = "refs/tags/v${version}"; + hash = "sha256-TEtQ2KnwcylQbprlRtgHv7HIFg7roDWD4TihrQE4icU="; + }; + + postPatch = '' + substituteInPlace pyproject.toml \ + --replace "numba>=0.57.0" "numba" + ''; + + nativeBuildInputs = [ + hatchling + hatch-vcs + ]; + + propagatedBuildInputs = [ + awkward + uproot + dask + dask.optional-dependencies.array + dask-awkward + dask-histogram + correctionlib + pyarrow + fsspec + matplotlib + numba + numpy + scipy + tqdm + lz4 + cloudpickle + toml + mplhep + packaging + pandas + hist + cachetools + ]; + + SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeCheckInputs = [ + distributed + pyinstrument + pytestCheckHook + ]; + + pythonImportsCheck = [ + "coffea" + ]; + + meta = with lib; { + description = "Basic tools and wrappers for enabling not-too-alien syntax when running columnar Collider HEP analysis"; + homepage = "https://github.com/CoffeaTeam/coffea"; + license = with licenses; [ bsd3 ]; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 338753baf120..63377230e2fb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1707,6 +1707,8 @@ self: super: with self; { cexprtk = callPackage ../development/python-modules/cexprtk { }; + coffea = callPackage ../development/python-modules/coffea { }; + cohere = callPackage ../development/python-modules/cohere { }; coincurve = callPackage ../development/python-modules/coincurve {