projects/guix·blob next-master · refs

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