projects/guix·blob graal · refs

6636 lines · 256.5 KiB

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