projects/guix·blob libreoffice · refs

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