From 7f0bd3f662be11fce8d4bca62ec1570e9eb22126 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 4 Jan 2026 00:36:47 +0000 Subject: [PATCH] gnu: Add python-xarray-dataclass. * gnu/packages/python-science.scm (python-xarray-dataclass): New variable. Change-Id: Id4293a97741704c434b6847b7b1ede8d35dd1edd Signed-off-by: Rutherther --- gnu/packages/python-science.scm | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 43b5a029d4c5d64e860aeb82c36aa82b100736b3..55370880264dcaac2a386eaf9472b081b1141c6c 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -4892,6 +4892,39 @@ large and growing library of domain-agnostic functions for advanced analytics and visualization with these data structures.") (license license:asl2.0))) +(define-public python-xarray-dataclass + (package + (name "python-xarray-dataclass") + (version "3.0.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xarray-contrib/xarray-dataclass/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1q3y9gbzrp1mh48y7gggqgggwnarxdn32h907mfax1hi9ap6ywil")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-hatchling)) + (propagated-inputs + (list python-numpy + python-typing-extensions + python-xarray)) + (home-page "https://github.com/xarray-contrib/xarray-dataclass/") + (synopsis "Xarray data creation by data classes") + (description + "xarray-dataclass is a Python package that makes it easy to create +@url{https://xarray.pydata.org/en/stable/index.html, xarray}'s DataArray and +Dataset objects that are \"typed\" (i.e. fixed dimensions, data type, +coordinates, attributes, and name) using +@url{https://docs.python.org/3/library/dataclasses.html, the Python's +dataclass}. It's a successor of not maintained +https://github.com/astropenguin/xarray-dataclasses.") + (license license:expat))) + (define-public python-xarray-dataclasses (package (name "python-xarray-dataclasses")