python313Packages.scipp: init at 25.05.1 (#410117)

This commit is contained in:
Doron Behar
2025-06-17 18:16:33 +03:00
committed by GitHub
6 changed files with 391 additions and 0 deletions
+42
View File
@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
# This is the baseType needed by scipp - the main package that depends on
# this package.
baseType ? "uint64_t",
}:
stdenv.mkDerivation (finalAttrs: {
pname = "units-llnl";
version = "0.13.1";
src = fetchFromGitHub {
owner = "LLNL";
repo = "units";
tag = "v${finalAttrs.version}";
hash = "sha256-thJnBT+wQPF9obzXk/T6H9lvPEAH5REx3YhBXEd7n7c=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
];
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeFeature "UNITS_BASE_TYPE" baseType)
];
doCheck = true;
meta = {
description = "Run-time C++ library for working with units of measurement and conversions between them and with string representations of units and measurements";
homepage = "https://github.com/llnl/units";
changelog = "https://github.com/llnl/units/blob/${finalAttrs.src.tag}/CHANGELOG.md";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "units-llnl";
platforms = lib.platforms.all;
};
})
@@ -0,0 +1,52 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
setuptools-scm,
# tests
matplotlib,
ipympl,
pytestCheckHook,
}:
buildPythonPackage rec {
pname = "mpltoolbox";
version = "25.04.0";
pyproject = true;
src = fetchFromGitHub {
owner = "scipp";
repo = "mpltoolbox";
tag = version;
hash = "sha256-+LqPTlVbSxuewWuPNUfGdgQjWFxo7s2i3e21WkNNK78=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
matplotlib
];
nativeCheckInputs = [
ipympl
pytestCheckHook
];
pythonImportsCheck = [
"mpltoolbox"
];
meta = {
description = "Interactive tools for Matplotlib";
homepage = "https://scipp.github.io/mpltoolbox/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ doronbehar ];
};
}
@@ -0,0 +1,117 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
# build-system
setuptools,
setuptools-scm,
# dependencies
lazy-loader,
matplotlib,
# tests
pytestCheckHook,
anywidget,
graphviz,
h5py,
ipympl,
ipywidgets,
mpltoolbox,
pandas,
plotly,
pooch,
pyarrow,
pythreejs,
scipp,
scipy,
xarray,
# tests data
symlinkJoin,
fetchurl,
}:
buildPythonPackage rec {
pname = "plopp";
version = "25.06.0";
pyproject = true;
src = fetchFromGitHub {
owner = "scipp";
repo = "plopp";
tag = version;
hash = "sha256-SwF0bUU/DAAJ5+0WvZgwqEw6IoaqdbKj0GkCgffGclA=";
};
build-system = [
setuptools
setuptools-scm
];
dependencies = [
lazy-loader
matplotlib
];
nativeCheckInputs = [
pytestCheckHook
anywidget
graphviz
h5py
ipympl
ipywidgets
mpltoolbox
pandas
plotly
pooch
pyarrow
pythreejs
scipp
scipy
xarray
];
env = {
# See: https://github.com/scipp/plopp/blob/25.05.0/src/plopp/data/examples.py
PLOPP_DATA_DIR =
let
# NOTE this might be changed by upstream in the future.
_version = "1";
in
symlinkJoin {
name = "plopp-test-data";
paths =
lib.mapAttrsToList
(
file: hash:
fetchurl {
url = "https://public.esss.dk/groups/scipp/plopp/${_version}/${file}";
inherit hash;
downloadToTemp = true;
recursiveHash = true;
postFetch = ''
mkdir -p $out/${_version}
mv $downloadedFile $out/${_version}/${file}
'';
}
)
{
"nyc_taxi_data.h5" = "sha256-hso8ESM+uLRf4y2CW/7dpAmm/kysAfJY3b+5vz78w4Q=";
"teapot.h5" = "sha256-i6hOw72ce1cBT6FMQTdCEKVe0WOMOjApKperGHoPW34=";
};
};
};
pythonImportsCheck = [
"plopp"
];
meta = {
description = "Visualization library for scipp";
homepage = "https://scipp.github.io/plopp/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ doronbehar ];
};
}
@@ -0,0 +1,114 @@
{
lib,
stdenv,
buildPythonPackage,
fetchFromGitHub,
# build-system
scikit-build-core,
setuptools,
setuptools-scm,
# nativeBuildInputs
cmake,
ninja,
# dependencies
numpy,
units-llnl,
# buildInputs
boost,
eigen,
gtest,
pybind11,
tbb_2022_0,
# tests
pytestCheckHook,
scipy,
beautifulsoup4,
ipython,
matplotlib,
pandas,
numba,
xarray,
h5py,
hypothesis,
}:
buildPythonPackage rec {
pname = "scipp";
version = "25.05.1";
pyproject = true;
src = fetchFromGitHub {
owner = "scipp";
repo = "Scipp";
# https://github.com/scipp/scipp/pull/3722
tag = version;
hash = "sha256-AanXb+nF/YIZFuzG5UnoNPX97WScfPKuoSBY18uYt9k=";
};
env = {
SKIP_CONAN = "true";
};
build-system = [
scikit-build-core
setuptools
setuptools-scm
];
nativeBuildInputs = [
cmake
ninja
];
dontUseCmakeConfigure = true;
dependencies = [
numpy
];
buildInputs = [
boost
eigen
gtest
pybind11
units-llnl.passthru.top-level
tbb_2022_0
];
nativeCheckInputs = [
pytestCheckHook
scipy
beautifulsoup4
ipython
matplotlib
pandas
numba
xarray
h5py
hypothesis
];
pytestFlagsArray = [
# See https://github.com/scipp/scipp/issues/3721
"--hypothesis-profile=ci"
];
pythonImportsCheck = [
"scipp"
];
meta = {
description = "Multi-dimensional data arrays with labeled dimensions";
homepage = "https://scipp.github.io";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ doronbehar ];
# Got:
#
# error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
#
# Needs debugging along with upstream.
broken = stdenv.hostPlatform.isDarwin;
};
}
@@ -0,0 +1,56 @@
{
lib,
buildPythonPackage,
units-llnl,
# build-system
nanobind,
scikit-build-core,
# nativeBuildInputs
cmake,
# NOTE that if top-level units-llnl package uses cmakeFlags other then
# Nixpkgs' default, the build might fail, and you'd want to pick only the
# cmakeFlags that don't cause a failure. See also:
# https://github.com/scipp/scipp/issues/3705
cmakeFlags ? units-llnl.cmakeFlags,
ninja,
}:
buildPythonPackage {
inherit (units-llnl)
pname
version
src
meta
;
pyproject = true;
build-system = [
nanobind
scikit-build-core
];
nativeBuildInputs = [
cmake
ninja
];
dontUseCmakeConfigure = true;
env = {
SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" (
cmakeFlags
++ [
(lib.cmakeBool "UNITS_BUILD_PYTHON_LIBRARY" true)
]
);
};
# Also upstream turns off testing for the python build so it seems, see:
# https://github.com/LLNL/units/blob/v0.13.1/pyproject.toml#L65-L66 However
# they do seem to use pytest for their CI, but in our case it fails due to
# missing googletest Python modules, which we don't know how to build.
doCheck = false;
passthru = {
top-level = units-llnl;
};
}
+10
View File
@@ -9369,6 +9369,8 @@ self: super: with self; {
mplleaflet = callPackage ../development/python-modules/mplleaflet { };
mpltoolbox = callPackage ../development/python-modules/mpltoolbox { };
mpmath = callPackage ../development/python-modules/mpmath { };
mpris-server = callPackage ../development/python-modules/mpris-server { };
@@ -11518,6 +11520,8 @@ self: super: with self; {
ploomber-extension = callPackage ../development/python-modules/ploomber-extension { };
plopp = callPackage ../development/python-modules/plopp { };
plotext = callPackage ../development/python-modules/plotext { };
plotille = callPackage ../development/python-modules/plotille { };
@@ -15829,6 +15833,8 @@ self: super: with self; {
scim2-tester = callPackage ../development/python-modules/scim2-tester { };
scipp = callPackage ../development/python-modules/scipp { };
scipy = callPackage ../development/python-modules/scipy { };
scmrepo = callPackage ../development/python-modules/scmrepo { };
@@ -18748,6 +18754,10 @@ self: super: with self; {
unique-log-filter = callPackage ../development/python-modules/unique-log-filter { };
units-llnl = callPackage ../development/python-modules/units-llnl {
inherit (pkgs) units-llnl;
};
unittest-data-provider = callPackage ../development/python-modules/unittest-data-provider { };
unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { };