projects/guix·blob perlssl · refs

6806 lines · 260.0 KiB

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