projects/guix·blob java-team · refs

7373 lines · 280.8 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2018, 2020-2025 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2015 Federico Beffa <[email protected]>
4;;; Copyright © 2016 Ben Woodcroft <[email protected]>
5;;; Copyright © 2016,2024 Hartmut Goebel <[email protected]>
6;;; Copyright © 2016, 2021-2025 Efraim Flashner <[email protected]>
7;;; Copyright © 2016-2020, 2022 Marius Bakke <[email protected]>
8;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2018, 2022 Leo Famulari <[email protected]>
10;;; Copyright © 2019-2026 Maxim Cournoyer <[email protected]>
11;;; Copyright © 2019 Giacomo Leidi <[email protected]>
12;;; Copyright © 2020-2025 Nicolas Goaziou <[email protected]>
13;;; Copyright © 2020 Pierre Langlois <[email protected]>
14;;; Copyright © 2020-2026 Vinicius Monego <[email protected]>
15;;; Copyright © 2021 Greg Hogan <[email protected]>
16;;; Copyright © 2021 Mădălin Ionel Patrașcu <[email protected]>
17;;; Copyright © 2021 Roel Janssen <[email protected]>
18;;; Copyright © 2021 Paul Garlick <[email protected]>
19;;; Copyright © 2021 Arun Isaac <[email protected]>
20;;; Copyright © 2021 Vagrant Cascadian <[email protected]>
21;;; Copyright © 2021, 2023 Felix Gruber <[email protected]>
22;;; Copyright © 2022 Malte Frank Gerdes <[email protected]>
23;;; Copyright © 2021, 2022 Guillaume Le Vaillant <[email protected]>
24;;; Copyright © 2022 Paul A. Patience <[email protected]>
25;;; Copyright © 2022 Wiktor Żelazny <[email protected]>
26;;; Copyright © 2022 Eric Bavier <[email protected]>
27;;; Copyright © 2022 kiasoc5 <[email protected]>
28;;; Copyright © 2022, 2024 Antero Mejr <[email protected]>
29;;; Copyright © 2022 jgart <[email protected]>
30;;; Copyright © 2022 Sarah Morgensen <[email protected]>
31;;; Copyright © 2023, 2024 Troy Figiel <[email protected]>
32;;; Copyright © 2024-2026 Sharlatan Hellseher <[email protected]>
33;;; Copyright © 2024 Marco Baggio <[email protected]>
34;;; Copyright © 2024 Nicolas Graves <[email protected]>
35;;; Copyright © 2024 Rick Huijzer <[email protected]>
36;;; Copyright © 2025 Nicolas Graves <[email protected]>
37;;; Copyright © 2025 Mark Walker <[email protected]>
38;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]>
39;;; Copyright © 2025 Jake Forster <[email protected]>
40;;; Copyright © 2025 Ghislain Vaillant <[email protected]>
41;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]>
42;;; Copyright © 2026 Reza Housseini <[email protected]>
43;;; Copyright © 2026 Spencer King <[email protected]>
44;;;
45;;; This file is part of GNU Guix.
46;;;
47;;; GNU Guix is free software; you can redistribute it and/or modify it
48;;; under the terms of the GNU General Public License as published by
49;;; the Free Software Foundation; either version 3 of the License, or (at
50;;; your option) any later version.
51;;;
52;;; GNU Guix is distributed in the hope that it will be useful, but
53;;; WITHOUT ANY WARRANTY; without even the implied warranty of
54;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55;;; GNU General Public License for more details.
56;;;
57;;; You should have received a copy of the GNU General Public License
58;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
59
60(define-module (gnu packages python-science)
61 #:use-module ((guix licenses) #:prefix license:)
62 #:use-module (gnu packages)
63 #:use-module (gnu packages algebra)
64 #:use-module (gnu packages base)
65 #:use-module (gnu packages bash)
66 #:use-module (gnu packages bioinformatics)
67 #:use-module (gnu packages boost)
68 #:use-module (gnu packages build-tools)
69 #:use-module (gnu packages check)
70 #:use-module (gnu packages chemistry)
71 #:use-module (gnu packages cmake)
72 #:use-module (gnu packages compression)
73 #:use-module (gnu packages cpp)
74 #:use-module (gnu packages cross-base)
75 #:use-module (gnu packages crypto)
76 #:use-module (gnu packages databases)
77 #:use-module (gnu packages digest)
78 #:use-module (gnu packages docker)
79 #:use-module (gnu packages duckdb)
80 #:use-module (gnu packages elf)
81 #:use-module (gnu packages gcc)
82 #:use-module (gnu packages geo)
83 #:use-module (gnu packages gl)
84 #:use-module (gnu packages graphviz)
85 #:use-module (gnu packages image)
86 #:use-module (gnu packages image-processing)
87 #:use-module (gnu packages javascript)
88 #:use-module (gnu packages jemalloc)
89 #:use-module (gnu packages jupyter)
90 #:use-module (gnu packages machine-learning)
91 #:use-module (gnu packages maths)
92 #:use-module (gnu packages mpi)
93 #:use-module (gnu packages networking)
94 #:use-module (gnu packages nss)
95 #:use-module (gnu packages pcre)
96 #:use-module (gnu packages perl)
97 #:use-module (gnu packages physics)
98 #:use-module (gnu packages pkg-config)
99 #:use-module (gnu packages protobuf)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-build)
102 #:use-module (gnu packages python-check)
103 #:use-module (gnu packages python-compression)
104 #:use-module (gnu packages python-crypto)
105 #:use-module (gnu packages python-graphics)
106 #:use-module (gnu packages python-web)
107 #:use-module (gnu packages python-xyz)
108 #:use-module (gnu packages qt)
109 #:use-module (gnu packages rust)
110 #:use-module (gnu packages serialization)
111 #:use-module (gnu packages simulation)
112 #:use-module (gnu packages sphinx)
113 #:use-module (gnu packages ssh)
114 #:use-module (gnu packages statistics)
115 #:use-module (gnu packages tbb)
116 #:use-module (gnu packages time)
117 #:use-module (gnu packages tls)
118 #:use-module (gnu packages version-control)
119 #:use-module (gnu packages xdisorg)
120 #:use-module (gnu packages xml)
121 #:use-module (gnu packages xorg)
122 #:use-module (guix packages)
123 #:use-module (guix gexp)
124 #:use-module (guix deprecation)
125 #:use-module (guix download)
126 #:use-module (guix git-download)
127 #:use-module (guix utils)
128 #:use-module (guix build-system cargo)
129 #:use-module (guix build-system cmake)
130 #:use-module (guix build-system meson)
131 #:use-module (guix build-system pyproject)
132 #:use-module (guix build-system qt))
133
134(define-public pyre
135 (package
136 (name "pyre")
137 (version "1.12.5")
138 (source
139 (origin
140 (method git-fetch)
141 (uri (git-reference
142 (url "https://github.com/pyre/pyre")
143 (commit (string-append "v" version))))
144 (file-name (git-file-name name version))
145 (sha256
146 (base32
147 "0crmssga481q2ggwcmj40nj5n9975wri14p609jdr9hwg4vdyvj2"))))
148 (build-system cmake-build-system)
149 (arguments
150 (list
151 #:imported-modules (append %cmake-build-system-modules
152 %pyproject-build-system-modules)
153 #:modules '((guix build cmake-build-system)
154 ((guix build pyproject-build-system) #:prefix py:)
155 (guix build utils))
156 #:configure-flags
157 #~(list (string-append "-DPYRE_VERSION=" #$version)
158 (string-append "-DPYRE_DEST_PACKAGES="
159 (py:site-packages %build-inputs %outputs)))
160 #:phases
161 #~(modify-phases %standard-phases
162 (add-after 'unpack 'enable-bytecode-determinism
163 (assoc-ref py:%standard-phases 'enable-bytecode-determinism))
164 ;; Move the check phase after the Python 'pyre' module
165 ;; is installed and made available.
166 (delete 'check)
167 (add-after 'install 'add-to-pythonpath
168 (lambda* (#:key inputs outputs #:allow-other-keys)
169 (py:add-installed-pythonpath inputs outputs)))
170 (add-after 'add-to-pythonpath 'wrap
171 (assoc-ref py:%standard-phases 'wrap))
172 (add-after 'add-to-pythonpath 'check
173 (lambda* (#:key tests? parallel-tests? #:allow-other-keys)
174 (when tests?
175 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
176 (let ((ignored-tests
177 (list
178 ;; The MPI tests are failing for unknown reasons (see:
179 ;; https://github.com/pyre/pyre/issues/126).
180 "tests.mpi"
181 ;; These tests have a cleanup phase that fails
182 ;; non-deterministically (see:
183 ;; https://github.com/pyre/pyre/issues/125).
184 "tests.pyre.lib.viz.flow"
185 ;; This test expects a TCP port 22 to be listening.
186 "tests.pyre.pkg.ipc.tcp.py"
187 ;; These postgres tests require a running postgresql
188 ;; daemon; they are also skipped in upstream CI.
189 "tests.postgres.ext"
190 ;; This test fails due to pre-1980 timestamps, not
191 ;; supported by ZIP.
192 "tests.pyre.pkg.filesystem.zip_open.py"
193 ;; This one trips on the patched python3 shebang.
194 "tests.pyre.pkg.filesystem.local_open.py")))
195 (invoke "ctest"
196 "-j" (if parallel-tests?
197 (number->string (parallel-job-count))
198 "1")
199 "-E" (string-join ignored-tests "|")))))))))
200 (native-inputs (list openssh-sans-x python python-numpy pybind11-2 zip))
201 (inputs (list gsl hdf5 openmpi postgresql))
202 (propagated-inputs (list python-pyyaml)) ;for the Python bindings
203 (home-page "http://pyre.orthologue.com/")
204 (synopsis "Framework for building Scientific applications")
205 (description
206 "This package provides a framework for building scientific applications.
207It aims to bring state of the art software design practices to scientific
208computing, with the goal of providing a strong skeleton on which to build
209scientific codes by steering the implementation towards usability and
210maintainability.")
211 (license license:bsd-3)))
212
213(define-public python-adjusttext
214 (package
215 (name "python-adjusttext")
216 (version "1.4.0")
217 (source
218 (origin
219 (method git-fetch)
220 (uri (git-reference
221 (url "https://github.com/Phlya/adjustText")
222 (commit (string-append "v" version))))
223 (file-name (git-file-name name version))
224 (sha256
225 (base32 "1cw9cfvrwimf1b3mvbdb8snj8shy1rzdpmb9d1j8vjwaj5ip4d9k"))))
226 (build-system pyproject-build-system)
227 (arguments
228 (list #:tests? #false)) ;there are none
229 (native-inputs
230 (list python-setuptools))
231 (propagated-inputs
232 (list python-matplotlib
233 python-numpy
234 python-scipy))
235 (home-page "https://github.com/Phlya/adjustText")
236 (synopsis "Adjust text position in matplotlib plots to minimize overlaps")
237 (description
238 "Often when we want to label multiple points on a graph the text will
239start heavily overlapping with both other labels and data points. This can be
240a major problem requiring manual solution. However this can be largely
241automated by smart placing of the labels (difficult) or iterative adjustment
242of their positions to minimize overlaps (relatively easy). This library
243implements the latter option to help with matplotlib graphs.")
244 (license license:expat)))
245
246(define-public python-algopy
247 (package
248 (name "python-algopy")
249 (version "0.7.2")
250 (source
251 (origin
252 (method url-fetch)
253 (uri (pypi-uri "algopy" version))
254 (sha256
255 (base32 "0l9d4pkbal6m6q8v6w5zr9wlij4sfycc8i2w7irk0i4n8hyvm0ja"))))
256 (build-system pyproject-build-system)
257 (native-inputs
258 (list python-pytest
259 python-setuptools))
260 (propagated-inputs
261 (list python-numpy
262 python-scipy))
263 (home-page "https://pythonhosted.org/algopy")
264 (synopsis "Algorithmic Differentation in Python")
265 (description
266 "AlgoPy provides a functionality to differentiate functions implemented
267as computer programs by using Algorithmic Differentiation (AD) techniques in
268the forward and reverse mode.
269
270The forward mode propagates univariate Taylor polynomials of arbitrary order.
271Hence it is also possible to use AlgoPy to evaluate higher-order derivative
272tensors. The reverse mode is also known as backpropagation and can be found
273in similar form in tools like PyTorch. Speciality of AlgoPy is the
274possibility to differentiate functions that contain matrix functions as
275+,-,*,/, dot, solve, qr, eigh, cholesky.")
276 (license license:bsd-3)))
277
278(define-public python-anndata
279 (package
280 (name "python-anndata")
281 (version "0.13.0rc3")
282 (source
283 (origin
284 (method git-fetch)
285 (uri (git-reference
286 (url "https://github.com/theislab/anndata")
287 (commit version)))
288 (file-name (git-file-name name version))
289 (sha256
290 (base32 "0hbnp4pw8wpn2lcds0wa92kb8x4bdkiv76dijg7g4pj0v86qm034"))))
291 (build-system pyproject-build-system)
292 (arguments
293 (list
294 ;; tests: 6677 passed, 1842 skipped, 195 xfailed, 4842 warnings, 98
295 ;; subtests passed
296 #:test-flags
297 #~(list "-m" "not gpu"
298 "--numprocesses" (number->string (min 8 (parallel-job-count)))
299 ;; XXX: AttributeError: module 'pyarrow.lib' has no attribute
300 ;; 'PyExtensionType'
301 "--ignore=tests/test_awkward.py")
302 #:phases
303 #~(modify-phases %standard-phases
304 ;; Doctests require scanpy from (gnu packages bioinformatics)
305 (add-after 'unpack 'disable-doctests
306 (lambda _
307 (substitute* "pyproject.toml"
308 (("--doctest-modules") ""))))
309 ;; Numba needs a writable dir to cache functions.
310 (add-before 'check 'set-numba-cache-dir
311 (lambda _
312 (setenv "NUMBA_CACHE_DIR" "/tmp"))))))
313 (native-inputs
314 (list hdf5 ;for h5diff, tests/test_io_backwards_compat.py
315 python-awkward
316 python-boltons
317 python-dask
318 python-distributed
319 python-filelock
320 python-hatch-vcs
321 python-hatchling
322 python-joblib
323 python-jsonschema
324 python-loompy
325 python-matplotlib
326 python-openpyxl
327 python-pyarrow
328 python-pytest
329 python-pytest-mock
330 python-pytest-randomly
331 python-pytest-xdist
332 python-scikit-learn
333 python-setuptools-scm))
334 (propagated-inputs
335 (list python-array-api-compat
336 python-h5py
337 python-legacy-api-wrap
338 python-natsort
339 python-numpy
340 python-packaging
341 python-pandas
342 python-scipy
343 python-scverse-misc
344 python-typing-extensions ;Python version < 3.13
345 python-zarr))
346 (home-page "https://github.com/theislab/anndata")
347 (synopsis "Annotated data for data analysis pipelines")
348 (description "Anndata is a package for simple (functional) high-level APIs
349for data analysis pipelines. In this context, it provides an efficient,
350scalable way of keeping track of data together with learned annotations and
351reduces the code overhead typically encountered when using a mostly
352object-oriented library such as @code{scikit-learn}.")
353 (license license:bsd-3)))
354
355;; A bare minimal package, mainly to use in tests and reduce closure
356;; size. Tests are left out in the main package to slim down native-inputs.
357(define-public python-anndata-minimal
358 (package/inherit python-anndata
359 (name "python-anndata-minimal")
360 (arguments
361 (substitute-keyword-arguments arguments
362 ((#:tests? _ #t) #f)))
363 (native-inputs
364 (list python-hatch-vcs
365 python-hatchling
366 python-setuptools-scm))))
367
368;; XXX: See: <https://codeberg.org/guix/guix/issues/3093>.
369(define-public python-aplus
370 ;; PyPI release lacks the latest version, Git has no tags.
371 (let ((commit "1ab8ebec987fb7213766784aad02cbf4410d9036")
372 (revision "0"))
373 (package
374 (name "python-aplus")
375 (version (git-version "0.11.1" revision commit))
376 (source
377 (origin
378 (method git-fetch)
379 (uri (git-reference
380 (url "https://github.com/xogeny/aplus")
381 (commit commit)))
382 (file-name (git-file-name name version))
383 (sha256
384 (base32 "02jcfj7dywvs0sd60c85pxwh0mwsj9p1q27445pba6j489x3dffj"))))
385 (build-system pyproject-build-system)
386 (arguments
387 (list #:tests? #f)) ;they depend on Nose test runner
388 (native-inputs
389 (list python-setuptools))
390 (home-page "https://github.com/xogeny/aplus")
391 (synopsis "Promises/A+ for Python")
392 (description
393 "This package is an implementation of the Promises/A+ specification and
394test suite in Python.")
395 (license license:expat))))
396
397(define-public python-apted
398 ;; PyPI release lacks tests and there is no Git tag.
399 (let ((commit "828b3e3f4c053f7d35f0b55b0d5597e8041719ac")
400 (revision "0"))
401 (package
402 (name "python-apted")
403 (version (git-version "1.0.3" revision commit))
404 (source
405 (origin
406 (method git-fetch)
407 (uri (git-reference
408 (url "https://github.com/JoaoFelipe/apted")
409 (commit commit)))
410 (file-name (git-file-name name version))
411 (sha256
412 (base32 "1vw1sbn41cysmhr4ib58cw3hzs1xjxwb1d8r1yhrqgjk5q6ckjw7"))))
413 (build-system pyproject-build-system)
414 (arguments
415 (list
416 #:test-flags
417 #~(list "--deselect=apted/tests/test_chained.py::test_factory"
418 "--deselect=apted/tests/test_correctness.py::test_factory"
419 "--deselect=apted/tests/test_per_edit_operation_correctness.py::test_factory")))
420 (native-inputs
421 (list python-pytest
422 python-setuptools
423 python-wheel))
424 (home-page "https://github.com/JoaoFelipe/apted")
425 (synopsis "Algorithm for the tree edit distance")
426 (description
427 "This is a Python implementation of the APTED algorithm,which
428supersedes the RTED algorithm for computing the tree edit distance.")
429 (license license:expat))))
430
431(define-public python-asap3
432 (package
433 (name "python-asap3")
434 (version "3.13.10")
435 (source
436 (origin
437 (method url-fetch)
438 (uri (pypi-uri "asap3" version))
439 (sha256
440 (base32 "1qpy9nnwv692hd3cg70n2zwjank25mlsfvvirklijwis3m4lfqg4"))))
441 (build-system pyproject-build-system)
442 (native-inputs
443 (list python-pytest
444 python-setuptools
445 which)) ;for build
446 (propagated-inputs
447 (list python-ase
448 python-numpy))
449 (home-page "https://wiki.fysik.dtu.dk/asap")
450 (synopsis "ASAP - classical potentials for Molecular Dynamics with ASE.")
451 (description "This package provides accelerated simulations and potentials
452of solids.")
453 (license license:lgpl3)))
454
455(define-public python-ase
456 (package
457 (name "python-ase")
458 (version "3.26.0")
459 (source
460 (origin
461 (method url-fetch)
462 (uri (pypi-uri "ase" version))
463 (sha256
464 (base32 "0xahqqyxkxrjh1g23icydngrvc8iv3lnd4iys9i802jvfxas6wd0"))))
465 (build-system pyproject-build-system)
466 (arguments
467 (list
468 ;; tests: 2 failed, 2999 passed, 566 skipped, 5 xfailed, 47 warnings
469 #:test-flags
470 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
471 ;; DeprecationWarning.
472 "--deselect"
473 "ase/test/fio/test_espresso.py::test_pw_input_write_nested_flat"
474 ;; UserWarning.
475 "--deselect"
476 "ase/test/fio/test_espresso.py::TestConstraints::test_fix_scaled")))
477 (native-inputs
478 (list python-pytest
479 python-pytest-xdist
480 python-setuptools))
481 (inputs (list spglib))
482 (propagated-inputs
483 (list python-matplotlib
484 python-numpy
485 python-scipy))
486 (home-page "https://wiki.fysik.dtu.dk/ase/")
487 (synopsis "Atomic Simulation Environment")
488 (description "This package provides a set of tools and Python modules for
489setting up, manipulating, running, visualizing and analyzing atomistic
490simulations.")
491 (license license:lgpl2.1+)))
492
493(define-public python-autoray
494 (package
495 (name "python-autoray")
496 (version "0.8.10")
497 (source
498 (origin
499 (method git-fetch)
500 (uri (git-reference
501 (url "https://github.com/jcmgray/autoray")
502 (commit (string-append "v" version))))
503 (file-name (git-file-name name version))
504 (sha256
505 (base32 "1gqfkpdng09l804xm9r1r098w10gr1bc5ax2xmhrpz9niybv71f5"))))
506 (build-system pyproject-build-system)
507 ;; tests: 1758 passed, 1483 skipped, 96 xfailed, 4 warnings
508 (native-inputs
509 (list python-hatch-vcs
510 python-hatchling
511 python-pytest))
512 (propagated-inputs
513 (list python-dask
514 python-matplotlib
515 python-networkx
516 python-numpy
517 python-opt-einsum
518 python-scipy
519 python-sparse))
520 (home-page "https://github.com/jcmgray/autoray")
521 (synopsis "Library for abstracting tensor operations")
522 (description
523 "This package provides a lightweight Python library for
524abstracting tensor operations. It provides an automatic dispatch mechanism
525that means you can write backend agnostic code that works for any library
526that provides a @code{numpy} compatible API.")
527 (license license:asl2.0)))
528
529(define-public python-baycomp
530 (package
531 (name "python-baycomp")
532 (version "1.0.3")
533 (source
534 (origin
535 (method url-fetch)
536 (uri (pypi-uri "baycomp" version))
537 (sha256
538 (base32 "1v6s4mfr6xzjbv9a2v89hywm6fbv5nii0qczvcfjanvdn7bmmcij"))))
539 (build-system pyproject-build-system)
540 (native-inputs
541 (list python-pytest python-setuptools python-wheel))
542 (propagated-inputs
543 (list python-matplotlib python-numpy python-scipy))
544 (home-page "https://github.com/janezd/baycomp")
545 (synopsis "Library for comparison of Bayesian classifiers")
546 (description
547 "Baycomp is a library for Bayesian comparison of classifiers. Functions
548in the library compare two classifiers on one or on multiple data sets. They
549compute three probabilities: the probability that the first classifier has
550higher scores than the second, the probability that differences are within the
551region of practical equivalence (rope), or that the second classifier has
552higher scores.")
553 (license license:expat)))
554
555(define-public python-boost-histogram
556 (package
557 (name "python-boost-histogram")
558 (version "1.7.1")
559 (source
560 (origin
561 (method url-fetch)
562 (uri (pypi-uri "boost_histogram" version))
563 (sha256
564 (base32 "06av8lxvvfafn4xbqakx2fbdcq0djbs7w6j4vn4ji8wgd39dglvf"))))
565 (build-system pyproject-build-system)
566 ;; This package bundles files from Boost::Histogram and doesn't provide
567 ;; a way to use a system library.
568 (propagated-inputs (list python-numpy))
569 (native-inputs (list cmake-minimal
570 pybind11-2
571 python-pytest
572 python-pytest-benchmark
573 python-scikit-build-core
574 python-setuptools-scm))
575 (home-page "https://boost-histogram.readthedocs.io/en/latest/")
576 (synopsis "Python bindings for the Boost::Histogram library")
577 (description
578 "This package provides Python bindings for the Boost::Histogram library,
579one of the fastest libraries for histogramming.")
580 (license license:bsd-3)))
581
582(define-public python-bottleneck
583 (package
584 (name "python-bottleneck")
585 (version "1.6.0")
586 (source
587 (origin
588 (method git-fetch)
589 (uri (git-reference
590 (url "https://github.com/pydata/bottleneck")
591 (commit (string-append "v" version))))
592 (file-name (git-file-name name version))
593 (sha256
594 (base32 "1p2ixxwdll1bhaqg68iywrb6n8kwscbnbx08q47fjslwzy8vkh7i"))))
595 (build-system pyproject-build-system)
596 (arguments
597 (list
598 #:test-flags #~(list "--pyargs" "bottleneck")
599 #:phases
600 #~(modify-phases %standard-phases
601 (add-before 'check 'remove-local-source
602 (lambda _
603 (delete-file-recursively "bottleneck"))))))
604 (native-inputs
605 (list python-pytest
606 python-setuptools
607 python-versioneer))
608 (propagated-inputs
609 (list python-numpy))
610 (home-page "https://github.com/pydata/bottleneck")
611 (synopsis "Fast NumPy array functions written in C")
612 (description
613 "Bottleneck is a collection of fast, NaN-aware NumPy array functions
614written in C.")
615 (license license:bsd-2)))
616
617(define-public python-clarabel
618 (package
619 (name "python-clarabel")
620 (version "0.7.1")
621 (source
622 (origin
623 (method url-fetch)
624 (uri (pypi-uri "clarabel" version))
625 (sha256
626 (base32 "15k32ynvh45n9q905bxwamh5w5cia9bxzmwz69wbribmyhsv22m3"))
627 (patches
628 (search-patches "python-clarabel-blas.patch"))))
629 (build-system cargo-build-system)
630 (arguments
631 (list
632 #:imported-modules `(,@%cargo-build-system-modules
633 ,@%pyproject-build-system-modules)
634 #:modules '((guix build cargo-build-system)
635 ((guix build pyproject-build-system) #:prefix py:)
636 (guix build utils))
637 #:phases
638 #~(modify-phases %standard-phases
639 (add-after 'build 'build-python-module
640 (assoc-ref py:%standard-phases 'build))
641 (add-after 'build-python-module 'install-python-module
642 (assoc-ref py:%standard-phases 'install)))
643 #:features '(list "python")
644 #:install-source? #false))
645 (inputs
646 (cons maturin (cargo-inputs 'python-clarabel)))
647 (native-inputs
648 (list python-wrapper))
649 (propagated-inputs (list python-numpy python-scipy))
650 (home-page "https://github.com/oxfordcontrol/Clarabel.rs")
651 (synopsis "Interior-point solver for convex conic optimisation problems")
652 (description "Clarabel.rs is a Rust implementation of an interior point
653numerical solver for convex optimization problems using a novel homogeneous
654embedding.")
655 (license license:asl2.0)))
656
657(define-public python-cmasher
658 (package
659 (name "python-cmasher")
660 (version "1.9.2")
661 (source
662 (origin
663 (method url-fetch)
664 (uri (pypi-uri "cmasher" version))
665 (sha256
666 (base32 "1xbzyla0l5i5vv86q4vwv33qmqzfzhhj6zry1lhy6ikir37c543c"))))
667 (build-system pyproject-build-system)
668 ;; tests: 65 passed, 2 skipped
669 (native-inputs
670 (list python-pytest
671 python-hatchling))
672 (propagated-inputs
673 (list python-colorspacious
674 python-matplotlib
675 python-numpy))
676 (home-page "https://cmasher.readthedocs.io")
677 (synopsis "Scientific colormaps utilities")
678 (description
679 "The CMasher package provides a collection of scientific colormaps and utility
680functions to be used by different Python packages and projects, mainly in
681combination with Matplotlib. It offers several alternatives to commonly used
682colormaps, like chroma and rainforest for jet; sunburst for hot; neutral for
683binary; and fusion and redshift for coolwarm.")
684 (license license:bsd-3)))
685
686(define-public python-cmcrameri
687 (package
688 (name "python-cmcrameri")
689 (version "1.9")
690 (source
691 (origin
692 (method git-fetch)
693 (uri (git-reference
694 (url "https://github.com/callumrollo/cmcrameri")
695 (commit (string-append "v" version))))
696 (file-name (git-file-name name version))
697 (sha256
698 (base32 "0wvqld65c1p3iqxmidfsavpp1nkjc1f4z6riqv0lmafpxrz2snbi"))))
699 (build-system pyproject-build-system)
700 (propagated-inputs (list python-matplotlib python-numpy python-packaging))
701 (native-inputs (list python-pytest python-setuptools python-setuptools-scm))
702 (home-page "https://github.com/callumrollo/cmcrameri")
703 (synopsis "Perceptually uniform colormaps by Fabio Crameri")
704 (description "This package provides a Python wrapper around Fabio
705Crameri's perceptually uniform colormaps for scientific data visualization.")
706 (license license:expat)))
707
708(define-public python-cmocean
709 (package
710 (name "python-cmocean")
711 (version "4.0.3")
712 (source
713 (origin
714 (method url-fetch)
715 (uri (pypi-uri "cmocean" version))
716 (sha256
717 (base32 "0z0d4ma6i228gwpgnkai8scs9bmzz41rirlnqpmb8hazzfcq71ip"))))
718 (build-system pyproject-build-system)
719 (native-inputs
720 (list python-pytest
721 python-setuptools
722 python-wheel))
723 (propagated-inputs
724 (list python-matplotlib
725 python-numpy
726 python-packaging))
727 (home-page "https://github.com/matplotlib/cmocean")
728 (synopsis "Colormaps for Oceanography")
729 (description
730 "This package contains colormaps for commonly-used oceanographic
731variables. Most of the colormaps started from @code{matplotlib} colormaps,
732but have now been adjusted using the viscm tool to be perceptually uniform.")
733 (license license:expat)))
734
735(define-public python-corner
736 (package
737 (name "python-corner")
738 (version "2.2.2")
739 (source
740 (origin
741 (method git-fetch) ;no tests in PyPi archive
742 (uri (git-reference
743 (url "https://github.com/dfm/corner.py")
744 (commit (string-append "v" version))))
745 (file-name (git-file-name name version))
746 (sha256
747 (base32 "1i4dk4jxh0saysya2cnsfwlxwpldbdl174i9pwi4qj82av9jr2ii"))))
748 (build-system pyproject-build-system)
749 (arguments
750 (list
751 #:test-flags
752 #~(list
753 ;; XXX: Disable tests which failed with mismatched images, check why.
754 "-k" (string-append "not test_labels[png]"
755 " and not test_title_quantiles[png]"
756 " and not test_title_quantiles_default[png]"
757 " and not test_title_quantiles_raises[png]"
758 " and not test_bins[png]"
759 " and not test_bins_log[png]"
760 " and not test_titles1[png]"
761 " and not test_titles2[png]"
762 " and not test_pandas[png]"
763 " and not test_tight[png]"
764 " and not test_extended_overplotting[png]"
765 " and not test_reverse_overplotting[png]"
766 " and not test_arviz[png]"
767 " and not test_range_fig_arg[png]"))))
768 (propagated-inputs
769 (list python-matplotlib))
770 (native-inputs
771 (list python-arviz python-pytest python-scipy python-setuptools-scm))
772 (home-page "http://corner.readthedocs.io/")
773 (synopsis "Make some beautiful corner plots")
774 (description
775 "This Python module uses @code{matplotlib} to visualize multidimensional
776samples using a scatterplot matrix. In these visualizations, each one- and
777two-dimensional projection of the sample is plotted to reveal covariances.
778corner was originally conceived to display the results of Markov Chain Monte
779Carlo simulations and the defaults are chosen with this application in mind but
780it can be used for displaying many qualitatively different samples.")
781 (license license:bsd-2)))
782
783(define-public python-cotengra
784 (package
785 (name "python-cotengra")
786 (version "0.8.0")
787 (source
788 (origin
789 (method git-fetch)
790 (uri (git-reference
791 (url "https://github.com/jcmgray/cotengra")
792 (commit (string-append "v" version))))
793 (file-name (git-file-name name version))
794 (sha256
795 (base32 "000z233s6nr2qmpjyn4sl1gym8a980xh2vf1jkvfjxfnrv40zl73"))))
796 (build-system pyproject-build-system)
797 (native-inputs
798 (list python-hatch-vcs
799 python-hatchling
800 python-pytest))
801 (propagated-inputs
802 (list python-autoray
803 python-matplotlib
804 python-seaborn))
805 (home-page "https://cotengra.readthedocs.io")
806 (synopsis
807 "Hyper optimized contraction trees")
808 (description
809 "This library allows for contracting tensor networks or einsum expressions
810involving large numbers of tensors. It includes drop-in replacements for
811@code{einsum} and @code{ncon}, an explicit contraction tree object, a hyper
812optimizer that samples trees while tuning the generating meta-parameters,
813dynamic slicing for massive memory savings and parallelism, simulated annealing
814as an alternative strategy for optimizing and slicing, and integrations with
815other libraries such as @code{numpy}, @code{opt_einsum}, @code{quimb}, and
816others.")
817 (license license:asl2.0)))
818
819(define-public python-cvxpy
820 (package
821 (name "python-cvxpy")
822 (version "1.7.5")
823 (source
824 (origin
825 (method git-fetch)
826 (uri (git-reference
827 (url "https://github.com/cvxpy/cvxpy")
828 (commit (string-append "v" version))))
829 (file-name (git-file-name name version))
830 (sha256
831 (base32 "0xawcpkfvp29wfb8g2dj8vnv6aslbs9mc03ddcdhpz0vdafp7vyd"))))
832 (build-system pyproject-build-system)
833 (arguments
834 (list
835 ;; tests: 1361 passed, 373 skipped, 5 deselected, 239 warnings, 29
836 ;; subtests passed
837 #:test-flags
838 #~(list #$@(map (lambda (test) (string-append "--deselect="
839 "cvxpy/tests/"
840 "test_cone2cone.py::"
841 test))
842 ;; cvxpy.error.SolverError: Either candidate conic
843 ;; solvers (['GLPK_MI', 'SCIPY']) do not support the
844 ;; cones output by the problem (SOC, NonNeg, Zero), or
845 ;; there are not enough constraints in the problem.
846 (list "TestSlacks::test_mi_socp_2"
847 ;; cvxpy.error.SolverError: Solver 'CVXOPT'
848 ;; failed. Try another solver, or solve with
849 ;; verbose=True for more information.
850 "TestOpRelConeQuad::test_oprelcone_1_m1_k3_complex"
851 "TestOpRelConeQuad::test_oprelcone_1_m3_k1_complex"
852 ;; cvxpy.error.SolverError: Solver 'CVXOPT'
853 ;; failed. Try another solver, or solve with
854 ;; verbose=True for more information.
855 "TestOpRelConeQuad::test_oprelcone_2"))
856 ;; TypeError: Array must be contiguous. A non-contiguous array
857 ;; was given.
858 "--deselect=cvxpy/tests/test_complex.py::TestComplex::test_sparse")
859 #:phases
860 #~(modify-phases %standard-phases
861 (add-before 'check 'set-ci-environment
862 (lambda _
863 ;; Activate hypothesis CI profile to suppress
864 ;; HealthCheck.too_slow which fails on slow build machines.
865 (setenv "CI" "1"))))))
866 (native-inputs
867 (list pybind11
868 python-pytest
869 python-setuptools))
870 (propagated-inputs
871 (list python-clarabel
872 python-numpy
873 python-osqp
874 python-scipy
875 python-scs
876 ;; [optional]
877 ;; python-cuopt-cu12
878 python-cvxopt
879 python-cylp
880 ;; python-daqp
881 ;; python-diffcp
882 python-ecos
883 ;; python-gurobipy
884 ;; python-highspy
885 ;; python-mosek
886 ;; python-nvidia-cuda-runtime-cu12
887 ;; python-ortools
888 ;; python-piqp
889 ;; python-proxsuite
890 ;; python-pyscipopt
891 ;; python-qoco
892 #;python-xpress))
893 (home-page "https://github.com/cvxpy/cvxpy")
894 (synopsis "DSL for modeling convex optimization problems")
895 (description
896 "This package provides a domain-specific language for modeling convex
897optimization problems in Python.")
898 (license license:asl2.0)))
899
900;; Note: Remember to update python-distributed when updating dask.
901(define-public python-dask
902 (package
903 (name "python-dask")
904 (version "2026.3.0")
905 (source
906 (origin
907 (method git-fetch)
908 (uri (git-reference
909 (url "https://github.com/dask/dask/")
910 (commit version)))
911 (file-name (git-file-name name version))
912 (sha256
913 (base32 "10w6ipxhx9gg14489gka4r0isp55xz3szgrx9f59424j240a5w15"))))
914 (build-system pyproject-build-system)
915 (arguments
916 (list
917 ;; tests: 15272 passed, 765 skipped, 313 xfailed, 280 xpassed, 7 warnings
918 #:test-flags
919 #~(list "-m" "not gpu and not slow and not network"
920 "--pyargs" "dask"
921 "--numprocesses" (number->string (min 4 (parallel-job-count)))
922 "--reruns=3"
923 "-k" (string-join
924 ;; This one cannot be interrupted.
925 (list "not test_interrupt"
926 ;; AttributeError: 'Array' object has no attribute
927 ;; 'expr'
928 "test_blockwise"
929 "test_is_dask_collection_doesnt_materialize"
930 ;; FileNotFoundError: [Errno 2] No such file or
931 ;; directory: 'taskset'
932 "test_cpu_affinity_taskset[affinity0]"
933 "test_cpu_affinity_taskset[affinity1]"
934 "test_cpu_affinity_taskset[affinity2]"
935 "test_cpu_affinity_taskset[affinity3]")
936 " and not "))
937 #:phases
938 #~(modify-phases %standard-phases
939 (add-before 'check 'remove-local-source
940 (lambda _
941 (delete-file-recursively "dask"))))))
942 (native-inputs
943 (list python-pytest
944 python-pytest-mock
945 python-pytest-rerunfailures
946 python-pytest-timeout
947 python-pytest-xdist
948 python-setuptools
949 python-setuptools-scm-next
950 tzdata-for-tests))
951 (propagated-inputs
952 (list python-click
953 python-cloudpickle
954 python-fsspec
955 python-packaging
956 python-partd
957 python-pyyaml
958 python-toolz
959 ;; [optional]
960 python-lz4
961 python-numpy
962 python-pandas
963 python-pyarrow))
964 (home-page "https://www.dask.org/")
965 (synopsis "Parallel computing with task scheduling")
966 (description
967 "Dask is a flexible parallel computing library for analytics. It
968consists of two components: dynamic task scheduling optimized for computation,
969and large data collections like parallel arrays, dataframes, and lists that
970extend common interfaces like NumPy, Pandas, or Python iterators to
971larger-than-memory or distributed environments. These parallel collections
972run on top of the dynamic task schedulers.")
973 (license license:bsd-3)))
974
975(define-public python-dask-gateway
976 (package
977 (name "python-dask-gateway")
978 (version "2026.3.0")
979 (source
980 (origin
981 (method git-fetch)
982 (uri (git-reference
983 (url "https://github.com/dask/dask-gateway")
984 (commit version)))
985 (file-name (git-file-name name version))
986 (sha256
987 (base32 "030693nl1rbsc9mpbny4hvx4rp44gw9cq242jwc6m97rj0n0cb5d"))))
988 (build-system pyproject-build-system)
989 (arguments
990 (list
991 #:tests? #f ;no tests
992 #:phases
993 #~(modify-phases %standard-phases
994 (add-after 'unpack 'chdir
995 (lambda _
996 (chdir "dask-gateway"))))))
997 (native-inputs
998 (list python-hatchling
999 python-pytest))
1000 (propagated-inputs
1001 (list python-aiohttp
1002 python-click
1003 python-dask
1004 python-distributed
1005 python-pyyaml
1006 python-tornado))
1007 (home-page "https://gateway.dask.org/")
1008 (synopsis "Client library for interacting with a dask-gateway server")
1009 (description
1010 "This package provides a client library for interacting with a
1011dask-gateway server.")
1012 (license license:bsd-3)))
1013
1014(define-public python-dask-image
1015 (package
1016 (name "python-dask-image")
1017 (version "2026.5.0")
1018 (source
1019 (origin
1020 (method git-fetch)
1021 (uri (git-reference
1022 (url "https://github.com/dask/dask-image")
1023 (commit (string-append "v" version))))
1024 (file-name (git-file-name name version))
1025 (sha256
1026 (base32 "0vz4f7c3fhj6lw4nvskdkjif13ymzibpvww8w21fzqkifrnxlij8"))))
1027 (build-system pyproject-build-system)
1028 ;; tests: 2171 passed, 178 skipped, 119 warnings
1029 (native-inputs
1030 (list python-pytest
1031 python-pytest-timeout
1032 python-setuptools
1033 python-setuptools-scm-next))
1034 (propagated-inputs
1035 (list python-dask
1036 python-numpy
1037 python-pims
1038 python-scipy
1039 python-tifffile
1040 ;; [optional]
1041 python-pandas))
1042 (home-page "https://github.com/dask/dask-image")
1043 (synopsis "Distributed image processing")
1044 (description "This is a package for image processing with Dask arrays.
1045Features:
1046
1047@itemize
1048@item Provides support for loading image files.
1049@item Implements commonly used N-D filters.
1050@item Includes a few N-D Fourier filters.
1051@item Provides some functions for working with N-D label images.
1052@item Supports a few N-D morphological operators.
1053@end itemize")
1054 (license license:bsd-3)))
1055
1056;; A bare minimal package, mainly to use in tests and reduce closure size.
1057;; Tests are left out in the main package to slim down native-inputs and
1058;; propagated-inputs.
1059(define-public python-dask-minimal
1060 (package/inherit python-dask
1061 (name "python-dask-minimal")
1062 (arguments
1063 (substitute-keyword-arguments arguments
1064 ((#:tests? _ #t) #f)))
1065 (native-inputs
1066 (list python-setuptools
1067 python-setuptools-scm-next))
1068 (propagated-inputs
1069 (list python-click
1070 python-cloudpickle
1071 python-fsspec
1072 python-packaging
1073 python-partd
1074 python-pyyaml
1075 python-toolz))))
1076
1077(define-public python-decaylanguage
1078 (package
1079 (name "python-decaylanguage")
1080 (version "1.0.0")
1081 (source
1082 (origin
1083 (method url-fetch)
1084 (uri (pypi-uri "decaylanguage" version))
1085 (sha256
1086 (base32 "14gam45rs90xg8qgng94fdava2rr17r9ps6mijsw925xdiwljpyh"))))
1087 (build-system pyproject-build-system)
1088 (arguments
1089 (list
1090 ;; This file fails to be collected with "DeprecationWarning: setDaemon()
1091 ;; is deprecated, set the daemon attribute instead".
1092 #:test-flags #~(list "--ignore" "tests/test_convert.py")))
1093 (propagated-inputs (list python-attrs
1094 python-graphviz
1095 python-hepunits
1096 python-lark
1097 python-numpy
1098 python-pandas
1099 python-particle
1100 python-plumbum))
1101 (native-inputs (list python-hatch-vcs
1102 python-hatchling
1103 python-pytest
1104 python-pytest-benchmark))
1105 (home-page "https://decaylanguage.readthedocs.io/en/latest/")
1106 (synopsis "Language to describe, manipulate and convert particle decays")
1107 (description "DecayLanguage implements a language to describe and convert
1108particle decays between digital representations, effectively making it
1109possible to interoperate several fitting programs. Particular interest is
1110given to programs dedicated to amplitude analyses.")
1111 (license license:bsd-3)))
1112
1113(define-public python-distributed
1114 (package
1115 (name "python-distributed")
1116 (version "2026.3.0")
1117 (source
1118 (origin
1119 (method git-fetch)
1120 (uri (git-reference
1121 (url "https://github.com/dask/distributed")
1122 (commit version)))
1123 (file-name (git-file-name name version))
1124 (sha256
1125 (base32 "1pdf3misfd9iycrd03prajmyvzp9j9p74nxk4zp27fz1jv04jawm"))))
1126 (build-system pyproject-build-system)
1127 (arguments
1128 (list
1129 ;; TODO: Test suite requires networking for most of the tests or special
1130 ;; care, find a way to enable some unit tests, see:
1131 ;; <.github/workflows/tests.yaml>.
1132 #:tests? #f))
1133 (native-inputs
1134 (list python-setuptools
1135 python-setuptools-scm-next))
1136 (propagated-inputs
1137 (list python-click
1138 python-cloudpickle
1139 python-dask
1140 python-jinja2
1141 python-locket
1142 python-msgpack
1143 python-packaging
1144 python-psutil
1145 python-pyyaml
1146 python-sortedcontainers
1147 python-tblib
1148 python-toolz
1149 python-tornado
1150 python-urllib3
1151 python-zict))
1152 (home-page "https://distributed.dask.org")
1153 (synopsis "Distributed scheduler for Dask")
1154 (description "Dask.distributed is a lightweight library for distributed
1155computing in Python. It extends both the @code{concurrent.futures} and
1156@code{dask} APIs to moderate sized clusters.")
1157 (license license:bsd-3)))
1158
1159(define-public python-dvc-data
1160 (package
1161 (name "python-dvc-data")
1162 (version "3.16.12")
1163 (home-page "https://github.com/iterative/dvc-data")
1164 (source (origin
1165 (method url-fetch)
1166 (uri (pypi-uri "dvc_data" version))
1167 (sha256
1168 (base32
1169 "156iwdn7v5jhwbpwz92n28qiasgcbmcqv9vxg8xbvdfxzlzw0b7r"))))
1170 (build-system pyproject-build-system)
1171 (propagated-inputs
1172 (list python-attrs
1173 python-dictdiffer
1174 python-diskcache
1175 python-dvc-objects
1176 python-fsspec
1177 python-funcy-1.14
1178 python-orjson
1179 python-pygtrie
1180 python-sqltrie
1181 python-tqdm))
1182 (native-inputs
1183 (list python-click
1184 python-pytest
1185 python-pytest-benchmark
1186 python-pytest-mock
1187 ;; python-pytest-servers is not packaged in Guix yet
1188 python-setuptools
1189 python-setuptools-scm
1190 python-typer
1191 python-wheel))
1192 (arguments
1193 (list
1194 #:test-flags
1195 ;; TODO: package python-pytest-server with its transitive dependencies
1196 #~(list "--ignore=tests/hashfile/test_db.py"
1197 "--ignore=tests/hashfile/test_db_index.py"
1198 "--ignore=tests/hashfile/test_obj.py"
1199 "--ignore=tests/index/test_build.py"
1200 "--ignore=tests/index/test_checkout.py"
1201 "--ignore=tests/index/test_fs.py"
1202 "--ignore=tests/index/test_index.py"
1203 "--ignore=tests/index/test_storage.py")
1204 #:phases
1205 #~(modify-phases %standard-phases
1206 (add-after 'unpack 'patch-pyproject
1207 (lambda _
1208 ;; setuptools cannot handle both license and license-files
1209 (substitute* "pyproject.toml"
1210 (("^license = .*") "license = {text = \"Apache-2.0\"}\n")
1211 (("^license-files = .*") "")))))))
1212 (synopsis "DVC's data management subsystem")
1213 (description "Dvc data is DVC's data management subsystem.")
1214 (license license:asl2.0)))
1215
1216(define-public python-dvc-objects
1217 (package
1218 (name "python-dvc-objects")
1219 (version "5.1.1")
1220 (home-page "https://github.com/iterative/dvc-objects")
1221 (source
1222 (origin
1223 (method url-fetch)
1224 (uri (pypi-uri "dvc_objects" version))
1225 (sha256
1226 (base32 "1amx5z8k2v2hbsajg0dcd5dxmmlv9bnbchpas95s8sj86cm8yc4y"))))
1227 (build-system pyproject-build-system)
1228 (propagated-inputs (list python-fsspec
1229 python-funcy-1.14))
1230 (native-inputs
1231 (list python-mypy
1232 python-pytest
1233 python-pytest-asyncio
1234 python-pytest-benchmark
1235 python-pytest-mock
1236 python-pytest-sugar
1237 python-reflink
1238 python-setuptools
1239 python-setuptools-scm
1240 python-wheel))
1241 (synopsis "Filesystem and object-db level abstractions for DVC")
1242 (description "Dvc objects provides a filesystem and object-db level
1243abstractions to use in dvc and dvc-data.")
1244 (license license:asl2.0)))
1245
1246(define-public python-ecos
1247 (package
1248 (name "python-ecos")
1249 (version "2.0.13")
1250 (source
1251 (origin
1252 (method git-fetch)
1253 (uri (git-reference
1254 (url "https://github.com/embotech/ecos-python")
1255 (commit (string-append "v" version))
1256 (recursive? #true)))
1257 (file-name (git-file-name name version))
1258 (sha256
1259 (base32 "16ljq8maflfkgbw16rldg6cy14vgz2pb3b2iga60i7yzkq2ikmyw"))))
1260 (build-system pyproject-build-system)
1261 (propagated-inputs (list python-numpy python-scipy))
1262 (native-inputs (list python-pytest python-setuptools python-wheel))
1263 (home-page "https://github.com/embotech/ecos")
1264 (synopsis "Embedded Cone Solver")
1265 (description
1266 "This is the Python package for ECOS: Embedded Cone Solver. ECOS is
1267numerical software for solving convex second-order cone programs (SOCPs).")
1268 (license license:gpl3)))
1269
1270(define-public python-efficient-apriori
1271 (package
1272 (name "python-efficient-apriori")
1273 (version "2.0.6")
1274 (source
1275 (origin
1276 (method url-fetch)
1277 (uri (pypi-uri "efficient_apriori" version))
1278 (sha256
1279 (base32 "0vmdp8qkir7jrmwgpzajssyxh6q78m0q16pr1v657vla9x5wxn2s"))))
1280 (build-system pyproject-build-system)
1281 (arguments
1282 (list
1283 #:test-flags
1284 #~(list "--doctest-modules" "-vv" "efficient_apriori")))
1285 (native-inputs (list python-setuptools python-pytest))
1286 (home-page "https://github.com/tommyod/Efficient-Apriori")
1287 (synopsis "An efficient Python implementation of the Apriori algorithm.")
1288 (description "An efficient Python implementation of the Apriori algorithm,
1289which uncovers hidden structures in categorical data")
1290 (license license:expat)))
1291
1292(define-public python-einops
1293 (package
1294 (name "python-einops")
1295 (version "0.8.1")
1296 (source
1297 (origin
1298 (method git-fetch) ;PyPI misses .ipynb files required for tests
1299 (uri (git-reference
1300 (url "https://github.com/arogozhnikov/einops")
1301 (commit (string-append "v" version))))
1302 (file-name (git-file-name name version))
1303 (sha256
1304 (base32 "07xd5a4sya3mr003f17hxykcbq3zf3mnr51qagv7fy55qcnbkn97"))))
1305 (build-system pyproject-build-system)
1306 (arguments
1307 (list
1308 #:test-flags
1309 ;; Skip optional dependency on Jupyter during tests.
1310 #~(list "--ignore=scripts/test_notebooks.py")
1311 #:phases
1312 #~(modify-phases %standard-phases
1313 (add-after 'unpack 'set-backend
1314 (lambda _
1315 ;; Einops supports different backends, but we test
1316 ;; only NumPy for availability and simplicity.
1317 (setenv "EINOPS_TEST_BACKENDS" "numpy"))))))
1318 (native-inputs
1319 (list python-hatchling
1320 python-nbconvert
1321 python-nbformat
1322 python-parameterized
1323 python-pytest))
1324 (propagated-inputs
1325 (list python-numpy))
1326 (home-page "https://einops.rocks/")
1327 (synopsis "Tensor operations for different backends")
1328 (description
1329 "Einops provides a set of tensor operations for NumPy and multiple deep
1330learning frameworks.")
1331 (license license:expat)))
1332
1333(define-public python-fast-array-utils
1334 (package
1335 (name "python-fast-array-utils")
1336 (version "1.4.1")
1337 (source
1338 (origin
1339 (method git-fetch)
1340 (uri (git-reference
1341 (url "https://github.com/scverse/fast-array-utils")
1342 (commit (string-append "v" version))))
1343 (file-name (git-file-name name version))
1344 (sha256
1345 (base32 "07qbsbsmzycxa5nib39zp7rfwcj3cvqyg4mpfkdn7xg2bmqprl7n"))))
1346 (build-system pyproject-build-system)
1347 (arguments
1348 ;; tests: 1455 passed, 1621 skipped, 232 deselected
1349 (list #:test-flags #~(list "-m" "not benchmark")))
1350 (native-inputs
1351 (list python-dask-minimal
1352 python-hatch-docstring-description
1353 python-hatch-fancy-pypi-readme
1354 python-hatch-vcs
1355 python-hatchling
1356 python-numba
1357 python-packaging
1358 python-pytest
1359 python-pytest-doctestplus
1360 python-scipy-minimal))
1361 (propagated-inputs
1362 (list python-numpy))
1363 (home-page "https://fast-array-utils.scverse.org/")
1364 (synopsis "Fast array utilities")
1365 (description
1366 "This package provides fast array utilities with minimal dependencies.")
1367 (license license:mpl2.0)))
1368
1369(define-public python-fast-histogram
1370 (package
1371 (name "python-fast-histogram")
1372 (properties '((commit . "92ed2049a2e24b15993bb770e96a5d21f4736be3")
1373 (revision . "0")))
1374 (version (git-version "0.14"
1375 (assoc-ref properties 'revision)
1376 (assoc-ref properties 'commit)))
1377 (source
1378 (origin
1379 (method git-fetch)
1380 (uri (git-reference
1381 (url "https://github.com/astrofrog/fast-histogram")
1382 (commit (assoc-ref properties 'commit))))
1383 (file-name (git-file-name name version))
1384 (sha256
1385 (base32 "0iqgrnzs2w0v36iyp9782lxc8nji2v7fvs1k90pnrrf6r3w98p0v"))))
1386 (build-system pyproject-build-system)
1387 (arguments
1388 (list
1389 #:test-flags
1390 ;; XXX: Too many bins for data range.
1391 #~(list "-k" "not test_1d_compare_with_numpy")
1392 #:phases
1393 #~(modify-phases %standard-phases
1394 (add-before 'check 'build-extensions
1395 (lambda _
1396 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
1397 (native-inputs
1398 (list python-hypothesis
1399 python-pytest
1400 python-setuptools
1401 python-setuptools-scm
1402 python-wheel))
1403 (propagated-inputs
1404 (list python-numpy))
1405 (home-page "https://github.com/astrofrog/fast-histogram")
1406 (synopsis "Fast simple 1D and 2D histograms")
1407 (description
1408 "The fast-histogram mini-package aims to provide simple and fast
1409histogram functions for regular bins that don't compromise on performance. It
1410doesn't do anything complicated - it just implements a simple histogram
1411algorithm in C and keeps it simple. The aim is to have functions that are
1412fast but also robust and reliable. The result is a 1D histogram function here
1413that is 7-15x faster than @code{numpy.histogram}, and a 2D histogram function
1414that is 20-25x faster than @code{numpy.histogram2d}.")
1415 (license license:bsd-3)))
1416
1417(define-public python-fastcluster
1418 (package
1419 (name "python-fastcluster")
1420 (version "1.3.0")
1421 (source
1422 (origin
1423 (method url-fetch)
1424 (uri (pypi-uri "fastcluster" version))
1425 (sha256
1426 (base32 "00nzjrk8cp3kwm0qax5xxg61dxq9b8s3jspsqx4skyn3lpmkl8ym"))))
1427 (build-system pyproject-build-system)
1428 (native-inputs
1429 (list python-pytest
1430 python-scipy
1431 python-setuptools))
1432 (propagated-inputs
1433 (list python-numpy))
1434 (home-page "https://danifold.net/fastcluster.html")
1435 (synopsis "Fast hierarchical clustering routines for R and Python")
1436 (description "The fastcluster package implements seven common hierarchical
1437clustering schemes efficiently. The package is made with two interfaces to
1438standard software: R and Python.")
1439 (license license:bsd-2)))
1440
1441;; XXX: Not maintained since 2019. The project was archived by the owner on
1442;; Nov 2, 2020. It is now read-only.
1443(define-public python-fbpca
1444 (package
1445 (name "python-fbpca")
1446 (version "1.0")
1447 (source (origin
1448 (method url-fetch)
1449 (uri (pypi-uri "fbpca" version))
1450 (sha256
1451 (base32
1452 "1lbjqhqsdmqk86lb86q3ywf7561zmdny1dfvgwqkyrkr4ij7f1hm"))))
1453 (build-system pyproject-build-system)
1454 (arguments
1455 (list
1456 #:test-flags
1457 ;; TypeError: 'dia_matrix' object is not subscriptable
1458 #~(list "--deselect=fbpca.py::TestPCA::test_sparse"
1459 "fbpca.py")))
1460 (native-inputs (list python-pytest python-setuptools))
1461 (propagated-inputs
1462 (list python-numpy python-scipy))
1463 (home-page "https://fbpca.readthedocs.io/")
1464 (synopsis "Functions for principal component analysis and accuracy checks")
1465 (description
1466 "This package provides fast computations for @dfn{principal component
1467analysis} (PCA), SVD, and eigendecompositions via randomized methods")
1468 (license license:bsd-3)))
1469
1470(define-public python-fgivenx
1471 (package
1472 (name "python-fgivenx")
1473 ;; See: https://github.com/handley-lab/fgivenx/issues/30
1474 (properties '((commit . "cf51dbf8b7efdd8d84f055740a069a5b882dcf77")
1475 (revision . "0")))
1476 (version (git-version "2.4.2"
1477 (assoc-ref properties 'revision)
1478 (assoc-ref properties 'commit)))
1479 (source
1480 (origin
1481 (method git-fetch)
1482 (uri (git-reference
1483 (url "https://github.com/handley-lab/fgivenx")
1484 (commit (assoc-ref properties 'commit))))
1485 (file-name (git-file-name name version))
1486 (sha256
1487 (base32 "1z9lwrjvz977gk6z7zqj8d21yi0xcz67mj1737yzzdc8c03nzg9w"))))
1488 (build-system pyproject-build-system)
1489 ;; tests: 25 passed, 1 warning
1490 (native-inputs
1491 (list python-pytest
1492 python-pytest-mpl
1493 python-setuptools))
1494 (propagated-inputs
1495 (list python-matplotlib
1496 python-numpy
1497 python-scipy
1498 ;; [optional]
1499 python-getdist
1500 python-joblib
1501 python-tqdm))
1502 (home-page "https://github.com/handley-lab/fgivenx")
1503 (synopsis "Functional Posterior Plotter")
1504 (description
1505 "@code{fgivenx} is a Python package for plotting posteriors of functions.
1506It is currently used in astronomy, but will be of use to any scientists
1507performing Bayesian analyses which have predictive posteriors that are
1508functions.
1509
1510This package allows one to plot a predictive posterior of a function,
1511dependent on sampled parameters. It assumes one has a Bayesian posterior
1512@code{Post(theta|D,M)} described by a set of posterior samples
1513@code{{theta_i}~Post}. If there is a function parameterised by theta
1514@code{y=f(x;theta)}, then this script will produce a contour plot of the
1515conditional posterior @code{P(y|x,D,M)} in the @code{(x,y)} plane.")
1516 (license license:expat)))
1517
1518(define-public python-flox
1519 (package
1520 (name "python-flox")
1521 ;; 0.11.2 (2026-02-26); the latest changes provide tests fixtures.
1522 (properties '((commit . "d2857f323a3f5b7c737b34e8cfc09492cc9ef2bf")
1523 (revision . "0")))
1524 (version (git-version "0.11.2"
1525 (assoc-ref properties 'revision)
1526 (assoc-ref properties 'commit)))
1527 (source
1528 (origin
1529 (method git-fetch)
1530 (uri (git-reference
1531 (url "https://github.com/xarray-contrib/flox")
1532 (commit (assoc-ref properties 'commit))))
1533 (file-name (git-file-name name version))
1534 (sha256
1535 (base32 "1m0svx2pdrfc8zps1kkzg12i9ncpz1mah9k8q467p6jjl8a5y7yc"))))
1536 (build-system pyproject-build-system)
1537 (arguments
1538 (list
1539 ;; tests: 10998 passed, 8264 skipped, 156 xfailed, 3 xpassed, 1376
1540 ;; warnings
1541 #:test-flags
1542 #~(list "--numprocesses" (number->string (parallel-job-count))
1543 ;; These are benchmark tests.
1544 "--ignore" "tests/test_asv.py"
1545 ;; Failed with DeadlineExceeded exeption.
1546 "--deselect=tests/test_properties.py::test_first_last"
1547 #$@(map (lambda (test)
1548 (string-append "--deselect=tests/test_cohorts.py"
1549 test))
1550 ;; Failed to compare snapshoted arrays.
1551 (list "::test_snapshot_cohorts[ERA5DayOfYear]"
1552 "::test_snapshot_cohorts[ERA5Google]"
1553 "::test_snapshot_cohorts[ERA5MonthHour]"
1554 "::test_snapshot_cohorts[ERA5MonthHourRechunked]"
1555 "::test_snapshot_cohorts[OISST]"
1556 "::test_snapshot_cohorts[PerfectBlockwiseResampling]"
1557 "::test_snapshot_cohorts[PerfectMonthly]"
1558 "::test_snapshot_cohorts[RandomBigArray]"
1559 "::test_snapshot_cohorts[SingleChunk]"
1560 "::test_snapshot_cohorts[NWMMidwest]")))))
1561 (native-inputs
1562 (list python-netcdf4
1563 python-pytest
1564 python-pytest-snapshot
1565 python-pytest-xdist
1566 python-setuptools
1567 python-setuptools-scm))
1568 (propagated-inputs
1569 (list python-numpy
1570 python-numpy-groupies
1571 python-packaging
1572 python-pandas
1573 python-scipy
1574 python-toolz
1575 ;; [optional]
1576 ;; python-asv ;not packaged yet in Guix
1577 python-cachey
1578 python-cftime
1579 ;; python-cubed ;not packaged yet in Guix
1580 python-dask
1581 python-lxml
1582 python-matplotlib
1583 python-numba
1584 python-numbagg
1585 python-sparse
1586 python-xarray
1587 python-zarr))
1588 (home-page "https://github.com/xarray-contrib/flox")
1589 (synopsis "GroupBy operations for @code{dask.array}")
1590 (description
1591 "@code{flox} mainly provides strategies for fast GroupBy reductions with
1592@code{dask.array}. It uses the MapReduce paradigm (or a \"tree reduction\")
1593to run the GroupBy operation in a parallel-native way totally avoiding a sort
1594or shuffle operation. @code{flox} can use either @code{dask} or @code{cubed}
1595as its backend.")
1596 (license license:asl2.0)))
1597
1598(define-public python-formulaic
1599 (package
1600 (name "python-formulaic")
1601 (version "1.2.2")
1602 (source
1603 (origin
1604 (method git-fetch)
1605 (uri (git-reference
1606 (url "https://github.com/matthewwardrop/formulaic")
1607 (commit (string-append "v" version))))
1608 (file-name (git-file-name name version))
1609 (sha256
1610 (base32 "0iifwsbsqwg4lx8m9b2rclr9jzpg7zgnly0iaf1nsva15jxi90hb"))))
1611 (build-system pyproject-build-system)
1612 (native-inputs
1613 (list python-hatchling
1614 python-hatch-vcs
1615 python-pytest
1616 python-sympy))
1617 (propagated-inputs
1618 (list python-interface-meta
1619 python-narwhals
1620 python-numpy
1621 python-pandas
1622 python-scipy
1623 python-typing-extensions
1624 python-wrapt))
1625 (home-page "https://github.com/matthewwardrop/formulaic")
1626 (synopsis "Implementation of Wilkinson formulas")
1627 (description "Formulaic is a high-performance implementation of Wilkinson
1628formulas for Python.")
1629 (license license:expat)))
1630
1631(define-public python-geosketch
1632 (package
1633 (name "python-geosketch")
1634 (version "1.3")
1635 (source
1636 (origin
1637 (method git-fetch)
1638 (uri (git-reference
1639 (url "https://github.com/brianhie/geosketch")
1640 (commit (string-append "v" version))))
1641 (file-name (git-file-name name version))
1642 (sha256
1643 (base32 "0lnynk4r87zqck5mmj33axmly34hh7lrlmfy1qidrw7xihy28g5a"))))
1644 (build-system pyproject-build-system)
1645 ;; XXX: Avoid circular dependency on python-scanorama.
1646 (arguments (list #:tests? #f))
1647 (native-inputs (list python-setuptools))
1648 (propagated-inputs (list python-fbpca python-numpy python-scikit-learn))
1649 (home-page "https://github.com/brianhie/geosketch")
1650 (synopsis "Geometry-preserving random sampling")
1651 (description "geosketch is a Python package that implements the geometric
1652sketching algorithm described by Brian Hie, Hyunghoon Cho, Benjamin DeMeo,
1653Bryan Bryson, and Bonnie Berger in \"Geometric sketching compactly summarizes
1654the single-cell transcriptomic landscape\", Cell Systems (2019). This package
1655provides an example implementation of the algorithm as well as scripts
1656necessary for reproducing the experiments in the paper.")
1657 (license license:expat)))
1658
1659(define-public python-hepunits
1660 (package
1661 (name "python-hepunits")
1662 (version "2.4.6")
1663 (source
1664 (origin
1665 (method git-fetch)
1666 (uri (git-reference
1667 (url "https://github.com/scikit-hep/hepunits")
1668 (commit (string-append "v" version))))
1669 (file-name (git-file-name name version))
1670 (sha256
1671 (base32 "0xkgaf7kmj1zrr8vd65xnam43xb9bd70q3kg7fvlshmd51k8z35r"))))
1672 (build-system pyproject-build-system)
1673 (native-inputs
1674 (list python-hatch-vcs
1675 python-hatchling
1676 python-pint
1677 python-pytest))
1678 (home-page "https://github.com/scikit-hep/hepunits")
1679 (synopsis "Units and constants in the HEP system of units")
1680 (description "@code{hepunits} collects the most commonly used units and
1681constants in the HEP System of Units, as derived from the basic units
1682originally defined by the CLHEP project.")
1683 (license license:bsd-3)))
1684
1685(define-public python-hist
1686 (package
1687 (name "python-hist")
1688 (version "2.10.1")
1689 (source
1690 (origin
1691 (method url-fetch)
1692 (uri (pypi-uri "hist" version))
1693 (sha256
1694 (base32 "0bhv8bf7zizxf7nsps5hyfppjk1ry0z6pwrwhz44xmm6g6nfdj6y"))))
1695 (build-system pyproject-build-system)
1696 (propagated-inputs (list python-boost-histogram
1697 python-histoprint
1698 python-numpy
1699 python-typing-extensions))
1700 (native-inputs (list python-hatch-vcs
1701 python-hatchling
1702 python-pytest
1703 python-pytest-mpl))
1704 (home-page "https://hist.readthedocs.io/en/latest/")
1705 (synopsis "Hist classes and utilities")
1706 (description
1707 "Hist is an analyst-friendly front-end for @code{boost-histogram}.")
1708 (license license:bsd-3)))
1709
1710(define-public python-histoprint
1711 (package
1712 (name "python-histoprint")
1713 (version "2.7.1")
1714 (source
1715 (origin
1716 (method git-fetch)
1717 (uri (git-reference
1718 (url "https://github.com/scikit-hep/histoprint")
1719 (commit (string-append "v" version))))
1720 (file-name (git-file-name name version))
1721 (sha256
1722 (base32 "03ydf3g5y6w7jx1ai7kg4fsdbjf2bjrr3dmv05wrbq7hb8ccb0y9"))))
1723 (build-system pyproject-build-system)
1724 (native-inputs
1725 (list python-hatch-vcs
1726 python-hatchling
1727 python-pytest))
1728 (propagated-inputs
1729 (list python-click
1730 python-numpy
1731 python-uhi
1732 ;; [optional]
1733 python-awkward
1734 python-boost-histogram
1735 python-rich
1736 python-uproot))
1737 (home-page "https://github.com/scikit-hep/histoprint")
1738 (synopsis "Pretty print histograms to the console")
1739 (description "Histoprint uses a mix of terminal color codes and Unicode
1740trickery (i.e. combining characters) to plot overlaying histograms.")
1741 (license license:expat)))
1742
1743(define-public python-imagehash
1744 (package
1745 (name "python-imagehash")
1746 (version "4.3.2")
1747 (source
1748 (origin
1749 (method git-fetch) ;no tests in PyPI
1750 (uri (git-reference
1751 ;; It's an effective and maintained fork of
1752 ;; <https://github.com/bunchesofdonald/photohash> project, which
1753 ;; has the latest release in 2016.
1754 (url "https://github.com/JohannesBuchner/imagehash")
1755 (commit (string-append "v" version))))
1756 (file-name (git-file-name name version))
1757 (sha256
1758 (base32 "1rz1fpwhcx0cbln189bcs61wlwgngcjcn77jvm0yji5s7lshhipy"))))
1759 (build-system pyproject-build-system)
1760 (arguments
1761 (list
1762 #:phases
1763 #~(modify-phases %standard-phases
1764 ;; Upstream plans to remove Python 2 compatibility:
1765 ;; https://github.com/JohannesBuchner/imagehash/pull/223
1766 (add-after 'unpack 'remove-six
1767 (lambda _
1768 (substitute* (find-files "." ".py$")
1769 (("import six") "")
1770 (("six\\.assertRaisesRegex\\(self, ")
1771 "self.assertRaisesRegex(")
1772 (("six\\.exec_") "")))))))
1773 (native-inputs
1774 (list python-pytest
1775 python-setuptools
1776 python-wheel))
1777 (propagated-inputs
1778 (list python-numpy
1779 python-pillow
1780 python-pywavelets
1781 python-scipy))
1782 (home-page "https://github.com/JohannesBuchner/imagehash")
1783 (synopsis "Perceptual Image Hashing library")
1784 (description
1785 "This package implements a functionality to tell whether two images look
1786nearly identical. The image hash algorithms (average, perceptual, difference,
1787wavelet) analyse the image structure on luminance (without color information).
1788The color hash algorithm analyses the color distribution and black & gray
1789fractions (without position information).
1790
1791Features:
1792@itemize
1793@item average hashing
1794@item perceptual hashing
1795@item difference hashing
1796@item wavelet hashing
1797@item HSV color hashing (colorhash)
1798@item crop-resistant hashing
1799@end itemize")
1800 (license license:bsd-2)))
1801
1802(define-public python-iminuit
1803 (package
1804 (name "python-iminuit")
1805 ;; TODO: PyPI archive bundles https://github.com/root-project/root which
1806 ;; is shipped as a git submodule in "extern/root", it would be nice to have
1807 ;; Root on board in Guix.
1808 (version "2.32.0")
1809 (source
1810 (origin
1811 (method url-fetch)
1812 (uri (pypi-uri "iminuit" version))
1813 (sha256
1814 (base32 "1lpprnn6h1f065b4aay6cr2bk6s5h3fv3gfnbbkrp5b5hv8k8ax3"))))
1815 (build-system pyproject-build-system)
1816 (native-inputs
1817 (list python-pytest
1818 python-scikit-build-core
1819 python-scipy-minimal))
1820 (propagated-inputs
1821 (list python-numpy))
1822 (home-page "https://github.com/scikit-hep/iminuit")
1823 (synopsis "Python interface for MINUIT2")
1824 (description
1825 "@code{iminuit} is a Jupyter-friendly Python interface for the @code{Minuit2}
1826C++ library maintained by CERN's ROOT team.
1827
1828Minuit was designed to optimize statistical cost functions, for
1829maximum-likelihood and least-squares fits. It provides the best-fit
1830parameters and error estimates from likelihood profile analysis.
1831
1832Optionally, Iminuit supports SciPy minimizers as alternatives to Minuit's
1833MIGRAD algorithm and Numba accelerated functions.")
1834 ;; Python interface under MIT Expat, Iminuit C++ library under LGPL v2.1+.
1835 (license (list license:expat license:lgpl2.1+))))
1836
1837(define-public python-jacobi
1838 (package
1839 (name "python-jacobi")
1840 (version "0.9.2")
1841 (source
1842 (origin
1843 (method url-fetch)
1844 (uri (pypi-uri "jacobi" version))
1845 (sha256
1846 (base32 "0a08680q6rnl6b1azq0lzd8r08pgnjd9ynwivb1g2vi4ccb4h7y1"))))
1847 (build-system pyproject-build-system)
1848 (arguments
1849 (list
1850 #:phases
1851 #~(modify-phases %standard-phases
1852 (add-after 'unpack 'fix-pytest-config
1853 (lambda _
1854 (substitute* "pyproject.toml"
1855 ;; AttributeError: module 'numpy' has no attribute
1856 ;; 'VisibleDeprecationWarning'
1857 ((".*error::numpy.VisibleDeprecationWarning.*") "")))))))
1858 (native-inputs
1859 (list python-pytest
1860 python-pytest-benchmark
1861 python-setuptools
1862 python-setuptools-scm))
1863 (propagated-inputs
1864 (list python-numpy))
1865 (home-page "https://github.com/hdembinski/jacobi")
1866 (synopsis "Compute numerical derivatives")
1867 (description
1868 "This package provides fast numerical derivatives for analytic
1869functions with arbitrary round-off error and error propagation.")
1870 (license license:expat)))
1871
1872(define-public python-janitor-rs
1873 (package
1874 (name "python-janitor-rs")
1875 (version "0.6.1")
1876 (source
1877 (origin
1878 ;; The upstream git source has no tags.
1879 (method url-fetch)
1880 (uri (pypi-uri "janitor_rs" version))
1881 (sha256
1882 (base32 "0xicxplz8vngbj4s6c7d08gpivns5bda85020yf1wjs8788g9m2l"))))
1883 (build-system pyproject-build-system)
1884 (arguments
1885 (list
1886 #:tests? #f ; No tests.
1887 #:imported-modules `(,@%cargo-build-system-modules
1888 ,@%pyproject-build-system-modules)
1889 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
1890 (guix build pyproject-build-system)
1891 (guix build utils))
1892 #:phases
1893 #~(modify-phases %standard-phases
1894 (add-after 'unpack 'prepare-cargo-build-system
1895 (lambda args
1896 (for-each
1897 (lambda (phase)
1898 (format #t "Running cargo phase: ~a~%" phase)
1899 (apply (assoc-ref cargo:%standard-phases phase)
1900 #:vendor-dir ".cargo/vendor"
1901 #:cargo-target #$(cargo-triplet)
1902 args))
1903 '(unpack-rust-crates
1904 configure
1905 check-for-pregenerated-files
1906 patch-cargo-checksums)))))))
1907 (native-inputs (append
1908 (list maturin
1909 rust
1910 `(,rust "cargo"))
1911 (or (and=> (%current-target-system)
1912 (compose list make-rust-sysroot))
1913 '())))
1914 (inputs (cargo-inputs 'janitor-rs))
1915 (home-page "https://github.com/pyjanitor-devs/janitor-rs")
1916 (synopsis "Rust library for faster pyjanitor")
1917 (description
1918 "This package provides a Rust library to improve the performance of
1919@code{python-pyjanitor}.")
1920 (license license:expat)))
1921
1922(define-public python-legendkit
1923 (package
1924 (name "python-legendkit")
1925 (version "0.3.6")
1926 (source
1927 (origin
1928 (method git-fetch) ;no tests in PyPI archive
1929 (uri (git-reference
1930 (url "https://github.com/Marsilea-viz/legendkit")
1931 (commit (string-append "v" version))))
1932 (file-name (git-file-name name version))
1933 (sha256
1934 (base32 "03xdhh95w4zydwa4ahp3gyfa6i60c9s5arfcj366knckb1bnpnn9"))))
1935 (build-system pyproject-build-system)
1936 (native-inputs
1937 (list python-hatchling
1938 python-pytest))
1939 (propagated-inputs
1940 (list python-matplotlib))
1941 (home-page "https://github.com/Marsilea-viz/legendki")
1942 (synopsis "Legend creation and manipulation for matplotlib")
1943 (description
1944 "This package implements a functionality to create and manipulate plot
1945legends for @code{matplotlib}.")
1946 (license license:expat)))
1947
1948(define-public python-libneuroml
1949 (package
1950 (name "python-libneuroml")
1951 (version "0.6.7")
1952 (source
1953 (origin
1954 (method git-fetch)
1955 (uri (git-reference
1956 (url "https://github.com/NeuralEnsemble/libNeuroML.git")
1957 (commit (string-append "v" version))))
1958 (file-name (git-file-name name version))
1959 (sha256
1960 (base32 "1x5sgm0250zdfnw16cbmgl45hz2kfmww5lghpyhlcadgnbzyq3dx"))))
1961 (build-system pyproject-build-system)
1962 ;; tests: 116 passed, 5 xfailed, 5 warnings
1963 (native-inputs
1964 (list python-pytest
1965 python-numpy
1966 python-setuptools
1967 python-tables))
1968 (propagated-inputs
1969 (list python-lxml
1970 python-natsort
1971 python-networkx))
1972 (home-page "https://libneuroml.readthedocs.org/en/latest/")
1973 (synopsis
1974 "Python library for working with NeuroML descriptions of neuronal models")
1975 (description
1976 "This package provides a Python library for working with NeuroML descriptions of
1977neuronal models")
1978 (license license:bsd-3)))
1979
1980(define-public python-marsilea
1981 (package
1982 (name "python-marsilea")
1983 (version "0.6.2")
1984 (source
1985 (origin
1986 (method git-fetch)
1987 (uri (git-reference
1988 (url "https://github.com/Marsilea-viz/marsilea")
1989 (commit (string-append "v" version))))
1990 (file-name (git-file-name name version))
1991 (sha256
1992 (base32 "0i7n44fzy8qibdk8jc6f1g356xa10cc7fr64dhpqkrsp9sz6kx70"))))
1993 (build-system pyproject-build-system)
1994 (arguments
1995 (list
1996 #:phases
1997 #~(modify-phases %standard-phases
1998 (add-before 'build 'set-version
1999 (lambda _
2000 (substitute* "pyproject.toml"
2001 ((".*uv-dynamic-versioning>.*") "")
2002 (("source.*uv-dynamic-versioning.*") "source = 'vcs'")))))))
2003 (native-inputs
2004 (list python-hatch-vcs
2005 python-hatchling
2006 python-pytest))
2007 (propagated-inputs
2008 (list python-legendkit
2009 python-matplotlib
2010 python-numpy
2011 python-pandas
2012 python-platformdirs
2013 python-scipy
2014 python-seaborn
2015 ;; [optional]
2016 python-fastcluster
2017 python-pyarrow)) ;extra == "parquet"
2018 (home-page "https://github.com/Marsilea-viz/marsilea")
2019 (synopsis "Declarative creation of composable visualizations")
2020 (description
2021 "Marsilea is a Python library for creating composable visualizations in a
2022declarative way. It is built on top of Matplotlib and provides a high-level
2023API for you to puzzle different visualizations together like logo.")
2024 (license license:expat)))
2025
2026(define-public python-maxent-disaggregation
2027 (package
2028 (name "python-maxent-disaggregation")
2029 (version "1.3.1")
2030 (source
2031 (origin
2032 (method git-fetch)
2033 (uri (git-reference
2034 (url "https://github.com/jakobsarthur/maxent_disaggregation")
2035 (commit (string-append "v" version))))
2036 (file-name (git-file-name name version))
2037 (sha256
2038 (base32 "0iqvgm5vcaj34wgbiyq6f7kqqyyvvj8wlc2fjanrsgnyp7imnvjd"))))
2039 (build-system pyproject-build-system)
2040 (native-inputs
2041 (list python-corner
2042 python-matplotlib
2043 python-pytest
2044 python-setuptools))
2045 (propagated-inputs
2046 (list nlopt python-numpy
2047 python-scipy))
2048 (home-page "https://github.com/jakobsarthur/maxent_disaggregation")
2049 (synopsis "Propagate uncertainty when disaggregating data")
2050 (description
2051 "This package provides tooling to help with the propagation of
2052uncertainty when disaggregating data, using the maximum entropy principle.")
2053 (license license:expat)))
2054
2055(define-public python-meshzoo
2056 (package
2057 (name "python-meshzoo")
2058 (version "0.9.4")
2059 (source
2060 (origin
2061 (method git-fetch)
2062 (uri (git-reference
2063 (url "https://github.com/diego-hayashi/meshzoo")
2064 (commit (string-append "v" version))))
2065 (file-name (git-file-name name version))
2066 (sha256
2067 (base32 "107byfppbq16fqyp2hw7ydcvvahspzq0hzvlvzqg2zxi1aigbr68"))))
2068 (build-system pyproject-build-system)
2069 (propagated-inputs
2070 (list python-numpy))
2071 (native-inputs (list python-flit-core python-matplotlib python-pytest))
2072 (home-page "https://github.com/diego-hayashi/meshzoo")
2073 (synopsis "Mesh generator for simple geometries")
2074 (description
2075 "@code{meshzoo} is a mesh generator for finite element or finite
2076volume computations for simple domains like regular polygons, disks,
2077spheres, cubes, etc.")
2078 (license license:gpl3+)))
2079
2080(define-public python-modin
2081 (package
2082 (name "python-modin")
2083 (version "0.37.1")
2084 (source
2085 (origin
2086 (method git-fetch)
2087 (uri (git-reference
2088 (url "https://github.com/modin-project/modin")
2089 (commit version)))
2090 (file-name (git-file-name name version))
2091 (sha256
2092 (base32 "1kqdx3b7sb3895ynypb6swf2jly26xvdghqqrm9ahqps16cn9dx9"))))
2093 (build-system pyproject-build-system)
2094 (arguments
2095 (list
2096 ;; tests:
2097 ;; - api: 5 passed
2098 ;; - dask: 269 passed, 2 skipped, 93 xfailed, 191 warnings
2099 ;; - python: 269 passed, 2 skipped, 93 xfailed, 197 warnings
2100 #:test-flags
2101 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
2102 ;; AssertionError: assert 'array <...>
2103 "-k" (string-join
2104 (list "not test_repr[100]"
2105 "test_repr[size1]"
2106 "test_repr[size2]"
2107 "test_repr[size3]"
2108 "test_repr[size4]"
2109 "test_repr[size5]"
2110 "test_repr[size6]"
2111 "test_repr[size7]"
2112 "test_repr[size8]"
2113 "test_repr[size9]")
2114 " and not ")
2115 "modin/tests/numpy")
2116 #:phases
2117 #~(modify-phases %standard-phases
2118 (add-after 'unpack 'fix-pytest-config
2119 (lambda _
2120 (substitute* "setup.cfg"
2121 ((" --cov-.*--cov-report=") ""))))
2122 (replace 'check
2123 (lambda* (#:key tests? test-flags #:allow-other-keys)
2124 (when tests?
2125 ;; API basic tests
2126 (invoke "pytest" "-vv"
2127 "modin/tests/test_executions_api.py"
2128 "modin/tests/test_headers.py"
2129 "modin/tests/core/test_dispatcher.py::test_add_option")
2130 ;; More complex engine tests, the complete set up requires
2131 ;; database access and AWS credentials, see:
2132 ;; <.github/workflows/ci.yml >.
2133 (setenv "MODIN_ENGINE" "dask")
2134 (apply invoke "pytest" "-vv" test-flags)
2135 (setenv "MODIN_ENGINE" "python")
2136 (apply invoke "pytest" "-vv" test-flags)))))))
2137 (native-inputs
2138 (list python-boto3
2139 python-pytest
2140 python-pytest-xdist
2141 python-s3fs
2142 python-setuptools
2143 python-versioneer))
2144 (propagated-inputs
2145 (list python-fsspec
2146 python-numpy
2147 python-packaging
2148 ;; Modin is not ready for Pandas 3 yet, see:
2149 ;; <https://codeberg.org/guix/guix/issues/9336>.
2150 python-pandas-2
2151 python-psutil
2152 python-typing-extensions
2153 ;; [optinoal]
2154 python-dask
2155 python-distributed))
2156 (home-page "https://github.com/modin-project/modin")
2157 (synopsis "Make your pandas code run faster")
2158 (description
2159 "Modin uses Ray or Dask to provide an effortless way to speed up your
2160pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame
2161libraries, Modin provides seamless integration and compatibility with existing
2162pandas code.")
2163 (license license:asl2.0)))
2164
2165(define-public python-mpl-scatter-density
2166 (package
2167 (name "python-mpl-scatter-density")
2168 (version "0.8")
2169 (source
2170 (origin
2171 (method url-fetch)
2172 (uri (pypi-uri "mpl_scatter_density" version))
2173 (sha256
2174 (base32 "0cynk1rk6k2xklgv69difphrz6id77x3xb58kbs4mc4q7z6bvfid"))))
2175 (build-system pyproject-build-system)
2176 (arguments
2177 (list
2178 ;; See <https://github.com/astrofrog/mpl-scatter-density/issues/42>.
2179 #:test-flags #~(list "-k" "not test_default_dpi")))
2180 (native-inputs
2181 (list python-pytest
2182 python-pytest-mpl
2183 python-setuptools
2184 python-setuptools-scm
2185 python-wheel))
2186 (propagated-inputs
2187 (list python-fast-histogram
2188 python-matplotlib
2189 python-numpy))
2190 (home-page "https://github.com/astrofrog/mpl-scatter-density")
2191 (synopsis "Matplotlib helpers to make density scatter plots")
2192 (description
2193 "This package provides functionality to make it easy to make scatter
2194density maps, both for interactive and non-interactive use.")
2195 (license license:bsd-2)))
2196
2197(define-public python-mpsplines
2198 ;; No release on PyPI no git tag, use the latest commit.
2199 (let ((commit "4967655fca8f4d0fc0685486c8ec2f1fe2f199d2")
2200 (revision "0"))
2201 (package
2202 (name "python-mpsplines")
2203 (version (git-version "0.0.0" revision commit))
2204 (source
2205 (origin
2206 (method git-fetch)
2207 (uri (git-reference
2208 (url "https://github.com/jararias/mpsplines")
2209 (commit commit)))
2210 (file-name (git-file-name name version))
2211 (sha256
2212 (base32 "1wqfvjp1d6xzb07qnq72h76f0mx7za9pasgw3qp3ciaycmlkvdr3"))))
2213 (build-system pyproject-build-system)
2214 (arguments
2215 (list #:tests? #f)) ; no tests provided
2216 (native-inputs
2217 (list python-setuptools
2218 python-wheel))
2219 (propagated-inputs
2220 (list python-scipy
2221 python-numpy
2222 python-loguru))
2223 (home-page "https://github.com/jararias/mpsplines")
2224 (synopsis "Mean preserving interpolation with splines")
2225 (description
2226 "This package implements a functionality for mean-preserving
2227interpolation of 1D data (for example, time series) with splines.")
2228 (license license:bsd-3))))
2229
2230(define-public python-msgpack-numpy
2231 (package
2232 (name "python-msgpack-numpy")
2233 (version "0.4.8")
2234 (source
2235 (origin
2236 (method url-fetch)
2237 (uri (pypi-uri "msgpack-numpy" version))
2238 (sha256
2239 (base32
2240 "0sbfanbkfs6c77np4vz0ayrwnv99bpn5xgj5fnf2yhhk0lcd6ry6"))))
2241 (build-system pyproject-build-system)
2242 (arguments
2243 (list #:test-backend #~'unittest))
2244 (native-inputs
2245 (list python-setuptools))
2246 (propagated-inputs
2247 (list python-msgpack python-numpy))
2248 (home-page "https://github.com/lebedov/msgpack-numpy")
2249 (synopsis
2250 "Numpy data serialization using msgpack")
2251 (description
2252 "This package provides encoding and decoding routines that enable the
2253serialization and deserialization of numerical and array data types provided
2254by numpy using the highly efficient @code{msgpack} format. Serialization of
2255Python's native complex data types is also supported.")
2256 (license license:bsd-3)))
2257
2258(define-public python-multiscale-spatial-image
2259 (package
2260 (name "python-multiscale-spatial-image")
2261 (version "2.0.3")
2262 (source
2263 (origin
2264 (method url-fetch)
2265 (uri (pypi-uri "multiscale_spatial_image" version))
2266 (sha256
2267 (base32 "1avcc7hrgyza793i02vjfvyn2bg0ag50h1pagapbpj65hl3v4whb"))))
2268 (build-system pyproject-build-system)
2269 ;; All interesting tests require file downloads over IPFS.
2270 (arguments (list #:tests? #false))
2271 (propagated-inputs
2272 (list python-dask
2273 python-numpy
2274 python-dateutil
2275 python-spatial-image
2276 python-xarray
2277 python-xarray-dataclass
2278 python-zarr))
2279 (native-inputs
2280 (list python-hatchling))
2281 (home-page "https://github.com/spatial-image/multiscale-spatial-image")
2282 (synopsis "Multi-dimensional spatial image data structure")
2283 (description
2284 "This package lets you generate a multiscale, chunked, multi-dimensional
2285spatial image data structure that can serialized to OME-NGFF. Each scale is a
2286scientific Python Xarray spatial-image Dataset, organized into nodes of an
2287Xarray Datatree.")
2288 (license license:asl2.0)))
2289
2290(define-public python-narwhals
2291 (package
2292 (name "python-narwhals")
2293 (version "2.22.1")
2294 (source
2295 (origin
2296 (method git-fetch)
2297 (uri (git-reference
2298 (url "https://github.com/narwhals-dev/narwhals")
2299 (commit (string-append "v" version))))
2300 (file-name (git-file-name name version))
2301 (sha256
2302 (base32 "0rq7asql365iv40jdbdnp05jja3y304pr2xd85ng83ly24h2bidx"))))
2303 (build-system pyproject-build-system)
2304 (arguments
2305 (list
2306 #:build-backend "hatchling.build" ; recent versions use uv-build
2307 ;; tests: 3557 passed, 118 skipped, 79 xfailed
2308 #:test-flags
2309 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
2310 ;; Run a minimal portion of tests, the complete test suite
2311 ;; requires Polars, PySpark and SqlFrame packages.
2312 "--constructors=pandas")))
2313 (native-inputs
2314 (list python-hatchling
2315 python-pytest
2316 python-pytest-env
2317 python-pytest-xdist
2318 tzdata-for-tests))
2319 (propagated-inputs
2320 ;; [core]
2321 (list python-duckdb
2322 python-pandas
2323 python-polars
2324 python-pyarrow
2325 ;; python-sqlframe
2326 ;; [optional]
2327 ;; python-cudf
2328 python-dask
2329 ;; python-ibis-framework
2330 ;; python-modin ;blocked by guix/guix#9336
2331 python-packaging
2332 ;; python-pyarrow-hotfix
2333 ;; python-pyspark
2334 python-rich))
2335 (home-page "https://narwhals-dev.github.io/narwhals/")
2336 (synopsis "Compatibility layer between dataframe libraries")
2337 (description
2338 "This package provides an extremely lightweight compatibility layer
2339between dataframe libraries.
2340@itemize
2341@item full API support: cuDF, Modin, pandas, Polars, PyArrow
2342@item lazy-only support: Dask, DuckDB, Ibis, PySpark, SQLFrame
2343@end itemize")
2344 (license license:expat)))
2345
2346;; A bare minimal package, mainly to use in tests and reduce closure
2347;; size. Tests are left out in the main package to slim down native-inputs.
2348(define-public python-narwhals-minimal
2349 (package/inherit python-narwhals
2350 (name "python-narwhals-minimal")
2351 (arguments
2352 (substitute-keyword-arguments arguments
2353 ((#:tests? _ #t) #f)))
2354 (native-inputs
2355 (list python-hatchling))
2356 ;; All Narwals dependencies are optional.
2357 (propagated-inputs '())))
2358
2359(define-public python-ndindex
2360 (package
2361 (name "python-ndindex")
2362 (version "1.10.1")
2363 (source
2364 (origin
2365 (method url-fetch)
2366 (uri (pypi-uri "ndindex" version))
2367 (sha256
2368 (base32 "048gc4pwvsyxkz7brph1fwmlgjd35alimvnb3248y91iy30i6q8g"))))
2369 (build-system pyproject-build-system)
2370 (arguments
2371 (list
2372 ;; tests: 121 passed, 1 deselected, 3 warnings
2373 #:test-flags
2374 #~(list "--pyargs" "ndindex"
2375 "--numprocesses" (number->string (min 8 (parallel-job-count)))
2376 "-p" "no:cov"
2377 "-W" "ignore:Unknown pytest.mark.no_cover:pytest.PytestUnknownMarkWarning"
2378 "-k" "not test_iter_indices_matmul") ; flaky
2379 #:phases
2380 #~(modify-phases %standard-phases
2381 (add-before 'check 'remove-local-source
2382 (lambda _
2383 (delete-file-recursively "ndindex"))))))
2384 (native-inputs
2385 (list python-cython
2386 python-numpy
2387 python-pytest
2388 python-pytest-xdist
2389 python-setuptools
2390 python-sympy))
2391 (home-page "https://quansight-labs.github.io/ndindex/")
2392 (synopsis "Python library for manipulating indices of ndarrays")
2393 (description "This package provides a Python library for manipulating
2394indices of @code{ndarrays}.")
2395 (license license:expat)))
2396
2397(define-public python-nestcheck
2398 (package
2399 (name "python-nestcheck")
2400 ;; 0.2.1 was placed in 2019, there are a lot of changes providing
2401 ;; comparability with Python 3.11, use the latest commit from master's
2402 ;; HEAD.
2403 (properties '((commit . "513ef962ef7b0d66377686f9fe0a9e354dad48b3")
2404 (revision . "0")))
2405 (version (git-version "0.2.1"
2406 (assoc-ref properties 'revision)
2407 (assoc-ref properties 'commit)))
2408 (source
2409 (origin
2410 (method git-fetch)
2411 (uri (git-reference
2412 (url "https://github.com/ejhigson/nestcheck")
2413 (commit (assoc-ref properties 'commit))))
2414 (file-name (git-file-name name version))
2415 (sha256
2416 (base32 "0zzms2jkiapawnjyr5i7c61m7pmg6yd3nmpv23bdx51glz2fmglc"))))
2417 (build-system pyproject-build-system)
2418 (arguments
2419 (list
2420 ;; tests: 58 passed, 6 deselected, 10 warnings
2421 #:test-flags
2422 ;; TypeError: MultiIndex.set_levels() got an unexpected keyword argument
2423 ;; 'inplace'
2424 #~(list "-k" (string-append "not test_run_list_error_summary"
2425 ;; AttributeError: 'Series' object has no
2426 ;; attribute 'iteritems'
2427 " and not test_kde_plot_df"
2428 ;; Test is not deterministic and fails with
2429 ;; assertion not equal for DF array.
2430 " and not test_summary_df"))
2431 #:phases
2432 #~(modify-phases %standard-phases
2433 (add-after 'unpack 'use-pytest
2434 (lambda _
2435 (substitute* "tests/test_core.py"
2436 (("'nose'") "'pytest'")))))))
2437 (native-inputs
2438 (list python-pytest
2439 python-setuptools))
2440 (propagated-inputs
2441 (list python-fgivenx
2442 python-matplotlib
2443 python-numpy
2444 python-pandas
2445 python-scipy
2446 python-tqdm))
2447 (home-page "https://github.com/ejhigson/nestcheck")
2448 (synopsis "Nested sampling calculations utilities")
2449 (description
2450 "This package implements a functionality to work with
2451@url{https://en.wikipedia.org/wiki/Nested_sampling_algorithm, Nested
2452sampling}, a popular numerical method for Bayesian computation, which
2453simultaneously generates samples from the posterior distribution and an
2454estimate of the Bayesian evidence for a given likelihood and prior.
2455@code{nestcheck} provides Python utilities for analysing samples produced by
2456nested sampling, and estimating uncertainties on nested sampling
2457calculations (which have different statistical properties to calculations
2458using other numerical methods).")
2459 (license license:expat)))
2460
2461(define-public python-nibabel
2462 (package
2463 (name "python-nibabel")
2464 (version "5.3.2")
2465 (source
2466 (origin
2467 (method url-fetch)
2468 (uri (pypi-uri "nibabel" version))
2469 (sha256
2470 (base32 "16snprwgp7qzp51j3mx0zdn7brvx6r14ankldi24ny0w7d8adp0b"))))
2471 (build-system pyproject-build-system)
2472 (arguments
2473 (list
2474 ;; AttributeError: 'dict' object has no attribute 'add'.
2475 #:test-flags #~(list "-k" "not test_first and not test_second")))
2476 (propagated-inputs (list python-importlib-resources python-numpy
2477 python-packaging python-typing-extensions))
2478 (native-inputs (list python-hatch-vcs
2479 python-hatchling
2480 python-pytest
2481 python-pytest-httpserver
2482 python-pytest-xdist))
2483 (home-page "https://nipy.org/nibabel/")
2484 (synopsis "Read and write access to common neuroimaging file formats")
2485 (description
2486 "@code{nibabel} is a library that provides read and write access to
2487common neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2
2488and later), GIFTI, NIfTI1, NIfTI2, CIFTI-2, MINC1, MINC2, AFNI BRIK/HEAD,
2489ECAT and Philips PAR/REC. In addition, NiBabel also supports FreeSurfer’s
2490MGH, geometry, annotation and morphometry files, and provides some limited
2491support for DICOM.")
2492 (license license:expat))) ; and other non-copyleft licenses
2493
2494(define-public python-numba-stats
2495 (package
2496 (name "python-numba-stats")
2497 (version "1.14.0")
2498 (source
2499 (origin
2500 (method git-fetch)
2501 (uri (git-reference
2502 (url "https://github.com/scikit-hep/numba-stats")
2503 (commit (string-append "v" version))))
2504 (file-name (git-file-name name version))
2505 (sha256
2506 (base32 "1raa5rlm3mdj25mhrvpnlvzj3c2r1gq378hy9xpxhdbyz061vzg0"))))
2507 (build-system pyproject-build-system)
2508 (native-inputs
2509 (list python-pytest
2510 python-setuptools
2511 python-setuptools-scm))
2512 (propagated-inputs
2513 (list python-numba
2514 python-numpy
2515 python-scipy))
2516 (home-page "https://github.com/scikit-hep/numba-stats")
2517 (synopsis "Accelerated implementations of SciPy probability distributions")
2518 (description
2519 "This package provides Numba-accelerated implementations of common SciPy
2520probability distributions and others used in particle physics.
2521
2522The supported distributions are:
2523
2524@itemize
2525@item Uniform
2526@item (Truncated) Normal
2527@item Log-normal
2528@item Poisson
2529@item Binomial
2530@item (Truncated) Exponential
2531@item Student's t
2532@item Voigtian
2533@item Crystal Ball
2534@item Generalised double-sided Crystal Ball
2535@item Tsallis-Hagedorn, a model for the minimum bias pT distribution
2536@item Q-Gaussian
2537@item Bernstein density (not normalized to unity)
2538@item Cruijff density (not normalized to unity)
2539@item CMS-Shape
2540@item Generalized Argus
2541@end itemize")
2542 (license license:expat)))
2543
2544(define-public python-numbagg
2545 (package
2546 (name "python-numbagg")
2547 (version "0.9.4")
2548 (source
2549 (origin
2550 (method git-fetch)
2551 (uri (git-reference
2552 (url "https://github.com/numbagg/numbagg")
2553 (commit (string-append "v" version))))
2554 (file-name (git-file-name name version))
2555 (sha256
2556 (base32 "1frx10rdyklp0zbd8bckl63i0vmj0z93nkx1i7dylbv99iw27215"))))
2557 (build-system pyproject-build-system)
2558 (arguments
2559 (list
2560 ;; tests: 613 passed, 1543 skipped, 1 xfailed, 1 warning
2561 #:test-flags
2562 #~(cons* "--benchmark-disable"
2563 "--benchmark-skip"
2564 "--durations=10"
2565 ;; pandas 3.0 raises instead of returning NaN for idxmax/idxmin on
2566 ;; all-NA groups; breaks these tests' pandas comparison, not numbagg
2567 ;; itself: https://github.com/numbagg/numbagg/issues/725
2568 (map
2569 (lambda (test)
2570 (string-append "--deselect=numbagg/test/test_grouped.py::test_"
2571 test))
2572 (list "group_pandas_comparison[float64-group_nanargmax-<lambda>-nanargmax]"
2573 "group_pandas_comparison[float64-group_nanargmin-<lambda>-nanargmin]"
2574 "all_nan_for_label[group_nanargmax-<lambda>-nanargmax]"
2575 "all_nan_for_label[group_nanargmin-<lambda>-nanargmin]"
2576 "single_nan_for_label[group_nanargmax-<lambda>-nanargmax]"
2577 "single_nan_for_label[group_nanargmin-<lambda>-nanargmin]"
2578 "all_values_are_nan[group_nanargmax-<lambda>-nanargmax]"
2579 "all_values_are_nan[group_nanargmin-<lambda>-nanargmin]"
2580 "groupby_empty_numeric_operations[group_nanargmin-<lambda>-nan]")))))
2581 (native-inputs
2582 (list python-bottleneck
2583 python-pandas-minimal ;to slim down closure size
2584 python-pytest
2585 python-pytest-benchmark
2586 python-setuptools
2587 python-setuptools-scm
2588 python-tabulate))
2589 (propagated-inputs
2590 (list python-numba
2591 python-numpy))
2592 (home-page "https://github.com/numbagg/numbagg")
2593 (synopsis "Fast N-dimensional aggregation functions with Numba")
2594 (description
2595 "Numbagg provides high-performance implementations for moving window,
2596aggregation, and grouping functions. It leverages Numba's JIT compilation and
2597is especially performant on multi-core parallelism.")
2598 (license license:bsd-3)))
2599
2600(define-public python-numdifftools
2601 (package
2602 (name "python-numdifftools")
2603 (version "0.9.42")
2604 (source
2605 (origin
2606 (method url-fetch)
2607 (uri (pypi-uri "numdifftools" version))
2608 (sha256
2609 (base32 "1hgv3jhf4y9qrizkwfryj2b56zd0i2dvzig1y7r4ng193wbparl6"))))
2610 (build-system pyproject-build-system)
2611 (arguments
2612 (list
2613 ;; tests: 171 passed, 3 skipped, 8 deselected, 374 warnings
2614 #:test-flags
2615 #~(list "-m" "not benchmark and not slow"
2616 ;; ValueError: setting an array element with a sequence.
2617 "-k" (string-append
2618 "not test_scalar_to_vector and "
2619 "not test_fun_with_additional_parameters"))))
2620 (native-inputs
2621 (list python-algopy
2622 python-line-profiler
2623 python-pdm-backend
2624 python-pytest
2625 python-statsmodels))
2626 (propagated-inputs
2627 (list python-numpy
2628 python-scipy
2629 ;; [optional]
2630 python-matplotlib))
2631 (home-page "https://github.com/pbrod/numdifftools")
2632 (synopsis "Solves automatic numerical differentiation problems")
2633 (description
2634 "This package implements a functionality to solve automatic numerical
2635differentiation problems in one or more variables. Finite differences are
2636used in an adaptive manner, coupled with a Richardson extrapolation
2637methodology to provide a maximally accurate result. The user can configure
2638many options like; changing the order of the method or the extrapolation, even
2639allowing the user to specify whether complex-step, central, forward or
2640backward differences are used.")
2641 (license license:bsd-3)))
2642
2643(define-public python-numpoly
2644 (package
2645 (name "python-numpoly")
2646 (version "1.3.9")
2647 (source
2648 (origin
2649 (method git-fetch)
2650 (uri (git-reference
2651 (url "https://github.com/jonathf/numpoly")
2652 (commit version)))
2653 (file-name (git-file-name name version))
2654 (sha256
2655 (base32 "1abz6ch2bzghbzwkvrr2yrg6zkkaz4wn7qqc5810szryrv0is3ih"))))
2656 (build-system pyproject-build-system)
2657 (arguments
2658 (list
2659 ;; tests: 221 passed, 4 warnings
2660 #:phases
2661 #~(modify-phases %standard-phases
2662 (add-after 'unpack 'set-version
2663 ;; Version is hardcoded.
2664 (lambda _
2665 (substitute* "pyproject.toml"
2666 (("0.1.0")
2667 #$version))))
2668 (add-before 'check 'remove-local-source
2669 (lambda _
2670 (delete-file-recursively "numpoly"))))))
2671 (native-inputs
2672 (list python-cython
2673 python-pytest
2674 python-setuptools
2675 python-sympy))
2676 (propagated-inputs
2677 (list python-importlib-metadata
2678 python-numpy))
2679 (home-page "https://numpoly.readthedocs.io/en/master/")
2680 (synopsis "Polynomials as a numpy datatype")
2681 (description "Numpoly is a generic library for creating, manipulating and
2682evaluating arrays of polynomials based on @code{numpy.ndarray objects}.")
2683 ;; Tests fail with dtype mismatches on 32-bit architectures, suggesting
2684 ;; that numpoly only supports 64 bit platforms.
2685 (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux"))
2686 (license license:bsd-2)))
2687
2688(define-public python-numpy-groupies
2689 (package
2690 (name "python-numpy-groupies")
2691 (version "0.11.3")
2692 (source
2693 (origin
2694 (method url-fetch)
2695 (uri (pypi-uri "numpy_groupies" version))
2696 (sha256
2697 (base32 "1q13gi0018maifhn6dkwi0pprr3p7ikv9r3zffg6p1ayspdazm5f"))))
2698 (build-system pyproject-build-system)
2699 (native-inputs
2700 (list python-numba
2701 python-pandas
2702 python-pytest
2703 python-setuptools
2704 python-setuptools-scm))
2705 (propagated-inputs
2706 (list python-numpy))
2707 (home-page "https://github.com/ml31415/numpy-groupies")
2708 (synopsis "Tools for group-indexing operations: aggregated sum and more")
2709 (description
2710 "This package provides optimized tools for group-indexing operations:
2711aggregated sum and more.")
2712 (license license:bsd-3)))
2713
2714(define-public python-openpmd-api
2715 (package
2716 (name "python-openpmd-api")
2717 ;; This can be removed when version 0.17.1 is released.
2718 (properties '((commit . "ec8251eaa80ecc7182f83de2180d020f42978046")
2719 (revision . "0")))
2720 (version (git-version "0.17.0"
2721 (assoc-ref properties 'revision)
2722 (assoc-ref properties 'commit)))
2723 (source
2724 (origin
2725 (method git-fetch)
2726 (uri (git-reference
2727 (url "https://github.com/openPMD/openPMD-api")
2728 (commit (assoc-ref properties 'commit))))
2729 (file-name (git-file-name name version))
2730 (sha256
2731 (base32 "1y9jz1igjwcrxh5w31q0dmzb9hpizbmg4yzma14ca3pcs0na4mqc"))))
2732 (build-system cmake-build-system)
2733 (arguments
2734 (list
2735 #:configure-flags
2736 #~(list "-DopenPMD_SUPERBUILD=OFF")))
2737 (native-inputs
2738 (list catch2-2
2739 python-numpy))
2740 (inputs
2741 (list hdf5
2742 nlohmann-json
2743 openmpi
2744 pybind11
2745 python
2746 toml11))
2747 (propagated-inputs
2748 (list python-mpi4py))
2749 (home-page "https://openpmd-api.readthedocs.io/")
2750 (synopsis "C++ & Python API for Scientific I/O")
2751 (description
2752 "openPMD is an open meta-data schema that provides meaning and
2753self-description for data sets in science and engineering. See the
2754@url{https://github.com/openPMD/openPMD-standard, openPMD standard} for
2755details of this schema.
2756
2757This library provides a reference API for openPMD data handling. Since
2758openPMD is a schema (or markup) on top of portable, hierarchical file formats,
2759this library implements various backends such as HDF5, ADIOS2 and JSON.
2760Writing & reading through those backends and their associated files are
2761supported for serial and @url{https://www.mpi-forum.org/docs/, MPI-parallel}
2762workflows.")
2763 (license (list license:gpl3 license:lgpl3))))
2764
2765(define-public python-opt-einsum
2766 (package
2767 (name "python-opt-einsum")
2768 (version "3.4.0")
2769 (source
2770 (origin
2771 (method git-fetch)
2772 (uri (git-reference
2773 (url "https://github.com/dgasmith/opt_einsum")
2774 (commit (string-append "v" version))))
2775 (file-name (git-file-name name version))
2776 (sha256
2777 (base32 "14p8rncba295w1bfnmn27fxi6mjas31y7yawvbiwj7d7ci196kx4"))))
2778 (build-system pyproject-build-system)
2779 ;; tests: 7752 passed, 139 skipped, 6 warnings
2780 (native-inputs
2781 (list python-hatch-fancy-pypi-readme
2782 python-hatch-vcs
2783 python-hatchling
2784 python-pytest))
2785 (propagated-inputs
2786 (list python-dask
2787 ;; python-jax
2788 python-numpy
2789 python-sparse
2790 #;python-torch))
2791 (home-page "https://github.com/dgasmith/opt_einsum")
2792 (synopsis "Optimizing numpys einsum function")
2793 (description
2794 "Optimized einsum can significantly reduce the overall execution time of
2795einsum-like expressions by optimizing the expression's contraction order and
2796dispatching many operations to canonical BLAS, cuBLAS, or other specialized
2797routines. Optimized einsum is agnostic to the backend and can handle NumPy,
2798Dask, PyTorch, Tensorflow, CuPy, Sparse, Theano, JAX, and Autograd arrays as
2799well as potentially any library which conforms to a standard API. See the
2800documentation for more information.")
2801 (license license:expat)))
2802
2803(define-public python-orsopy
2804 (package
2805 (name "python-orsopy")
2806 (version "1.2.1")
2807 (source
2808 (origin
2809 (method git-fetch)
2810 (uri (git-reference
2811 (url "https://github.com/reflectivity/orsopy")
2812 (commit (string-append "v" version))))
2813 (file-name (git-file-name name version))
2814 (sha256
2815 (base32 "15av7b38h9x0f09dzxb111r2kxm6an461l9ajb01r8r7mv7m5bw9"))))
2816 (build-system pyproject-build-system)
2817 (arguments
2818 (list
2819 #:test-flags
2820 ;; These tests require network access.
2821 #~(cons* "--ignore=orsopy/slddb/tests/test_webapi.py"
2822 (map (lambda (test)
2823 (string-append "--deselect=orsopy/fileio/tests/"
2824 "test_model_language.py::" test))
2825 (list "TestSubStack::test_resolve_layers"
2826 "TestMaterial::test_density_lookup_elements"
2827 "TestSampleModel::test_resolve_to_layers")))))
2828 (propagated-inputs
2829 (list python-numpy python-pyyaml python-jsonschema python-h5py))
2830 (native-inputs
2831 (list python-pint python-pytest python-setuptools))
2832 (home-page "https://github.com/reflectivity/orsopy")
2833 (synopsis "Open Reflectometry Standards Organization Python tools")
2834 (description
2835 "This package provides Python tools for the Open Reflectometry Standards
2836Organization (ORSO). It includes utilities for working with reflectometry
2837data files and the ORSO file format.")
2838 (license license:expat)))
2839
2840(define-public python-osfclient
2841 (package
2842 (name "python-osfclient")
2843 (version "0.0.5")
2844 (source
2845 (origin
2846 (method git-fetch)
2847 (uri (git-reference
2848 (url "https://github.com/osfclient/osfclient")
2849 (commit version)))
2850 (file-name (git-file-name name version))
2851 (sha256
2852 (base32 "1ympjh028xgwkzvhwqa31rack1h8nni7zzn2alp1819m4pm8hysn"))))
2853 (build-system pyproject-build-system)
2854 (arguments
2855 (list
2856 #:test-flags
2857 ;; 2 tests fail with assertion not equal:
2858 ;; AssertionError: assert 16 == (4 + (4 * 2))
2859 ;; See: <https://github.com/osfclient/osfclient/issues/214>.
2860 #~(list "-k"
2861 (string-append "not test_recursive_upload"
2862 " and not nottest_recursive_upload_with_subdir"))))
2863 (native-inputs
2864 (list python-pytest
2865 python-mock
2866 python-setuptools))
2867 (propagated-inputs
2868 (list python-requests
2869 python-six
2870 python-tqdm))
2871 (home-page "https://github.com/osfclient/osfclient")
2872 (synopsis "Python library and command-line client for file storage on OSF")
2873 (description
2874 "The @code{osfclient} is a python library and a command-line client for
2875up- and downloading files to and from @url{https://osf.io/, Open Science
2876Framework} projects. The @acronym{OSF, Open Science Framework} is an open
2877source project which facilitates the open collaboration of researchers on the
2878web, by sharing data and other research outputs.")
2879 (license license:bsd-3)))
2880
2881(define-public python-osqp
2882 (package
2883 (name "python-osqp")
2884 (version "1.0.5")
2885 (source
2886 (origin
2887 (method git-fetch)
2888 (uri (git-reference
2889 (url "https://github.com/osqp/osqp-python")
2890 (commit (string-append "v" version))
2891 (recursive? #true)))
2892 (file-name (git-file-name name version))
2893 (sha256
2894 (base32 "0b5j0hv6dlbs3dm9xvs2ijnjr2r8xnchs4jyk3dx16qhcp85wklb"))))
2895 (build-system pyproject-build-system)
2896 (arguments
2897 (list
2898 ;; tests: 47 passed, 3 skipped, 1027 warnings
2899 #:test-flags
2900 ;; These tests require the module "vec_emosqp", which we don't have.
2901 #~(list "--ignore=src/osqp/tests/codegen_vectors_test.py"
2902 ;; These tests need "mat_emosqp".
2903 "--ignore=src/osqp/tests/codegen_matrices_test.py")
2904 #:phases
2905 #~(modify-phases %standard-phases
2906 (add-after 'unpack 'fix-osqp-source-location
2907 ;; XXX: Maybe implement it as CMake configure flags, otherwise
2908 ;; each package depending on osqp needs to have this phase?
2909 (lambda _
2910 (copy-recursively #$(package-source
2911 (this-package-native-input "osqp"))
2912 "osqp")
2913 (substitute* "osqp/algebra/_common/lin_sys/qdldl/qdldl.cmake"
2914 (("Fetching/configuring QDLDL solver")
2915 (format #f "Adding/configuring QDLDL solver from: ~a"
2916 #$(package-source
2917 (this-package-native-input "qdldl"))))
2918 (("GIT_REPOSITORY https://github.com/osqp/qdldl\\.git")
2919 (format #f "SOURCE_DIR ~a"
2920 #$(package-source
2921 (this-package-native-input "qdldl"))))
2922 (("GIT_TAG v0.1.8")
2923 ""))
2924 (substitute* "CMakeLists.txt"
2925 (("Fetching/configuring OSQP")
2926 (format #f "Adding/configuring OSQP: ~a"
2927 (string-append (getcwd) "/osqp")))
2928 (("GIT_REPOSITORY https://github.com/osqp/osqp\\.git")
2929 (format #f "SOURCE_DIR ~a"
2930 (string-append (getcwd) "/osqp")))
2931 (("GIT_TAG v1.0.0")
2932 "")))))))
2933 (native-inputs
2934 (list cmake-minimal
2935 osqp
2936 pybind11-2
2937 python-pytest
2938 python-pytorch
2939 python-scikit-build-core
2940 python-setuptools-scm
2941 qdldl))
2942 (propagated-inputs
2943 (list python-jinja2
2944 python-joblib
2945 python-numpy
2946 python-scipy
2947 python-setuptools))
2948 (home-page "https://osqp.org/")
2949 (synopsis "OSQP: operator splitting QP solver")
2950 (description "The OSQP (Operator Splitting Quadratic Program) solver is a
2951numerical optimization package.")
2952 (license license:asl2.0)))
2953
2954(define-public python-pandarallel
2955 (package
2956 (name "python-pandarallel")
2957 (version "1.6.5")
2958 (source
2959 (origin
2960 (method git-fetch) ; no tests in PyPI
2961 (uri (git-reference
2962 (url "https://github.com/nalepae/pandarallel/")
2963 (commit (string-append "v" version))))
2964 (file-name (git-file-name name version))
2965 (sha256
2966 (base32 "0r2wlxlwp4wia0vm15k4cp421mwa20k4k5g2ml01inprj8bl1p0p"))
2967 (patches
2968 (search-patches "python-pandarallel-fix-df-applymap.patch"
2969 "python-pandarallel-fix-parallel_apply.patch"))))
2970 (build-system pyproject-build-system)
2971 (arguments
2972 (list
2973 #:test-flags #~(list "-n" (number->string (parallel-job-count)))))
2974 (propagated-inputs
2975 (list python-dill
2976 python-pandas
2977 python-psutil))
2978 (native-inputs
2979 (list python-mkdocs-material
2980 python-numpy
2981 python-pytest
2982 python-pytest-xdist
2983 python-setuptools
2984 python-wheel))
2985 (home-page "https://nalepae.github.io/pandarallel/")
2986 (synopsis "Tool to parallelize Pandas operations across CPUs")
2987 (description
2988 "@code{pandarallel} allows any Pandas user to take advantage of their
2989multi-core computer, while Pandas uses only one core. @code{pandarallel} also
2990offers nice progress bars (available on Notebook and terminal) to get an rough
2991idea of the remaining amount of computation to be done.")
2992 (license license:bsd-3)))
2993
2994(define-public python-pandas
2995 (package
2996 (name "python-pandas")
2997 (version "3.0.3")
2998 (source
2999 (origin
3000 (method git-fetch)
3001 (uri (git-reference
3002 (url "https://github.com/pandas-dev/pandas")
3003 (commit (string-append "v" version))))
3004 (file-name (git-file-name name version))
3005 (sha256
3006 (base32 "1qagfjf4rrpx4xdw0bwg3q9g4k5vjplvifnx6k2frm8z2ws9hgds"))))
3007 (build-system pyproject-build-system)
3008 (arguments
3009 (list
3010 ;; tests: 185854 passed, 12827 skipped, 776 xfailed, 86 xpassed
3011 #:test-flags
3012 #~(list "-m" (string-join
3013 (list "not db" "network" "single_cpu" "slow" "slow_arm")
3014 " and not ")
3015 "-vv"
3016 ;; See: <https://github.com/pandas-dev/pandas/issues/54907>.
3017 "--no-strict-data-files"
3018 "--numprocesses" (number->string (min 4 (parallel-job-count)))
3019 "-k" (string-join
3020 (list "not test_git_version"
3021 "test_show_versions_console"
3022 ;; DeprecationWarning: Bitwise inversion '~' on bool
3023 ;; is deprecated and will be removed in Python 3.16.
3024 "test_scalar_unary[numexpr-pandas]"
3025 ;; AssertionError: Series are different.
3026 #$@(if (target-64bit?)
3027 '()
3028 '("test_rolling_var_numerical_issues")))
3029 " and not "))
3030 #:phases
3031 #~(modify-phases %standard-phases
3032 (add-after 'unpack 'patch-generate-version
3033 (lambda _
3034 ;; See: <https://github.com/pandas-dev/pandas/issues/59459>.
3035 (substitute* "generate_version.py"
3036 (("version =.*")
3037 (format #f "version = ~s~%" #$version))
3038 (("git_version =.*")
3039 (format #f "git_version = ~s~%" #$version)))))
3040 (replace 'check
3041 (lambda* (#:key test-flags tests? #:allow-other-keys)
3042 (when tests?
3043 ;; Tests don't work with "--pyargs pandas" or changing
3044 ;; directory to output, script is taken from pyproject.toml
3045 ;; file.
3046 (setenv "HOME" "/tmp")
3047 (delete-file-recursively "pandas")
3048 (invoke "python" "-c" (format #f "~a; ~a=[~{'~a', ~}]);"
3049 "import pandas as pd"
3050 "pd.test(extra_args"
3051 test-flags))))))))
3052 (propagated-inputs
3053 (list python-numpy
3054 python-dateutil
3055 ;; XXX: Pandas lists a lot of optional dependencies which are not
3056 ;; hard requirements, leave them listed here and commented out for
3057 ;; the reference purpose. Try to keep closure as bare minimal as
3058 ;; possible.
3059 ;;
3060 ;; [optional]
3061 ;; python-adbc-driver-postgresql
3062 ;; python-adbc-driver-sqlite
3063 ;; python-beautifulsoup4
3064 python-bottleneck
3065 ;; python-fastparquet
3066 ;; python-fsspec
3067 ;; python-gcsfs
3068 ;; python-html5lib
3069 ;; python-hypothesis
3070 ;; python-jinja2
3071 python-lxml
3072 ;; python-matplotlib
3073 python-numba
3074 python-numexpr
3075 ;; python-odfpy
3076 ;; python-openpyxl
3077 ;; python-psycopg2
3078 ;; python-pyarrow
3079 ;; python-pyiceberg
3080 ;; python-pymysql
3081 ;; python-pyqt5
3082 ;; python-pyreadstat
3083 ;; python-python-calamine
3084 ;; python-pyxlsb
3085 ;; python-qtpy
3086 ;; python-s3fs
3087 ;; python-scipy
3088 ;; python-sqlalchemy
3089 ;; python-tables
3090 ;; python-tabulate
3091 ;; python-xarray
3092 ;; python-xlrd
3093 ;; python-xlsxwriter
3094 #;python-zstandard))
3095 (inputs
3096 (list xclip xsel))
3097 (native-inputs
3098 (list python-hypothesis
3099 python-meson
3100 python-pytest
3101 python-pytest-localserver
3102 python-pytest-xdist
3103 python-pytz
3104 python-versioneer
3105 tzdata-for-tests))
3106 (home-page "https://pandas.pydata.org")
3107 (synopsis "Data structures for data analysis, time series, and statistics")
3108 (description
3109 "Pandas is a Python package providing fast, flexible, and expressive data
3110structures designed to make working with structured (tabular,
3111multidimensional, potentially heterogeneous) and time series data both easy
3112and intuitive. It aims to be the fundamental high-level building block for
3113doing practical, real world data analysis in Python.")
3114 (license license:bsd-3)))
3115
3116(define-public python-pandas-2
3117 (package
3118 (inherit python-pandas)
3119 (name "python-pandas")
3120 (version "2.3.3")
3121 (source
3122 (origin
3123 (method git-fetch)
3124 (uri (git-reference
3125 (url "https://github.com/pandas-dev/pandas")
3126 (commit (string-append "v" version))))
3127 (file-name (git-file-name name version))
3128 (sha256
3129 (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg"))
3130 (patches (search-patches "python-pandas-2-no-pytz_datetime.patch"))))
3131 (build-system pyproject-build-system)
3132 (arguments
3133 (list
3134 ;; tests: 173093 passed, 24265 skipped, 990 xfailed, 77 xpassed, 110 warnings
3135 #:test-flags
3136 #~(list "-m" (string-join
3137 (list "not db" "network" "single_cpu" "slow" "slow_arm")
3138 " and not ")
3139 "--numprocesses" (number->string (min 4 (parallel-job-count)))
3140 "-k" (string-join
3141 (list "not test_git_version"
3142 "test_parsing_tzlocal_deprecated"
3143 "test_show_versions_console"
3144 ;; XXX: Introduced by NumPy 2.4.6 and Cython 3.2.5:
3145 ;; NotImplementedError
3146 ;; See:
3147 ;; <https://github.com/pandas-dev/pandas/issues/62820>,
3148 ;; <https://github.com/pandas-dev/pandas/issues/63078>.
3149 "test_categorical_block_pickle"
3150 "test_pickle"
3151 "test_pickle_freq"
3152 "test_pickle_preserves_block_ndim"
3153 "test_pickle_preserves_name"
3154 "test_pickle_round_trip"
3155 "test_pickle_roundtrip"
3156 "test_pickle_roundtrip_containers"
3157 "test_round_trip_current"
3158 ;; AssertionError: Series are different.
3159 #$@(if (target-64bit?)
3160 '()
3161 '("test_rolling_var_numerical_issues")))
3162 " and not "))
3163 #:phases
3164 #~(modify-phases %standard-phases
3165 (add-after 'unpack 'patch-generate-version
3166 (lambda _
3167 ;; See: <https://github.com/pandas-dev/pandas/issues/59459>.
3168 (substitute* "generate_version.py"
3169 (("version =.*")
3170 (format #f "version = ~s~%" #$version))
3171 (("git_version =.*")
3172 (format #f "git_version = ~s~%" #$version)))))
3173 (replace 'check
3174 (lambda* (#:key inputs outputs test-flags tests? #:allow-other-keys)
3175 (when tests?
3176 (setenv "HOME" "/tmp")
3177 (with-directory-excursion
3178 (string-append (string-append (site-packages inputs outputs)
3179 "/pandas"))
3180 (apply invoke "pytest" "-vv" test-flags))))))))
3181 (propagated-inputs
3182 (list python-numpy
3183 python-dateutil
3184 python-pytz
3185 python-tzdata))
3186 (inputs
3187 (list xclip xsel))
3188 (native-inputs
3189 (list python-meson
3190 python-lxml
3191 python-pytest
3192 python-pytest-asyncio
3193 python-pytest-xdist
3194 python-versioneer
3195 tzdata-for-tests))))
3196
3197(define-public python-pandas-flavor
3198 (package
3199 (name "python-pandas-flavor")
3200 (version "0.8.1")
3201 (source
3202 (origin
3203 (method url-fetch)
3204 (uri (pypi-uri "pandas_flavor" version))
3205 (sha256
3206 (base32
3207 "0rn3pnracv8013j3f737qal3isf1brbc3mpxqhr03vik322sapr5"))))
3208 (build-system pyproject-build-system)
3209 (native-inputs
3210 (list python-pytest
3211 python-setuptools
3212 python-setuptools-scm))
3213 (propagated-inputs
3214 (list python-pandas
3215 python-xarray))
3216 (home-page "https://github.com/pyjanitor-devs/pandas_flavor")
3217 (synopsis "Write your own flavor of Pandas")
3218 (description "Pandas 0.23 added a simple API for registering accessors
3219with Pandas objects. Pandas-flavor extends Pandas' extension API by
3220
3221@itemize
3222@item adding support for registering methods as well
3223@item making each of these functions backwards compatible with older versions
3224of Pandas
3225@end itemize")
3226 (license license:expat)))
3227
3228;; A bare minimal package, mainly to use in tests and reduce closure size.
3229;; Tests are left out in the main package to slim down native-inputs and
3230;; propagated-inputs.
3231(define-public python-pandas-minimal
3232 (package/inherit python-pandas
3233 (name "python-pandas-minimal")
3234 (arguments
3235 (substitute-keyword-arguments arguments
3236 ((#:tests? _ #t) #f)))
3237 (native-inputs
3238 (list python-meson
3239 python-versioneer))
3240 (propagated-inputs
3241 (list python-numpy
3242 python-dateutil
3243 python-pytz))))
3244
3245(define-public python-pandas-stubs
3246 (package
3247 (name "python-pandas-stubs")
3248 ;; The versioning follows that of Pandas and uses the date of the
3249 ;; python-pandas-stubs release.
3250 (version "3.0.3.260530")
3251 (source
3252 (origin
3253 (method git-fetch)
3254 (uri (git-reference
3255 (url "https://github.com/pandas-dev/pandas-stubs")
3256 (commit (string-append "v" version))))
3257 (file-name (git-file-name name version))
3258 (sha256
3259 (base32 "0r79bbblf2rkbw2min9x231c0h74rmir0aay0wv52v6d4vig7xdw"))))
3260 (build-system pyproject-build-system)
3261 (arguments
3262 (list
3263 ;; tests: 3184 passed, 6 skipped, 21 deselected
3264 #:test-flags
3265 #~(list
3266 ;; Expected type '<class 'numpy.[...]'>' but got '<class '[...]'>'
3267 "--deselect=tests/frame/test_frame.py::test_types_median"
3268 "--deselect=tests/frame/test_frame.py::test_types_min"
3269 "--deselect=tests/frame/test_frame.py::test_types_max"
3270 "--deselect=tests/frame/test_indexing.py::test_getset_untyped"
3271 "--deselect=tests/series/test_agg.py::test_agg_any_float"
3272 "--deselect=tests/series/test_agg.py::test_agg_int"
3273 "--deselect=tests/series/test_agg.py::test_agg_float"
3274 "--deselect=tests/series/test_agg.py::test_agg_complex"
3275 "--deselect=tests/series/test_series.py::test_types_min"
3276 "--deselect=tests/series/test_series.py::test_types_max"
3277 "--deselect=tests/series/test_series.py::test_types_var"
3278 "--deselect=tests/series/test_series.py::test_types_agg"
3279 "--deselect=tests/series/test_series.py::test_types_aggregate"
3280 ;; ModuleNotFoundError: No module named 'pyiceberg'
3281 "--deselect=tests/test_io.py::test_iceberg"
3282 ;; ImportError: Missing optional dependency 'python-calamine'.
3283 "--deselect=tests/test_io.py::test_read_excel"
3284 "--deselect=tests/test_io.py::test_excel_reader")))
3285 (native-inputs
3286 (list python-beautifulsoup4
3287 python-fsspec
3288 python-html5lib
3289 python-jinja2
3290 python-loguru
3291 python-lxml
3292 python-matplotlib
3293 python-mypy
3294 python-numexpr
3295 python-odfpy
3296 python-openpyxl
3297 python-pandas
3298 python-poetry-core
3299 python-pyarrow
3300 python-pyreadstat
3301 python-pytest
3302 python-pytz
3303 python-scipy
3304 python-sqlalchemy-2
3305 python-tables
3306 python-tabulate
3307 python-typing-extensions
3308 python-xarray
3309 python-xlrd
3310 python-xlsxwriter
3311 ;; Not packaged yet
3312 ;;
3313 ;; python-calamine
3314 ;; python-poethepoet
3315 ;; python-pyarrow-stubs
3316 ;; python-pyiceberg
3317 ;; python-pyrefly
3318 ;; python-python-calamine
3319 ;; python-pyxlsb
3320 ;; python-scipy-stubs
3321 ;; python-ty
3322 ;; python-types-python-dateutil
3323 tzdata-for-tests))
3324 (propagated-inputs
3325 (list python-numpy
3326 python-types-pytz))
3327 (home-page "https://pandas.pydata.org")
3328 (synopsis "Type annotations for pandas")
3329 (description
3330 "This package contains public type stubs for @code{python-pandas}, following
3331the convention of providing stubs in a separate package, as specified in
3332@acronym{PEP, Python Enhancement Proposal} 561. The stubs cover the most
3333typical use cases of @code{python-pandas}. In general, these stubs are
3334narrower than what is possibly allowed by @code{python-pandas}, but follow a
3335convention of suggesting best recommended practices for using
3336@code{python-pandas}.")
3337 (license license:bsd-3)))
3338
3339(define-public python-pandera
3340 (package
3341 (name "python-pandera")
3342 (version "0.31.1")
3343 (source
3344 (origin
3345 ;; XXX: Sanity-check fails to load when switched to git-fetch.
3346 (method url-fetch)
3347 (uri (pypi-uri "pandera" version))
3348 (sha256
3349 (base32 "04qgmcfvw78ccfnmidhy3zw1i99nyjkz3b0klsd4ypgiia3a6nn7"))))
3350 (build-system pyproject-build-system)
3351 (arguments
3352 (list
3353 ;; tests: 3810 passed, 22 skipped, 21 xfailed, 5923 warnings
3354 #:test-flags
3355 ;; With higher threads count tests randomly fail during collection.
3356 #~(list "--numprocesses" (number->string (min 2 (parallel-job-count)))
3357 ;; TODO: Ignore tests for not packaged python-ibis-framework,
3358 ;; and python-pyspark.
3359 "--ignore=tests/ibis"
3360 "--ignore=tests/pyspark"
3361 ;; Not compatible with Pandas 3 yet.
3362 "--ignore=tests/modin"
3363 ;; Tests fail to connect to 127.0.0.1:52245, connection refused.
3364 "--deselect=tests/fastapi/test_app.py::test_items_endpoint"
3365 "--deselect=tests/fastapi/test_app.py::test_transactions_endpoint"
3366 "--deselect=tests/fastapi/test_app.py::test_upload_file_endpoint"
3367 ;; frictionless is not packaged yet.
3368 "-k" "not test_frictionless_schema_")))
3369 (native-inputs
3370 (list python-joblib
3371 python-black ;some tets depent on it
3372 python-mypy-for-tests
3373 python-pytest
3374 python-pytest-asyncio
3375 python-pytest-xdist
3376 python-pytz
3377 python-setuptools
3378 python-setuptools-scm
3379 python-sphinx ;some tets depent on it
3380 python-uvicorn
3381 tzdata-for-tests))
3382 (inputs
3383 ;; [optional]
3384 ;; Pandera comes with a lot of extras. We test as many as possible, but do
3385 ;; not include all of them in the propagated-inputs. Currently, we have to
3386 ;; skip the pyspark and io tests due to missing packages python-pyspark
3387 ;; and python-frictionless.
3388 (list python-dask
3389 python-distributed
3390 python-geopandas
3391 python-hypothesis
3392 ;; python-ibis-framework ;missing from Guix
3393 ;; python-modin ;blocked by guix/guix#9336
3394 python-numpy
3395 python-pandas
3396 python-polars
3397 ;; python-pyspark ;missing from Guix
3398 ;; python-ray ;missing from Guix
3399 python-scipy
3400 python-shapely))
3401 (propagated-inputs
3402 (list python-packaging
3403 python-pydantic
3404 python-typeguard
3405 python-typing-extensions
3406 python-typing-inspect))
3407 (home-page "https://github.com/unionai-oss/pandera")
3408 (synopsis "Perform data validation on dataframe-like objects")
3409 (description
3410 "@code{python-pandera} provides a flexible and expressive API for
3411performing data validation on dataframe-like objects to make data processing
3412pipelines more readable and robust. Dataframes contain information that
3413@code{python-pandera} explicitly validates at runtime. This is useful in
3414production-critical data pipelines or reproducible research settings. With
3415@code{python-pandera}, you can:
3416
3417@itemize
3418@item Define a schema once and use it to validate different dataframe types.
3419@item Check the types and properties of columns.
3420@item Perform more complex statistical validation like hypothesis testing.
3421@item Seamlessly integrate with existing data pipelines via function decorators.
3422@item Define dataframe models with the class-based API with pydantic-style syntax.
3423@item Synthesize data from schema objects for property-based testing.
3424@item Lazily validate dataframes so that all validation rules are executed.
3425@item Integrate with a rich ecosystem of tools like @code{python-pydantic},
3426@code{python-fastapi} and @code{python-mypy}.
3427@end itemize")
3428 (license license:expat)))
3429
3430(define-public python-particle
3431 (package
3432 (name "python-particle")
3433 (version "1.0.1")
3434 (source
3435 (origin
3436 (method git-fetch)
3437 (uri (git-reference
3438 (url "https://github.com/scikit-hep/particle")
3439 (commit (string-append "v" version))))
3440 (file-name (git-file-name name version))
3441 (sha256
3442 (base32 "0sfv7d5l1f6vgv4aliq0swvswpz580zk0zp7frbkq786jmx9zxs7"))))
3443 (build-system pyproject-build-system)
3444 (native-inputs
3445 (list python-hatch-vcs
3446 python-hatchling
3447 python-pandas-minimal
3448 python-pytest
3449 python-pytest-benchmark))
3450 (propagated-inputs
3451 (list python-attrs
3452 python-hepunits))
3453 (home-page "https://github.com/scikit-hep/particle")
3454 (synopsis "Extended PDG particle data and MC identification codes")
3455 (description
3456 "@code{Particle} provides a pythonic interface to the Particle Data Group
3457(PDG) particle data tables and particle identification codes, with extended
3458particle information and extra goodies.")
3459 (license license:bsd-3)))
3460
3461(define-public python-pingouin
3462 (package
3463 (name "python-pingouin")
3464 (version "0.6.1")
3465 (source
3466 (origin
3467 (method git-fetch)
3468 (uri (git-reference
3469 (url "https://github.com/raphaelvallat/pingouin")
3470 (commit (string-append "v" version))))
3471 (file-name (git-file-name name version))
3472 (sha256
3473 (base32 "14hxs2w51qgg67kqkxpy02kd4q8gb7vayj85kcp8qvda1q1xasfv"))))
3474 (build-system pyproject-build-system)
3475 (arguments
3476 (list
3477 ;; tests: 85 passed, 3 deselected, 43 warnings
3478 #:test-flags
3479 #~(list
3480 ;; These tests failed with the python-pandas update.
3481 "--deselect=tests/test_parametric.py::TestParametric::test_ancova"
3482 "--deselect=tests/test_parametric.py::TestParametric::test_anova"
3483 "--deselect=tests/test_pandas.py::TestParametric::test_pandas")))
3484 (native-inputs
3485 (list python-pytest
3486 python-setuptools))
3487 (propagated-inputs
3488 (list python-matplotlib
3489 python-mpmath
3490 python-numpy
3491 python-pandas
3492 python-pandas-flavor
3493 python-scikit-learn
3494 python-scipy
3495 python-seaborn
3496 python-statsmodels
3497 python-tabulate))
3498 (home-page "https://pingouin-stats.org/")
3499 (synopsis "Statistical package for Python")
3500 (description "Pingouin is a statistical package written in Python 3 and
3501based mostly on Pandas and NumPy. Its features include
3502
3503@itemize
3504@item ANOVAs: N-ways, repeated measures, mixed, ancova
3505@item Pairwise post-hocs tests (parametric and non-parametric) and pairwise
3506correlations
3507@item Robust, partial, distance and repeated measures correlations
3508@item Linear/logistic regression and mediation analysis
3509@item Bayes Factors
3510@item Multivariate tests
3511@item Reliability and consistency
3512@item Effect sizes and power analysis
3513@item Parametric/bootstrapped confidence intervals around an effect size or a
3514correlation coefficient
3515@item Circular statistics
3516@item Chi-squared tests
3517@item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation,
3518and more
3519@end itemize")
3520 (license license:gpl3)))
3521
3522(define-public python-pint
3523 (package
3524 (name "python-pint")
3525 (version "0.25.3")
3526 (source
3527 (origin
3528 (method git-fetch)
3529 (uri (git-reference
3530 (url "https://github.com/hgrecco/pint")
3531 (commit version)))
3532 (file-name (git-file-name name version))
3533 (sha256
3534 (base32 "0ra25yfvjm5fpc47wm2dk8vicpdblvjjizbs0n1ak5d65mqinv4p"))))
3535 (build-system pyproject-build-system)
3536 (arguments
3537 (list
3538 ;; tests: 2191 passed, 142 skipped, 11 xfailed, 9 warnings, 298 subtests
3539 ;; passed
3540 #:test-flags #~(list "--ignore=pint/testsuite/benchmarks")
3541 #:phases
3542 #~(modify-phases %standard-phases
3543 (add-before 'check 'pre-check
3544 (lambda _
3545 (setenv "HOME" "/tmp"))))))
3546 (native-inputs
3547 (list python-hatch-vcs
3548 python-hatchling
3549 python-pytest
3550 python-pytest-mpl))
3551 (propagated-inputs
3552 (list python-flexcache
3553 python-flexparser
3554 python-platformdirs
3555 python-typing-extensions))
3556 (home-page "https://github.com/hgrecco/pint")
3557 (synopsis "Physical quantities module")
3558 (description
3559 "Pint is a Python package to define, operate and manipulate physical
3560quantities: the product of a numerical value and a unit of measurement. It
3561allows arithmetic operations between them and conversions from and to
3562different units.")
3563 (license license:bsd-3)))
3564
3565(define-public python-plotly
3566 (package
3567 (name "python-plotly")
3568 (version "6.8.0")
3569 (source
3570 (origin
3571 (method git-fetch)
3572 (uri (git-reference
3573 (url "https://github.com/plotly/plotly.py")
3574 (commit (string-append "v" version))))
3575 (file-name (git-file-name name version))
3576 (sha256
3577 (base32 "147vgm22zrg4wcjc427mxszbb8v6vhs7hgchcm8678cy304hawvd"))))
3578 (build-system pyproject-build-system)
3579 (arguments
3580 (list
3581 ;; tests: 3039 passed, 24 skipped, 292 deselected, 4 xfailed, 556 warnings
3582 #:test-flags
3583 ;; Missing dependencies.
3584 #~(list "--ignore=plotly/matplotlylib/mplexporter/tests/test_basic.py"
3585 "--ignore=plotly/matplotlylib/mplexporter/tests/test_utils.py"
3586 "--ignore=plotly/matplotlylib/tests/test_renderer.py"
3587 "--ignore=tests/test_io/test_renderers.py"
3588 "--ignore=tests/test_optional/test_kaleido/test_kaleido.py"
3589 ;; XXX: Combination of missing packages and assertion errors.
3590 "-k" (string-join
3591 (list "not test_acceptance_named"
3592 "test_colorscale_and_levels_same_length"
3593 "test_correct_order_param"
3594 "test_date_in_hover"
3595 "test_dependencies_not_imported"
3596 "test_fips_values_same_length"
3597 "test_from_json_output_type"
3598 "test_get_module_exists_submodule"
3599 "test_iplot_mpl_works"
3600 "test_iplot_works_after_you_call_init_notebook_mode"
3601 "test_iplot_works_without_init_notebook_mode"
3602 "test_lazy_imports"
3603 "test_ols_trendline_slopes"
3604 "test_overall_trendline"
3605 "test_read_json_from_file_string"
3606 "test_read_json_from_filelike"
3607 "test_read_json_from_pathlib"
3608 "test_render_mode"
3609 "test_scope_is_not_list"
3610 "test_trendline_enough_values"
3611 "test_trendline_nan_values"
3612 "test_trendline_on_timeseries"
3613 "test_trendline_results_passthrough")
3614 " and not "))
3615 #:phases
3616 #~(modify-phases %standard-phases
3617 (add-before 'build 'skip-npm
3618 ;; npm is not packaged so build without it
3619 (lambda _
3620 (setenv "SKIP_NPM" "T"))))))
3621 ;; XXX: Plotly requires a long list of test only packages, do not
3622 ;; propagate them, see:
3623 ;; <https://github.com/plotly/plotly.py/blob/v6.8.0/pyproject.toml#L56>.
3624 (native-inputs
3625 (list ;; python-anywidget ;not packaged yet in Guix
3626 python-colorcet
3627 python-geopandas
3628 python-hatchling
3629 python-inflect
3630 ;; python-kaleido ;not packaged yet in Guix
3631 python-numpy
3632 python-orjson
3633 python-pandas-minimal
3634 ;; python-pdfrw ;not packaged yet in Guix
3635 python-pillow
3636 ;; python-plotly-geo ;not packaged yet in Guix
3637 python-polars
3638 python-pyarrow
3639 python-pyshp
3640 python-pytest
3641 python-pytz
3642 python-scikit-image
3643 python-scipy-minimal
3644 python-shapely
3645 python-statsmodels
3646 python-xarray
3647 tzdata-for-tests))
3648 (propagated-inputs
3649 (list python-narwhals
3650 python-packaging))
3651 (home-page "https://plotly.com/python/")
3652 (synopsis "Interactive plotting library for Python")
3653 (description
3654 "Plotly's Python graphing library makes interactive,publication-quality
3655graphs online. Examples of how to make line plots, scatter plots, area
3656charts, bar charts, error bars, box plots, histograms, heatmaps, subplots,
3657multiple-axes, polar charts, and bubble charts.")
3658 (license license:expat)))
3659
3660(define-public python-plotnine
3661 (package
3662 (name "python-plotnine")
3663 (version "0.15.7")
3664 (source
3665 (origin
3666 (method git-fetch)
3667 (uri (git-reference
3668 (url "https://github.com/has2k1/plotnine")
3669 (commit (string-append "v" version))))
3670 (file-name (git-file-name name version))
3671 (sha256
3672 (base32 "0cf8bv9cjjdd0qa77kq6kpspwmbg8px6s5s5zplrns9awlskn8zg"))))
3673 (build-system pyproject-build-system)
3674 (arguments
3675 (list
3676 #:test-flags
3677 ;; XXX: Check for any new failing tests during next update cycle.
3678 ;; These all fail because the images are considered to be too different,
3679 ;; though they really do look fine.
3680 ;; See https://github.com/has2k1/plotnine/issues/627
3681 `(list ,@(map (lambda (file) (string-append "--ignore=" file))
3682 (list "tests/test_aes.py"
3683 "tests/test_annotation_logticks.py"
3684 "tests/test_coords.py"
3685 "tests/test_facet_labelling.py"
3686 "tests/test_facets.py"
3687 "tests/test_layout.py"
3688 "tests/test_position.py"
3689 "tests/test_qplot.py"
3690 "tests/test_plot_composition.py"
3691 "tests/test_scale_internals.py"
3692 "tests/test_scale_labelling.py"
3693 "tests/test_theme.py"))
3694 "--ignore-glob=tests/test_geom*.py"
3695 "--ignore-glob=tests/test_stat*.py"
3696 "-k" ; Other failures
3697 (string-append "not "
3698 (string-join
3699 (list
3700 ;; This triggers an unexpected but harmless
3701 ;; warning.
3702 "test_save_method"
3703 ;; This test fails to set the locale.
3704 "test_no_after_scale_warning"
3705 ;; Missing optional modules
3706 "test_non_linear_smooth"
3707 "test_non_linear_smooth_no_ci")
3708 " and not "
3709 'infix)))
3710 #:phases
3711 #~(modify-phases %standard-phases
3712 (add-before 'check 'pre-check
3713 (lambda* (#:key inputs outputs #:allow-other-keys)
3714 ;; The data files are referenced by the tests but they are not
3715 ;; installed.
3716 (copy-recursively "plotnine/data"
3717 (string-append (site-packages inputs
3718 outputs)
3719 "/plotnine/data"))
3720 (setenv "CI" "1") ;skip tests that are known to fail on CI.
3721 ;; Matplotlib needs to be able to write its configuration file
3722 ;; somewhere.
3723 (setenv "MPLCONFIGDIR" "/tmp")
3724 (setenv "TZ" "UTC")
3725 (setenv "TZDIR"
3726 (search-input-directory inputs "share/zoneinfo")))))))
3727 (propagated-inputs (list python-adjusttext
3728 python-matplotlib
3729 python-mizani
3730 python-numpy
3731 python-patsy
3732 python-scipy
3733 python-statsmodels))
3734 (native-inputs (list python-geopandas
3735 python-mock
3736 python-pandas
3737 python-pytest
3738 python-setuptools
3739 python-setuptools-scm
3740 python-wheel
3741 tzdata-for-tests))
3742 (home-page "https://github.com/has2k1/plotnine")
3743 (synopsis "Grammar of Graphics for Python")
3744 (description
3745 "Plotnine is a Python implementation of the Grammar of Graphics.
3746It is a powerful graphics concept for creating plots and visualizations in a
3747structured and declarative manner. It is inspired by the R package ggplot2
3748and aims to provide a similar API and functionality in Python.")
3749 (license license:expat)))
3750
3751(define-public python-pods
3752 (package
3753 (name "python-pods")
3754 (version "0.1.17")
3755 (source
3756 (origin
3757 (method url-fetch)
3758 (uri (pypi-uri "pods" version))
3759 (sha256
3760 (base32 "1z57jdwml2jzr2dq20p7pzx3ayhajgfd2d0xqjvgzx576hp2z1ac"))))
3761 (build-system pyproject-build-system)
3762 ;; Tests depend on Nose framework and try to download test data from
3763 ;; <https://github.com/SheffieldML/GPmat>.
3764 (arguments (list #:tests? #f))
3765 (native-inputs
3766 (list python-poetry-core))
3767 (propagated-inputs
3768 (list python-pandas
3769 python-pyyaml
3770 python-scipy
3771 python-tables))
3772 (home-page "https://github.com/lawrennd/ods")
3773 (synopsis "Python software for Open Data Science")
3774 (description "This package provides utilities and tools for open data
3775science including tools for accessing data sets in Python.")
3776 (license license:bsd-3)))
3777
3778(define-public python-polars
3779 (package
3780 (name "python-polars")
3781 (version "1.38.1")
3782 (source
3783 (origin
3784 (method url-fetch)
3785 (uri (pypi-uri "polars" version))
3786 (sha256
3787 (base32 "0fc2fx2p72g01nhhhfs1fzbwz58rcj7zppascanq1y2f6kjjnfl0"))))
3788 (build-system pyproject-build-system)
3789 ;; The wheel doesn't have tests.
3790 ;; TODO On the next update, hopefully if delete-all-but has made it
3791 ;; into guix, switch to a git-source and keep src/polars and tests
3792 ;; subdirectories.
3793 (arguments (list #:tests? #f))
3794 (propagated-inputs (list python-polars-runtime-32))
3795 (native-inputs (list python-setuptools))
3796 (home-page "https://pola.rs/")
3797 (synopsis "Blazingly fast DataFrame library")
3798 (description
3799 "Polars is a DataFrame library for manipulating structured data.")
3800 (license license:expat)))
3801
3802(define-public python-polars-runtime-32
3803 (package
3804 (name "python-polars-runtime-32")
3805 (version "1.38.1")
3806 (source
3807 (origin
3808 (method url-fetch)
3809 (uri (pypi-uri "polars_runtime_32" version))
3810 (sha256
3811 (base32 "1v72zkyhcziiizpymjlh2d5rwnkmvhlp18ln8brp31y5yp8hxwh4"))))
3812 (build-system pyproject-build-system)
3813 (arguments
3814 (list
3815 #:imported-modules `(,@%cargo-build-system-modules
3816 ,@%pyproject-build-system-modules)
3817 #:modules '(((guix build cargo-build-system) #:prefix cargo:)
3818 (guix build pyproject-build-system)
3819 (guix build utils))
3820 ;; There are rust tests which would be costly to run, but no python ones.
3821 #:tests? #f
3822 #:phases
3823 #~(modify-phases %standard-phases
3824 (add-after 'unpack 'build-without-rust-nightly
3825 (lambda _
3826 ;; Add cargo flags that allow compilation without Rust nightly.
3827 (substitute* "pyproject.toml"
3828 ((".*tool.maturin.*" all)
3829 (string-append all "no-default-features = true\n"
3830 "features = [\"full\"]\n")))))
3831 (add-after 'unpack 'fix-tikv-jemallocator
3832 (lambda _
3833 ;; removes a patch.crates-io option that is packaged in
3834 ;; gnu/packages/rust-sources: rust-tikv-jemallocator-for-polars
3835 (substitute* "Cargo.toml"
3836 (("^tikv-jemallocator.*") ""))))
3837 ;; jemalloc needs unbundling for tikv-jemallocator-sys
3838 (add-before 'build 'override-jemalloc
3839 (lambda* (#:key inputs #:allow-other-keys)
3840 (let ((jemalloc (assoc-ref inputs "jemalloc")))
3841 ;; This flag is needed when not using the bundled jemalloc.
3842 ;; https://github.com/tikv/jemallocator/issues/19
3843 (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1")
3844 (setenv "JEMALLOC_OVERRIDE"
3845 (string-append jemalloc "/lib/libjemalloc_pic.a")))))
3846 (add-after 'unpack 'prepare-cargo-build-system
3847 (lambda args
3848 (for-each
3849 (lambda (phase)
3850 (format #t "Running cargo phase: ~a~%" phase)
3851 (apply (assoc-ref cargo:%standard-phases phase)
3852 #:cargo-target #$(cargo-triplet)
3853 args))
3854 '(prepare-rust-crates
3855 unpack-rust-crates
3856 configure
3857 check-for-pregenerated-files
3858 patch-cargo-checksums)))))))
3859 (inputs
3860 (cons* jemalloc
3861 lz4
3862 (list zstd "lib")
3863 (cargo-inputs 'python-polars-runtime-32)))
3864 (native-inputs
3865 (append
3866 (list maturin
3867 pkg-config
3868 rust
3869 `(,rust "cargo"))
3870 (or (and=> (%current-target-system)
3871 (compose list make-rust-sysroot))
3872 '())))
3873 (home-page "https://pola.rs/")
3874 (synopsis "Blazingly fast DataFrame library")
3875 (description "Polars is an analytical query engine written for DataFrames.
3876It is designed to be fast, easy to use and expressive.")
3877 (properties '(("upstream-name" . "polars-runtime-32")
3878 (tunable? . #true)))
3879 (license license:expat)))
3880
3881(define-public python-pyamg
3882 (package
3883 (name "python-pyamg")
3884 (version "5.3.0")
3885 (source (origin
3886 (method url-fetch)
3887 (uri (pypi-uri "pyamg" version))
3888 (modules '((guix build utils)))
3889 (snippet
3890 ;; Delete autogenerated files, regenerate in a phase.
3891 #~(begin
3892 (for-each
3893 (lambda (file)
3894 (delete-file (string-append "pyamg/amg_core/" file)))
3895 '("air_bind.cpp"
3896 "evolution_strength_bind.cpp"
3897 "graph_bind.cpp"
3898 "krylov_bind.cpp"
3899 "linalg_bind.cpp"
3900 "relaxation_bind.cpp"
3901 "ruge_stuben_bind.cpp"
3902 "smoothed_aggregation_bind.cpp"
3903 "tests/bind_examples_bind.cpp"))))
3904 (sha256
3905 (base32
3906 "02w6xy3i0qcpsfc64zw8k15mi6qykq65h3d98vi9p6fdlkqx08sk"))))
3907 (arguments
3908 (list
3909 ;; tests: 40 passed, 1 skipped
3910 #:phases
3911 #~(modify-phases %standard-phases
3912 ;; Regenerate the autogenerated files.
3913 (add-after 'unpack 'amg-core-bind-them
3914 (lambda _
3915 ;; bindthem.py heavily depends on location to produce *_bind.cpp
3916 ;; file, make it available in tests as well.
3917 (copy-file "pyamg/amg_core/bindthem.py"
3918 "pyamg/amg_core/tests/bindthem.py")
3919 (with-directory-excursion "pyamg/amg_core"
3920 (substitute* "bindthem.py"
3921 (("/usr/bin/env python3") (which "python3")))
3922 (invoke "sh" "generate.sh"))
3923 (with-directory-excursion "pyamg/amg_core/tests"
3924 (invoke "python" "bindthem.py" "bind_examples.h"))))
3925 (add-before 'check 'pre-check
3926 (lambda _
3927 (copy-recursively "pyamg/tests" "tests")
3928 (delete-file-recursively "pyamg"))))))
3929 (build-system pyproject-build-system)
3930 (native-inputs
3931 (list pybind11-2
3932 python-cppheaderparser
3933 python-pytest
3934 python-pyyaml
3935 python-setuptools
3936 python-setuptools-scm))
3937 (propagated-inputs
3938 (list python-numpy
3939 python-scipy))
3940 (home-page "https://github.com/pyamg/pyamg")
3941 (synopsis "Algebraic Multigrid Solvers in Python")
3942 (description "PyAMG is a Python library of Algebraic Multigrid
3943(AMG) solvers. It features implementations of:
3944@itemize
3945@item Ruge-Stuben (RS) or Classical AMG
3946@item AMG based on Smoothed Aggregation (SA)
3947@item Adaptive Smoothed Aggregation (αSA)
3948@item Compatible Relaxation (CR)
3949@item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc.
3950@end itemize")
3951 (license license:expat)))
3952
3953(define-public python-pydicom
3954 (package
3955 (name "python-pydicom")
3956 (version "2.4.4")
3957 (source (origin
3958 (method git-fetch)
3959 (uri (git-reference
3960 (url "https://github.com/pydicom/pydicom")
3961 (commit (string-append "v" version))))
3962 (file-name (git-file-name name version))
3963 (sha256
3964 (base32
3965 "0ksyyc1hbhyqy289a2frn84ss29fb7czirx3dkxx56f4ia33b4c8"))))
3966 (build-system pyproject-build-system)
3967 (arguments
3968 (list
3969 #:test-flags
3970 ;; Skip tests that require networking.
3971 #~(list "-k" (string-append
3972 "not test_jpeg_ls_pixel_data.py"
3973 " and not test_gdcm_pixel_data.py"
3974 " and not test_pillow_pixel_data.py"
3975 " and not test_rle_pixel_data.py"
3976 " and not Test_JPEG_LS_Lossless_transfer_syntax"
3977 " and not test_numpy_pixel_data.py"
3978 " and not test_data_manager.py"
3979 " and not test_handler_util.py"
3980 " and not test_overlay_np.py"
3981 " and not test_encoders_pydicom.py"
3982 " and not test_encaps.py"
3983 " and not test_reading_ds_with_known_tags_with_UN_VR"
3984 " and not TestDatasetOverlayArray"
3985 " and not TestReader"
3986 " and not test_filewriter.py"))))
3987 (native-inputs (list python-pytest python-flit-core))
3988 (inputs (list gdcm libjpeg-turbo))
3989 (propagated-inputs (list python-numpy python-pillow))
3990 (home-page "https://github.com/pydicom/pydicom")
3991 (synopsis "Python library for reading and writing DICOM data")
3992 (description "@code{python-pydicom} is a Python library for reading and
3993writing DICOM medical imaging data. It can read, modify and write DICOM
3994data.")
3995 (license license:expat)))
3996
3997(define-public python-pyet
3998 (package
3999 (name "python-pyet")
4000 (version "1.3.1")
4001 (source
4002 (origin
4003 (method url-fetch)
4004 (uri (pypi-uri "pyet" version))
4005 (sha256
4006 (base32 "1dblsx0bv1g453hcx5vwij1zgankwgwvhwllqkn47k578h038xvy"))))
4007 (build-system pyproject-build-system)
4008 (native-inputs
4009 (list python-mock
4010 python-pytest
4011 python-setuptools
4012 python-wheel))
4013 (propagated-inputs
4014 (list python-pandas
4015 python-xarray))
4016 (home-page "https://github.com/pyet-org/pyet")
4017 (synopsis "Python package for evapotranspiration calculation")
4018 (description
4019 "This package provides a Python library for calculating
4020Evapotranspiration using various standard methods.")
4021 (license license:expat)))
4022
4023(define-public python-pyjanitor
4024 (package
4025 (name "python-pyjanitor")
4026 (version "0.32.23")
4027 (source
4028 (origin
4029 (method git-fetch)
4030 (uri (git-reference
4031 (url "https://github.com/pyjanitor-devs/pyjanitor")
4032 (commit (string-append "v" version))))
4033 (file-name (git-file-name name version))
4034 (sha256
4035 (base32 "1mvgabsn5jl2aidh2mcqdmh60p2g514nb5sxwskhz1q57pk4m0w9"))))
4036 (build-system pyproject-build-system)
4037 ;; Pyjanitor has an extensive test suite. For quick debugging, the tests
4038 ;; marked turtle can be skipped using "-m" "not turtle".
4039 (arguments
4040 (list
4041 ;; tests: 1030 passed, 2 skipped, 42 xfailed, 6 xpassed, 594 warnings
4042 #:test-flags
4043 ;; The tests take quite long, so consider adding the "-n" line and
4044 ;; adding python-pytest-xdist to the native-inputs when testing.
4045 ;; However, the tests are not deterministic, enen they are enabled in
4046 ;; project's CI (.github/workflows/tests.yml), when ran with "-n,
4047 ;; --numprocesses" , so disable again before committing.
4048 #~(list ;; "--numprocesses" (number->string (min 8 (parallel-job-count)))
4049 ;; Test files are not included.
4050 "--ignore=tests/io/test_read_csvs.py"
4051 ;; Polars has not been packaged yet.
4052 "--ignore=tests/polars/"
4053 ;; PySpark has not been packaged yet.
4054 "--ignore=tests/spark/"
4055 ;; Flaky test (fails for performance reasons)
4056 "--deselect=tests/math/test_ecdf.py::test_ecdf_string"
4057 ;; Tries to connect to the internet.
4058 "-k" (string-append "not test_is_connected"
4059 ;; Test files are not included.
4060 " and not test_read_commandline_bad_cmd"
4061 ;; XXX: Fatal Python error: Segmentation fault
4062 " and not test_maccs_keys_fingerprint"
4063 " and not test_morgan_fingerprint_counts"
4064 " and not test_morgan_fingerprint_bits"
4065 ;; AssertionError: DataFrame.iloc[:, 1]
4066 ;; (column name="cities") are different
4067 " and not test_various_sorted"))
4068 #:phases
4069 #~(modify-phases %standard-phases
4070 (add-before 'check 'set-env-ci
4071 (lambda _
4072 ;; Some tests are skipped if the JANITOR_CI_MACHINE
4073 ;; variable is not set.
4074 (setenv "JANITOR_CI_MACHINE" "1"))))))
4075 (propagated-inputs (list python-janitor-rs
4076 python-multipledispatch
4077 python-natsort
4078 python-pandas-flavor
4079 python-scipy
4080 ;; [optional]
4081 python-biopython
4082 python-unyt))
4083 (native-inputs (list python-numba
4084 python-openpyxl
4085 python-pytest
4086 ;;python-pytest-xdist ;only for -n when testing
4087 ;; TODO: Remove python-requests and inject its target
4088 ;; data to make the package behaviour reproducible.
4089 python-requests
4090 python-setuptools
4091 rdkit))
4092 (home-page "https://github.com/pyjanitor-devs/pyjanitor")
4093 (synopsis "Tools for cleaning and transforming Pandas DataFrames")
4094 (description
4095 "@code{pyjanitor} provides a set of data cleaning routines for
4096@code{pandas} DataFrames. These routines extend the method chaining API
4097defined by @code{pandas} for a subset of its methods. Originally, this
4098package was a port of the R package by the same name and it is inspired by the
4099ease-of-use and expressiveness of the @code{dplyr} package.")
4100 (license license:expat)))
4101
4102(define-public python-pykdtree
4103 (package
4104 (name "python-pykdtree")
4105 (version "1.4.2")
4106 (source
4107 (origin
4108 (method url-fetch)
4109 (uri (pypi-uri "pykdtree" version))
4110 (sha256
4111 (base32 "1xb5xdp32s5ffcbbb6vlrj4i70hdknajvr9yhzx0wld52rx9caxx"))))
4112 (build-system pyproject-build-system)
4113 (arguments
4114 (list
4115 ;; FIXME: Tests are unable to import properly, but it seems to work in
4116 ;; real conditions.
4117 #:tests? #f
4118 #:phases
4119 #~(modify-phases %standard-phases
4120 (add-after 'install 'fix-site-packages
4121 (lambda* (#:key inputs outputs #:allow-other-keys)
4122 (with-directory-excursion (site-packages inputs outputs)
4123 (for-each delete-file (find-files "." "test*"))))))))
4124 (native-inputs
4125 (list python-cython python-pytest python-setuptools python-wheel))
4126 (propagated-inputs
4127 (list python-numpy))
4128 (home-page "https://github.com/storpipfugl/pykdtree")
4129 (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
4130 (description
4131 "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
4132search in Python.")
4133 (license license:lgpl3+)))
4134
4135(define-public python-pylems
4136 (package
4137 (name "python-pylems")
4138 (version "0.6.9")
4139 (source
4140 (origin
4141 (method git-fetch)
4142 (uri (git-reference
4143 (url "https://github.com/LEMS/pylems")
4144 (commit (string-append "v" version))))
4145 (file-name (git-file-name name version))
4146 (sha256
4147 (base32 "0gimdx89cdla1b6zzkdrmj979nn2zy2475qvpwxxas0iv27ql0vj"))))
4148 (build-system pyproject-build-system)
4149 (arguments
4150 ;; Disable tests that require networking
4151 (list #:test-flags #~(list "./lems/test" "-k" "not test_load_write_xml")))
4152 (native-inputs (list python-setuptools python-pytest))
4153 (propagated-inputs (list python-lxml python-matplotlib))
4154 (home-page "https://github.com/LEMS/pylems")
4155 (synopsis
4156 "Python support for the Low Entropy Model Specification language (LEMS)")
4157 (description "A @acronym{LEMS, Low Entropy Model Specification} simulator
4158written in Python which can be used to run NeuroML2 models.")
4159 (license license:lgpl3)))
4160
4161(define-public python-pymcubes
4162 (package
4163 (name "python-pymcubes")
4164 (version "0.1.6")
4165 (source
4166 (origin
4167 (method git-fetch) ; no tests in PyPI
4168 (uri (git-reference
4169 (url "https://github.com/pmneila/PyMCubes")
4170 (commit (string-append "v" version))))
4171 (file-name (git-file-name name version))
4172 (sha256
4173 (base32 "1v2qhc4pwanx6a8k843mbh45yk77n3w63sy5lzk5c3q4pkvfj1b9"))))
4174 (build-system pyproject-build-system)
4175 (arguments
4176 (list
4177 #:phases
4178 #~(modify-phases %standard-phases
4179 (add-before 'check 'prepare-test-environment
4180 (lambda _
4181 ;; FileNotFoundError: [Errno 2] No such file or directory:
4182 ;; 'output/test.obj'
4183 (mkdir "output")
4184 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
4185 (native-inputs
4186 (list python-cython
4187 python-pytest
4188 python-setuptools
4189 python-wheel))
4190 (propagated-inputs
4191 (list python-pycollada
4192 python-numpy
4193 python-scipy))
4194 (home-page "https://github.com/pmneila/PyMCubes")
4195 (synopsis "Marching cubes for Python")
4196 (description
4197 "@code{PyMCubes} is an implementation of the marching cubes algorithm to
4198extract iso-surfaces from volumetric data. The volumetric data can be given
4199as a three-dimensional @code{NumPy} array or as a Python function @code{f(x,
4200y, z)}.")
4201 (license license:bsd-3)))
4202
4203(define-public python-pynetdicom
4204 (package
4205 (name "python-pynetdicom")
4206 (version "2.1.1")
4207 (source (origin
4208 (method url-fetch)
4209 (uri (pypi-uri "pynetdicom" version))
4210 (sha256
4211 (base32
4212 "1smzrnc93nmv8jz4np9knas74a46b1nhb3hjpf8n9vfpxypgnwcn"))))
4213 (build-system pyproject-build-system)
4214 (arguments
4215 (list
4216 #:test-flags
4217 ;; Tests takes about 10-15min to complete, and not thread save.
4218 ;; Skip tests that require networking.
4219 #~(list "-k" (string-append
4220 " not TestFindSCP"
4221 " and not TestQRGetServiceClass"
4222 " and not TestQRMoveServiceClass"
4223 " and not TestStoreSCP"
4224 " and not test_ae.py"
4225 " and not test_echoscp.py"
4226 " and not test_qrscp_echo.py"
4227 " and not test_storescp.py"
4228 " and not test_pr_level_patient"
4229 " and not test_pr_level_series"
4230 " and not test_scp_cancelled"))))
4231 (native-inputs (list python-numpydoc
4232 python-poetry-core
4233 python-pytest))
4234 (propagated-inputs (list python-pydicom
4235 python-pyfakefs
4236 python-sqlalchemy))
4237 (home-page "https://github.com/pydicom/pynetdicom")
4238 (synopsis "Python implementation of the DICOM networking protocol")
4239 (description
4240 "@code{pynetdicom} is a Python package that implements the DICOM
4241networking protocol. It allows the easy creation of DICOM
4242@acronym{SCUs,Service Class Users} and @acronym{SCPs,Service Class
4243Providers}.")
4244 (license license:expat)))
4245
4246(define-public python-pynrrd
4247 (package
4248 (name "python-pynrrd")
4249 (version "1.1.3")
4250 (source (origin
4251 (method git-fetch)
4252 (uri (git-reference
4253 (url "https://github.com/mhe/pynrrd")
4254 (commit (string-append "v" version))))
4255 (file-name (git-file-name name version))
4256 (sha256
4257 (base32
4258 "1l0hjbqzf5i1bmpxpblpyyqkhci3mb5n07x6hqf2a91hggfyrvda"))))
4259 (build-system pyproject-build-system)
4260 (native-inputs
4261 (list python-pytest python-setuptools))
4262 (propagated-inputs
4263 (list python-numpy))
4264 (home-page "https://github.com/mhe/pynrrd")
4265 (synopsis "Python module for reading and writing NRRD files")
4266 (description
4267 "@code{pynrrd} is a Python module for reading and writing @acronym{NRRD,
4268Nearly Raw Raster Data} files (format designed to support scientific
4269visualization and image processing involving N-dimensional raster data) into
4270and from numpy arrays.")
4271 (license license:expat)))
4272
4273(define-public python-pynsee
4274 (package
4275 (name "python-pynsee")
4276 (version "0.1.8")
4277 (source
4278 (origin
4279 (method url-fetch)
4280 (uri (pypi-uri "pynsee" version))
4281 (sha256
4282 (base32 "1w084ynwdd9f4wpcnakqc0nxcbj9gr8vppv4rd258i3dp1qq4sw5"))))
4283 (build-system pyproject-build-system)
4284 (arguments (list #:tests? #f)) ; XXX: Tests require network access.
4285 (native-inputs
4286 (list python-setuptools
4287 python-wheel))
4288 (propagated-inputs
4289 (list python-appdirs
4290 python-openpyxl
4291 python-pandas
4292 python-platformdirs
4293 python-pyarrow
4294 python-requests
4295 python-shapely
4296 python-tqdm
4297 python-unidecode
4298 python-urllib3
4299 python-xlrd))
4300 (home-page "https://pynsee.readthedocs.io")
4301 (synopsis
4302 "Tools to Easily Search and Download French Data From INSEE and IGN APIs")
4303 (description
4304 "This package provides tools to easily search and download French data
4305from INSEE and IGN APIs. This data includes more than 150 000 macroeconomic
4306series, a dozen datasets of local french data, numerous sources available on
4307@url{insee.fr}, geographical limits of administrative areas taken from IGN as
4308well as key metadata and SIRENE database containing data on all French
4309compagnies.")
4310 (license license:expat)))
4311
4312(define-public python-pyqtgraph
4313 (package
4314 (name "python-pyqtgraph")
4315 (version "0.13.7")
4316 (source
4317 (origin
4318 (method url-fetch)
4319 (uri (pypi-uri "pyqtgraph" version))
4320 (sha256
4321 (base32 "1qyr461hcvhgy02slfkgrbip2xwa8zz6dvmi1476v6f66lclzy34"))))
4322 (build-system pyproject-build-system)
4323 (arguments
4324 ;; tests: 949 passed, 1356 skipped, 2 deselected, 8 xfailed, 130 warnings
4325 (list #:test-flags
4326 ;; Failed: CALL ERROR: Exceptions caught in Qt event loop.
4327 #~(list "--deselect=tests/exporters/test_svg.py::test_plotscene"
4328 ;; The test_reload test fails. It suggests to disable
4329 ;; assert rewriting in Pytest, but it still doesn't pass.
4330 "-k" "not test_reload"
4331 ;; Run unit tets only.
4332 "tests")
4333 #:phases
4334 #~(modify-phases %standard-phases
4335 (add-before 'check 'set-qpa
4336 (lambda _
4337 (setenv "QT_QPA_PLATFORM" "offscreen"))))))
4338 (native-inputs
4339 (list python-pytest
4340 ;; Do not propagate Qt5/Qt6 let the user of the package to select
4341 ;; any supported one, see
4342 ;; <https://pyqtgraph.readthedocs.io/en/pyqtgraph-0.13.7>
4343 ;; </getting_started/how_to_use.html#pyqt-and-pyside>.
4344 python-pyqt-6
4345 python-pytest-qt
4346 python-setuptools))
4347 (propagated-inputs
4348 (list python-h5py
4349 python-numpy
4350 python-pyopengl
4351 python-scipy))
4352 (home-page "https://www.pyqtgraph.org")
4353 (synopsis "Scientific graphics and GUI library for Python")
4354 (description
4355 "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2
4356and PySide6. It is intended for use in mathematics, scientific or engineering
4357applications.")
4358 (license license:expat)))
4359
4360(define-public python-pytensor
4361 (package
4362 (name "python-pytensor")
4363 (version "3.2.4")
4364 (source (origin
4365 (method git-fetch)
4366 (uri (git-reference
4367 (url "https://github.com/pymc-devs/pytensor")
4368 (commit (string-append "rel-" version))))
4369 (file-name (git-file-name name version))
4370 (sha256
4371 (base32
4372 "0wqklzah9rysxnmf34zrj4njc1k79r9n9kbi1cnm6qj2dds6bm3d"))))
4373 (build-system pyproject-build-system)
4374 (arguments
4375 (list
4376 ;; tests: 1906 passed, 2581 skipped, 34 deselected, 12 xfailed, 274 warnings
4377 #:test-flags
4378 ;; XXX: Full test suite takes about 20-30min to complete in single
4379 ;; thread, attempt to run tests in parallel with pytest-xdist fails even
4380 ;; so upstream provides a support for that, try to figure out how to
4381 ;; improve it.
4382 ;;
4383 ;; Upstream implements a script, showing slow tests which may be used to
4384 ;; exclude even more hanging/slow ones, see:
4385 ;; <scripts/slowest_tests/extract-slow-tests.py>.
4386 ;;
4387 #~(list "--benchmark-disable"
4388 "--benchmark-skip"
4389 "--durations=50"
4390 ;; Skip computationally intensive tests.
4391 "--ignore=tests/scan/"
4392 "--ignore=tests/tensor/"
4393 "--ignore=tests/sandbox/"
4394 "--ignore=tests/sparse/sandbox/"
4395 ;; A mixture of assertions are not equal in these tests.
4396 "--deselect=tests/link/numba/test_nlinalg.py::test_Eigh[x0-L-None]"
4397 #$@(map (lambda (test)
4398 (string-append "--deselect=tests/graph/rewriting/"
4399 "test_basic.py::"
4400 test))
4401 ;; Tests fail with similar errors: AssertionError:
4402 ;; assert 'FunctionGraph(Op1(Op2(x, y), z))' ==
4403 ;; 'FunctionGraph(Op4(z, y))'
4404 (list "TestPatternNodeRewriter::test_replace_output"
4405 "TestPatternNodeRewriter::test_nested_out_pattern"
4406 "TestPatternNodeRewriter::test_unification_1"
4407 "TestPatternNodeRewriter::test_replace_subgraph"
4408 "TestPatternNodeRewriter::test_no_recurse"
4409 "TestPatternNodeRewriter::test_multiple"
4410 "TestPatternNodeRewriter::test_nested_even"
4411 "TestPatternNodeRewriter::test_nested_odd"
4412 "TestPatternNodeRewriter::test_expand"
4413 "TestPatternNodeRewriter::test_ambiguous"
4414 "TestPatternNodeRewriter::test_constant"
4415 "TestPatternNodeRewriter::test_constraints"
4416 "TestPatternNodeRewriter::test_match_same"
4417 "TestPatternNodeRewriter::test_eq"
4418 "TestEquilibrium::test_1"
4419 "TestEquilibrium::test_2"
4420 "TestEquilibrium::test_low_use_ratio"
4421 ;; A mixture of assertions are not equal:
4422 "TestPatternNodeRewriter::test_allow_multiple_clients"
4423 "TestPatternNodeRewriter::test_op_pattern"
4424 "test_patternsub_values_eq_approx[out_pattern0-True]"
4425 "test_patternsub_values_eq_approx[out_pattern0-False]"
4426 "test_patternsub_values_eq_approx[x-True]"
4427 "test_patternsub_values_eq_approx[x-False]"
4428 "test_patternsub_multi_output_nodes"))
4429 #$@(map (lambda (test)
4430 (string-append "--deselect=tests/graph/" test))
4431 (list "rewriting/test_kanren.py::test_kanren_basic"
4432 "rewriting/test_kanren.py::test_KanrenRelationSub_filters"
4433 "rewriting/test_kanren.py::test_KanrenRelationSub_dot"
4434 "rewriting/test_unify.py::test_unify_Variable"
4435 "rewriting/test_unify.py::test_ConstrainedVar"
4436 "rewriting/test_unify.py::test_unify_OpPattern"
4437 "test_destroyhandler.py::test_misc")))
4438 #:phases
4439 #~(modify-phases %standard-phases
4440 (add-before 'check 'pre-check
4441 (lambda _
4442 ;; It is required for most tests.
4443 (setenv "HOME" "/tmp")
4444 ;; This would otherwise interfere with finding the installed
4445 ;; pytensor when running tests.
4446 (delete-file-recursively "pytensor"))))))
4447 (native-inputs (list python-cython
4448 python-pytest
4449 python-pytest-benchmark
4450 python-pytest-mock
4451 python-pytest-xdist
4452 python-versioneer
4453 python-setuptools))
4454 (propagated-inputs (list python-cons
4455 python-etuples
4456 python-filelock
4457 python-logical-unification
4458 python-minikanren
4459 python-numba
4460 python-numpy
4461 python-scipy
4462 ;; [optional]
4463 ;; python-jaxlib
4464 ;; python-jax
4465 #;python-llvmlite))
4466 (home-page "https://pytensor.readthedocs.io/en/latest/")
4467 (synopsis
4468 "Library for mathematical expressions in multi-dimensional arrays")
4469 (description
4470 "PyTensor is a Python library that allows one to define, optimize, and
4471efficiently evaluate mathematical expressions involving multi-dimensional
4472arrays. It is a fork of the Aesara library.")
4473 (license license:bsd-3)))
4474
4475(define-public python-pytest-pyvista
4476 (package
4477 (name "python-pytest-pyvista")
4478 (version "0.3.2")
4479 (source
4480 (origin
4481 (method url-fetch)
4482 (uri (pypi-uri "pytest_pyvista" version))
4483 (sha256
4484 (base32 "0hgk3a5wwymk3k7ih4lsmkd44dfnsd842zv5859izqxkw74j2xpn"))))
4485 (build-system pyproject-build-system)
4486 (arguments
4487 (list
4488 ;; No tests included in the PyPI tarball.
4489 #:tests? #f))
4490 (propagated-inputs (list python-numpy python-pillow python-pytest-8))
4491 (native-inputs (list python-flit-core))
4492 (home-page "https://github.com/pyvista/pytest-pyvista")
4493 (synopsis "Pytest plugin for comparing PyVista plot images")
4494 (description "This package provides a Pytest plugin that facilitates
4495the comparison of images produced by PyVista, generating cached images from
4496tests and comparing subsequent results against that cache.")
4497 (license license:expat)))
4498
4499(define-public python-pythran
4500 (package
4501 (name "python-pythran")
4502 ;; 0.18.1 (2025-11-15), released version does not support gast 0.7.0 and
4503 ;; beniget 0.5.0.
4504 (properties '((commit . "1159b80a09ece110a369729507ba5d0bc8e895b2")
4505 (revision . "0")))
4506 (version (git-version "0.18.1"
4507 (assoc-ref properties 'revision)
4508 (assoc-ref properties 'commit)))
4509 (source
4510 (origin
4511 (method git-fetch)
4512 (uri (git-reference
4513 (url "https://github.com/serge-sans-paille/pythran")
4514 (commit (assoc-ref properties 'commit))))
4515 (file-name (git-file-name name version))
4516 (sha256
4517 (base32 "0w9vbfqsazrl7zv4b7mh8alib4kihk9gn6xmxp2w39jg5wpk2bdi"))))
4518 (build-system pyproject-build-system)
4519 (arguments
4520 (list
4521 ;; FIXME: find more reliable tests file(s), all tests from
4522 ;; test_typing.py fail with error: ModuleNotFoundError: No module named
4523 ;; 'distutils.msvccompiler'.
4524 #:tests? #f
4525 #:phases
4526 #~(modify-phases %standard-phases
4527 (add-before 'build 'unvendor-xsimd
4528 (lambda _
4529 (delete-file-recursively "pythran/xsimd")
4530 (symlink #$(package-source
4531 (this-package-input "xsimd"))
4532 "pythran/xsimd"))))))
4533 (native-inputs
4534 (list python-setuptools))
4535 (propagated-inputs
4536 (list boost ;headers need to be available
4537 xsimd
4538 python-beniget
4539 python-gast
4540 python-numpy
4541 python-ply))
4542 (home-page "https://github.com/serge-sans-paille/pythran")
4543 (synopsis "Ahead of Time compiler for numeric kernels")
4544 (description
4545 "Pythran is an ahead of time compiler for a subset of the Python
4546language, with a focus on scientific computing. It takes a Python module
4547annotated with a few interface descriptions and turns it into a native
4548Python module with the same interface, but (hopefully) faster.")
4549 (license license:bsd-3)))
4550
4551(define-public python-pyts
4552 (let ((commit "4f3d97bcb1016d33dbfaef68c0931756a4552410")
4553 (revision "0"))
4554 (package
4555 (name "python-pyts")
4556 (version (git-version "0.13.0" revision commit))
4557 (source
4558 (origin
4559 (method git-fetch)
4560 (uri (git-reference
4561 (url "https://github.com/johannfaouzi/pyts")
4562 (commit commit)))
4563 (file-name (git-file-name name version))
4564 (sha256
4565 (base32 "16hlxwajdz44qs8vi7bhiania2b3201fv3pqiwsx79rb554bvl66"))))
4566 (build-system pyproject-build-system)
4567 (arguments
4568 (list
4569 #:test-flags
4570 #~(list "--pyargs" "pyts"
4571 ;; Most likely a flaky test.
4572 "--deselect=preprocessing/transformer.py::\
4573pyts.preprocessing.transformer.QuantileTransformer")
4574 #:phases
4575 #~(modify-phases %standard-phases
4576 ;; See https://github.com/johannfaouzi/pyts/issues/168
4577 (add-after 'unpack 'fix-scikit-learn-compat
4578 (lambda _
4579 (substitute* (list "pyts/metrics/dtw.py"
4580 "pyts/preprocessing/imputer.py"
4581 "pyts/preprocessing/transformer.py")
4582 (("force_all_finite=")
4583 "ensure_all_finite=")))))))
4584 (propagated-inputs
4585 (list python-joblib
4586 python-numba
4587 python-numpy
4588 python-scikit-learn
4589 python-scipy))
4590 (native-inputs
4591 (list python-pytest python-setuptools))
4592 (home-page "https://github.com/johannfaouzi/pyts")
4593 (synopsis "Python package for time series classification")
4594 (description
4595 "pyts is a Python package for time series classification. It aims to
4596make time series classification easily accessible by providing preprocessing
4597and utility tools, and implementations of state-of-the-art algorithms. Most
4598of these algorithms transform time series, thus pyts provides several tools to
4599perform these transformations.")
4600 (license license:bsd-3))))
4601
4602(define-public python-pyvista
4603 (package
4604 (name "python-pyvista")
4605 (version "0.46.5")
4606 (source
4607 (origin
4608 (method git-fetch)
4609 (uri (git-reference
4610 (url "https://github.com/pyvista/pyvista")
4611 (commit (string-append "v" version))))
4612 (file-name (git-file-name name version))
4613 (sha256
4614 (base32 "0553bp4fhbar9z0ybjv1mw1jhb5rhrr4v6q2bzmia0ww0dn8fc69"))))
4615 (build-system pyproject-build-system)
4616 (arguments
4617 (list
4618 ;; tests: 5891 passed, 623 skipped, 355 deselected, 3 xfailed, 167 warnings
4619 #:test-flags
4620 ;; TODO: Find out what's going on with skipped tests.
4621 #~(list "--ignore=tests/plotting/test_charts.py"
4622 "--ignore=tests/examples/test_download_files.py"
4623 "--ignore=tests/examples/test_downloads.py"
4624 "--ignore=tests/plotting/test_texture.py"
4625 ;; Tries to download data from GitHub at collection time.
4626 "--ignore=tests/core/test_dataobject_filters.py"
4627 ;; Tries to download data from GitHub at collection time.
4628 "--ignore=tests/core/test_dataset_filters.py"
4629 ;; Tries to download data from GitHub at collection time.
4630 "--ignore=tests/plotting/test_plotter.py"
4631 "-k" (string-join
4632 (list "not test_actor_texture"
4633 "test_add_multiple"
4634 "test_add_timer_event"
4635 "test_avsucd_reader"
4636 "test_binarymarchingcubesreader"
4637 "test_bmpreader"
4638 "test_box_axes"
4639 "test_byureader"
4640 "test_cast_to_numpy_raises"
4641 "test_compute_boundary_mesh_quality"
4642 "test_connectivity_"
4643 "test_dataset_loader_cubemap"
4644 "test_dataset_loader_dicom"
4645 "test_dataset_loader_from_nested_files_and_directory"
4646 "test_dataset_loader_from_nested_multiblock"
4647 "test_dataset_loader_one_file"
4648 "test_dataset_loader_two_files_both_loadable"
4649 "test_dataset_loader_two_files_one_loadable"
4650 "test_dcmreader"
4651 "test_demreader"
4652 "test_ensight_multi_block_io"
4653 "test_ensightreader_arrays"
4654 "test_ensightreader_time_sets"
4655 "test_ensightreader_timepoints"
4656 "test_facetreader"
4657 "test_fluentcffreader"
4658 "test_gambitreader"
4659 "test_gaussian_cubes_reader"
4660 "test_gesignareader"
4661 "test_gif_reader"
4662 "test_hdf_reader"
4663 "test_hdr_reader"
4664 "test_init_cmap"
4665 "test_interpolate"
4666 "test_jpegreader"
4667 "test_legend_"
4668 "test_load_dataset_no_reader"
4669 "test_load_theme"
4670 "test_meta_image_reader"
4671 "test_multiblockplot3dreader"
4672 "test_nifti_reader"
4673 "test_nrrd_reader"
4674 "test_objreader"
4675 "test_only_screenshots_flag"
4676 "test_openfoam_case_type"
4677 "test_openfoam_cell_to_point_default"
4678 "test_openfoam_patch_arrays"
4679 "test_openfoam_skip_zero_time"
4680 "test_openfoamreader_active_time"
4681 "test_openfoamreader_arrays_time"
4682 "test_openfoamreader_read_data_time_point"
4683 "test_openfoamreader_read_data_time_value"
4684 "test_particle_reader"
4685 "test_partition"
4686 "test_pdbreader"
4687 "test_plot3dmetareader"
4688 "test_plot_return_img_with_cpos"
4689 "test_plot_return_img_without_cpos"
4690 "test_png_reader"
4691 "test_pnm_reader"
4692 "test_prostar_reader"
4693 "test_protein_ribbon"
4694 "test_pvdreader"
4695 "test_pvdreader_no_part_group"
4696 "test_pvdreader_no_time_group"
4697 "test_read_cgns"
4698 "test_repr"
4699 "test_save_before_close_callback"
4700 "test_slc_reader"
4701 "test_stlreader"
4702 "test_tecplotreader"
4703 "test_tiff_reader"
4704 "test_timer"
4705 "test_translate_direction_collinear"
4706 "test_user_logo"
4707 "test_xdmf_reader"
4708 ;; XXX: incompatible with Numpy@2
4709 ;; Drop when updating along with vtk.
4710 "test_check_subdtype_changes_type"
4711 ;; These tests try to download data from GitHub.
4712 "test_read_exodus"
4713 "test_nek5000_reader"
4714 "test_exodus_reader_ext"
4715 "test_exodus_reader_core"
4716 "test_exodus_blocks"
4717 "test_download_dataset_texture"
4718 "test_structured_grid_cast_to_explicit_structured_grid"
4719 "test_pad_image_multi_component_with_scalar"
4720 "test_pad_image_raises"
4721 "test_points_to_cells_and_cells_to_points_dimensions"
4722 ;; These tests download cow.vtp from GitHub.
4723 "test_meshio[cow_ugrid]"
4724 "test_meshio[points_only]"
4725 ;; Looks for pyproject.toml in installed package.
4726 "test_max_positional_args_matches_pyproject")
4727 " and not "))
4728 #:phases
4729 #~(modify-phases %standard-phases
4730 ;; vtk check fails in sanity-check, comment out
4731 (add-after 'unpack 'patch-pyproject
4732 (lambda _
4733 (substitute* "pyproject.toml"
4734 (("'vtk[^']*'," all) (string-append "#" all)))))
4735 (add-after 'unpack 'fix-failing-tests
4736 (lambda _
4737 (substitute* "tests/plotting/test_plotting.py"
4738 (("\"\"\"Determine if using mesa.\"\"\"" all)
4739 (string-append all "\n return False")))
4740 (substitute* "tests/test_meshio.py"
4741 (("cow = .*$" all) (string-append "#" all "\n"))
4742 ((", cow") ""))))
4743 ;; test phase writes files to $HOME
4744 (add-before 'check 'redirect-HOME
4745 (lambda _
4746 (setenv "HOME" "/tmp"))))))
4747 (native-inputs
4748 (list nss-certs-for-test
4749 python-aiohttp
4750 python-ipython
4751 python-mypy
4752 python-pandas-2
4753 python-pytest-8
4754 python-pytest-cases
4755 python-pytest-mock
4756 python-pytest-pyvista
4757 python-scipy
4758 python-tqdm
4759 python-trimesh
4760 which
4761 xorg-server-for-tests))
4762 (propagated-inputs
4763 (list python-cmcrameri
4764 python-cmocean
4765 python-colorcet
4766 python-imageio
4767 python-matplotlib
4768 python-meshio
4769 python-numpy
4770 python-pillow
4771 python-pooch
4772 python-scooby
4773 vtk-9.5))
4774 (home-page "https://docs.pyvista.org/")
4775 (synopsis "3D plotting and mesh analysis through VTK")
4776 (description
4777 "PyVista is...
4778
4779@itemize
4780@item @emph{Pythonic VTK}: a high-level API to the Visualization
4781Toolkit (VTK);
4782@item mesh data structures and filtering methods for spatial datasets;
4783@item 3D plotting made simple and built for large/complex data geometries.
4784@end itemize
4785
4786This package provides a Pythonic, well-documented interface exposing VTK's
4787powerful visualization backend to facilitate rapid prototyping, analysis, and
4788visual integration of spatially referenced datasets.")
4789 (license license:expat)))
4790
4791(define-public python-pyvistaqt
4792 (package
4793 (name "python-pyvistaqt")
4794 (version "0.11.3")
4795 (source
4796 (origin
4797 (method git-fetch)
4798 (uri (git-reference
4799 (url "https://github.com/pyvista/pyvistaqt")
4800 (commit version)))
4801 (file-name (git-file-name name version))
4802 (sha256
4803 (base32 "04f9cd98k463pdrpi8jby411x9mc0ih62gl0nv0h9w3r7pwl61yl"))))
4804 (build-system pyproject-build-system)
4805 (arguments
4806 (list
4807 #:phases
4808 #~(modify-phases %standard-phases
4809 (add-after 'unpack 'fix-pytest
4810 (lambda _
4811 (substitute* "tests/conftest.py"
4812 (("pytest.skip")
4813 "pytest.mark.skipif"))))
4814 (add-before 'check 'before-check
4815 (lambda _
4816 ;; Testing requires write access.
4817 (setenv "HOME" "/tmp")
4818 ;; Testing requires a running xorg server.
4819 (system "Xvfb :99 -screen 0 1024x768x24 &")
4820 (setenv "DISPLAY" ":99.0"))))))
4821 (propagated-inputs (list python-pyvista python-qtpy))
4822 (native-inputs (list python-ipython
4823 python-matplotlib
4824 python-numpy
4825 python-pyqt-6
4826 python-pytest
4827 python-pytest-qt
4828 python-setuptools
4829 python-sphinx-gallery
4830 xorg-server))
4831 (home-page "https://github.com/pyvista/pyvistaqt")
4832 (synopsis "Qt support for PyVista")
4833 (description
4834 "@code{pyvistaqt} is a helper module for @code{pyvista} to enable you to
4835plot using Qt by placing a vtk-widget into a background renderer. This can be
4836quite useful when you desire to update your plot in real-time.")
4837 (license license:expat)))
4838
4839(define-public python-pyzx
4840 (package
4841 (name "python-pyzx")
4842 (version "0.9.0")
4843 (source
4844 (origin
4845 (method git-fetch) ; no tests in PyPI
4846 (uri (git-reference
4847 (url "https://github.com/zxcalc/pyzx")
4848 (commit (string-append "v" version))))
4849 (file-name (git-file-name name version))
4850 (sha256
4851 (base32 "1bnmz08w1bmipir1wnn1k3fw64rply7891xns22qfj6yh0j1n6rj"))))
4852 (build-system pyproject-build-system)
4853 (arguments (list #:test-flags
4854 #~(list
4855 ;; Ignore long running tests
4856 "--ignore=tests/long_test.py"
4857 "--ignore=tests/long_scalar_test.py")
4858 #:phases
4859 #~(modify-phases %standard-phases
4860 (add-before 'check 'pre-check
4861 (lambda* (#:key inputs outputs #:allow-other-keys)
4862 (setenv "HOME" "/tmp")
4863 ;; Matplotlib needs to be able to write its
4864 ;; configuration file somewhere.
4865 (setenv "MPLCONFIGDIR" "/tmp"))))))
4866 (native-inputs (list python-pytest
4867 python-setuptools
4868 python-wheel))
4869 (propagated-inputs (list python-ipywidgets
4870 python-lark
4871 python-numpy
4872 python-pyperclip
4873 python-tqdm))
4874 (home-page "https://github.com/zxcalc/pyzx")
4875 (synopsis "Quantum circuit rewriting and optimisation using the ZX-calculus")
4876 (description
4877 "PyZX is a Python tool implementing the theory of ZX-calculus for the
4878creation, visualisation, and automated rewriting of large-scale quantum
4879circuits. PyZX currently allows you to:
4880
4881@itemize
4882@item Read in quantum circuits in the file format of QASM, Quipper or Quantomatic;
4883@item Rewrite circuits into a pseudo-normal form using the ZX-calculus;
4884@item Extract new simplified circuits from these reduced graphs;
4885@item Visualise the ZX-graphs and rewrites using either Matplotlib, Quantomatic
4886or as a TikZ file for use in LaTeX documents;
4887@item Output the optimised circuits in QASM, QC or QUIPPER format.
4888@end itemize")
4889 (license license:asl2.0)))
4890
4891(define-public python-qdldl
4892 (package
4893 (name "python-qdldl")
4894 (version "0.1.7.post5")
4895 (source
4896 (origin
4897 (method url-fetch)
4898 (uri (pypi-uri "qdldl" version))
4899 (sha256
4900 (base32 "0vi8dgrw32qj03z2dd3zqd0d625pibq3xmlgmidfsnwvqkhrj4qb"))))
4901 (build-system pyproject-build-system)
4902 (native-inputs
4903 (list cmake-minimal
4904 pybind11-2
4905 python-pytest
4906 python-setuptools))
4907 (propagated-inputs (list python-numpy python-scipy))
4908 (home-page "https://github.com/oxfordcontrol/qdldl-python/")
4909 (synopsis "QDLDL LDL factorization routine")
4910 (description "This package provides a Python interface to the QDLDL LDL
4911factorization routine for quasi-definite linear system.")
4912 (license license:asl2.0)))
4913
4914(define-public python-quantities
4915 (package
4916 (name "python-quantities")
4917 (version "0.16.4")
4918 (source
4919 (origin
4920 (method url-fetch)
4921 (uri (pypi-uri "quantities" version))
4922 (sha256
4923 (base32 "0dmzk17hd0c6lzjlipjpc52jdifknpvxq15javn19n3f9yvxxdpm"))))
4924 (build-system pyproject-build-system)
4925 (arguments
4926 (list
4927 #:phases
4928 #~(modify-phases %standard-phases
4929 (add-before 'check 'pre-check
4930 (lambda _
4931 (setenv "PY_IGNORE_IMPORTMISMATCH" "1"))))))
4932 (native-inputs
4933 (list python-pytest
4934 python-setuptools
4935 python-setuptools-scm))
4936 (propagated-inputs
4937 (list python-numpy))
4938 (home-page "https://github.com/python-quantities/python-quantities")
4939 (synopsis "Support for physical quantities with units, based on NumPy")
4940 (description
4941 "Quantities is designed to handle arithmetic and conversions of physical
4942quantities, which have a magnitude, dimensionality specified by various units,
4943and possibly an uncertainty. It builds on the NumPy library and is designed
4944to work with @code{numpy.ufuncs}, many of which are already supported.")
4945 ;; OSI approved, BSD like, see doc/user/license.rst.
4946 (license license:bsd-3)))
4947
4948;; XXX: Deprecated on <2026-06-08>.
4949(define-deprecated/public-alias hugs (@ (gnu packages physiscs) python-qutip))
4950
4951(define-public python-ruffus
4952 (package
4953 (name "python-ruffus")
4954 (version "2.8.4")
4955 (source
4956 (origin
4957 (method url-fetch)
4958 (uri (pypi-uri "ruffus" version))
4959 (sha256
4960 (base32 "1ai673k1s94s8b6pyxai8mk17p6zvvyi87rl236fs6ls8mpdklvc"))))
4961 (build-system pyproject-build-system)
4962 (arguments
4963 (list
4964 #:phases
4965 #~(modify-phases %standard-phases
4966 (replace 'check
4967 (lambda* (#:key tests? #:allow-other-keys)
4968 (when tests?
4969 (with-directory-excursion "ruffus/test"
4970 (invoke "bash" "run_all_unit_tests3.cmd"))))))))
4971 (native-inputs (list python-pytest python-setuptools))
4972 (home-page "http://www.ruffus.org.uk")
4973 (synopsis "Light-weight computational pipeline management")
4974 (description
4975 "Ruffus is designed to allow scientific and other analyses to be
4976automated with the minimum of fuss and the least effort.")
4977 (license license:expat)))
4978
4979(define-public python-salib
4980 (package
4981 (name "python-salib")
4982 (version "1.5.2")
4983 (source
4984 (origin
4985 (method git-fetch)
4986 (uri (git-reference
4987 (url "https://github.com/SALib/SALib")
4988 (commit (string-append "v" version))))
4989 (file-name (git-file-name name version))
4990 (sha256
4991 (base32 "0v7l6qbxgclz644fq1vmakfasxcdhg1g019b5w47hlxqw8fx0ipl"))))
4992 (build-system pyproject-build-system)
4993 ;; tests: 190 passed, 1 xfailed, 28 warnings
4994 (arguments
4995 (list
4996 #:phases
4997 #~(modify-phases %standard-phases
4998 ;; Remove this phase on the next update, it is already in master.
4999 (add-before 'build 'fix-for-pandas-3
5000 (lambda _
5001 (substitute* "src/SALib/analyze/sobol.py"
5002 (("np\\.array\\(\\[0\\.0\\]\\)")
5003 "np.float64(0.0)")))))))
5004 (native-inputs
5005 (list python-hatch-vcs
5006 python-hatchling
5007 python-pytest))
5008 (propagated-inputs
5009 (list python-matplotlib
5010 python-multiprocess
5011 python-numpy
5012 python-pandas
5013 python-scipy))
5014 (home-page "https://salib.readthedocs.io/en/latest/")
5015 (synopsis "Tools for global sensitivity analysis")
5016 (description "SALib provides tools for global sensitivity analysis. It
5017contains Sobol', Morris, FAST, DGSM, PAWN, HDMR, Moment Independent and
5018fractional factorial methods.")
5019 (license license:expat)))
5020
5021(define-public python-scikit-allel
5022 (package
5023 (name "python-scikit-allel")
5024 (version "1.3.13")
5025 (source
5026 (origin
5027 (method url-fetch)
5028 (uri (pypi-uri "scikit_allel" version))
5029 (sha256
5030 (base32 "0d9yadzhsjjqkh6rz273f53iwczk0c7pv9dajzcrmfnk036b8f4s"))))
5031 (build-system pyproject-build-system)
5032 (arguments
5033 (list
5034 #:test-flags
5035 '(list "-k"
5036 (string-append
5037 ;; AttributeError: 'Dataset' object has no attribute 'asstr'
5038 "not test_vcf_to_hdf5"
5039 " and not test_vcf_to_hdf5_exclude"
5040 " and not test_vcf_to_hdf5_rename"
5041 " and not test_vcf_to_hdf5_group"
5042 " and not test_vcf_to_hdf5_ann"
5043 ;; Does not work with recent hmmlearn
5044 " and not test_roh_mhmm_0pct"
5045 " and not test_roh_mhmm_100pct"))
5046 #:phases
5047 '(modify-phases %standard-phases
5048 (add-before 'check 'build-ext
5049 (lambda _
5050 (invoke "python" "setup.py" "build_ext" "--inplace"))))))
5051 (propagated-inputs
5052 (list python-dask python-numpy))
5053 (native-inputs
5054 (list htslib
5055 python-cython
5056 python-h5py
5057 python-hmmlearn
5058 python-numexpr
5059 python-numpy
5060 python-pytest
5061 python-setuptools
5062 python-setuptools-scm
5063 python-wheel
5064 python-zarr))
5065 (home-page "https://github.com/cggh/scikit-allel")
5066 (synopsis "Explore and analyze genetic variation data")
5067 (description
5068 "This package provides utilities for exploratory analysis of large scale
5069genetic variation data.")
5070 (license license:expat)))
5071
5072(define-public python-scikit-base
5073 (package
5074 (name "python-scikit-base")
5075 (version "1.0.2")
5076 (source
5077 (origin
5078 (method git-fetch)
5079 (uri (git-reference
5080 (url "https://github.com/sktime/skbase")
5081 (commit (string-append "v" version))))
5082 (file-name (git-file-name name version))
5083 (sha256
5084 (base32 "1436l0jr6avyhz2dg3driykn6rwskwyf57aig7x3pwak6w3il6rv"))))
5085 (build-system pyproject-build-system)
5086 (native-inputs
5087 (list python-numpy
5088 python-pandas-minimal
5089 python-pytest
5090 python-scikit-learn
5091 python-scipy-minimal
5092 python-setuptools
5093 python-toml))
5094 (home-page "https://github.com/sktime/skbase")
5095 (synopsis "Base classes for sklearn-like parametric objects")
5096 (description
5097 "@code{skbase} provides base classes for creating scikit-learn-like
5098parametric objects, along with tools to make it easier to build your own
5099packages that follow these design patterns.")
5100 (license license:bsd-3)))
5101
5102(define-public python-scikit-build-core
5103 (package
5104 (name "python-scikit-build-core")
5105 (version "0.12.2")
5106 (source
5107 (origin
5108 (method git-fetch)
5109 (uri (git-reference
5110 (url "https://github.com/scikit-build/scikit-build-core")
5111 (commit (string-append "v" version))))
5112 (file-name (git-file-name name version))
5113 (sha256
5114 (base32 "18xh572ndd0dww7czic775p6n8y5kxd072fj7xdhxwykdxr0bl2g"))))
5115 (build-system pyproject-build-system)
5116 (arguments
5117 (list
5118 ;; tests: 414 passed, 63 skipped, 75 deselected, 1 xfailed
5119 #:test-flags #~(list "-m" "not isolated and not network")))
5120 (native-inputs
5121 (list python-cattrs-minimal
5122 python-hatch-vcs
5123 python-hatchling
5124 python-pypa-build
5125 python-pytest
5126 python-pytest-subprocess
5127 python-virtualenv))
5128 (propagated-inputs
5129 (list cmake-minimal
5130 pybind11
5131 python-packaging
5132 python-pathspec))
5133 (home-page "https://github.com/scikit-build/scikit-build-core")
5134 (synopsis "Build backend for CMake based projects")
5135 (description "Scikit-build-core is a build backend for Python that uses
5136CMake to build extension modules. It has a simple yet powerful static
5137configuration system in pyproject.toml, and supports almost unlimited
5138flexibility via CMake. It was initially developed to support the demanding
5139needs of scientific users, but can build any sort of package that uses
5140CMake.")
5141 (license license:asl2.0)))
5142
5143(define-public python-scikit-build-core-bootstrap
5144 (hidden-package
5145 (package/inherit python-scikit-build-core
5146 (arguments
5147 (list #:tests? #f))
5148 (native-inputs
5149 (list python-hatch-vcs
5150 python-hatchling))
5151 (propagated-inputs
5152 (list python-packaging
5153 python-pathspec)))))
5154
5155(define-public python-scikit-fem
5156 (package
5157 (name "python-scikit-fem")
5158 (version "11.0.0")
5159 (source
5160 (origin
5161 (method git-fetch) ; no tests in PyPI
5162 (uri (git-reference
5163 (url "https://github.com/kinnala/scikit-fem")
5164 (commit version)))
5165 (file-name (git-file-name name version))
5166 (sha256
5167 (base32 "13zh57raz2qcdfhsvpdlyiba5q0s0lh5b3gmsmh4cfrncrkdh6mh"))))
5168 (build-system pyproject-build-system)
5169 (arguments
5170 (list
5171 #:test-flags #~(list
5172 ;; Tests require Jax.
5173 "--ignore=tests/test_autodiff.py"
5174 "--ignore=tests/test_examples.py")))
5175 (native-inputs
5176 (list python-autograd
5177 python-pyamg
5178 ;; python-jax ; not packed yet
5179 python-pytest
5180 python-shapely
5181 python-setuptools))
5182 (propagated-inputs
5183 (list python-meshio
5184 python-numpy
5185 python-matplotlib
5186 python-scipy))
5187 (home-page "https://scikit-fem.readthedocs.io/en/latest/")
5188 (synopsis "Library for performing finite element assembly")
5189 (description
5190 "@code{scikit-fem} is a library for performing finite element assembly.
5191Its main purpose is the transformation of bilinear forms into sparse matrices
5192and linear forms into vectors.")
5193 (license license:bsd-3)))
5194
5195(define-public python-scikit-fuzzy
5196 (package
5197 (name "python-scikit-fuzzy")
5198 (version "0.5.0")
5199 (source
5200 (origin
5201 (method url-fetch)
5202 (uri (pypi-uri "scikit_fuzzy" version))
5203 (sha256
5204 (base32 "0zsfyd8cpd2l82fwh3smxbwhb3bkqwlq17cbav53axma4c2k9r9f"))))
5205 (build-system pyproject-build-system)
5206 (arguments
5207 (list
5208 #:test-flags #~(list "--pyargs" "skfuzzy")))
5209 (native-inputs
5210 (list python-pytest python-setuptools python-wheel))
5211 (propagated-inputs
5212 (list python-networkx python-numpy python-scipy))
5213 (home-page "https://github.com/scikit-fuzzy/scikit-fuzzy")
5214 (synopsis "Fuzzy logic toolkit for SciPy")
5215 (description
5216 "This package implements many useful tools for projects involving fuzzy
5217logic, also known as grey logic.")
5218 (license license:bsd-3)))
5219
5220(define-public python-scikit-image
5221 (package
5222 (name "python-scikit-image")
5223 (version "0.26.0")
5224 (source
5225 (origin
5226 (method git-fetch)
5227 (uri (git-reference
5228 (url "https://github.com/scikit-image/scikit-image")
5229 (commit (string-append "v" version))))
5230 (file-name (git-file-name name version))
5231 ;; TODO: Remove patch when refreshing python-scikit-image.
5232 ;; Prevent deprecation warning from python-pillow 12.1.1.
5233 (patches
5234 (search-patches "python-scikit-image-fix-python-pillow.patch"))
5235 (sha256
5236 (base32 "1x90jad3jqin8ws1j1i89zrajpcbn1h87nl5yxxf5cs3b7ha13rf"))))
5237 (build-system pyproject-build-system)
5238 (arguments
5239 (list
5240 #:test-flags
5241 #~(list "--ignore=benchmarks/"
5242 ;; RuntimeWarning: divide by zero encountered in scalar divide
5243 ;; (see:
5244 ;; <https://github.com/scikit-image/scikit-image/issues/7348>).
5245 "-k" "not test_ellipse_parameter_stability")))
5246 (propagated-inputs
5247 (list python-imageio
5248 python-lazy-loader
5249 python-networkx
5250 python-numpy
5251 python-packaging
5252 python-pillow
5253 python-scipy
5254 python-tifffile
5255 ;; [optional]
5256 ;; python-astropy
5257 ;; python-cloudpickle
5258 ;; python-dask
5259 ;; python-matplotlib
5260 ;; python-pooch
5261 ;; python-pyamg
5262 ;; python-pywavelets
5263 ;; python-scikit-learn
5264 #;python-simpleitk))
5265 (native-inputs
5266 (list python-meson
5267 python-pytest
5268 python-pytest-localserver
5269 python-pytest-pretty
5270 python-pythran))
5271 (home-page "https://scikit-image.org/")
5272 (synopsis "Image processing in Python")
5273 (description
5274 "Scikit-image is a collection of algorithms for image processing.")
5275 (license license:bsd-3)))
5276
5277(define-public python-scikit-misc
5278 (package
5279 (name "python-scikit-misc")
5280 (version "0.5.1")
5281 (source
5282 (origin
5283 (method url-fetch)
5284 (uri (pypi-uri "scikit_misc" version))
5285 (sha256
5286 (base32 "18sj7qa3kk4pqh3rzg2c64lf03nciv9cf985yh1h2kpqqndgdhf5"))))
5287 (build-system pyproject-build-system)
5288 (arguments
5289 (list
5290 #:test-flags
5291 '(list "--pyargs" "skmisc")
5292 #:phases
5293 #~(modify-phases %standard-phases
5294 (add-after 'unpack 'fix-version
5295 (lambda _
5296 (call-with-output-file "skmisc/_version.py"
5297 (lambda (port)
5298 (display (string-append "__version__ = \"" #$version "\"")
5299 port)))
5300 (substitute* "meson.build"
5301 (("^ version: run_command.*")
5302 (string-append " version: '" #$version "',\n")))
5303 (substitute* "pyproject.toml"
5304 (("dynamic = \\['version'\\]")
5305 (string-append "version = \"" #$version "\""))))))))
5306 (native-inputs
5307 (list gfortran
5308 python-meson
5309 python-spin
5310 python-pytest
5311 python-setuptools))
5312 (propagated-inputs
5313 (list python-numpy))
5314 (home-page "https://has2k1.github.io/scikit-misc/stable")
5315 (synopsis "Miscellaneous tools for scientific computing.")
5316 (description "This package provides miscellaneous tools for data analysis
5317and scientific computing.")
5318 (license license:bsd-3)))
5319
5320(define-public python-scikit-opt
5321 (package
5322 (name "python-scikit-opt")
5323 (version "0.6.6")
5324 (source
5325 (origin
5326 (method url-fetch)
5327 (uri (pypi-uri "scikit-opt" version))
5328 (sha256
5329 (base32 "0ycqizgsj7q57asc1bphzhf1fx9zqn0vx5rli7q541bas64hfqiy"))))
5330 (build-system pyproject-build-system)
5331 (native-inputs
5332 (list python-pytest
5333 python-setuptools))
5334 (propagated-inputs
5335 (list python-numpy
5336 python-pytorch
5337 python-scipy))
5338 (home-page "https://github.com/guofei9987/scikit-opt")
5339 (synopsis "Swarm intelligence algorithms in Python")
5340 (description
5341 "Scikit-opt (or sko) is a Python module implementing @dfn{swarm
5342intelligence} algorithms: genetic algorithm, particle swarm optimization,
5343simulated annealing, ant colony algorithm, immune algorithm, artificial fish
5344swarm algorithm.")
5345 (license license:expat)))
5346
5347(define-public python-scikit-optimize
5348 ;; XXX: The project might be not maintained, see
5349 ;; <https://github.com/holgern/scikit-optimize/issues/6>.
5350 (package
5351 (name "python-scikit-optimize")
5352 (version "0.10.2")
5353 (source
5354 (origin
5355 (method git-fetch)
5356 (uri (git-reference
5357 (url "https://github.com/holgern/scikit-optimize")
5358 (commit (string-append "v" version))))
5359 (file-name (git-file-name name version))
5360 (sha256
5361 (base32 "0pc6avzxz8l32km5jvv3maih0a5x2akxybvxl2hdg04qz2l0kz8b"))))
5362 (build-system pyproject-build-system)
5363 (arguments
5364 (list
5365 ;; tests: 398 passed, 1 skipped, 179 warnings
5366 #:test-flags
5367 #~(list "--numprocesses" (number->string (parallel-job-count))
5368 "-k" (string-join
5369 ;; XXX: As the project is not actively maintained, review
5370 ;; failing test when a fresh release is available.
5371 (list "not test_acq_optimizer"
5372 "test_acq_optimizer_with_time_api"
5373 "test_categorical_init_vals"
5374 "test_consistent_x_iter_dimensions"
5375 "test_early_stopping_delta_x"
5376 "test_early_stopping_delta_x_empty_result_object"
5377 "test_early_stopping_delta_y"
5378 "test_early_stopping_delta_y_with_x0"
5379 "test_exhaust_initial_calls"
5380 "test_fixed_random_states"
5381 "test_init_points_and_models"
5382 "test_init_vals"
5383 "test_init_vals_and_models"
5384 "test_minimizer_api"
5385 "test_minimizer_api_random_only"
5386 "test_minimizer_space_constraint"
5387 "test_minimizer_with_space"
5388 "test_mixed_spaces"
5389 "test_optimizer_base_estimator_string_smoke"
5390 "test_optimizer_base_estimator_string_smoke_njobs"
5391 "test_per_second_api"
5392 "test_repeated_x"
5393 "test_tree_based_minimize")
5394 " and not "))))
5395 (native-inputs
5396 (list python-pytest
5397 python-pytest-xdist
5398 python-setuptools))
5399 (propagated-inputs
5400 (list python-joblib
5401 python-matplotlib
5402 python-numpy
5403 python-pyaml
5404 python-scikit-learn
5405 python-scipy))
5406 (home-page "https://scikit-optimize.github.io/")
5407 (synopsis "Sequential model-based optimization toolbox")
5408 (description
5409 "Scikit-Optimize, or @code{skopt}, is a simple and efficient library to
5410minimize (very) expensive and noisy black-box functions. It implements
5411several methods for sequential model-based optimization. @code{skopt} aims to
5412be accessible and easy to use in many contexts.")
5413 (license license:bsd-3)))
5414
5415(define-public python-scikit-surprise
5416 (package
5417 (name "python-scikit-surprise")
5418 (version "1.1.5")
5419 (source
5420 (origin
5421 (method git-fetch)
5422 (uri (git-reference
5423 (url "https://github.com/NicolasHug/Surprise")
5424 (commit (string-append "v" version))))
5425 (file-name (git-file-name name version))
5426 (sha256
5427 (base32 "1jw05xb8w7d5vx0v8gjd51a5bp1zwqy5adcpaf8fy5mfrdjn6hpp"))))
5428 (build-system pyproject-build-system)
5429 (arguments
5430 (list
5431 ;; tests: 82 passed
5432 #:phases
5433 #~(modify-phases %standard-phases
5434 (add-before 'sanity-check 'set-home
5435 (lambda _
5436 ;; Change from /homeless-shelter to /tmp for write
5437 ;; permission.
5438 (setenv "HOME" "/tmp"))))))
5439 (native-inputs
5440 (list python-cython
5441 python-pandas-minimal
5442 python-pytest
5443 python-setuptools))
5444 (propagated-inputs
5445 (list python-joblib
5446 python-numpy
5447 python-scikit-learn))
5448 (home-page "https://surpriselib.com/")
5449 (synopsis "Recommender system library for Scikit-learn")
5450 (description
5451 "This package provides a Python library for building and analyzing
5452recommender systems that deal with explicit rating data. It was designed with
5453the following purposes in mind:
5454@itemize
5455@item Provide tools to handle downloaded or user-provided datasets.
5456@item Provide ready-to-use prediction algorithms and similarity measures.
5457@item Provide a base for creating custom algorithms.
5458@item Provide tools to evaluate, analyse and compare algorithm performance.
5459@item Provide documentation with precise details regarding library algorithms.
5460@end itemize")
5461 (license license:bsd-3)))
5462
5463(define-public python-scikit-survival
5464 (package
5465 (name "python-scikit-survival")
5466 (version "0.26.0")
5467 (source
5468 (origin
5469 (method git-fetch)
5470 (uri (git-reference
5471 (url "https://github.com/sebp/scikit-survival")
5472 (commit (string-append "v" version))
5473 ;; TODO: This package contains a copy of Eigen in
5474 ;; sksurv/linear_model/src. It would be good to figure out
5475 ;; how to use our own Eigen package.
5476 (recursive? #true)))
5477 (file-name (git-file-name name version))
5478 (sha256
5479 (base32 "0r0xi9saz247ph6bgrc3iknq0m60d8rs4sl4mdv4s1zja80w1cp8"))))
5480 (build-system pyproject-build-system)
5481 (arguments
5482 (list
5483 ;; tests: 1013 passed, 105 warnings
5484 #:test-flags
5485 #~(list "--durations=10" ;to help in spotting long running tests
5486 "--numprocesses" (number->string (min 4 (parallel-job-count))))))
5487 (propagated-inputs
5488 (list python-ecos
5489 python-joblib
5490 python-numexpr
5491 python-numpy
5492 python-osqp
5493 python-pandas
5494 python-scikit-learn
5495 python-scipy))
5496 (native-inputs
5497 (list python-cython
5498 python-packaging
5499 python-pytest
5500 python-pytest-xdist
5501 python-setuptools
5502 python-setuptools-scm))
5503 (home-page "https://github.com/sebp/scikit-survival")
5504 (synopsis "Survival analysis built on top of scikit-learn")
5505 (description "Scikit-survival is a Python module for survival analysis
5506built on top of scikit-learn. It allows doing survival analysis while
5507utilizing the power of scikit-learn, e.g., for pre-processing or doing
5508cross-validation.")
5509 (license license:gpl3+)))
5510
5511(define-public python-scipy
5512 (package
5513 (name "python-scipy")
5514 (version "1.17.1")
5515 ;; TODO: PyPI archive bundles extra in subprojects:
5516 ;; - https://github.com/boostorg/math
5517 ;; - https://github.com/scipy/HiGHS
5518 ;; - https://github.com/scipy/xsf
5519 ;; - qhull
5520 (source
5521 (origin
5522 (method url-fetch)
5523 (uri (pypi-uri "scipy" version))
5524 (sha256
5525 (base32 "1h4pn8i33cf5jzlh6hs6sjg10i8x1ch35y5f4v11d26bv09f1n4m"))))
5526 (build-system pyproject-build-system)
5527 (arguments
5528 (list
5529 ;; tests: 81362 passed, 7493 skipped, 313 xfailed, 28 xpassed, 225 warnings
5530 #:configure-flags
5531 ''(("setup-args" . #("-Duse-system-libraries=all")))
5532 #:test-flags
5533 #~(list "--durations=10"
5534 "--numprocesses" (number->string (min 8 (parallel-job-count)))
5535 "--pyargs" "scipy"
5536 "-k" (string-join
5537 ;; Network access is required.
5538 (list "not test_ascent"
5539 "test_electrocardiogram"
5540 "test_existence_all"
5541 "test_face"
5542 ;; pycparser.ply.yacc.YaccError: Unable to build parser
5543 "test_callbacks"
5544 "test_bad_callbacks"
5545 ;; AssertionError: Items are not equal: ACTUAL:
5546 ;; np.complex128(inf+nanj) DESIRED: (inf+0j)
5547 "test_expm1_complex"
5548 ;; Bad results (X out of Y) for the following points
5549 ;; (in output 0):
5550 "test_spherical_in_complex"
5551 "test_spherical_jn_complex"
5552 "test_spherical_kn"
5553 "test_spherical_yn_complex"
5554 ;; Not equal to tolerance <...>
5555 "test_log1p_complex"
5556 "test_negative_real_gh14582[spherical_in-False]"
5557 "test_negative_real_gh14582[spherical_in-True]"
5558 "test_negative_real_gh14582[spherical_jn-False"
5559 "test_negative_real_gh14582[spherical_jn-True]"
5560 "test_negative_real_gh14582[spherical_yn-False]"
5561 "test_negative_real_gh14582[spherical_yn-True]")
5562 " and not "))
5563 #:phases
5564 #~(modify-phases %standard-phases
5565 (add-after 'set-paths 'hide-gfortran
5566 ;; See: <https://issues.guix.gnu.org/73439#45>.
5567 (lambda* (#:key inputs #:allow-other-keys)
5568 (let ((gfortran #$(this-package-native-input "gfortran")))
5569 (setenv "CPLUS_INCLUDE_PATH"
5570 (string-join
5571 (delete (string-append gfortran "/include/c++")
5572 (string-split (getenv "CPLUS_INCLUDE_PATH") #\:))
5573 ":")))))
5574 (replace 'check
5575 (lambda* (#:key test-flags tests? #:allow-other-keys)
5576 (when tests?
5577 ;; Step out of the source directory to avoid interference.
5578 ;; See: <.github/workflows/linux.yml> for any other possible
5579 ;; tests setup.
5580 (with-directory-excursion "/tmp"
5581 (setenv "HOME" "/tmp")
5582 (setenv "PYTHONOPTIMIZE" "2")
5583 (apply invoke "pytest" "-vv" test-flags))))))))
5584 (native-inputs
5585 (list gfortran
5586 pkg-config
5587 python-hypothesis
5588 python-meson
5589 python-mpmath
5590 python-pooch
5591 python-pytest
5592 python-pytest-timeout
5593 python-pytest-xdist
5594 python-pythran
5595 python-threadpoolctl))
5596 (inputs
5597 (list boost
5598 openblas
5599 pybind11
5600 qhull
5601 xsimd))
5602 (propagated-inputs
5603 (list python-numpy))
5604 (home-page "https://scipy.org/")
5605 (synopsis "The Scipy library provides efficient numerical routines")
5606 (description "The SciPy library is one of the core packages that make up
5607the SciPy stack. It provides many user-friendly and efficient numerical
5608routines such as routines for numerical integration and optimization.")
5609 (license license:bsd-3)))
5610
5611;; A bare minimal package, mainly to use in tests and reduce closure
5612;; size. Tests are left out in the main package to slim down native-inputs.
5613(define-public python-scipy-minimal
5614 (package/inherit python-scipy
5615 (name "python-scipy-minimal")
5616 (arguments
5617 (substitute-keyword-arguments arguments
5618 ((#:tests? _ #t) #f)))
5619 (native-inputs
5620 (list gfortran
5621 pkg-config
5622 python-meson
5623 python-pythran))))
5624
5625(define-public python-scs
5626 (package
5627 (name "python-scs")
5628 (version "3.2.10")
5629 (source
5630 (origin
5631 (method git-fetch)
5632 (uri (git-reference
5633 (url "https://github.com/bodono/scs-python")
5634 (commit version)))
5635 (file-name (git-file-name name version))
5636 (sha256
5637 (base32 "1wg1g6das5hs53z3sjn2m8646023d14q9shmwfb38n23baqi468g"))))
5638 (build-system pyproject-build-system)
5639 (arguments
5640 (list
5641 ;; tests: 26 passed
5642 #:phases
5643 #~(modify-phases %standard-phases
5644 (add-after 'ensure-no-mtimes-pre-1980 'substitute-git-submodules
5645 (lambda _
5646 (rmdir "scs_source")
5647 (symlink #$(package-source
5648 (this-package-native-input "scs"))
5649 "scs_source")
5650 (rmdir "scs/pythoncapi-compat")
5651 (symlink #$(package-source
5652 (this-package-native-input "pythoncapi-compat"))
5653 "scs/pythoncapi-compat"))))))
5654 (native-inputs
5655 (list pkg-config
5656 python-meson
5657 python-pytest
5658 pythoncapi-compat
5659 scs))
5660 (inputs
5661 (list lapack
5662 openblas))
5663 (propagated-inputs
5664 (list python-numpy
5665 python-scipy))
5666 (home-page "https://github.com/bodono/scs-python")
5667 (synopsis "Splitting conic solver")
5668 (description "This package provides a Python interface for the
5669SCS (Splitting conic solver) library.")
5670 (license license:expat)))
5671
5672(define-public python-simple-pid
5673 (package
5674 (name "python-simple-pid")
5675 (version "2.0.1")
5676 (source (origin
5677 (method url-fetch)
5678 (uri (pypi-uri "simple_pid" version))
5679 (sha256
5680 (base32
5681 "17p9bgka5yv5lbnbk374yjccrlizm572wv3xb479072lahf7cwap"))))
5682 (build-system pyproject-build-system)
5683 (native-inputs
5684 (list python-pytest python-setuptools python-wheel))
5685 (home-page "https://github.com/m-lundberg/simple-pid")
5686 (synopsis "Easy to use PID controller")
5687 (description "This package provides a simple and easy-to-use @acronym{PID,
5688proportional-integral-derivative} controller.")
5689 (license license:expat)))
5690
5691(define-public python-simplespectral
5692 (package
5693 (name "python-simplespectral")
5694 (version "1.0.0")
5695 (source
5696 (origin
5697 (method url-fetch)
5698 (uri (pypi-uri "SimpleSpectral" version))
5699 (sha256
5700 (base32 "0qh3xwdv9cwcqdamvglrhm586p4yaq1hd291py1fvykhk2a2d4w6"))))
5701 (build-system pyproject-build-system)
5702 (arguments
5703 (list #:tests? #f)) ;No tests, also not in git repository.
5704 (native-inputs
5705 (list python-setuptools))
5706 (propagated-inputs
5707 (list python-numpy python-scipy))
5708 (home-page "https://github.com/xmikos/simplespectral")
5709 (synopsis "FFT module for Python")
5710 (description
5711 "This package provides a simplified @code{scipy.signal.spectral} module
5712to do spectral analysis in Python.")
5713 (license license:expat)))
5714
5715(define-public python-snakemake-executor-plugin-slurm
5716 (package
5717 (name "python-snakemake-executor-plugin-slurm")
5718 (version "1.7.0")
5719 (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm/")
5720 (source
5721 (origin
5722 (method git-fetch)
5723 (uri (git-reference
5724 (url home-page)
5725 (commit (string-append "v" version))))
5726 (file-name (git-file-name name version))
5727 (sha256
5728 (base32 "0x7ghrkvmxqbcjl69hxp5axa1av3s0mdc0i9xjg8qjnd3hgd82r3"))))
5729 (build-system pyproject-build-system)
5730 (arguments
5731 (list #:phases
5732 #~(modify-phases %standard-phases
5733 (replace 'check
5734 (lambda* (#:key tests? #:allow-other-keys)
5735 (when tests?
5736 (invoke "python3" "tests/tests.py")))))))
5737 (native-inputs (list python-pandas
5738 python-poetry-core
5739 python-pytest
5740 python-snakemake-executor-plugin-slurm-jobstep
5741 snakemake))
5742 (synopsis "Snakemake executor plugin: slurm")
5743 (description "A Snakemake executor plugin for running SLURM jobs.")
5744 (license license:expat)))
5745
5746(define-public python-snakemake-executor-plugin-slurm-jobstep
5747 (package
5748 (name "python-snakemake-executor-plugin-slurm-jobstep")
5749 (version "0.3.0")
5750 (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep")
5751 (source
5752 (origin
5753 (method git-fetch)
5754 (uri (git-reference
5755 (url home-page)
5756 (commit (string-append "v" version))))
5757 (file-name (git-file-name name version))
5758 (sha256
5759 (base32 "0ly15ywmbfcm5z7jy7dxiidpw3immsdd2k80vrm4pza721irxcar"))))
5760 (build-system pyproject-build-system)
5761 (arguments
5762 (list #:phases
5763 #~(modify-phases %standard-phases
5764 (replace 'check
5765 (lambda* (#:key tests? #:allow-other-keys)
5766 (when tests?
5767 (invoke "python3" "tests/tests.py")))))))
5768 (native-inputs (list python-poetry-core
5769 python-pytest
5770 snakemake))
5771 (synopsis "Snakemake executor plugin: slurm-jobstep")
5772 (description "A Snakemake executor plugin for running srun jobs inside of
5773SLURM jobs (meant for internal use by python-snakemake-executor-plugin-slurm).")
5774 (license license:expat)))
5775
5776(define-public python-snakemake-interface-common
5777 (package
5778 (name "python-snakemake-interface-common")
5779 ;; This commit fixes a python-packaging sanity-check failure.
5780 (properties '((commit . "d585b5c0c7c0ec0df60a1a26d5d413f3ee88e63f")
5781 (revision . "0")))
5782 (version (git-version "1.23.0"
5783 (assoc-ref properties 'revision)
5784 (assoc-ref properties 'commit)))
5785 (source
5786 (origin
5787 (method git-fetch)
5788 (uri (git-reference
5789 (url "https://github.com/snakemake/snakemake-interface-common")
5790 (commit (assoc-ref properties 'commit))))
5791 (file-name (git-file-name name version))
5792 (sha256
5793 (base32 "1zxks3jjwc5addx5wxgfb5zn2y2jzxz53n739b9w8qba3nwnzyj2"))))
5794 (build-system pyproject-build-system)
5795 (arguments
5796 (list
5797 #:test-backend #~'custom
5798 #:test-flags #~(list "tests/tests.py")))
5799 (propagated-inputs
5800 (list python-argparse-dataclass
5801 python-configargparse
5802 python-packaging))
5803 (native-inputs
5804 (list python-pytest
5805 python-setuptools))
5806 (home-page "https://github.com/snakemake/snakemake-interface-common")
5807 (synopsis "Common functions and classes for Snakemake and its plugins")
5808 (description "This package provides common functions and classes
5809for Snakemake and its plugins.")
5810 (license license:expat)))
5811
5812(define-public python-snakemake-interface-executor-plugins
5813 (package
5814 (name "python-snakemake-interface-executor-plugins")
5815 (version "9.4.0")
5816 (source
5817 (origin
5818 (method git-fetch)
5819 (uri (git-reference
5820 (url (string-append "https://github.com/snakemake/"
5821 "snakemake-interface-executor-plugins"))
5822 (commit (string-append "v" version))))
5823 (file-name (git-file-name name version))
5824 (sha256
5825 (base32 "1qz4cl5wyinhk191ivkxn0ghjjdicyvg6wq97b1bgn01qqfdvxkq"))))
5826 (build-system pyproject-build-system)
5827 (arguments
5828 (list
5829 #:test-backend #~'custom
5830 #:test-flags #~(list "tests/tests.py")))
5831 (propagated-inputs (list python-snakemake-interface-common))
5832 (native-inputs (list python-poetry-core python-pytest))
5833 (home-page (string-append "https://github.com/snakemake/"
5834 "python-snakemake-interface-executor-plugins"))
5835 (synopsis "Interface for Snakemake executor plugins")
5836 (description
5837 "This package provides a stable interface for interactions between Snakemake and
5838its executor plugins.")
5839 (license license:expat)))
5840
5841(define-public python-snakemake-interface-logger-plugins
5842 (package
5843 (name "python-snakemake-interface-logger-plugins")
5844 (version "2.0.1")
5845 (source
5846 (origin
5847 (method git-fetch)
5848 (uri (git-reference
5849 (url (string-append "https://github.com/snakemake/"
5850 "snakemake-interface-logger-plugins"))
5851 (commit (string-append "v" version))))
5852 (file-name (git-file-name name version))
5853 (sha256
5854 (base32 "138z6i810v374h27gj9jxg5jwdz6ccyirgv2f2l313j1iivj7wfa"))))
5855 (build-system pyproject-build-system)
5856 (arguments
5857 (list
5858 #:test-flags #~(list "tests/tests.py")))
5859 (propagated-inputs (list python-snakemake-interface-common))
5860 (native-inputs
5861 (list python-hatchling
5862 python-snakemake-logger-plugin-rich-bootstrap
5863 python-pytest))
5864 (home-page (string-append "https://github.com/snakemake/"
5865 "python-snakemake-interface-logger-plugins"))
5866 (synopsis "Interface for Snakemake logger plugins")
5867 (description
5868 "This package provides a stable interface for interactions between Snakemake and
5869its logger plugins.")
5870 (license license:expat)))
5871
5872(define-public python-snakemake-interface-logger-plugins-bootstrap
5873 (package/inherit python-snakemake-interface-logger-plugins
5874 (name "python-snakemake-interface-logger-plugins-bootstrap")
5875 (arguments (list #:tests? #f))
5876 (native-inputs (list python-hatchling))))
5877
5878(define-public python-snakemake-interface-report-plugins
5879 (package
5880 (name "python-snakemake-interface-report-plugins")
5881 (version "1.3.0")
5882 (source
5883 (origin
5884 (method git-fetch)
5885 (uri (git-reference
5886 (url (string-append "https://github.com/snakemake/"
5887 "snakemake-interface-report-plugins"))
5888 (commit (string-append "v" version))))
5889 (file-name (git-file-name name version))
5890 (sha256
5891 (base32 "0i16ia88ym2y9092c9z1jxgmfmnfdha69hbm56ncnxdmsfch9s6y"))))
5892 (build-system pyproject-build-system)
5893 (arguments
5894 (list
5895 #:tests? #f ;circular dependency on snakemake
5896 #:test-backend #~'custom
5897 #:test-flags #~(list "tests/tests.py")))
5898 (propagated-inputs (list python-snakemake-interface-common))
5899 (native-inputs (list python-poetry-core))
5900 (home-page (string-append "https://github.com/snakemake/"
5901 "python-snakemake-interface-report-plugins"))
5902 (synopsis "Interface for Snakemake report plugins")
5903 (description "This package provides a stable interface for interactions
5904between Snakemake and its report plugins.")
5905 (license license:expat)))
5906
5907(define-public python-snakemake-interface-scheduler-plugins
5908 (package
5909 (name "python-snakemake-interface-scheduler-plugins")
5910 (version "2.0.2")
5911 (source
5912 (origin
5913 (method git-fetch)
5914 (uri (git-reference
5915 (url (string-append "https://github.com/snakemake/"
5916 "snakemake-interface-scheduler-plugins"))
5917 (commit (string-append "v" version))))
5918 (file-name (git-file-name name version))
5919 (sha256
5920 (base32 "0bz33dl90cblzs9gki8kmklv9zkdh22883455541y5b5k70hr306"))))
5921 (build-system pyproject-build-system)
5922 (arguments
5923 (list
5924 ;; XXX: Tests collect but snakemake.scheduler is missing.
5925 #:tests? #f
5926 #:test-flags #~(list "tests/tests.py")))
5927 (propagated-inputs (list python-snakemake-interface-common))
5928 (native-inputs
5929 (list python-hatchling
5930 python-pytest))
5931 (home-page (string-append "https://github.com/snakemake/"
5932 "python-snakemake-interface-scheduler-plugins"))
5933 (synopsis "Interface for Snakemake scheduler plugins")
5934 (description
5935 "This package provides a stable interface for interactions between Snakemake and
5936its scheduler plugins.")
5937 (license license:expat)))
5938
5939(define-public python-snakemake-interface-software-deployment-plugins
5940 (package
5941 (name "python-snakemake-interface-software-deployment-plugins")
5942 (version "0.18.6")
5943 (source
5944 (origin
5945 (method git-fetch)
5946 (uri (git-reference
5947 (url (string-append "https://github.com/snakemake/"
5948 "snakemake-interface-software-deployment-plugins"))
5949 (commit (string-append "v" version))))
5950 (file-name (git-file-name name version))
5951 (sha256
5952 (base32 "10dv8317ryxa05bdfyy6hqlwjxl0crnhfy66zvsl662zvzcb2hm6"))))
5953 (build-system pyproject-build-system)
5954 (arguments
5955 (list
5956 #:test-flags #~(list "--ignore=tests/test_py37.py")))
5957 (propagated-inputs (list python-argparse-dataclass
5958 python-snakemake-interface-common))
5959 (native-inputs
5960 (list python-hatchling
5961 python-pytest
5962 python-snakemake-software-deployment-plugin-envmodules-bootstrap))
5963 (home-page (string-append "https://github.com/snakemake/"
5964 "snakemake-interface-software-deployment-plugins"))
5965 (synopsis "Interface for Snakemake software deployment plugins")
5966 (description
5967 "This package provides a stable interface for interactions between Snakemake and
5968its software deployment plugins.")
5969 (license license:expat)))
5970
5971(define-public python-snakemake-interface-storage-plugins
5972 (package
5973 (name "python-snakemake-interface-storage-plugins")
5974 (version "4.4.1")
5975 (source
5976 (origin
5977 (method git-fetch)
5978 (uri (git-reference
5979 (url (string-append "https://github.com/snakemake/"
5980 "snakemake-interface-storage-plugins"))
5981 (commit (string-append "v" version))))
5982 (file-name (git-file-name name version))
5983 (sha256
5984 (base32 "0nv6zldqspjvy27g94rz4cpnk34jrh6gyfb2zkqk7y1mflk8i95n"))))
5985 (build-system pyproject-build-system)
5986 (arguments
5987 (list
5988 #:tests? #f ;circular dependency on snakemake
5989 #:phases
5990 #~(modify-phases %standard-phases
5991 (add-after 'unpack 'relax-requirements
5992 (lambda _
5993 (substitute* "pyproject.toml"
5994 (("wrapt = \".*\"")
5995 "wrapt = \"*\""))))
5996 (replace 'check
5997 (lambda* (#:key tests? #:allow-other-keys)
5998 (when tests?
5999 (invoke "python3" "tests/tests.py")))))))
6000 (propagated-inputs
6001 (list python-humanfriendly
6002 python-snakemake-interface-common
6003 python-tenacity
6004 python-throttler
6005 python-wrapt))
6006 (native-inputs (list python-poetry-core python-pytest))
6007 (home-page (string-append "https://github.com/snakemake/"
6008 "snakemake-interface-storage-plugins"))
6009 (synopsis "Interface for Snakemake storage plugins")
6010 (description
6011 "This package provides a stable interface for interactions between
6012Snakemake and its storage plugins.")
6013 (license license:expat)))
6014
6015(define-public python-snakemake-logger-plugin-rich
6016 (package
6017 (name "python-snakemake-logger-plugin-rich")
6018 (version "0.4.1")
6019 (source
6020 (origin
6021 (method git-fetch)
6022 (uri (git-reference
6023 (url "https://github.com/cademirch/snakemake-logger-plugin-rich")
6024 (commit (string-append "v" version))))
6025 (file-name (git-file-name name version))
6026 (sha256
6027 (base32 "07r2gqhxqs5ijqh4yjrdcwj60aqr66iglm6jvdwkgr9x0dmg7j4h"))))
6028 (build-system pyproject-build-system)
6029 (arguments
6030 (list
6031 ;; XXX: --logger argument is not recognized.
6032 #:tests? #f))
6033 (propagated-inputs
6034 (list python-pydantic
6035 python-rich
6036 python-snakemake-interface-executor-plugins
6037 python-snakemake-interface-logger-plugins))
6038 (native-inputs
6039 (list python-hatchling))
6040 (home-page "https://github.com/cademirch/snakemake-logger-plugin-rich")
6041 (synopsis "Log plugin for snakemake using Rich")
6042 (description "This package provides a logging plugin for Snakemake
6043that utilizes @code{python-rich} for enhanced terminal styling and
6044progress bars.")
6045 (license license:expat)))
6046
6047(define-public python-snakemake-logger-plugin-rich-bootstrap
6048 (package/inherit python-snakemake-logger-plugin-rich
6049 (name "python-snakemake-logger-plugin-rich-bootstrap")
6050 (propagated-inputs
6051 (modify-inputs propagated-inputs
6052 (replace "python-snakemake-interface-logger-plugins"
6053 python-snakemake-interface-logger-plugins-bootstrap)))))
6054
6055(define-public python-snakemake-software-deployment-plugin-container
6056 (package
6057 (name "python-snakemake-software-deployment-plugin-container")
6058 (version "0.6.2")
6059 (source
6060 (origin
6061 (method git-fetch)
6062 (uri (git-reference
6063 (url (string-append "https://github.com/snakemake/"
6064 "snakemake-software-deployment-plugin-container"))
6065 (commit (string-append "v" version))))
6066 (file-name (git-file-name name version))
6067 (sha256
6068 (base32 "0izkmnr89cfd085z99bp4yf57djppb462n6k04fhi2k5mk93mzlm"))))
6069 (build-system pyproject-build-system)
6070 (arguments
6071 (list
6072 ;; Tests require network access.
6073 #:tests? #f))
6074 (propagated-inputs
6075 (list python-snakemake-interface-common
6076 python-snakemake-interface-software-deployment-plugins
6077 python-udocker))
6078 (native-inputs (list python-hatchling python-pytest))
6079 (home-page (string-append "https://github.com/snakemake/"
6080 "snakemake-software-deployment-plugin-container"))
6081 (synopsis "Run Snakemake within a rootless container")
6082 (description "This package provides a generic container plugin
6083implementing snakemake's software-deployment interface.")
6084 (license license:expat)))
6085
6086(define-public python-snakemake-software-deployment-plugin-envmodules
6087 (package
6088 (name "python-snakemake-software-deployment-plugin-envmodules")
6089 (version "0.2.0")
6090 (source
6091 (origin
6092 (method git-fetch)
6093 (uri (git-reference
6094 (url (string-append "https://github.com/snakemake/"
6095 "snakemake-software-deployment-plugin-envmodules"))
6096 (commit (string-append "v" version))))
6097 (file-name (git-file-name name version))
6098 (sha256
6099 (base32 "1764502r8vqg3k61wjc81rfi5v89rxj0njhpcfynxxx82rnda0vv"))))
6100 (build-system pyproject-build-system)
6101 (arguments
6102 (list
6103 #:test-backend #~'custom
6104 #:test-flags #~(list "tests/test_plugin.py")))
6105 (propagated-inputs
6106 (list python-snakemake-interface-common
6107 python-snakemake-interface-software-deployment-plugins))
6108 (native-inputs (list python-hatchling python-pytest))
6109 (home-page (string-append "https://github.com/snakemake/"
6110 "snakemake-software-deployment-plugin-envmodules"))
6111 (synopsis "Environment modules plugin for Snakemake")
6112 (description
6113 "This package provides a software deployment plugin for Snakemake
6114using environment modules.")
6115 (license license:expat)))
6116
6117(define-public python-snakemake-software-deployment-plugin-envmodules-bootstrap
6118 (package/inherit python-snakemake-software-deployment-plugin-envmodules
6119 (arguments
6120 (substitute-keyword-arguments
6121 (package-arguments python-snakemake-software-deployment-plugin-envmodules)
6122 ((#:tests? tests #t) #f)
6123 ((#:phases phases #~%standard-phases)
6124 #~(modify-phases #$phases
6125 (delete 'sanity-check)))))
6126 (propagated-inputs
6127 (modify-inputs
6128 (package-propagated-inputs python-snakemake-software-deployment-plugin-envmodules)
6129 (delete "python-snakemake-interface-software-deployment-plugins")))))
6130
6131(define-public python-snakemake-storage-plugin-http
6132 (package
6133 (name "python-snakemake-storage-plugin-http")
6134 (version "0.3.1")
6135 (source
6136 (origin
6137 (method git-fetch)
6138 (uri (git-reference
6139 (url (string-append "https://github.com/snakemake/"
6140 "snakemake-storage-plugin-http"))
6141 (commit (string-append "v" version))))
6142 (file-name (git-file-name name version))
6143 (sha256
6144 (base32 "0mlc1nkz9l06ahz6s90lxrxvw5gz7krgyd7acyd51srv6lx0ipk9"))))
6145 (build-system pyproject-build-system)
6146 (arguments
6147 (list
6148 #:test-backend #~'custom
6149 #:test-flags #~(list "tests/tests.py")))
6150 (propagated-inputs
6151 (list python-requests
6152 python-requests-oauthlib
6153 python-snakemake-interface-common
6154 python-snakemake-interface-storage-plugins))
6155 (native-inputs (list python-poetry-core snakemake))
6156 (home-page (string-append "https://github.com/snakemake/"
6157 "snakemake-storage-plugin-http"))
6158 (synopsis "Download input files from HTTP(s) in Snakemake")
6159 (description
6160 "This package provides a storage plugin for downloading input
6161files from HTTP(s) in Snakemake.")
6162 (license license:expat)))
6163
6164(define-public python-sparse
6165 (package
6166 (name "python-sparse")
6167 (version "0.18.0")
6168 (source
6169 (origin
6170 (method url-fetch)
6171 (uri (pypi-uri "sparse" version))
6172 (sha256
6173 (base32
6174 "1x5zkgbsgmpr6nis0k2y5vrsg7l61ly2zishnijcgh0fxdhjdyap"))))
6175 (build-system pyproject-build-system)
6176 (propagated-inputs
6177 (list python-numba python-numpy python-scipy))
6178 (native-inputs
6179 (list python-dask
6180 python-pytest
6181 python-setuptools
6182 python-setuptools-scm))
6183 (home-page "https://github.com/pydata/sparse/")
6184 (synopsis "Library for multi-dimensional sparse arrays")
6185 (description
6186 "This package implements sparse arrays of arbitrary dimension on top of
6187@code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most
6188of the elements are zero. @code{python-sparse} generalizes the
6189@code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but
6190extends beyond just rows and columns to an arbitrary number of dimensions.
6191Additionally, this project maintains compatibility with the
6192@code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface
6193used in @code{scipy.sparse}. These differences make this project useful in
6194certain situations where @code{scipy.sparse} matrices are not well suited, but
6195it should not be considered a full replacement. It lacks layouts that are not
6196easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and
6197depends on @code{scipy.sparse} for some computations.")
6198 (license license:bsd-3)))
6199
6200(define-public python-spin
6201 (package
6202 (name "python-spin")
6203 (version "0.8")
6204 (source
6205 (origin
6206 (method url-fetch)
6207 (uri (pypi-uri "spin" version))
6208 (sha256
6209 (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7"))))
6210 (build-system pyproject-build-system)
6211 (propagated-inputs (list python-click python-colorama python-tomli))
6212 (native-inputs (list python-pytest python-setuptools python-wheel))
6213 (home-page "https://github.com/scientific-python/spin")
6214 (synopsis "Developer tool for scientific Python libraries")
6215 (description "@code{spin} is a simple interface for common development
6216tasks. It comes with a few common build commands out the box, but can
6217easily be customized per project.
6218
6219The impetus behind developing the tool was the mass migration of scientific
6220Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after
6221distutils was deprecated. When many of the build and installation commands
6222changed, it made sense to abstract away the nuisance of having to re-learn
6223them.")
6224 (license license:bsd-3)))
6225
6226(define-public python-supersmoother
6227 ;; 0.4 was release in 2017, there a lot of changes on master branch
6228 ;; providing tests fixtures.
6229 (let ((commit "0a81544ac6bb33bdb08deeba69e97a4ceebcebcf")
6230 (revision "0"))
6231 (package
6232 (name "python-supersmoother")
6233 (version (git-version "0.4" revision commit))
6234 (source
6235 (origin
6236 (method git-fetch) ; no package in PyPI
6237 (uri (git-reference
6238 (url "https://github.com/jakevdp/supersmoother")
6239 (commit commit)))
6240 (file-name (git-file-name name version))
6241 (sha256
6242 (base32 "1r79nssw4a44zizvqg8y685nv3asdfj440s227phfww6kz33s3la"))))
6243 (build-system pyproject-build-system)
6244 (native-inputs
6245 (list python-pytest
6246 python-scipy
6247 python-setuptools))
6248 (propagated-inputs
6249 (list python-numpy))
6250 (home-page "http://github.com/jakevdp/supersmoother")
6251 (synopsis "Python implementation of Friedman's Supersmoother")
6252 (description
6253 "This package provides an efficient implementation of
6254@url{https://www.slac.stanford.edu/pubs/slacpubs/3250/slac-pub-3477.pdf,
6255Friedman's SuperSmoother} based in Python. It makes use of numpy for fast
6256numerical computation.")
6257 (license license:bsd-2))))
6258
6259(define-public python-tdda
6260 (package
6261 (name "python-tdda")
6262 (version "3.2.03")
6263 (source
6264 (origin
6265 (method git-fetch)
6266 (uri (git-reference
6267 (url "https://github.com/tdda/tdda")
6268 (commit (string-append "v" version))))
6269 (file-name (git-file-name name version))
6270 (sha256
6271 (base32 "1rqh1pa17n5al0b3blqr4h9qn4x6wxnxw6ilc2lk72k027cxmv84"))))
6272 (build-system pyproject-build-system)
6273 (arguments
6274 (list
6275 #:test-flags
6276 #~(list
6277 ;; Failures probably due to a dependency mismatch (e.g. pandas).
6278 ;; Not investigated further as this is a leaf package.
6279 ;; tdda is actively maintained, so will probably be fixed.
6280 (string-append "--deselect=tdda/test_tdda.py::"
6281 "TestCommonConstraints::"
6282 "testSimpleAllCorrectVerificationFromCSVFile")
6283 (string-append "--deselect=tdda/test_tdda.py::"
6284 "TestCommonConstraints::"
6285 "testSimpleAllNotCorrectVerificationFromCSVFile")
6286 ;; Not further investigated, results in: AssertionError:
6287 ;; '~homeless-shelter/foo.csv' != '/homeless-shelter/foo.csv'
6288 (string-append "--deselect=tdda/test_tdda.py::"
6289 "TestTDDAUtils::test_handle_tilde_strings"))))
6290 (native-inputs
6291 (list python-pytest
6292 python-setuptools
6293 tzdata-for-tests))
6294 (propagated-inputs
6295 (list python-chardet
6296 python-numpy
6297 python-pandas
6298 python-polars
6299 python-pyarrow
6300 python-pyyaml
6301 python-regex
6302 python-requests
6303 python-rich
6304 python-tomli
6305 python-tomli-w))
6306 (home-page "https://tdda.readthedocs.io/en/stable")
6307 (synopsis "Test-driven data analysis library for Python")
6308 (description
6309 "The TDDA Python module provides command-line and Python API support
6310for the overall process of data analysis, through tools that perform
6311reference testing, constraint discovery for data, automatic inference
6312of regular expressions from text data and automatic test generation.")
6313 (license license:expat)))
6314
6315(define-public python-traittypes
6316 (package
6317 (name "python-traittypes")
6318 (version "0.2.1")
6319 (source
6320 (origin
6321 (method url-fetch)
6322 (uri (pypi-uri "traittypes" version))
6323 (sha256
6324 (base32 "1mlv93irdrgxrhnhq3ksi9585d55bpi4mv9dha4p8gkkjiia4vxy"))))
6325 (build-system pyproject-build-system)
6326 (arguments
6327 (list
6328 ;; This one test fails because it doesn't raise an expected exception.
6329 #:test-flags '(list "-k" "not test_bad_values")
6330 #:phases
6331 '(modify-phases %standard-phases
6332 (add-after 'unpack 'numpy-compatibility
6333 (lambda _
6334 (substitute* "traittypes/tests/test_traittypes.py"
6335 (("np\\.int") "int")))))))
6336 (propagated-inputs (list python-traitlets))
6337 (native-inputs
6338 (list python-numpy
6339 python-pandas
6340 python-pynose
6341 python-pytest
6342 python-setuptools
6343 python-xarray))
6344 (home-page "https://github.com/jupyter-widgets/traittypes")
6345 (synopsis "Trait types for NumPy, SciPy and friends")
6346 (description "The goal of this package is to provide a reference
6347implementation of trait types for common data structures used in the scipy
6348stack such as numpy arrays or pandas and xarray data structures. These are
6349out of the scope of the main traitlets project but are a common requirement to
6350build applications with traitlets in combination with the scipy stack.")
6351 (license license:bsd-3)))
6352
6353(define-public python-trimesh
6354 (package
6355 (name "python-trimesh")
6356 (version "4.5.3")
6357 (source
6358 (origin
6359 (method git-fetch) ; no tests in PyPI
6360 (uri (git-reference
6361 (url "https://github.com/mikedh/trimesh")
6362 (commit version)))
6363 (file-name (git-file-name name version))
6364 (sha256
6365 (base32 "17fyapp8nffnnf95bmcvllvg41fjlpvlv6qndbm048hnyayixxld"))))
6366 (build-system pyproject-build-system)
6367 (arguments
6368 (list
6369 #:test-flags
6370 ;; XXX: When more optional modules are available review
6371 ;; disabled tests once again.
6372 ;;
6373 ;; Disable tests requiring optional, not packed modules.
6374 #~(list "-k" (string-join
6375 (list "not test_bezier_example"
6376 "test_discrete"
6377 "test_dxf"
6378 "test_ply_path_bezier"
6379 "test_ply_path_line"
6380 "test_ply_path_multi"
6381 "test_revolve"
6382 "test_screw"
6383 "test_simple_closed"
6384 "test_simple_extrude"
6385 "test_simple_open"
6386 "test_slice_onplane"
6387 "test_spline_3D"
6388 "test_svg"
6389 ;; Following tests require network:
6390 "test_fuze"
6391 "test_remote")
6392 " and not "))
6393 #:phases
6394 #~(modify-phases %standard-phases
6395 ;; XXX: It struggles to load and fails with error: AttributeError:
6396 ;; module 'trimesh' has no attribute '__main__'.
6397 (delete 'sanity-check))))
6398 (native-inputs
6399 (list python-pyinstrument
6400 python-pytest))
6401 (propagated-inputs
6402 (list ;; python-cascadio ; not packed yet, optional
6403 python-chardet
6404 python-colorlog
6405 python-httpx
6406 python-jsonschema
6407 python-lxml
6408 ;; python-mapbox-earcut ; not packed yet, optional
6409 ;; python-manifold3d ; not packed yet, optional
6410 python-meshio
6411 python-networkx
6412 python-numpy
6413 ;; python-openctm ; not packed yet, optional
6414 python-pillow
6415 python-psutil
6416 python-pycollada
6417 python-pyglet
6418 python-requests
6419 python-rtree
6420 python-scikit-image
6421 python-scipy
6422 python-setuptools
6423 python-shapely
6424 ;; python-svg-path ; not packed yet, optional
6425 python-sympy
6426 ;; python-vhacdx ; not packed yet, optional
6427 ;; python-xatlas ; not packed yet, optional
6428 python-xxhash))
6429 (home-page "https://github.com/mikedh/trimesh")
6430 (synopsis "Python library for loading and using triangular meshes")
6431 (description
6432 "Trimesh is a pure Python library for loading and using triangular meshes
6433with an emphasis on watertight surfaces. The goal of the library is to
6434provide a full featured and well tested Trimesh object which allows for easy
6435manipulation and analysis, in the style of the Polygon object in the Shapely
6436library.")
6437 (license license:expat)))
6438
6439(define-public python-tspex
6440 (package
6441 (name "python-tspex")
6442 ;; 0.6.3 is not tagged; must be this one, as it is the latest, from the
6443 ;; day of the release, and the commit message is "Bump to 0.6.3".
6444 (properties '((commit . "d393ff497b7c14d673e792bd6c84ddd734be1239")
6445 (revision . "0")))
6446 (version (git-version "0.6.3"
6447 (assoc-ref properties 'revision)
6448 (assoc-ref properties 'commit)))
6449 (source
6450 (origin
6451 (method git-fetch)
6452 (uri (git-reference
6453 (url "https://github.com/apcamargo/tspex")
6454 (commit (assoc-ref properties 'commit))))
6455 (file-name (git-file-name name version))
6456 (sha256
6457 (base32 "0khhnahhn0jp9y14q6wgq0xqadqszwn1iq3y562bhfmv09f4j1ik"))))
6458 (build-system pyproject-build-system)
6459 (arguments
6460 (list
6461 #:phases
6462 #~(modify-phases %standard-phases
6463 ;; The seaborn styles have different names.
6464 (add-after 'unpack 'fix-seaborn
6465 (lambda _
6466 (substitute* (find-files "." ".py$")
6467 (("seaborn-") "seaborn-v0_8-")))))))
6468 (native-inputs
6469 (list python-pytest
6470 python-setuptools))
6471 (propagated-inputs
6472 (list python-matplotlib
6473 python-numpy
6474 python-pandas
6475 python-seaborn
6476 python-xlrd))
6477 (home-page "https://apcamargo.github.io/tspex/")
6478 (synopsis "Calculate tissue-specificity metrics for gene expression")
6479 (description
6480 "This package provides a Python package for calculating
6481tissue-specificity metrics for gene expression.")
6482 (license license:gpl3+)))
6483
6484(define-public python-typedunits
6485 (package
6486 (name "python-typedunits")
6487 (version "0.0.2")
6488 (source
6489 (origin
6490 (method git-fetch)
6491 (uri (git-reference
6492 (url "https://github.com/quantumlib/TypedUnits")
6493 (commit (string-append "v" version))))
6494 (file-name (git-file-name name version))
6495 (sha256
6496 (base32 "0ir7xciv4inlsc6wvafwlbb4ij8i1a8pn76q7p1rgckh63vws03l"))))
6497 (build-system pyproject-build-system)
6498 (arguments
6499 (list
6500 #:phases
6501 #~(modify-phases %standard-phases
6502 (add-after 'unpack 'patch-requirements
6503 (lambda* (#:key inputs #:allow-other-keys)
6504 (substitute* "requirements.txt"
6505 (("^cython.*\n") "")))))))
6506 (native-inputs
6507 (list python-cython
6508 python-pytest
6509 python-setuptools))
6510 (propagated-inputs
6511 (list python-attrs
6512 python-numpy
6513 python-protobuf-6
6514 python-pyparsing))
6515 (home-page "https://github.com/quantumlib/TypedUnits")
6516 (synopsis "Fast units and dimensions library")
6517 (description
6518 "This package provides a fast units and dimensions library with support
6519for static dimensionality checking and protobuffer serialization.")
6520 (license license:asl2.0)))
6521
6522(define-public python-uhi
6523 (package
6524 (name "python-uhi")
6525 (version "1.1.1")
6526 (source
6527 (origin
6528 (method git-fetch)
6529 (uri (git-reference
6530 (url "https://github.com/scikit-hep/uhi")
6531 (commit (string-append "v" version))))
6532 (file-name (git-file-name name version))
6533 (sha256
6534 (base32 "1hrk39w6mim91kk70vclh7k3fpwn8d1h6g9gh0jx16f5ii8py8i6"))))
6535 (build-system pyproject-build-system)
6536 (arguments
6537 (list
6538 #:test-flags
6539 ;; Tests introduce cycle with python-hist.
6540 #~(list "--ignore=tests/test_hdf5.py"
6541 "--ignore=tests/test_json.py"
6542 "--ignore=tests/test_zip.py")))
6543 (native-inputs
6544 (list python-boost-histogram
6545 python-dependency-groups
6546 python-hatch-vcs
6547 python-hatchling
6548 python-packaging
6549 python-pytest
6550 python-setuptools))
6551 (propagated-inputs
6552 (list python-numpy
6553 ;; [optional]
6554 python-fastjsonschema
6555 python-h5py))
6556 (home-page "https://github.com/scikit-hep/uhi")
6557 (synopsis "Universal Histogram Interface")
6558 (description "This is a package meant primarily for documenting histogram
6559indexing and the PlottableHistogram Protocol and any future cross-library
6560standards. It also contains the code for the PlottableHistogram Protocol, to
6561be used in type checking libraries wanting to conform to the protocol. It is
6562not usually a runtime dependency, but only a type checking, testing, and/or
6563docs dependency in support of other libraries.")
6564 (license license:bsd-3)))
6565
6566(define-public python-unyt
6567 (package
6568 (name "python-unyt")
6569 (version "3.1.0")
6570 (source
6571 (origin
6572 (method url-fetch)
6573 (uri (pypi-uri "unyt" version))
6574 (sha256
6575 (base32 "07g5rasgikp8a4x0cylz8xxzgh3536djdjppcadiqlhygyl845bp"))))
6576 (build-system pyproject-build-system)
6577 ;; tests: 764 passed, 37 skipped, 2 xfailed
6578 (native-inputs
6579 (list python-flit-core
6580 python-pytest))
6581 (propagated-inputs
6582 (list python-numpy
6583 python-packaging
6584 python-sympy))
6585 (home-page "https://unyt.readthedocs.io")
6586 (synopsis "Library for working with data that has physical units")
6587 (description
6588 "@code{unyt} is a Python library working with data that has physical
6589units. It defines the @code{unyt.array.unyt_array} and
6590@code{unyt.array.unyt_quantity} classes (subclasses of NumPy’s ndarray class)
6591for handling arrays and scalars with units,respectively")
6592 (license license:bsd-3)))
6593
6594(define-public python-uproot
6595 (package
6596 (name "python-uproot")
6597 (version "5.6.4")
6598 (source
6599 (origin
6600 (method url-fetch)
6601 (uri (pypi-uri "uproot" version))
6602 (sha256
6603 (base32 "024k5kjwcd2nw5hfxhpl0x9p5aq0qrg0nlh9v24vr39rcqadh52a"))))
6604 (build-system pyproject-build-system)
6605 (arguments
6606 (list
6607 #:test-flags
6608 #~(list
6609 ;; conftest.py is not required and it imports modules we do not use.
6610 "--noconftest"
6611 ;; There is no easy way to skip tests that require the network, so
6612 ;; just run a handful of tests that pass.
6613 "tests/test_0351_write_TList.py"
6614 "tests/test_0352_write_THashList.py"
6615 "tests/test_0439_check_awkward_before_numpy.py"
6616 "tests/test_0976_path_object_split.py"
6617 "tests/test_1198_coalesce.py"
6618 "tests/test_1264_write_NumPy_array_of_strings.py"
6619 "tests/test_1318_dont_compare_big_endian_in_awkward.py")
6620 #:phases
6621 #~(modify-phases %standard-phases
6622 (add-after 'unpack 'set-version
6623 (lambda _
6624 ;; Version is determined dynamically from .git.
6625 (substitute* "pyproject.toml"
6626 (("\\[project\\]")
6627 (string-append "[project]" "\n" "version = \""
6628 #$version "\""))
6629 (("\"version\"") "")))))))
6630 (native-inputs
6631 (list python-hatch-vcs
6632 python-pytest
6633 python-pytest-timeout
6634 python-setuptools))
6635 (propagated-inputs
6636 (list python-awkward
6637 python-cramjam
6638 python-fsspec
6639 python-numpy
6640 python-packaging
6641 python-xxhash))
6642 (home-page "https://uproot.readthedocs.io")
6643 (synopsis "ROOT I/O in Python using NumPy")
6644 (description
6645 "Uproot is a Python library for reading and writing ROOT files. It uses
6646NumPy and does not depend on C++ ROOT.")
6647 (license license:bsd-3)))
6648
6649(define-public python-upsetplot
6650 (package
6651 (name "python-upsetplot")
6652 ;; Latest release is incompatible with Pandas 3 and NumPy 2.4.
6653 (properties '((commit . "e9603da19d321c047f88d404f687e82be415e52c")
6654 (revision . "1")))
6655 (version (git-version "0.9.0"
6656 (assoc-ref properties 'revision)
6657 (assoc-ref properties 'commit)))
6658 (source
6659 (origin
6660 (method git-fetch)
6661 (uri (git-reference
6662 ;; Using a fork of https://github.com/jnothman/UpSetPlot
6663 ;; original source that is updated for Pandas 3 compatibility,
6664 ;; see <https://github.com/kevinpetersavage/UpSetPlot/pull/1>.
6665 (url "https://github.com/kevinpetersavage/UpSetPlot")
6666 (commit (assoc-ref properties 'commit))))
6667 (file-name (git-file-name name version))
6668 (sha256
6669 (base32 "155g0x4z0zdfri528spws5mad4d24vadsc827iy92f5br7vbf3j3"))))
6670 (build-system pyproject-build-system)
6671 (propagated-inputs
6672 (list python-matplotlib python-pandas))
6673 (native-inputs
6674 (list python-pytest python-setuptools))
6675 (home-page "https://upsetplot.readthedocs.io")
6676 (synopsis "Draw UpSet plots with Pandas and Matplotlib")
6677 (description
6678 "This is a Python implementation of UpSet plots by Lex et al.
6679UpSet plots are used to visualize set overlaps; like Venn diagrams but more
6680readable.")
6681 (license license:bsd-3)))
6682
6683(define-public python-vaex-core
6684 (package
6685 (name "python-vaex-core")
6686 (version "4.19.0")
6687 (source
6688 (origin
6689 (method git-fetch)
6690 (uri (git-reference
6691 (url "https://www.github.com/maartenbreddels/vaex")
6692 (commit (string-append "core-v" version))))
6693 (file-name (git-file-name name version))
6694 (sha256
6695 (base32 "1m6h6m0vm8vdx2nk26nvlbyfvlj0g9ph8cdh38258gn18fd2db0l"))
6696 (patches
6697 (search-patches "python-vaex-core-fix-tsl-use.patch"))
6698 (modules '((guix build utils)
6699 (ice-9 ftw)))
6700 (snippet
6701 #~(begin
6702 ;; Delete everything except for vaex-core itself:
6703 (define (delete-except exception)
6704 (lambda (file)
6705 (unless (member file `("." ".." ,exception))
6706 (delete-file-recursively file))))
6707 (for-each (delete-except "packages") (scandir "."))
6708 (with-directory-excursion "packages"
6709 (for-each (delete-except "vaex-core") (scandir ".")))
6710 (for-each (lambda (file)
6711 (unless (member file '("." ".."))
6712 (rename-file
6713 (string-append "packages/vaex-core/" file)
6714 file)))
6715 (scandir "packages/vaex-core"))
6716 (delete-file-recursively "packages")
6717 (delete-file-recursively "vendor")))))
6718 (build-system pyproject-build-system)
6719 (arguments
6720 (list
6721 ;; TODO: Require vaex.server and others, which require vaex-core;
6722 ;; implement bootstrapping.
6723 #:tests? #f
6724 #:phases
6725 #~(modify-phases %standard-phases
6726 (add-after 'unpack 'relax-requirements
6727 (lambda _
6728 (substitute* "setup.py"
6729 ;; "dask!=2022.4.0,<2024.9"; there is a note "fingerprinting
6730 ;; in no longer deterministic as of 2024.9.0" which may be
6731 ;; resolved in 2024.12.1.
6732 ((",<2024.9") "")
6733 ;; There is no a fresh version supporting Pandas 3 yet, built
6734 ;; has passed but sanity-check fails.
6735 (("pandas>=1.0,<3") "pandas>=1.0"))))
6736 (add-before 'build 'patch-missing-include
6737 (lambda _
6738 ;; See: <https://github.com/vaexio/vaex/issues/2382>.
6739 ;; TODO: Update to the latest version including the fix.
6740 (substitute* "src/string_utils.hpp"
6741 (("#include <nonstd/string_view.hpp>")
6742 "#include <cstdint>\n#include <nonstd/string_view.hpp>")))))))
6743 (native-inputs
6744 (list pybind11
6745 python-cython
6746 python-setuptools))
6747 (inputs
6748 (list boost
6749 pcre
6750 string-view-lite
6751 tsl-hopscotch-map))
6752 (propagated-inputs
6753 (list python-aplus
6754 python-blake3
6755 python-cloudpickle
6756 python-dask
6757 python-filelock
6758 python-frozendict
6759 python-future
6760 python-nest-asyncio
6761 python-numpy
6762 python-pandas
6763 python-pyarrow
6764 python-pydantic
6765 python-pyyaml
6766 python-rich
6767 python-six ;hard dependency
6768 python-tabulate
6769 ;; [optional]
6770 python-diskcache
6771 python-fsspec
6772 ;; python-gcsfs ;not packaged yet in Guix
6773 python-graphviz
6774 python-h5py
6775 python-httpx
6776 ;; python-ipyvolume ;not packaged yet in Guix
6777 python-psutil
6778 python-s3fs))
6779 (home-page "https://www.github.com/maartenbreddels/vaex")
6780 (synopsis "Core of Vaex library for exploring tabular datasets")
6781 (description "Vaex is a high performance Python library for lazy
6782Out-of-Core DataFrames (similar to Pandas), to visualize and explore big
6783tabular datasets. This package provides the core modules of Vaex.")
6784 (license license:expat)))
6785
6786(define-public python-vector
6787 (package
6788 (name "python-vector")
6789 (version "1.8.1")
6790 (source
6791 (origin
6792 (method git-fetch)
6793 (uri (git-reference
6794 (url "https://github.com/scikit-hep/vector")
6795 (commit (string-append "v" version))))
6796 (file-name (git-file-name name version))
6797 (sha256
6798 (base32 "0gxcihgs2cxxhfayv9ixis4pgjnp45c33pqym6cdp0n8j4y6y6zm"))))
6799 (build-system pyproject-build-system)
6800 (native-inputs
6801 (list ;; python-dask-awkward ;not packaged yet in Guix
6802 python-hatch-vcs
6803 python-hatchling
6804 ;; python-jax ;not packaged yet in Guix
6805 python-notebook
6806 python-optree
6807 python-papermill
6808 python-pytest
6809 #;python-spark-parse)) ;not packaged yet in Guix
6810 (propagated-inputs
6811 (list python-numpy
6812 python-packaging
6813 ;; [optional]
6814 python-awkward
6815 python-numba
6816 python-sympy))
6817 (home-page "https://github.com/scikit-hep/vector")
6818 (synopsis "Arrays of 2D, 3D, and Lorentz vectors")
6819 (description "Vector is a Python library for 2D and 3D spatial vectors, as
6820well as 4D space-time vectors. It is especially intended for performing
6821geometric calculations on arrays of vectors, rather than one vector at a time
6822in a Python @code{for} loop.")
6823 (license license:bsd-3)))
6824
6825(define-public python-vedo
6826 (package
6827 (name "python-vedo")
6828 (version "2025.5.4")
6829 (source
6830 (origin
6831 (method git-fetch)
6832 (uri (git-reference
6833 (url "https://github.com/marcomusy/vedo")
6834 (commit (string-append "v" version))))
6835 (file-name (git-file-name name version))
6836 (sha256
6837 (base32 "17lrx30pdag0d3d5a2cycfylsbhad4ywikza784h2fg95w77y1va"))))
6838 (build-system pyproject-build-system)
6839 (arguments
6840 (list
6841 ;; XXX: The whole test suite depends on the data from
6842 ;; <https://vedo.embl.es/examples> providing samples which need to be
6843 ;; downloaded during tests, find the way how to enable it.
6844 #:tests? #f
6845 #:phases
6846 #~(modify-phases %standard-phases
6847 (add-after 'unpack 'relax-requirements
6848 ;; vtk does not provide Python metadata.
6849 ;;
6850 ;; ...checking requirements: ERROR: vedo==2025.5.4
6851 ;; DistributionNotFound(Requirement.parse('vtk'), {'vedo'})
6852 (lambda _
6853 (substitute* "pyproject.toml"
6854 (("\"vtk\",") "")))))))
6855 (native-inputs
6856 (list pkg-config
6857 python-pkgconfig
6858 python-setuptools
6859 python-wheel))
6860 (propagated-inputs
6861 (list python-deprecated
6862 python-matplotlib
6863 python-numpy
6864 python-pygments
6865 vtk))
6866 (home-page "https://github.com/marcomusy/vedo")
6867 (synopsis
6868 "Analysis and visualization of 3D objects and point clouds")
6869 (description
6870 "@code{vedo} is a fast and lightweight python module for
6871scientific analysis and visualization. The package provides a wide
6872range of functionalities for working with three-dimensional meshes and
6873point clouds. It can also be used to generate high quality
6874two-dimensional renderings such as scatter plots and histograms.
6875@code{vedo} is based on @code{vtk} and @code{numpy}.")
6876 ;; vedo is released under the Expat license. Included fonts are
6877 ;; covered by the OFL license and textures by the CC0 license.
6878 ;; The earth images are in the public domain.
6879 (license (list license:expat
6880 license:silofl1.1
6881 license:cc0
6882 license:public-domain))))
6883
6884(define-public python-xarray
6885 (package
6886 (name "python-xarray")
6887 (version "2026.04.0")
6888 (source
6889 (origin
6890 (method git-fetch)
6891 (uri (git-reference
6892 (url "https://github.com/pydata/xarray")
6893 (commit (string-append "v" version))))
6894 (file-name (git-file-name name version))
6895 (sha256
6896 (base32 "1ma0k5gw5frldms4zrgp5ww0l1m5h5620ks5sdljbjz4wqbsf9di"))))
6897 (build-system pyproject-build-system)
6898 (arguments
6899 (list
6900 ;; tests: 7500 passed, 9135 skipped, 24 xfailed, 6 xpassed, 45 warnings
6901 #:test-flags
6902 #~(list "--numprocesses" (number->string (min 8 (parallel-job-count)))
6903 ;; Regression in Pandas 3.0.3.
6904 ;; See: <https://github.com/pydata/xarray/issues/11359>.
6905 (string-append "--deselect=properties/test_pandas_roundtrip.py"
6906 "::test_roundtrip_pandas_dataframe_datetime")
6907 ;; See: <https://github.com/pydata/xarray/issues/10548>.
6908 (string-append "--deselect=xarray/tests/test_dataset.py"
6909 "::TestDataset::test_repr"))
6910 #:phases
6911 #~(modify-phases %standard-phases
6912 (add-after 'unpack 'fix-pytest-config
6913 (lambda _
6914 (substitute* "pyproject.toml"
6915 ((".*--mypy-.*") "")))))))
6916 (native-inputs
6917 (list python-pytest
6918 python-pytest-asyncio
6919 python-pytest-xdist
6920 python-pytz
6921 python-setuptools
6922 python-setuptools-scm
6923 tzdata-for-tests))
6924 (propagated-inputs
6925 (list python-numpy
6926 python-packaging
6927 python-pandas
6928 ;; [optional]
6929 python-bottleneck
6930 ;; python-cartopy
6931 ;; python-cftime
6932 ;; python-dask
6933 ;; python-flox
6934 ;; python-fsspec
6935 ;; python-h5netcdf
6936 ;; python-matplotlib
6937 ;; python-nc-time-axis
6938 ;; python-netcdf4
6939 python-numba
6940 ;; python-numbagg ;blocked by guix/guix#9344
6941 ;; python-opt-einsum
6942 ;; python-pooch
6943 ;; python-pydap
6944 python-scipy-minimal ;to slim down closure size
6945 ;; python-seaborn
6946 ;; python-sparse
6947 #;python-zarr))
6948 (home-page "https://github.com/pydata/xarray")
6949 (synopsis "N-D labeled arrays and datasets")
6950 (description "Xarray (formerly xray) makes working with labelled
6951multi-dimensional arrays simple, efficient, and fun!
6952
6953Xarray introduces labels in the form of dimensions, coordinates and attributes
6954on top of raw NumPy-like arrays, which allows for a more intuitive, more
6955concise, and less error-prone developer experience. The package includes a
6956large and growing library of domain-agnostic functions for advanced analytics
6957and visualization with these data structures.")
6958 (license license:asl2.0)))
6959
6960(define-public python-xarray-dataclass
6961 (package
6962 (name "python-xarray-dataclass")
6963 (version "3.0.0")
6964 (source
6965 (origin
6966 (method git-fetch)
6967 (uri (git-reference
6968 (url "https://github.com/xarray-contrib/xarray-dataclass/")
6969 (commit (string-append "v" version))))
6970 (file-name (git-file-name name version))
6971 (sha256
6972 (base32 "1q3y9gbzrp1mh48y7gggqgggwnarxdn32h907mfax1hi9ap6ywil"))))
6973 (build-system pyproject-build-system)
6974 (native-inputs
6975 (list python-pytest
6976 python-hatchling))
6977 (propagated-inputs
6978 (list python-numpy
6979 python-typing-extensions
6980 python-xarray))
6981 (home-page "https://github.com/xarray-contrib/xarray-dataclass/")
6982 (synopsis "Xarray data creation by data classes")
6983 (description
6984 "xarray-dataclass is a Python package that makes it easy to create
6985@url{https://xarray.pydata.org/en/stable/index.html, xarray}'s DataArray and
6986Dataset objects that are \"typed\" (i.e. fixed dimensions, data type,
6987coordinates, attributes, and name) using
6988@url{https://docs.python.org/3/library/dataclasses.html, the Python's
6989dataclass}. It's a successor of not maintained
6990https://github.com/astropenguin/xarray-dataclasses.")
6991 (license license:expat)))
6992
6993(define-public python-xarray-dataclasses
6994 (package
6995 (name "python-xarray-dataclasses")
6996 (version "1.7.0")
6997 (source
6998 (origin
6999 (method git-fetch)
7000 (uri (git-reference
7001 (url "https://github.com/astropenguin/xarray-dataclasses/")
7002 (commit (string-append "v" version))))
7003 (file-name (git-file-name name version))
7004 (sha256
7005 (base32 "043lc1hadr5y0y16g682viiafy0hfsa7q18lqmndpyvnmcgm893z"))))
7006 (build-system pyproject-build-system)
7007 (propagated-inputs (list python-numpy python-typing-extensions
7008 python-xarray))
7009 (native-inputs (list python-pytest python-poetry-core))
7010 (home-page "https://github.com/astropenguin/xarray-dataclasses/")
7011 (synopsis "Data creation made easy by dataclass")
7012 (description "@code{xarray-dataclasses} is a Python package that makes it
7013easy to create @code{xarray}'s @code{DataArray} and @code{Datase} objects that
7014are \"typed\" (i.e. fixed dimensions, data type, coordinates, attributes, and
7015name) using the Python's @code{dataclass}.")
7016 (license license:expat)))
7017
7018(define-public python-xarray-einstats
7019 (package
7020 (name "python-xarray-einstats")
7021 (version "0.9.1")
7022 (source
7023 (origin
7024 (method git-fetch)
7025 (uri (git-reference
7026 (url "https://github.com/arviz-devs/xarray-einstats")
7027 (commit (string-append "v" version))))
7028 (file-name (git-file-name name version))
7029 (sha256
7030 (base32 "11crz1l6swabwzmwbrxypfw8gbbp81higzgi5nsxzfigcrrqq30a"))))
7031 (build-system pyproject-build-system)
7032 ;; tests: 317 passed, 48 skipped
7033 (native-inputs
7034 (list python-flit-core
7035 python-pytest))
7036 (propagated-inputs
7037 (list python-numpy
7038 python-scipy
7039 python-xarray
7040 ;; [optinoal]
7041 python-einops
7042 python-numba))
7043 (home-page "https://einstats.python.arviz.org/en/latest/")
7044 (synopsis "Stats, linear algebra and einops for xarray")
7045 (description
7046 "@code{xarray_einstats} provides wrappers around some NumPy and SciPy
7047functions and around einops with an API and features adapted to xarray.")
7048 (license license:asl2.0)))
7049
7050(define-public python-xarray-schema
7051 (package
7052 (name "python-xarray-schema")
7053 (version "0.0.3")
7054 (source
7055 (origin
7056 (method url-fetch)
7057 (uri (pypi-uri "xarray-schema" version))
7058 (sha256
7059 (base32 "08194629696z98dkc74i6c9zmy1jicvd2ajb75q0lsf0i427cv4w"))))
7060 (build-system pyproject-build-system)
7061 (propagated-inputs (list python-numpy python-xarray))
7062 (native-inputs
7063 (list python-pytest
7064 python-setuptools
7065 python-setuptools-scm
7066 python-wheel))
7067 (home-page "https://github.com/carbonplan/xarray-schema")
7068 (synopsis "Schema validation for Xarray objects")
7069 (description "This package implements schema validation for Xarray
7070objects.")
7071 (license license:expat)))
7072
7073(define-public pyzo
7074 (package
7075 (name "pyzo")
7076 (version "4.20.0")
7077 (source
7078 (origin
7079 (method git-fetch)
7080 (uri (git-reference
7081 (url "https://github.com/pyzo/pyzo")
7082 (commit (string-append "v" version))))
7083 (file-name (git-file-name name version))
7084 (sha256
7085 (base32 "1a82k7hjmv20lrwiwsdrvczrm21wq16m4snwsirwhj0jh5k1x9iw"))))
7086 (build-system pyproject-build-system)
7087 (arguments
7088 (list
7089 #:test-flags
7090 #~(list "--ignore-glob=pyzo/yoton/tests/*" ; XXX: yoton is outdated.
7091 "--ignore=pyzo/codeeditor/_test.py"))) ; XXX: cannot import qt.
7092 (native-inputs
7093 (list python-flit-core
7094 python-pytest
7095 python-setuptools))
7096 (inputs (list python-pyside-6))
7097 (home-page "https://pyzo.org")
7098 (synopsis "Python IDE for scientific computing")
7099 (description
7100 "Pyzo is a Python IDE focused on interactivity and introspection,which
7101makes it very suitable for scientific computing. Its practical design is
7102aimed at simplicity and efficiency.
7103
7104It consists of two main components, the editor and the shell, and uses a set
7105of pluggable tools to help the programmer in various ways. Some example tools
7106are source structure, project manager, interactive help, workspace...")
7107 (license license:bsd-2)))
7108
7109(define-public snakemake
7110 (package
7111 (name "snakemake")
7112 (version "9.25.1")
7113 (source
7114 (origin
7115 (method git-fetch)
7116 (uri (git-reference
7117 (url "https://github.com/snakemake/snakemake")
7118 (commit (string-append "v" version))))
7119 (file-name (git-file-name name version))
7120 (sha256
7121 (base32 "15xic0m0pyhakyzvi9r2hlm9rvfnws53ngxnwkp9l9x47xqfgh7v"))))
7122 (build-system pyproject-build-system)
7123 (arguments
7124 (list
7125 #:test-flags
7126 #~(list
7127 ;; Conda is ignored, see
7128 ;; github.com/snakemake/snakemake/pull/3339#issuecomment-5241768006
7129 "--ignore=tests/test_software_directive.py"
7130 ;; These tests require snakemake-executor-plugin-cluster-generic.
7131 "--ignore=tests/test_executor_test_suite.py"
7132 "--deselect=tests/test_logging.py::test_group_job_failure_events"
7133 ;; Those require additional snakemake plugins.
7134 "--ignore=tests/test_api.py"
7135 ;; XXX: Unclear why these tests fail.
7136 "--ignore=tests/test_jupyter_notebook_pathlike.py"
7137 "--ignore=tests/test_persistence.py"
7138 "--deselect=tests/test_script.py::TestBashEncoder"
7139 "--deselect=tests/test_sourcecache.py::test_github_file_fetch"
7140 "--ignore=tests/test_report_href/test_script.py"
7141 "--ignore=tests/test_script_py/scripts/test_explicit_import.py"
7142 "--ignore=tests/test_output_index.py"
7143 ;; We don't care about testing old [email protected] on Guix.
7144 "--ignore=tests/test_conda_python_3_7_script/test_script_python_3_7.py"
7145 ;; We don't care about lints.
7146 "--ignore=tests/test_linting.py"
7147 ;; These tests attempt to change S3 buckets on AWS and fail
7148 ;; because there are no AWS credentials.
7149 "--ignore=tests/test_tibanna"
7150 ;; It's a similar story with this test, which requires access
7151 ;; to the Google Storage service.
7152 "--ignore=tests/test_google_lifesciences")
7153 #:phases
7154 #~(modify-phases %standard-phases
7155 (add-after 'unpack 'relax-requirements
7156 (lambda _
7157 (substitute* "pyproject.toml"
7158 (("\"pip\",")
7159 "")
7160 (("\"packaging.*\",")
7161 "\"packaging\","))))
7162 (add-after 'unpack 'avoid-assets-download
7163 (lambda _
7164 (substitute* "setup.py"
7165 (("^from assets import Assets") "")
7166 (("^Assets\\.deploy\\(\\)") ""))))
7167 (add-before 'check 'pre-check
7168 (lambda* (#:key tests? #:allow-other-keys)
7169 (when tests?
7170 (setenv "HOME" "/tmp")))))))
7171 (propagated-inputs
7172 (list python-appdirs
7173 python-conda-inject
7174 python-configargparse
7175 python-connection-pool
7176 python-docutils
7177 python-dpath
7178 python-gitpython
7179 python-humanfriendly
7180 python-immutables
7181 python-jinja2
7182 python-jsonschema
7183 python-nbformat
7184 python-packaging
7185 python-psutil
7186 python-pulp
7187 python-pyyaml
7188 python-requests
7189 python-reretry
7190 python-smart-open
7191 python-snakemake-interface-common
7192 python-snakemake-interface-executor-plugins
7193 python-snakemake-interface-logger-plugins
7194 python-snakemake-interface-report-plugins
7195 python-snakemake-interface-scheduler-plugins
7196 python-snakemake-interface-software-deployment-plugins
7197 python-snakemake-interface-storage-plugins
7198 python-sqlmodel
7199 python-tabulate
7200 python-throttler
7201 python-wrapt
7202 python-yte))
7203 (native-inputs
7204 (list python-numpy
7205 python-pandas
7206 python-pytest
7207 python-setuptools
7208 python-setuptools-scm
7209 python-snakemake-software-deployment-plugin-container
7210 python-snakemake-software-deployment-plugin-envmodules
7211 python-tomli))
7212 (home-page "https://snakemake.readthedocs.io")
7213 (synopsis "Python-based execution environment for make-like workflows")
7214 (description
7215 "Snakemake aims to reduce the complexity of creating workflows by
7216providing a clean and modern domain specific specification language (DSL) in
7217Python style, together with a fast and comfortable execution environment.")
7218 (license license:expat)))
7219
7220(define-public spyder
7221 (package
7222 (name "spyder")
7223 (version "6.1.7")
7224 (source
7225 (origin
7226 (method git-fetch)
7227 (uri (git-reference
7228 (url "https://github.com/spyder-ide/spyder")
7229 (commit (string-append "v" version))))
7230 (file-name (git-file-name name version))
7231 (modules '((guix build utils)))
7232 (snippet
7233 #~(begin
7234 ;; Delete bundles and use our own packages.
7235 (delete-file-recursively "spyder/plugins/help/utils/js/mathjax")
7236 (delete-file-recursively "external-deps")))
7237 (sha256
7238 (base32 "1bzr9n3x29xvhq3cqdpclnvqawqrpxnj49zbb344f7i3lx261k7j"))))
7239 (build-system pyproject-build-system)
7240 (arguments
7241 (list
7242 #:imported-modules (append %qt-build-system-modules
7243 %pyproject-build-system-modules)
7244 #:modules '((guix build pyproject-build-system)
7245 ((guix build qt-build-system) #:prefix qt:)
7246 (guix build utils))
7247 #:test-flags
7248 ;; The 'plugins' tests takes a long time to run and contains timeouts
7249 ;; and segfaults along the way. Many more files and individual tests
7250 ;; would have to be skipped to test that directory. Run only the base
7251 ;; tests then.
7252 #~(list
7253 "--ignore" "spyder/plugins"
7254 "-k" (string-append
7255 "not "
7256 (string-join
7257 (list
7258 "flaky"
7259 "test_file_gid"
7260 "test_get_user_environment_variables"
7261 "test_is_module_installed_with_custom_interpreter"
7262 "test_get_installed_apps_and_icons"
7263 "test_environ"
7264 "test_debug_selection"
7265 "test_store_user_credentials"
7266 "test_profiler"
7267 "test_secure_options"
7268 ;; Test below could be reintroduced once bcrypt is updated
7269 "test_dependencies_for_spyder_setup_install_requires_in_sync"
7270 "test_plot_from_collectioneditor")
7271 " and not ")))
7272 #:phases
7273 #~(modify-phases %standard-phases
7274 ;; TODO: Update python-bcrypt on python-team to pass this check.
7275 (add-after 'unpack 'relax-bcrypt
7276 (lambda _
7277 (setenv "SPYDER_QT_BINDING" "pyqt6")
7278 (substitute* "setup.py"
7279 (("bcrypt>=4.3.0") "bcrypt"))))
7280 (add-after 'install 'install-mathjax
7281 (lambda* (#:key inputs outputs #:allow-other-keys)
7282 (symlink (string-append #$(this-package-input "js-mathjax")
7283 "/share/javascript/mathjax")
7284 (string-append (site-packages inputs outputs)
7285 "/spyder/plugins/help/utils/js/mathjax"))))
7286 (add-before 'check 'pre-check
7287 (lambda _
7288 (setenv "HOME" "/tmp") ; tests need a writable home
7289 (setenv "QT_QPA_PLATFORM" "offscreen")))
7290 (add-after 'wrap 'qt-wrap
7291 (lambda args
7292 (apply (assoc-ref qt:%standard-phases 'qt-wrap)
7293 `(,@args #:qtbase #$(this-package-input "qtbase"))))))))
7294 (propagated-inputs (list python-aiohttp
7295 python-asyncssh
7296 python-atomicwrites
7297 python-bcrypt
7298 python-chardet
7299 python-cloudpickle
7300 python-cookiecutter
7301 python-diff-match-patch
7302 python-intervaltree
7303 python-ipython
7304 python-ipython-pygments-lexers
7305 python-jedi
7306 python-jellyfish
7307 python-jsonschema
7308 python-keyring
7309 python-markdown-it-py
7310 python-nbconvert
7311 python-numpydoc
7312 python-packaging
7313 python-parso
7314 python-pexpect
7315 python-pickleshare
7316 python-psutil
7317 python-pygithub
7318 python-pygments
7319 python-pylint
7320 python-pylint-venv
7321 python-pyls-spyder
7322 python-pyqt-6
7323 python-pyqtwebengine-6
7324 python-lsp-black
7325 python-lsp-ruff
7326 python-lsp-server
7327 python-pyuca
7328 python-pyzmq
7329 python-qdarkstyle
7330 python-qstylizer
7331 python-qtawesome
7332 python-qtconsole
7333 python-qtpy
7334 python-rtree
7335 python-sphinx
7336 python-spyder-kernels
7337 python-superqt
7338 python-textdistance
7339 python-three-merge
7340 python-watchdog
7341 python-yarl))
7342 (inputs (list bash-minimal js-mathjax qtbase qtsvg qtwayland))
7343 (native-inputs (list git-minimal/pinned
7344 python-cython
7345 python-flaky
7346 python-matplotlib
7347 python-packaging
7348 python-pandas
7349 python-pillow
7350 python-pytest
7351 python-pytest-mock
7352 python-pytest-order
7353 python-pytest-qt
7354 python-pytest-timeout
7355 python-pyyaml
7356 python-scipy
7357 python-setuptools
7358 python-sympy))
7359 (home-page "https://www.spyder-ide.org/")
7360 (synopsis "Scientific Python Development Environment")
7361 (description
7362 "Spyder is a scientific environment written in Python, for Python, and
7363designed by and for scientists, engineers and data analysts. It offers a
7364combination of the advanced editing, analysis, debugging, and profiling
7365functionality of a comprehensive development tool with the data exploration,
7366interactive execution, deep inspection, and visualization capabilities of a
7367scientific package.")
7368 (license license:expat)))
7369
7370;;;
7371;;; Avoid adding new packages to the end of this file. To reduce the chances
7372;;; of a merge conflict, place them above in alphabetical order.
7373;;;