projects/guix·blob crypto-team · refs

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