projects/guix·blob onnx · refs

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