projects/guix·blob hurd-team · refs

6837 lines · 261.6 KiB

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