projects/guix·blob version-1.4.0 · refs

1663 lines · 64.0 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2015, 2016, 2020, 2021, 2022 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2015 Federico Beffa <[email protected]>
4;;; Copyright © 2016 Ben Woodcroft <[email protected]>
5;;; Copyright © 2016 Hartmut Goebel <[email protected]>
6;;; Copyright © 2016, 2022 Efraim Flashner <[email protected]>
7;;; Copyright © 2016-2020, 2022 Marius Bakke <[email protected]>
8;;; Copyright © 2019 Tobias Geerinckx-Rice <[email protected]>
9;;; Copyright © 2019, 2021, 2022 Maxim Cournoyer <[email protected]>
10;;; Copyright © 2019 Giacomo Leidi <[email protected]>
11;;; Copyright © 2020 Pierre Langlois <[email protected]>
12;;; Copyright © 2020, 2021, 2022 Vinicius Monego <[email protected]>
13;;; Copyright © 2021 Greg Hogan <[email protected]>
14;;; Copyright © 2021 Roel Janssen <[email protected]>
15;;; Copyright © 2021 Paul Garlick <[email protected]>
16;;; Copyright © 2021 Arun Isaac <[email protected]>
17;;; Copyright © 2021 Felix Gruber <[email protected]>
18;;; Copyright © 2022 Malte Frank Gerdes <[email protected]>
19;;; Copyright © 2022 Guillaume Le Vaillant <[email protected]>
20;;; Copyright © 2022 Paul A. Patience <[email protected]>
21;;; Copyright © 2022 Wiktor Żelazny <[email protected]>
22;;; Copyright © 2022 Eric Bavier <[email protected]>
23;;; Copyright © 2022 jgart <[email protected]>
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages python-science)
41 #:use-module ((guix licenses) #:prefix license:)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bioinformatics)
45 #:use-module (gnu packages boost)
46 #:use-module (gnu packages build-tools)
47 #:use-module (gnu packages check)
48 #:use-module (gnu packages cpp)
49 #:use-module (gnu packages crypto)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages gcc)
52 #:use-module (gnu packages image-processing)
53 #:use-module (gnu packages machine-learning)
54 #:use-module (gnu packages maths)
55 #:use-module (gnu packages mpi)
56 #:use-module (gnu packages pcre)
57 #:use-module (gnu packages perl)
58 #:use-module (gnu packages pkg-config)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-build)
61 #:use-module (gnu packages python-crypto)
62 #:use-module (gnu packages python-check)
63 #:use-module (gnu packages python-web)
64 #:use-module (gnu packages python-xyz)
65 #:use-module (gnu packages simulation)
66 #:use-module (gnu packages sphinx)
67 #:use-module (gnu packages statistics)
68 #:use-module (gnu packages time)
69 #:use-module (gnu packages xdisorg)
70 #:use-module (gnu packages xml)
71 #:use-module (gnu packages xorg)
72 #:use-module (guix packages)
73 #:use-module (guix gexp)
74 #:use-module (guix download)
75 #:use-module (guix git-download)
76 #:use-module (guix utils)
77 #:use-module (guix build-system python))
78
79(define-public python-scipy
80 (package
81 (name "python-scipy")
82 (version "1.9.1")
83 (source
84 (origin
85 (method url-fetch)
86 (uri (pypi-uri "scipy" version))
87 (sha256
88 (base32 "1jcb94xal7w7ax80kaivqqics36v8smi4a3xngyxbrh0i538rli6"))))
89 (build-system python-build-system)
90 (arguments
91 (list
92 #:phases
93 #~(modify-phases %standard-phases
94 (add-after 'unpack 'loosen-requirements
95 (lambda _
96 (substitute* "pyproject.toml"
97 (("numpy==") "numpy>=")
98 (("meson==") "meson>="))))
99 (replace 'build
100 (lambda _
101 ;; ZIP does not support timestamps before 1980.
102 (setenv "SOURCE_DATE_EPOCH" "315532800")
103 (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
104 (replace 'install
105 (lambda _
106 (let ((whl (car (find-files "dist" "\\.whl$"))))
107 (invoke "pip" "--no-cache-dir" "--no-input"
108 "install" "--no-deps" "--prefix" #$output whl))))
109 (replace 'check
110 (lambda* (#:key tests? #:allow-other-keys)
111 (when tests?
112 ;; Step out of the source directory to avoid interference.
113 (with-directory-excursion "/tmp"
114 (invoke "python" "-c"
115 (string-append
116 "import scipy; scipy.test('fast', parallel="
117 (number->string (parallel-job-count))
118 ", verbose=2)"))))))
119 (add-after 'check 'install-doc
120 (lambda* (#:key outputs #:allow-other-keys)
121 ;; FIXME: Documentation cannot be built because it requires
122 ;; a newer version of pydata-sphinx-theme, which currently
123 ;; cannot build without internet access:
124 ;; <https://github.com/pydata/pydata-sphinx-theme/issues/628>.
125 ;; Keep the phase for easy testing.
126 (let ((sphinx-build (false-if-exception
127 (search-input-file input "bin/sphinx-build"))))
128 (if sphinx-build
129 (let* ((doc (assoc-ref outputs "doc"))
130 (data (string-append doc "/share"))
131 (docdir (string-append
132 data "/doc/"
133 #$(package-name this-package) "-"
134 #$(package-version this-package)))
135 (html (string-append docdir "/html")))
136 (with-directory-excursion "doc"
137 ;; Build doc.
138 (invoke "make" "html"
139 ;; Building the documentation takes a very long time.
140 ;; Parallelize it.
141 (string-append "SPHINXOPTS=-j"
142 (number->string (parallel-job-count))))
143 ;; Install doc.
144 (mkdir-p html)
145 (copy-recursively "build/html" html)))
146 (format #t "sphinx-build not found, skipping~%"))))))))
147 (propagated-inputs
148 (list python-numpy python-matplotlib python-pyparsing python-pythran))
149 (inputs (list openblas pybind11))
150 (native-inputs
151 (list gfortran
152 ;; XXX: Adding gfortran shadows GCC headers, causing a compilation
153 ;; failure. Somehow also providing GCC works around it ...
154 gcc
155 meson-python
156 pkg-config
157 python-cython
158 python-pypa-build
159 python-pytest
160 python-pytest-xdist
161 python-threadpoolctl))
162 (home-page "https://scipy.org/")
163 (synopsis "The Scipy library provides efficient numerical routines")
164 (description "The SciPy library is one of the core packages that make up
165the SciPy stack. It provides many user-friendly and efficient numerical
166routines such as routines for numerical integration and optimization.")
167 (license license:bsd-3)))
168
169(define-public python-scikit-fuzzy
170 (package
171 (name "python-scikit-fuzzy")
172 (version "0.4.2")
173 (source
174 (origin
175 (method url-fetch)
176 (uri (pypi-uri "scikit-fuzzy" version))
177 (sha256
178 (base32 "0bp1n771fj44kdp7a00bcvfwirvv2rc803b7g6yf3va7v0j29c8s"))))
179 (build-system python-build-system)
180 (arguments '(#:tests? #f)) ;XXX: not compatible with newer numpy.testing
181 (native-inputs
182 (list python-nose))
183 (propagated-inputs
184 (list python-networkx python-numpy python-scipy))
185 (home-page "https://github.com/scikit-fuzzy/scikit-fuzzy")
186 (synopsis "Fuzzy logic toolkit for SciPy")
187 (description
188 "This package implements many useful tools for projects involving fuzzy
189logic, also known as grey logic.")
190 (license license:bsd-3)))
191
192(define-public python-scikit-image
193 (package
194 (name "python-scikit-image")
195 (version "0.19.3")
196 (source
197 (origin
198 (method url-fetch)
199 (uri (pypi-uri "scikit-image" version))
200 (sha256
201 (base32 "0l645smf7w1kail70z8d9r3xmvz7qh6g7n3d2bpacbbnw5ykdd94"))))
202 (build-system python-build-system)
203 (arguments
204 `(#:phases
205 (modify-phases %standard-phases
206 (add-before 'build 'change-home-dir
207 (lambda _
208 ;; Change from /homeless-shelter to /tmp for write permission.
209 (setenv "HOME" "/tmp")
210 #t))
211 (replace 'build
212 (lambda _
213 (invoke "make")))
214 (replace 'check
215 (lambda _
216 ;; The following tests require online data.
217 (invoke "python" "-m" "pytest" "skimage" "--doctest-modules" "-k"
218 (string-append "not test_ndim"
219 " and not test_skin")))))))
220 ;; See requirements/ for the list of build and run time requirements.
221 ;; NOTE: scikit-image has an optional dependency on python-pooch, however
222 ;; propagating it would enable many more tests that require online data.
223 (propagated-inputs
224 (list python-cloudpickle
225 python-dask
226 python-imageio
227 python-matplotlib
228 python-networkx
229 python-numpy
230 python-pillow
231 python-pythran
232 python-pywavelets
233 python-scipy
234 python-tifffile))
235 (native-inputs
236 (list python-cython
237 python-pytest
238 python-pytest-localserver))
239 (home-page "https://scikit-image.org/")
240 (synopsis "Image processing in Python")
241 (description
242 "Scikit-image is a collection of algorithms for image processing.")
243 (license license:bsd-3)))
244
245(define-public python-scikit-allel
246 (package
247 (name "python-scikit-allel")
248 (version "1.3.5")
249 (source
250 (origin
251 (method url-fetch)
252 (uri (pypi-uri "scikit-allel" version))
253 (sha256
254 (base32 "1vg88ng6gd175gzk39iz1drxig5l91dyx398w2kbw3w8036zv8gj"))))
255 (build-system python-build-system)
256 (arguments
257 (list
258 #:phases
259 #~(modify-phases %standard-phases
260 (replace 'check
261 (lambda* (#:key tests? #:allow-other-keys)
262 (when tests?
263 (invoke "python" "setup.py" "build_ext" "--inplace")
264 (invoke "python" "-m" "pytest" "-v" "allel"
265 ;; AttributeError: 'Dataset' object has no attribute 'asstr'
266 "-k" (string-append
267 "not test_vcf_to_hdf5"
268 " and not test_vcf_to_hdf5_exclude"
269 " and not test_vcf_to_hdf5_rename"
270 " and not test_vcf_to_hdf5_group"
271 " and not test_vcf_to_hdf5_ann"))))))))
272 (propagated-inputs
273 (list python-dask
274 python-numpy))
275 (native-inputs
276 (list python-cython
277 ;; The following are all needed for the tests
278 htslib
279 python-h5py
280 python-hmmlearn
281 python-numexpr
282 python-pytest
283 python-scipy
284 python-setuptools-scm
285 python-zarr))
286 (home-page "https://github.com/cggh/scikit-allel")
287 (synopsis "Explore and analyze genetic variation data")
288 (description
289 "This package provides utilities for exploratory analysis of large scale
290genetic variation data.")
291 (license license:expat)))
292
293(define-public python-sgp4
294 (package
295 (name "python-sgp4")
296 (version "2.12")
297 (source
298 (origin
299 (method url-fetch)
300 (uri (pypi-uri "sgp4" version))
301 (sha256
302 (base32 "0dncp9i5b6afkg7f8mj9j0qzsp008b8v73yc0qkmizhpns7mvwvx"))))
303 (build-system python-build-system)
304 (propagated-inputs
305 (list python-numpy))
306 (home-page "https://github.com/brandon-rhodes/python-sgp4")
307 (synopsis "Track earth satellite TLE orbits using SGP4")
308 (description
309 "This package provides a Python implementation of the most recent version
310of the SGP4 satellite tracking algorithm.")
311 (license license:expat)))
312
313(define-public python-trimesh
314 (package
315 (name "python-trimesh")
316 (version "3.10.7")
317 (source
318 (origin
319 (method url-fetch)
320 (uri (pypi-uri "trimesh" version))
321 (sha256
322 (base32 "0bw55cwxlxds0j54naijh64sdb0rkscx4i1fy0ql94h96kw2p2ir"))))
323 (build-system python-build-system)
324 (propagated-inputs
325 (list python-numpy))
326 (native-inputs
327 (list python-coveralls
328 python-pyinstrument
329 python-pytest
330 python-pytest-cov))
331 (arguments
332 `(;; TODO: Get tests to work.
333 #:tests? #f
334 #:phases
335 (modify-phases %standard-phases
336 (add-after 'unpack 'fix-build
337 (lambda _
338 (substitute* "trimesh/resources/templates/blender_boolean.py"
339 (("\\$MESH_PRE")
340 "'$MESH_PRE'")))))))
341 (home-page "https://github.com/mikedh/trimesh")
342 (synopsis "Python library for loading and using triangular meshes")
343 (description
344 "Trimesh is a pure Python library for loading and using triangular meshes
345with an emphasis on watertight surfaces. The goal of the library is to provide
346a full featured and well tested Trimesh object which allows for easy
347manipulation and analysis, in the style of the Polygon object in the Shapely
348library.")
349 (license license:expat)))
350
351(define-public python-tspex
352 (package
353 (name "python-tspex")
354 (version "0.6.2")
355 (source (origin
356 (method url-fetch)
357 (uri (pypi-uri "tspex" version))
358 (sha256
359 (base32
360 "0x64ki1nzhms2nb8xpng92bzh5chs850dvapr93pkg05rk22m6mv"))))
361 (build-system python-build-system)
362 (propagated-inputs
363 (list python-matplotlib python-numpy python-pandas python-xlrd))
364 (home-page "https://apcamargo.github.io/tspex/")
365 (synopsis "Calculate tissue-specificity metrics for gene expression")
366 (description
367 "This package provides a Python package for calculating
368tissue-specificity metrics for gene expression.")
369 (license license:gpl3+)))
370
371(define-public python-pandas
372 (package
373 (name "python-pandas")
374 (version "1.4.4")
375 (source
376 (origin
377 (method url-fetch)
378 (uri (pypi-uri "pandas" version))
379 (sha256
380 (base32 "0ryv66s9cvd27q6a985vv556k2qlnlrdna2z7qc7bdhphrrhsv5b"))))
381 (build-system python-build-system)
382 (arguments
383 `(#:modules ((guix build utils)
384 (guix build python-build-system)
385 (ice-9 ftw)
386 (srfi srfi-1)
387 (srfi srfi-26))
388 #:phases
389 (modify-phases %standard-phases
390 (add-after 'unpack 'enable-parallel-build
391 (lambda _
392 (substitute* "setup.py"
393 (("\"-j\", type=int, default=1")
394 (format #f "\"-j\", type=int, default=~a"
395 (parallel-job-count))))))
396 (add-after 'unpack 'patch-which
397 (lambda* (#:key inputs #:allow-other-keys)
398 (let ((which (assoc-ref inputs "which")))
399 (substitute* "pandas/io/clipboard/__init__.py"
400 (("^WHICH_CMD = .*")
401 (string-append "WHICH_CMD = \"" which "\"\n"))))))
402 (add-before 'check 'prepare-x
403 (lambda _
404 (system "Xvfb &")
405 (setenv "DISPLAY" ":0")
406 ;; xsel needs to write a log file.
407 (setenv "HOME" "/tmp")))
408 (replace 'check
409 (lambda* (#:key tests? #:allow-other-keys)
410 (let ((build-directory
411 (string-append
412 (getcwd) "/build/"
413 (first (scandir "build"
414 (cut string-prefix? "lib." <>))))))
415 (substitute* "pyproject.toml"
416 ;; Not all data files are distributed with the tarball.
417 (("--strict-data-files ") ""))
418 (with-directory-excursion build-directory
419 (when tests?
420 (invoke "pytest" "-vv" "pandas" "--skip-slow"
421 "--skip-network"
422 "-n" (number->string (parallel-job-count))
423 "-k"
424 (string-append
425 ;; These test access the internet (see:
426 ;; https://github.com/pandas-dev/pandas/issues/45085).:
427 ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml]
428 ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree]
429 "not test_wrong_url"
430 ;; TODO: Missing input
431 " and not TestS3"
432 " and not s3"
433 ;; This test fails when run with pytest-xdist
434 ;; (see:
435 ;; https://github.com/pandas-dev/pandas/issues/39096).
436 " and not test_memory_usage"))))))))))
437 (propagated-inputs
438 (list python-jinja2
439 python-numpy
440 python-openpyxl
441 python-pytz
442 python-dateutil
443 python-xlrd
444 python-xlsxwriter))
445 (inputs
446 (list which xclip xsel))
447 (native-inputs
448 (list python-cython
449 python-beautifulsoup4
450 python-lxml
451 python-html5lib
452 python-pytest
453 python-pytest-mock
454 python-pytest-xdist
455 ;; Needed to test clipboard support.
456 xorg-server-for-tests))
457 (home-page "https://pandas.pydata.org")
458 (synopsis "Data structures for data analysis, time series, and statistics")
459 (description
460 "Pandas is a Python package providing fast, flexible, and expressive data
461structures designed to make working with structured (tabular,
462multidimensional, potentially heterogeneous) and time series data both easy
463and intuitive. It aims to be the fundamental high-level building block for
464doing practical, real world data analysis in Python.")
465 (license license:bsd-3)))
466
467(define-public python-pythran
468 (package
469 (name "python-pythran")
470 (version "0.11.0")
471 (home-page "https://github.com/serge-sans-paille/pythran")
472 (source (origin
473 (method git-fetch)
474 (uri (git-reference (url home-page) (commit version)))
475 (file-name (git-file-name name version))
476 (sha256
477 (base32 "0cm7wfcyvkp1wmq7n1lyf2d3sj6158jf63bagjpjmfnjwij19n0p"))
478 (modules '((guix build utils)))
479 (snippet
480 '(begin
481 ;; Remove bundled Boost and xsimd.
482 (delete-file-recursively "third_party")))))
483 (build-system python-build-system)
484 (arguments
485 (list #:phases
486 #~(modify-phases %standard-phases
487 (add-after 'unpack 'do-not-install-third-parties
488 (lambda _
489 (substitute* "setup.py"
490 (("third_parties = .*")
491 "third_parties = []\n"))))
492 (replace 'check
493 (lambda* (#:key tests? #:allow-other-keys)
494 (when tests?
495 ;; Remove compiler flag that trips newer GCC:
496 ;; https://github.com/serge-sans-paille/pythran/issues/908
497 (substitute* "pythran/tests/__init__.py"
498 (("'-Wno-absolute-value',")
499 ""))
500 (setenv "HOME" (getcwd))
501 ;; This setup is modelled after the upstream CI system.
502 (call-with-output-file ".pythranrc"
503 (lambda (port)
504 (format port "[compiler]\nblas=openblas~%")))
505 (invoke "pytest" "-vv"
506 (string-append "--numprocesses="
507 (number->string
508 (parallel-job-count)))
509 "pythran/tests/test_cases.py")))))))
510 (native-inputs
511 ;; For tests.
512 (list openblas python-pytest python-pytest-xdist))
513 (propagated-inputs
514 (list boost xsimd ;headers need to be available
515 python-beniget python-gast python-numpy python-ply))
516 (synopsis "Ahead of Time compiler for numeric kernels")
517 (description
518 "Pythran is an ahead of time compiler for a subset of the Python
519language, with a focus on scientific computing. It takes a Python module
520annotated with a few interface descriptions and turns it into a native
521Python module with the same interface, but (hopefully) faster.")
522 (license license:bsd-3)))
523
524(define-public python-pyts
525 (package
526 (name "python-pyts")
527 (version "0.12.0")
528 (source (origin
529 (method url-fetch)
530 (uri (pypi-uri "pyts" version))
531 (sha256
532 (base32
533 "1cb5jwp8g52a3hxay6mxbfzk16ly6yj6rphq8cwbwk1k2jdf11dg"))))
534 (build-system python-build-system)
535 (arguments
536 (list
537 #:phases
538 '(modify-phases %standard-phases
539 (replace 'check
540 (lambda* (#:key tests? #:allow-other-keys)
541 (when tests?
542 (invoke "pytest" "-v"
543 ;; XXX: This test fails for unknown reasons
544 ;; Expected:
545 ;; (40, 9086)
546 ;; Got:
547 ;; (40, 9088)
548 "-k"
549 "not pyts.multivariate.transformation.weasel_muse.WEASELMUSE")))))))
550 (propagated-inputs
551 (list python-joblib
552 python-matplotlib
553 python-numba
554 python-numpy
555 python-scikit-learn
556 python-scipy))
557 (native-inputs
558 (list python-pytest python-pytest-cov))
559 (home-page "https://github.com/johannfaouzi/pyts")
560 (synopsis "Python package for time series classification")
561 (description
562 "This package provides a Python package for time series classification.")
563 (license license:bsd-3)))
564
565(define-public python-bottleneck
566 (package
567 (name "python-bottleneck")
568 (version "1.3.2")
569 (source
570 (origin
571 (method url-fetch)
572 (uri (pypi-uri "Bottleneck" version))
573 (sha256
574 (base32 "0wz5320jx3n4q2nsvwvc7cpi66b46qbals9v53m955rmcq5ry5r0"))))
575 (build-system python-build-system)
576 (arguments
577 `(#:phases
578 (modify-phases %standard-phases
579 (replace 'check
580 (lambda _
581 (invoke "python" "setup.py" "pytest"))))))
582 (native-inputs
583 (list python-hypothesis python-pytest python-pytest-runner))
584 (propagated-inputs
585 (list python-numpy))
586 (home-page "https://github.com/pydata/bottleneck")
587 (synopsis "Fast NumPy array functions written in C")
588 (description
589 "Bottleneck is a collection of fast, NaN-aware NumPy array functions
590written in C.")
591 (license license:bsd-2)))
592
593(define-public python-baycomp
594 (package
595 (name "python-baycomp")
596 (version "1.0.2")
597 (source
598 (origin
599 (method url-fetch)
600 (uri (pypi-uri "baycomp" version))
601 (sha256
602 (base32 "1c1354a7b3g8slychjgyjxqdm8z40z9kviyl9n4g9kfpdg0p4d64"))))
603 (build-system python-build-system)
604 (propagated-inputs
605 (list python-matplotlib python-numpy python-scipy))
606 (home-page "https://github.com/janezd/baycomp")
607 (synopsis "Library for comparison of Bayesian classifiers")
608 (description
609 "Baycomp is a library for Bayesian comparison of classifiers. Functions
610in the library compare two classifiers on one or on multiple data sets. They
611compute three probabilities: the probability that the first classifier has
612higher scores than the second, the probability that differences are within the
613region of practical equivalence (rope), or that the second classifier has
614higher scores.")
615 (license license:expat)))
616
617(define-public python-fbpca
618 (package
619 (name "python-fbpca")
620 (version "1.0")
621 (source (origin
622 (method url-fetch)
623 (uri (pypi-uri "fbpca" version))
624 (sha256
625 (base32
626 "1lbjqhqsdmqk86lb86q3ywf7561zmdny1dfvgwqkyrkr4ij7f1hm"))))
627 (build-system python-build-system)
628 (propagated-inputs
629 (list python-numpy python-scipy))
630 (home-page "https://fbpca.readthedocs.io/")
631 (synopsis "Functions for principal component analysis and accuracy checks")
632 (description
633 "This package provides fast computations for @dfn{principal component
634analysis} (PCA), SVD, and eigendecompositions via randomized methods")
635 (license license:bsd-3)))
636
637(define-public python-geosketch
638 (package
639 (name "python-geosketch")
640 (version "1.2")
641 (source (origin
642 (method url-fetch)
643 (uri (pypi-uri "geosketch" version))
644 (sha256
645 (base32
646 "0knch5h0p8xpm8bi3b5mxyaf1ywwimrsdmbnc1xr5icidcv9gzmv"))))
647 (build-system python-build-system)
648 (arguments '(#:tests? #false)) ;there are none
649 (propagated-inputs (list python-fbpca python-numpy python-scikit-learn))
650 (home-page "https://github.com/brianhie/geosketch")
651 (synopsis "Geometry-preserving random sampling")
652 (description "geosketch is a Python package that implements the geometric
653sketching algorithm described by Brian Hie, Hyunghoon Cho, Benjamin DeMeo,
654Bryan Bryson, and Bonnie Berger in \"Geometric sketching compactly summarizes
655the single-cell transcriptomic landscape\", Cell Systems (2019). This package
656provides an example implementation of the algorithm as well as scripts
657necessary for reproducing the experiments in the paper.")
658 (license license:expat)))
659
660(define-public python-xarray
661 (package
662 (name "python-xarray")
663 (version "0.15.1")
664 (source (origin
665 (method url-fetch)
666 (uri (pypi-uri "xarray" version))
667 (sha256
668 (base32
669 "1yx8j66b7rn10m2l6gmn8yr9cn38pi5cj0x0wwpy4hdnhy6i7qv4"))))
670 (build-system python-build-system)
671 (native-inputs
672 (list python-setuptools-scm python-pytest))
673 (propagated-inputs
674 (list python-numpy python-pandas))
675 (arguments
676 `(#:phases
677 (modify-phases %standard-phases
678 (replace 'check
679 (lambda _
680 (invoke "pytest"))))))
681 (home-page "https://github.com/pydata/xarray")
682 (synopsis "N-D labeled arrays and datasets")
683 (description "Xarray (formerly xray) makes working with labelled
684multi-dimensional arrays simple, efficient, and fun!
685
686Xarray introduces labels in the form of dimensions, coordinates and attributes
687on top of raw NumPy-like arrays, which allows for a more intuitive, more
688concise, and less error-prone developer experience. The package includes a
689large and growing library of domain-agnostic functions for advanced analytics
690and visualization with these data structures.")
691 (license license:asl2.0)))
692
693(define-public python-msgpack-numpy
694 (package
695 (name "python-msgpack-numpy")
696 (version "0.4.6.post0")
697 (source
698 (origin
699 (method url-fetch)
700 (uri (pypi-uri "msgpack-numpy" version))
701 (sha256
702 (base32
703 "0syzy645mwcy7lfjwz6pc8f9p2vv1qk4limc8iina3l5nnf0rjyz"))))
704 (build-system python-build-system)
705 (propagated-inputs
706 (list python-msgpack python-numpy))
707 (home-page "https://github.com/lebedov/msgpack-numpy")
708 (synopsis
709 "Numpy data serialization using msgpack")
710 (description
711 "This package provides encoding and decoding routines that enable the
712serialization and deserialization of numerical and array data types provided
713by numpy using the highly efficient @code{msgpack} format. Serialization of
714Python's native complex data types is also supported.")
715 (license license:bsd-3)))
716
717(define-public python-ruffus
718 (package
719 (name "python-ruffus")
720 (version "2.8.4")
721 (source
722 (origin
723 (method url-fetch)
724 (uri (pypi-uri "ruffus" version))
725 (sha256
726 (base32
727 "1ai673k1s94s8b6pyxai8mk17p6zvvyi87rl236fs6ls8mpdklvc"))))
728 (build-system python-build-system)
729 (arguments
730 `(#:phases
731 (modify-phases %standard-phases
732 (delete 'check)
733 (add-after 'install 'check
734 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
735 (when tests?
736 (add-installed-pythonpath inputs outputs)
737 (with-directory-excursion "ruffus/test"
738 (invoke "bash" "run_all_unit_tests3.cmd"))))))))
739 (native-inputs
740 (list python-pytest))
741 (home-page "http://www.ruffus.org.uk")
742 (synopsis "Light-weight computational pipeline management")
743 (description
744 "Ruffus is designed to allow scientific and other analyses to be
745automated with the minimum of fuss and the least effort.")
746 (license license:expat)))
747
748(define-public python-statannot
749 (package
750 (name "python-statannot")
751 (version "0.2.3")
752 (source
753 (origin
754 (method url-fetch)
755 (uri (pypi-uri "statannot" version))
756 (sha256
757 (base32
758 "1f8c2sylzr7lpjbyqxsqlp9xi8rj3d8c9hfh98x4jbb83zxc4026"))))
759 (build-system python-build-system)
760 (propagated-inputs
761 (list python-numpy python-seaborn python-matplotlib python-pandas
762 python-scipy))
763 (home-page
764 "https://github.com/webermarcolivier/statannot")
765 (synopsis "Add annotations to existing plots generated by seaborn")
766 (description
767 "This is a Python package to compute statistical test and add statistical
768annotations on an existing boxplots and barplots generated by seaborn.")
769 (license license:expat)))
770
771(define-public python-upsetplot
772 (package
773 (name "python-upsetplot")
774 (version "0.6.0")
775 (source
776 (origin
777 (method url-fetch)
778 (uri (pypi-uri "UpSetPlot" version))
779 (sha256
780 (base32
781 "11zrykwnb00w5spx4mnsnm0f9gwrphdczainpmwkyyi50vipaa2l"))
782 (modules '((guix build utils)))
783 (snippet
784 ;; Patch for compatibility with newer setuptools:
785 ;; https://github.com/jnothman/UpSetPlot/pull/178
786 '(substitute* "upsetplot/data.py"
787 (("import distutils")
788 "from distutils.version import LooseVersion")
789 (("if distutils\\.version\\.LooseVersion")
790 "if LooseVersion")))))
791 (build-system python-build-system)
792 (arguments
793 '(#:phases
794 (modify-phases %standard-phases
795 (replace 'check
796 (lambda* (#:key tests? #:allow-other-keys)
797 (when tests?
798 (invoke "pytest" "-v" "--doctest-modules")))))))
799 (propagated-inputs
800 (list python-matplotlib python-pandas))
801 (native-inputs
802 (list python-pytest-runner python-pytest-cov))
803 (home-page "https://upsetplot.readthedocs.io")
804 (synopsis "Draw UpSet plots with Pandas and Matplotlib")
805 (description
806 "This is a Python implementation of UpSet plots by Lex et al.
807UpSet plots are used to visualize set overlaps; like Venn diagrams but more
808readable.")
809 (license license:bsd-3)))
810
811(define-public python-vedo
812 (package
813 (name "python-vedo")
814 (version "2022.2.0")
815 (source
816 (origin
817 (method git-fetch)
818 (uri (git-reference
819 (url "https://github.com/marcomusy/vedo")
820 (commit (string-append "v" version))))
821 (file-name (git-file-name name version))
822 (sha256
823 (base32
824 "1hhv4xc4bphhd1zrnf7r6fpf65xvkdqmb1lh51qg1xpv91h2az0h"))))
825 (build-system python-build-system)
826 (arguments
827 `(#:phases
828 (modify-phases %standard-phases
829 (add-after 'unpack 'fix-tests
830 ;; These tests require online data.
831 (lambda _
832 (substitute* "tests/common/test_actors.py"
833 (("^st = .*") "")
834 (("^assert isinstance\\(st\\.GetTexture\\(\\), .*") ""))
835 (delete-file "tests/common/test_pyplot.py")))
836 (add-after 'build 'mpi-setup
837 ,%openmpi-setup)
838 (replace 'check
839 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
840 (when tests?
841 (setenv "HOME" (getcwd))
842 (add-installed-pythonpath inputs outputs)
843 (with-directory-excursion "tests"
844 (for-each (lambda (dir)
845 (with-directory-excursion dir
846 (invoke "./run_all.sh")))
847 '("common" "dolfin"))))))
848 ;; Disable the sanity check, which fails with the following error:
849 ;;
850 ;; ...checking requirements: ERROR: vedo==2022.2.0 DistributionNotFound(Requirement.parse('vtk<9.1.0'), {'vedo'})
851 (delete 'sanity-check))))
852 (native-inputs
853 (list pkg-config
854 python-pkgconfig))
855 (propagated-inputs
856 (list fenics
857 python-deprecated
858 python-matplotlib
859 python-numpy
860 vtk))
861 (home-page "https://github.com/marcomusy/vedo")
862 (synopsis
863 "Analysis and visualization of 3D objects and point clouds")
864 (description
865 "@code{vedo} is a fast and lightweight python module for
866scientific analysis and visualization. The package provides a wide
867range of functionalities for working with three-dimensional meshes and
868point clouds. It can also be used to generate high quality
869two-dimensional renderings such as scatter plots and histograms.
870@code{vedo} is based on @code{vtk} and @code{numpy}.")
871 ;; vedo is released under the Expat license. Included fonts are
872 ;; covered by the OFL license and textures by the CC0 license.
873 ;; The earth images are in the public domain.
874 (license (list license:expat
875 license:silofl1.1
876 license:cc0
877 license:public-domain))))
878
879(define-public python-pandas-flavor
880 (package
881 (name "python-pandas-flavor")
882 (version "0.2.0")
883 (source
884 (origin
885 (method url-fetch)
886 (uri (pypi-uri "pandas_flavor" version))
887 (sha256
888 (base32
889 "12g4av8gpl6l83yza3h97j3f2jblqv69frlidrvdq8ny2rc6awbq"))))
890 (build-system python-build-system)
891 (propagated-inputs
892 (list python-pandas python-xarray))
893 (home-page "https://github.com/Zsailer/pandas_flavor")
894 (synopsis "Write your own flavor of Pandas")
895 (description "Pandas 0.23 added a simple API for registering accessors
896with Pandas objects. Pandas-flavor extends Pandas' extension API by
897
898@itemize
899@item adding support for registering methods as well
900@item making each of these functions backwards compatible with older versions
901of Pandas
902@end itemize")
903 (license license:expat)))
904
905(define-public python-pingouin
906 (package
907 (name "python-pingouin")
908 (version "0.5.2")
909 (source
910 ;; The PyPI tarball does not contain the tests.
911 (origin
912 (method git-fetch)
913 (uri (git-reference
914 (url "https://github.com/raphaelvallat/pingouin")
915 (commit (string-append "v" version))))
916 (file-name (git-file-name name version))
917 (sha256
918 (base32
919 "0czy7cpn6xx9fs6wbz6rq2lpkb1a89bzxj1anf2f9in1m5qyrh83"))))
920 (build-system python-build-system)
921 (arguments
922 `(#:phases
923 (modify-phases %standard-phases
924 (add-after 'unpack 'loosen-requirements
925 (lambda _
926 (substitute* '("requirements.txt" "setup.py")
927 ;; Remove sklearn pinning since it works fine with 1.1.2:
928 ;; https://github.com/raphaelvallat/pingouin/pull/300
929 (("scikit-learn<1\\.1\\.0")
930 "scikit-learn"))))
931 ;; On loading, Pingouin uses the outdated package to check if a newer
932 ;; version is available on PyPI. This check adds an extra dependency
933 ;; and is irrelevant to Guix users. So, disable it.
934 (add-after 'unpack 'remove-outdated-check
935 (lambda _
936 (substitute* "setup.py"
937 (("\"outdated\",") ""))
938 (substitute* "pingouin/__init__.py"
939 (("^from outdated[^\n]*") "")
940 (("^warn_if_outdated[^\n]*") ""))))
941 (replace 'check
942 (lambda* (#:key tests? #:allow-other-keys)
943 (when tests?
944 (invoke "pytest")))))))
945 (native-inputs
946 (list python-pytest python-pytest-cov))
947 (propagated-inputs
948 (list python-matplotlib
949 python-mpmath
950 python-numpy
951 python-pandas
952 python-pandas-flavor
953 python-scikit-learn
954 python-scipy
955 python-seaborn
956 python-statsmodels
957 python-tabulate))
958 (home-page "https://pingouin-stats.org/")
959 (synopsis "Statistical package for Python")
960 (description "Pingouin is a statistical package written in Python 3 and
961based mostly on Pandas and NumPy. Its features include
962
963@itemize
964@item ANOVAs: N-ways, repeated measures, mixed, ancova
965@item Pairwise post-hocs tests (parametric and non-parametric) and pairwise
966correlations
967@item Robust, partial, distance and repeated measures correlations
968@item Linear/logistic regression and mediation analysis
969@item Bayes Factors
970@item Multivariate tests
971@item Reliability and consistency
972@item Effect sizes and power analysis
973@item Parametric/bootstrapped confidence intervals around an effect size or a
974correlation coefficient
975@item Circular statistics
976@item Chi-squared tests
977@item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation,
978and more
979@end itemize")
980 (license license:gpl3)))
981
982(define-public python-pyglm
983 (package
984 (name "python-pyglm")
985 (version "2.5.7")
986 (source
987 (origin
988 ;; Test files are not included in the archive in pypi.
989 (method git-fetch)
990 (uri (git-reference
991 (url "https://github.com/Zuzu-Typ/PyGLM")
992 (commit version)
993 ;; Checkout the bundled `glm` submodule. PyGLM uses the
994 ;; currently unreleased GLM_EXT_matrix_integer feature. Can
995 ;; maybe unbundle once [email protected] is released.
996 (recursive? #t)))
997 (file-name (git-file-name name version))
998 (sha256
999 (base32
1000 "08v0cgkwsf8rxscx5g9c5p1dy38rvak2fy3q6hg985if1nj6d9ks"))))
1001 (build-system python-build-system)
1002 (home-page "https://github.com/Zuzu-Typ/PyGLM")
1003 (synopsis "OpenGL Mathematics library for Python")
1004 (description "PyGLM is a Python extension library which brings the OpenGL
1005Mathematics (GLM) library to Python.")
1006 (license license:zlib)))
1007
1008(define-public python-distributed
1009 (package
1010 (name "python-distributed")
1011 (version "2022.05.2")
1012 (source
1013 (origin
1014 ;; The test files are not included in the archive on pypi
1015 (method git-fetch)
1016 (uri (git-reference
1017 (url "https://github.com/dask/distributed")
1018 (commit version)))
1019 (file-name (git-file-name name version))
1020 (sha256
1021 (base32
1022 "009jrlk7kmazrd3nkl217cl3x5ddg7kw9mqdgq1z9knv5h1rm8qv"))
1023 ;; Delete bundled copy of python-versioneer.
1024 (snippet '(delete-file "versioneer.py"))))
1025 (build-system python-build-system)
1026 (arguments
1027 '(#:phases
1028 (modify-phases %standard-phases
1029 (add-after 'unpack 'versioneer
1030 (lambda _
1031 (invoke "versioneer" "install")))
1032 (add-after 'unpack 'fix-references
1033 (lambda* (#:key outputs #:allow-other-keys)
1034 (substitute* '("distributed/comm/tests/test_ucx_config.py"
1035 "distributed/tests/test_client.py"
1036 "distributed/tests/test_queues.py"
1037 "distributed/tests/test_variable.py"
1038 "distributed/cli/tests/test_tls_cli.py"
1039 "distributed/cli/tests/test_dask_spec.py"
1040 "distributed/cli/tests/test_dask_worker.py"
1041 "distributed/cli/tests/test_dask_scheduler.py")
1042 (("\"dask-scheduler\"")
1043 (format #false "\"~a/bin/dask-scheduler\""
1044 (assoc-ref outputs "out")))
1045 (("\"dask-worker\"")
1046 (format #false "\"~a/bin/dask-worker\""
1047 (assoc-ref outputs "out"))))))
1048 ;; ERROR: distributed==2022.5.2
1049 ;; ContextualVersionConflict (locket 0.2.0
1050 ;; (/gnu/store/...-python-locket-0.2.0/lib/python3.9/site-packages),
1051 ;; Requirement.parse('locket>=1.0.0'), {'distributed'})
1052 (delete 'sanity-check)
1053 (replace 'check
1054 (lambda* (#:key tests? #:allow-other-keys)
1055 (when tests?
1056 (setenv "DISABLE_IPV6" "1")
1057 ;; The integration tests are all problematic to some
1058 ;; degree. They either require network access or some
1059 ;; other setup. We only run the tests in
1060 ;; distributed/tests.
1061 (for-each (lambda (dir)
1062 (delete-file-recursively
1063 (string-append "distributed/" dir "/tests")))
1064 (list "cli" "comm" "dashboard" "deploy" "diagnostics"
1065 "http" "http/scheduler" "http/worker"
1066 "protocol" "shuffle"))
1067 (invoke "python" "-m" "pytest" "-vv" "distributed"
1068 "-m"
1069 (string-append "not slow"
1070 " and not flaky"
1071 " and not gpu"
1072 " and not ipython"
1073 " and not avoid_ci")
1074 "-k"
1075 (string-append
1076 ;; These fail because they require network access,
1077 ;; specifically access to 8.8.8.8.
1078 "not "
1079 (string-join
1080 (list
1081 "TestClientSecurityLoader.test_security_loader"
1082 "test_BatchedSend"
1083 "test_allowed_failures_config"
1084 "test_async_context_manager"
1085 "test_async_with"
1086 "test_client_repr_closed_sync"
1087 "test_close_closed"
1088 "test_close_fast_without_active_handlers"
1089 "test_close_grace_period_for_handlers"
1090 "test_close_loop_sync"
1091 "test_close_properly"
1092 "test_close_twice"
1093 "test_compression"
1094 "test_connection_pool"
1095 "test_connection_pool_close_while_connecting"
1096 "test_connection_pool_detects_remote_close"
1097 "test_connection_pool_outside_cancellation"
1098 "test_connection_pool_remove"
1099 "test_connection_pool_respects_limit"
1100 "test_connection_pool_tls"
1101 "test_counters"
1102 "test_dashboard_host"
1103 "test_dashboard_link_cluster"
1104 "test_dashboard_link_inproc"
1105 "test_deserialize_error"
1106 "test_dont_override_default_get"
1107 "test_errors"
1108 "test_fail_to_pickle_target_2"
1109 "test_file_descriptors_dont_leak"
1110 "test_finished"
1111 "test_get_client_functions_spawn_clusters"
1112 "test_host_uses_scheduler_protocol"
1113 "test_identity_inproc"
1114 "test_identity_tcp"
1115 "test_large_packets_inproc"
1116 "test_locked_comm_drop_in_replacement"
1117 "test_locked_comm_intercept_read"
1118 "test_locked_comm_intercept_write"
1119 "test_multiple_listeners"
1120 "test_no_dangling_asyncio_tasks"
1121 "test_plugin_exception"
1122 "test_plugin_internal_exception"
1123 "test_plugin_multiple_exceptions"
1124 "test_ports"
1125 "test_preload_import_time"
1126 "test_queue_in_task"
1127 "test_quiet_client_close"
1128 "test_rebalance_sync"
1129 "test_repr_localcluster"
1130 "test_require_encryption"
1131 "test_rpc_default"
1132 "test_rpc_inproc"
1133 "test_rpc_message_lifetime_default"
1134 "test_rpc_message_lifetime_inproc"
1135 "test_rpc_message_lifetime_tcp"
1136 "test_rpc_serialization"
1137 "test_rpc_tcp"
1138 "test_rpc_tls"
1139 "test_rpc_with_many_connections_inproc"
1140 "test_rpc_with_many_connections_tcp"
1141 "test_scheduler_file"
1142 "test_security_dict_input_no_security"
1143 "test_security_loader"
1144 "test_security_loader_ignored_if_explicit_security_provided"
1145 "test_security_loader_ignored_if_returns_none"
1146 "test_send_after_stream_start"
1147 "test_send_before_close"
1148 "test_send_before_start"
1149 "test_send_recv_args"
1150 "test_send_recv_cancelled"
1151 "test_sending_traffic_jam"
1152 "test_serializers"
1153 "test_server"
1154 "test_server_comms_mark_active_handlers"
1155 "test_shutdown"
1156 "test_shutdown_localcluster"
1157 "test_teardown_failure_doesnt_crash_scheduler"
1158 "test_threadpoolworkers_pick_correct_ioloop"
1159 "test_tls_listen_connect"
1160 "test_tls_temporary_credentials_functional"
1161 "test_variable_in_task"
1162 "test_worker_preload_text"
1163 "test_worker_uses_same_host_as_nanny")
1164 " and not ")
1165
1166 ;; These fail because it doesn't find dask[distributed]
1167 " and not test_quiet_close_process"
1168
1169 ;; This one fails because of a silly assert failure:
1170 ;; '2022.05.2' == '2022.5.2'
1171 " and not test_version"
1172 " and not test_git_revision"
1173
1174 ;; Recursion stack failure. No idea what they
1175 ;; expected to happen.
1176 " and not test_stack_overflow"
1177
1178 ;; These tests are rather flaky
1179 " and not test_quiet_quit_when_cluster_leaves"
1180 " and not multiple_clients_restart"))))))))
1181 (propagated-inputs
1182 (list python-click
1183 python-cloudpickle
1184 python-cryptography
1185 python-dask
1186 python-msgpack
1187 python-psutil
1188 python-pyyaml
1189 python-setuptools
1190 python-sortedcontainers
1191 python-tblib
1192 python-toolz
1193 python-tornado-6
1194 python-urllib3
1195 python-zict))
1196 (native-inputs
1197 (list python-pytest
1198 python-pytest-timeout
1199 python-flaky
1200 python-versioneer))
1201 (home-page "https://distributed.dask.org")
1202 (synopsis "Distributed scheduler for Dask")
1203 (description "Dask.distributed is a lightweight library for distributed
1204computing in Python. It extends both the @code{concurrent.futures} and
1205@code{dask} APIs to moderate sized clusters.")
1206 (license license:bsd-3)))
1207
1208(define-public python-modin
1209 (package
1210 (name "python-modin")
1211 (version "0.15.1")
1212 (source
1213 (origin
1214 ;; The archive on pypi does not include all required files.
1215 (method git-fetch)
1216 (uri (git-reference
1217 (url "https://github.com/modin-project/modin")
1218 (commit version)))
1219 (file-name (git-file-name name version))
1220 (sha256
1221 (base32
1222 "0nf2pdqna2vn7vq7q7b51f3cfbrxfn77pyif3clibjsxzvfm9k03"))))
1223 (build-system python-build-system)
1224 (arguments
1225 `(#:phases
1226 (modify-phases %standard-phases
1227 (add-after 'unpack 'make-files-writable
1228 (lambda _
1229 (for-each make-file-writable (find-files "."))))
1230 (add-after 'unpack 'loosen-requirements
1231 (lambda _
1232 (substitute* "setup.py"
1233 ;; Don't depend on a specific version of Pandas.
1234 (("pandas==")
1235 "pandas>="))))
1236 (replace 'check
1237 (lambda* (#:key tests? #:allow-other-keys)
1238 (when tests?
1239 (setenv "MODIN_ENGINE" "dask")
1240 (invoke "python" "-m" "pytest"
1241 "modin/pandas/test/test_concat.py")
1242 (setenv "MODIN_ENGINE" "python")
1243 (invoke "python" "-m" "pytest"
1244 "modin/pandas/test/test_concat.py")))))))
1245 (propagated-inputs
1246 (list python-cloudpickle
1247 python-dask
1248 python-distributed
1249 python-numpy
1250 python-packaging
1251 python-pandas))
1252 (native-inputs
1253 (list python-coverage
1254 python-jinja2
1255 python-lxml
1256 python-matplotlib
1257 python-msgpack
1258 python-openpyxl
1259 python-psutil
1260 python-pyarrow
1261 python-pytest
1262 python-pytest-benchmark
1263 python-pytest-cov
1264 python-pytest-xdist
1265 python-scipy
1266 python-sqlalchemy
1267 python-tables
1268 python-tqdm
1269 python-xarray
1270 python-xlrd))
1271 (home-page "https://github.com/modin-project/modin")
1272 (synopsis "Make your pandas code run faster")
1273 (description
1274 "Modin uses Ray or Dask to provide an effortless way to speed up your
1275pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame
1276libraries, Modin provides seamless integration and compatibility with existing
1277pandas code.")
1278 (license license:asl2.0)))
1279
1280(define-public python-numpy-groupies
1281 (package
1282 (name "python-numpy-groupies")
1283 (version "0.9.14")
1284 (source
1285 (origin
1286 (method url-fetch)
1287 (uri (pypi-uri "numpy_groupies" version))
1288 (sha256
1289 (base32 "000qz0z78rs3l6y0dd2vzvd2lx3mczm2762whwsdnhz6c35axdq1"))))
1290 (build-system python-build-system)
1291 (native-inputs
1292 (list python-pytest
1293 python-pytest-runner
1294 python-numba
1295 python-numpy))
1296 (home-page "https://github.com/ml31415/numpy-groupies")
1297 (synopsis "Tools for group-indexing operations: aggregated sum and more")
1298 (description
1299 "This package provides optimized tools for group-indexing operations:
1300aggregated sum and more.")
1301 (license license:bsd-3)))
1302
1303(define-public python-pyvista
1304 (package
1305 (name "python-pyvista")
1306 (version "0.36.1")
1307 (source
1308 ;; The PyPI tarball does not contain the tests.
1309 ;; (However, we don't yet actually run the tests.)
1310 (origin
1311 (method git-fetch)
1312 (uri (git-reference
1313 (url "https://github.com/pyvista/pyvista")
1314 (commit (string-append "v" version))))
1315 (file-name (git-file-name name version))
1316 (sha256
1317 (base32 "1kjilcrz2cyh67n79r8dpxrans99mlviz2whc6g7j8hgn7v14z2n"))))
1318 (build-system python-build-system)
1319 (propagated-inputs
1320 (list python-appdirs
1321 python-imageio
1322 python-matplotlib
1323 python-meshio
1324 python-numpy
1325 python-pillow
1326 python-scooby
1327 vtk))
1328 (arguments
1329 '(#:phases
1330 (modify-phases %standard-phases
1331 ;; Disable tests for now because they require several modules
1332 ;; currently unpackaged in Guix.
1333 (delete 'check)
1334 ;; Disable the sanity check, which fails with the following error:
1335 ;;
1336 ;; ...checking requirements: ERROR: pyvista==0.34.0 DistributionNotFound(Requirement.parse('vtk'), {'pyvista'})
1337 (delete 'sanity-check))))
1338 (home-page "https://docs.pyvista.org/")
1339 (synopsis "3D plotting and mesh analysis through VTK")
1340 (description
1341 "PyVista is...
1342
1343@itemize
1344@item @emph{Pythonic VTK}: a high-level API to the Visualization
1345Toolkit (VTK);
1346@item mesh data structures and filtering methods for spatial datasets;
1347@item 3D plotting made simple and built for large/complex data geometries.
1348@end itemize
1349
1350This package provides a Pythonic, well-documented interface exposing VTK's
1351powerful visualization backend to facilitate rapid prototyping, analysis, and
1352visual integration of spatially referenced datasets.")
1353 (license license:expat)))
1354
1355(define-public python-simplespectral
1356 (package
1357 (name "python-simplespectral")
1358 (version "1.0.0")
1359 (source
1360 (origin
1361 (method url-fetch)
1362 (uri (pypi-uri "SimpleSpectral" version))
1363 (sha256
1364 (base32 "0qh3xwdv9cwcqdamvglrhm586p4yaq1hd291py1fvykhk2a2d4w6"))))
1365 (build-system python-build-system)
1366 (propagated-inputs
1367 (list python-numpy python-scipy))
1368 (home-page "https://github.com/xmikos/simplespectral")
1369 (synopsis "FFT module for Python")
1370 (description
1371 "This package provides a simplified @code{scipy.signal.spectral} module
1372to do spectral analysis in Python.")
1373 (license license:expat)))
1374
1375(define-public python-traittypes
1376 (package
1377 (name "python-traittypes")
1378 (version "0.2.1")
1379 (source
1380 (origin
1381 (method url-fetch)
1382 (uri (pypi-uri "traittypes" version))
1383 (sha256
1384 (base32 "1mlv93irdrgxrhnhq3ksi9585d55bpi4mv9dha4p8gkkjiia4vxy"))))
1385 (build-system python-build-system)
1386 (arguments
1387 '(#:phases
1388 (modify-phases %standard-phases
1389 (replace 'check
1390 (lambda* (#:key tests? #:allow-other-keys)
1391 (when tests?
1392 ;; This one test fails because it doesn't raise an expected
1393 ;; exception.
1394 (invoke "pytest" "-vv" "-k" "not test_bad_values")))))))
1395 (propagated-inputs (list python-traitlets))
1396 (native-inputs
1397 (list python-numpy
1398 python-pandas
1399 python-nose
1400 python-pytest
1401 python-xarray))
1402 (home-page "https://github.com/jupyter-widgets/traittypes")
1403 (synopsis "Trait types for NumPy, SciPy and friends")
1404 (description "The goal of this package is to provide a reference
1405implementation of trait types for common data structures used in the scipy
1406stack such as numpy arrays or pandas and xarray data structures. These are
1407out of the scope of the main traitlets project but are a common requirement to
1408build applications with traitlets in combination with the scipy stack.")
1409 (license license:bsd-3)))
1410
1411(define-public python-aplus
1412 (package
1413 (name "python-aplus")
1414 (version "0.11.0")
1415 (source
1416 (origin
1417 (method url-fetch)
1418 (uri (pypi-uri "aplus" version))
1419 (sha256
1420 (base32 "1rznc26nlp641rn8gpdngfp79a3fji38yavqakxi35mx2da04msg"))))
1421 (build-system python-build-system)
1422 (home-page "https://github.com/xogeny/aplus")
1423 (synopsis "Promises/A+ for Python")
1424 (description "This package is an implementation of the Promises/A+
1425specification and test suite in Python.")
1426 (license license:expat)))
1427
1428(define-public python-climin
1429 (package
1430 (name "python-climin")
1431 (version "0.1a1")
1432 (source (origin
1433 (method url-fetch)
1434 (uri (pypi-uri "climin" version))
1435 (sha256
1436 (base32
1437 "1wpjisd5zzi5yvjff02hnxn84822k8sdxvvd33lil2x79wdb36rv"))))
1438 (build-system python-build-system)
1439 (native-inputs (list python-nose))
1440 (propagated-inputs (list python-numpydoc python-numpy python-scipy))
1441 (home-page "https://github.com/BRML/climin")
1442 (synopsis "Optimization for machine learning")
1443 (description
1444 "@command{climin} is a Python package for optimization,
1445heavily biased to machine learning scenarios. It works on top of
1446@command{numpy} and (partially) @command{gnumpy}.")
1447 (license license:bsd-3)))
1448
1449(define-public python-paramz
1450 (package
1451 (name "python-paramz")
1452 (version "0.9.5")
1453 (source (origin
1454 (method url-fetch)
1455 (uri (pypi-uri "paramz" version))
1456 (sha256
1457 (base32
1458 "16hbh97kj6b1c2gw22rqnr3w3nqkszh9gj8vgx738gq81wf225q9"))))
1459 (build-system python-build-system)
1460 (propagated-inputs (list python-decorator python-numpy python-scipy
1461 python-six))
1462 (home-page "https://github.com/sods/paramz")
1463 (synopsis "The Parameterization Framework")
1464 (description
1465 "@command{paramz} is a lightweight parameterization framework
1466for parameterized model creation and handling. Its features include:
1467
1468@itemize
1469 @item Easy model creation with parameters.
1470 @item Fast optimized access of parameters for optimization routines.
1471 @item Memory efficient storage of parameters (only one copy in memory).
1472 @item Renaming of parameters.
1473 @item Intuitive printing of models and parameters.
1474 @item Gradient saving directly inside parameters.
1475 @item Gradient checking of parameters.
1476 @item Optimization of parameters.
1477 @item Jupyter notebook integration.
1478 @item Efficient storage of models, for reloading.
1479 @item Efficient caching.
1480@end itemize")
1481 (license license:bsd-3)))
1482
1483(define-public python-gpy
1484 (package
1485 (name "python-gpy")
1486 (version "1.10.0")
1487 (source (origin
1488 (method url-fetch)
1489 (uri (pypi-uri "GPy" version))
1490 (sha256
1491 (base32
1492 "1yx65ajrmqp02ykclhlb0n8s3bx5r0xj075swwwigiqaippr7dx2"))))
1493 (build-system python-build-system)
1494 (arguments
1495 `(#:phases (modify-phases %standard-phases
1496 (add-before 'check 'remove-plotting-tests
1497 ;; These fail
1498 (lambda _
1499 (delete-file "GPy/testing/plotting_tests.py"))))))
1500 (native-inputs (list python-cython python-nose python-climin))
1501 (propagated-inputs (list python-numpy python-paramz python-scipy
1502 python-six))
1503 (home-page "https://sheffieldml.github.io/GPy/")
1504 (synopsis "The Gaussian Process Toolbox")
1505 (description
1506 "@command{GPy} is a Gaussian Process (GP) framework written in
1507Python, from the Sheffield machine learning group. GPy implements a range of
1508machine learning algorithms based on GPs.")
1509 (license license:bsd-3)))
1510
1511(define-public python-deepdish
1512 (package
1513 (name "python-deepdish")
1514 (version "0.3.7")
1515 (source (origin
1516 (method url-fetch)
1517 (uri (pypi-uri "deepdish" version))
1518 (sha256
1519 (base32
1520 "1wqzwh3y0mjdyba5kfbvlamn561d3afz50zi712c7klkysz3mzva"))))
1521 (arguments
1522 (list #:phases #~(modify-phases %standard-phases
1523 (add-after 'unpack 'dont-vendor-six
1524 (lambda _
1525 (delete-file "deepdish/six.py")
1526 (substitute* "deepdish/io/hdf5io.py"
1527 (("from deepdish import six") "import six"))
1528 (substitute* "deepdish/io/ls.py"
1529 (("from deepdish import io, six, __version__")
1530 "from deepdish import io, __version__
1531import six
1532")))))))
1533 (build-system python-build-system)
1534 (native-inputs (list python-pandas))
1535 (propagated-inputs (list python-numpy python-scipy python-six
1536 python-tables))
1537 (home-page "https://github.com/uchicago-cs/deepdish")
1538 (synopsis "Python library for HDF5 file saving and loading")
1539 (description
1540 "Deepdish is a Python library to load and save HDF5 files.
1541The primary feature of deepdish is its ability to save and load all kinds of
1542data as HDF5. It can save any Python data structure, offering the same ease
1543of use as pickling or @code{numpy.save}, but with the language
1544interoperability offered by HDF5.")
1545 (license license:bsd-3)))
1546
1547(define-public python-simple-pid
1548 (package
1549 (name "python-simple-pid")
1550 (version "1.0.1")
1551 (source (origin
1552 (method url-fetch)
1553 (uri (pypi-uri "simple-pid" version))
1554 (sha256
1555 (base32
1556 "094mz6rmfq1h0gpns5vlxb7xf9297hlkhndw7g9k95ziqfkv7mk0"))))
1557 (build-system python-build-system)
1558 (arguments
1559 '(#:phases
1560 (modify-phases %standard-phases
1561 (replace 'check
1562 (lambda* (#:key tests? #:allow-other-keys)
1563 (when tests?
1564 (invoke "python" "-m" "unittest" "discover" "tests/")))))))
1565 (home-page "https://github.com/m-lundberg/simple-pid")
1566 (synopsis "Easy to use PID controller")
1567 (description "This package provides a simple and easy-to-use @acronym{PID,
1568proportional-integral-derivative} controller.")
1569 (license license:expat)))
1570
1571(define-public python-opt-einsum
1572 (package
1573 (name "python-opt-einsum")
1574 (version "3.3.0")
1575 (source (origin
1576 (method url-fetch)
1577 (uri (pypi-uri "opt_einsum" version))
1578 (sha256
1579 (base32
1580 "0jb5lia0q742d1713jk33vlj41y61sf52j6pgk7pvhxvfxglgxjr"))))
1581 (build-system python-build-system)
1582 (arguments
1583 '(#:phases
1584 (modify-phases %standard-phases
1585 (replace 'check
1586 (lambda* (#:key tests? #:allow-other-keys)
1587 (when tests?
1588 (invoke "pytest" "-vv")))))))
1589 (propagated-inputs (list python-numpy))
1590 (native-inputs (list python-pytest python-pytest-cov python-pytest-pep8))
1591 (home-page "https://github.com/dgasmith/opt_einsum")
1592 (synopsis "Optimizing numpys einsum function")
1593 (description
1594 "Optimized einsum can significantly reduce the overall execution time of
1595einsum-like expressions by optimizing the expression's contraction order and
1596dispatching many operations to canonical BLAS, cuBLAS, or other specialized
1597routines. Optimized einsum is agnostic to the backend and can handle NumPy,
1598Dask, PyTorch, Tensorflow, CuPy, Sparse, Theano, JAX, and Autograd arrays as
1599well as potentially any library which conforms to a standard API. See the
1600documentation for more information.")
1601 (license license:expat)))
1602
1603(define-public python-vaex-core
1604 (package
1605 (name "python-vaex-core")
1606 (version "4.13.0")
1607 (source
1608 (origin
1609 (method url-fetch)
1610 (uri (pypi-uri "vaex-core" version))
1611 (sha256
1612 (base32 "0ni862x5njhfsldjy49xmasd34plrs7yrmkyss6z1b6sgkbw9fsb"))
1613 (modules '((guix build utils)))
1614 (snippet
1615 ;; Remove bundled libraries
1616 '(for-each delete-file-recursively
1617 (list "vendor/boost"
1618 "vendor/pcre"
1619 "vendor/pybind11")))))
1620 (build-system python-build-system)
1621 (arguments
1622 `(#:tests? #false ;require vaex.server and others, which require vaex-core.
1623 #:phases
1624 (modify-phases %standard-phases
1625 (replace 'check
1626 (lambda* (#:key tests? #:allow-other-keys)
1627 (when tests?
1628 (invoke "pytest" "-vv" )))))))
1629 (inputs
1630 (list boost pcre pybind11-2.3))
1631 (propagated-inputs
1632 (list python-aplus
1633 python-blake3
1634 python-cloudpickle
1635 python-dask
1636 python-filelock
1637 python-frozendict
1638 python-future
1639 python-nest-asyncio
1640 python-numpy
1641 python-pandas
1642 python-progressbar2
1643 python-pyarrow
1644 python-pydantic
1645 python-pyyaml
1646 python-requests
1647 python-rich
1648 python-six
1649 python-tabulate))
1650 (native-inputs
1651 (list python-pytest python-cython))
1652 (home-page "https://www.github.com/maartenbreddels/vaex")
1653 (synopsis "Core of Vaex library for exploring tabular datasets")
1654 (description "Vaex is a high performance Python library for lazy
1655Out-of-Core DataFrames (similar to Pandas), to visualize and explore big
1656tabular datasets. This package provides the core modules of Vaex.")
1657 (license license:expat)))
1658
1659;;;
1660;;; Avoid adding new packages to the end of this file. To reduce the chances
1661;;; of a merge conflict, place them above by existing packages with similar
1662;;; functionality or similar names.
1663;;;