gnu: tarlz: Update to 0.21.
[jackhill/guix/guix.git] / gnu / packages / python-science.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2015, 2016, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch>
4 ;;; Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
5 ;;; Copyright © 2016 Hartmut Goebel <h.goebel@crazy-compilers.com>
6 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
7 ;;; Copyright © 2016, 2017, 2018, 2019, 2020 Marius Bakke <mbakke@fastmail.com>
8 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
9 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
10 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
11 ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
12 ;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
13 ;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
14 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
15 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
16 ;;;
17 ;;; This file is part of GNU Guix.
18 ;;;
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
23 ;;;
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
28 ;;;
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
31
32 (define-module (gnu packages python-science)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (gnu packages)
35 #:use-module (gnu packages base)
36 #:use-module (gnu packages check)
37 #:use-module (gnu packages gcc)
38 #:use-module (gnu packages image-processing)
39 #:use-module (gnu packages maths)
40 #:use-module (gnu packages mpi)
41 #:use-module (gnu packages perl)
42 #:use-module (gnu packages pkg-config)
43 #:use-module (gnu packages python)
44 #:use-module (gnu packages python-build)
45 #:use-module (gnu packages python-check)
46 #:use-module (gnu packages python-web)
47 #:use-module (gnu packages python-xyz)
48 #:use-module (gnu packages simulation)
49 #:use-module (gnu packages sphinx)
50 #:use-module (gnu packages time)
51 #:use-module (gnu packages xdisorg)
52 #:use-module (gnu packages xml)
53 #:use-module (gnu packages xorg)
54 #:use-module (guix packages)
55 #:use-module (guix download)
56 #:use-module (guix git-download)
57 #:use-module (guix utils)
58 #:use-module (guix build-system python))
59
60 (define-public python-scipy
61 (package
62 (name "python-scipy")
63 (version "1.6.0")
64 (source
65 (origin
66 (method url-fetch)
67 (uri (pypi-uri "scipy" version))
68 (sha256
69 (base32 "0rh5b1rwdcvvagld8vpxnpaibszy1skpx39a0fwzd5gx5pwcjvfb"))))
70 (build-system python-build-system)
71 (propagated-inputs
72 `(("python-numpy" ,python-numpy)
73 ("python-matplotlib" ,python-matplotlib)
74 ("python-pyparsing" ,python-pyparsing)))
75 (inputs
76 `(("openblas" ,openblas)
77 ("pybind11" ,pybind11)))
78 (native-inputs
79 `(("python-cython" ,python-cython)
80 ("python-pytest" ,python-pytest)
81 ("python-sphinx" ,python-sphinx)
82 ("python-numpydoc" ,python-numpydoc)
83 ("gfortran" ,gfortran)
84 ("perl" ,perl)
85 ("which" ,which)))
86 (outputs '("out" "doc"))
87 (arguments
88 `(#:phases
89 (modify-phases %standard-phases
90 (add-before 'build 'change-home-dir
91 (lambda _
92 ;; Change from /homeless-shelter to /tmp for write permission.
93 (setenv "HOME" "/tmp")
94 #t))
95 (add-after 'unpack 'disable-broken-tests
96 (lambda _
97 (substitute* "scipy/sparse/linalg/dsolve/tests/test_linsolve.py"
98 (("^( +)def test_threads_parallel\\(self\\):" m indent)
99 (string-append indent
100 "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
101 m)))
102 (substitute* "scipy/sparse/linalg/eigen/arpack/tests/test_arpack.py"
103 (("^def test_parallel_threads\\(\\):" m)
104 (string-append "@pytest.mark.skip(reason=\"Disabled by Guix\")\n"
105 m)))
106 #t))
107 (add-before 'build 'configure-openblas
108 (lambda* (#:key inputs #:allow-other-keys)
109 (call-with-output-file "site.cfg"
110 (lambda (port)
111 (format port
112 "[blas]
113 libraries = openblas
114 library_dirs = ~a/lib
115 include_dirs = ~a/include
116
117 # backslash-n to make emacs happy
118 \n[atlas]
119 library_dirs = ~a/lib
120 atlas_libs = openblas
121 "
122 (assoc-ref inputs "openblas")
123 (assoc-ref inputs "openblas")
124 (assoc-ref inputs "openblas"))))
125 #t))
126 (add-after 'install 'install-doc
127 (lambda* (#:key inputs outputs #:allow-other-keys)
128 (let* ((data (string-append (assoc-ref outputs "doc") "/share"))
129 (doc (string-append data "/doc/" ,name "-" ,version))
130 (html (string-append doc "/html"))
131 (pyver ,(string-append "PYVER=" (version-major+minor
132 (package-version python))))
133 ;; By default it tries to run sphinx-build through the Python
134 ;; interpreter which won't work with our shell wrapper.
135 (sphinxbuild "SPHINXBUILD=LANG=C sphinx-build"))
136 ;; Make installed package available for building the
137 ;; documentation
138 (add-installed-pythonpath inputs outputs)
139 (with-directory-excursion "doc"
140 ;; Fix generation of images for mathematical expressions.
141 (substitute* (find-files "source" "conf\\.py")
142 (("pngmath_use_preview = True")
143 "pngmath_use_preview = False"))
144 (mkdir-p html)
145 (invoke "make" "html" pyver sphinxbuild)
146 (with-directory-excursion "build/html"
147 (for-each (lambda (file)
148 (let* ((dir (dirname file))
149 (tgt-dir (string-append html "/" dir)))
150 (install-file file html)))
151 (find-files "." ".*")))))
152 #t))
153 ;; Tests can only be run after the library has been installed and not
154 ;; within the source directory.
155 (delete 'check)
156 (add-after 'install 'check
157 (lambda* (#:key inputs outputs #:allow-other-keys)
158 (add-installed-pythonpath inputs outputs)
159 (with-directory-excursion "/tmp"
160 (invoke "python" "-c"
161 "import scipy; scipy.test(verbose=2)")))))))
162 (home-page "https://www.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
165 the SciPy stack. It provides many user-friendly and efficient numerical
166 routines such as routines for numerical integration and optimization.")
167 (properties `((python2-variant . ,(delay python2-scipy))))
168 (license license:bsd-3)))
169
170 ;; Version 1.2.2 is the last version to support Python 2
171 (define-public python2-scipy
172 (package
173 (inherit (package-with-python2
174 (strip-python2-variant python-scipy)))
175 (version "1.2.2")
176 (source
177 (origin
178 (method url-fetch)
179 (uri (pypi-uri "scipy" version))
180 (sha256
181 (base32
182 "1cgvgin8fvckv96hjh3ikmwkra5rif51bdb75ifzf7xbil5iwcx4"))))))
183
184 (define-public python2-weave
185 (package
186 (name "python2-weave")
187 (version "0.16.0")
188 (source
189 (origin
190 (method url-fetch)
191 (uri (pypi-uri "weave" version))
192 (sha256
193 (base32 "0jnm3584mfichgwgrd1gk5i42ll9c08nkw9716n947n4338f6ghs"))))
194 (build-system python-build-system)
195 (arguments
196 `(#:python ,python-2
197 #:phases
198 (modify-phases %standard-phases
199 (replace 'check
200 (lambda _
201 (invoke "nosetests" "-v"
202 "--exclude"
203 "test_(user|incorrect_ownership|char_fail|obj_fail)"))))))
204 (propagated-inputs
205 `(("python-numpy" ,python2-numpy)))
206 (native-inputs
207 `(("python-nose" ,python2-nose)))
208 (home-page "https://www.scipy.org/")
209 (synopsis "Tools for including C/C++ code within Python code")
210 (description "Weave is the stand-alone version of the obsolete Scipy
211 submodule @code{scipy.weave}. It is Python 2.x only, and is provided for
212 users that need new versions of Scipy but have existing code that still
213 depends on @code{scipy.weave}. For new code, users are recommended to use
214 Cython.")
215 (license license:bsd-3)))
216
217 (define-public python-scikit-fuzzy
218 (package
219 (name "python-scikit-fuzzy")
220 (version "0.4.2")
221 (source
222 (origin
223 (method url-fetch)
224 (uri (pypi-uri "scikit-fuzzy" version))
225 (sha256
226 (base32 "0bp1n771fj44kdp7a00bcvfwirvv2rc803b7g6yf3va7v0j29c8s"))))
227 (build-system python-build-system)
228 (arguments
229 `(#:phases
230 (modify-phases %standard-phases
231 (replace 'check
232 (lambda _
233 (invoke "nosetests" "-s" "-v" "skfuzzy")
234 #t)))))
235 (native-inputs
236 `(("python-nose" ,python-nose)))
237 (propagated-inputs
238 `(("python-networkx" ,python-networkx)
239 ("python-numpy" ,python-numpy)
240 ("python-scipy" ,python-scipy)))
241 (home-page "https://github.com/scikit-fuzzy/scikit-fuzzy")
242 (synopsis "Fuzzy logic toolkit for SciPy")
243 (description
244 "This package implements many useful tools for projects involving fuzzy
245 logic, also known as grey logic.")
246 (license license:bsd-3)))
247
248 (define-public python-scikit-image
249 (package
250 (name "python-scikit-image")
251 (version "0.18.1")
252 (source
253 (origin
254 (method url-fetch)
255 (uri (pypi-uri "scikit-image" version))
256 (sha256
257 (base32 "0wgisa03smhrphcjnhq7waa5vyyd32b67hblapjbqrqqj751idpv"))))
258 (build-system python-build-system)
259 (arguments
260 `(#:phases
261 (modify-phases %standard-phases
262 (add-before 'build 'change-home-dir
263 (lambda _
264 ;; Change from /homeless-shelter to /tmp for write permission.
265 (setenv "HOME" "/tmp")
266 #t))
267 (replace 'build
268 (lambda _
269 (invoke "make")))
270 (replace 'check
271 (lambda _
272 ;; The following tests require online data.
273 (invoke "python" "-m" "pytest" "skimage" "--doctest-modules" "-k"
274 (string-append "not test_ndim"
275 " and not test_skin")))))))
276 ;; See requirements/ for the list of build and run time requirements.
277 ;; NOTE: scikit-image has an optional dependency on python-pooch, however
278 ;; propagating it would enable many more tests that require online data.
279 (propagated-inputs
280 `(("python-cloudpickle" ,python-cloudpickle)
281 ("python-dask" ,python-dask)
282 ("python-imageio" ,python-imageio)
283 ("python-matplotlib" ,python-matplotlib)
284 ("python-networkx" ,python-networkx)
285 ("python-numpy" ,python-numpy)
286 ("python-pillow" ,python-pillow)
287 ("python-pywavelets" ,python-pywavelets)
288 ("python-scipy" ,python-scipy)
289 ("python-tifffile" ,python-tifffile)))
290 (native-inputs
291 `(("python-codecov" ,python-codecov)
292 ("python-cython" ,python-cython)
293 ("python-flake8" ,python-flake8)
294 ("python-pytest" ,python-pytest)
295 ("python-pytest-cov" ,python-pytest-cov)
296 ("python-pytest-localserver" ,python-pytest-localserver)
297 ("python-wheel" ,python-wheel)))
298 (home-page "https://scikit-image.org/")
299 (synopsis "Image processing in Python")
300 (description
301 "Scikit-image is a collection of algorithms for image processing.")
302 (license license:bsd-3)))
303
304 (define-public python-sgp4
305 (package
306 (name "python-sgp4")
307 (version "2.12")
308 (source
309 (origin
310 (method url-fetch)
311 (uri (pypi-uri "sgp4" version))
312 (sha256
313 (base32 "0dncp9i5b6afkg7f8mj9j0qzsp008b8v73yc0qkmizhpns7mvwvx"))))
314 (build-system python-build-system)
315 (propagated-inputs
316 `(("python-numpy" ,python-numpy)))
317 (home-page "https://github.com/brandon-rhodes/python-sgp4")
318 (synopsis "Track earth satellite TLE orbits using SGP4")
319 (description
320 "This package provides a Python implementation of the most recent version
321 of the SGP4 satellite tracking algorithm.")
322 (license license:expat)))
323
324 (define-public python-pandas
325 (package
326 (name "python-pandas")
327 (version "1.0.5")
328 (source
329 (origin
330 (method url-fetch)
331 (uri (pypi-uri "pandas" version))
332 (sha256
333 (base32 "1a2gv3g6jr6vb5ca43fkwjl5xf86wpfz8y3zcy787adjl0hdkib9"))))
334 (build-system python-build-system)
335 (arguments
336 `(#:modules ((guix build utils)
337 (guix build python-build-system)
338 (ice-9 ftw)
339 (srfi srfi-26))
340 #:phases (modify-phases %standard-phases
341 (add-after 'unpack 'patch-which
342 (lambda* (#:key inputs #:allow-other-keys)
343 (let ((which (assoc-ref inputs "which")))
344 (substitute* "pandas/io/clipboard/__init__.py"
345 (("^WHICH_CMD = .*")
346 (string-append "WHICH_CMD = \"" which "\"\n"))))
347 #t))
348 (add-before 'check 'prepare-x
349 (lambda _
350 (system "Xvfb &")
351 (setenv "DISPLAY" ":0")
352 ;; xsel needs to write a log file.
353 (setenv "HOME" "/tmp")
354 #t))
355 (replace 'check
356 (lambda _
357 (let ((build-directory
358 (string-append
359 (getcwd) "/build/"
360 (car (scandir "build"
361 (cut string-prefix? "lib." <>))))))
362 ;; Disable the "strict data files" option which causes
363 ;; the build to error out if required data files are
364 ;; not available (as is the case with PyPI archives).
365 (substitute* "setup.cfg"
366 (("addopts = --strict-data-files") "addopts = "))
367 (with-directory-excursion build-directory
368 (invoke "pytest" "-vv" "pandas" "--skip-slow"
369 "--skip-network"))))))))
370 (propagated-inputs
371 `(("python-jinja2" ,python-jinja2)
372 ("python-numpy" ,python-numpy)
373 ("python-openpyxl" ,python-openpyxl)
374 ("python-pytz" ,python-pytz)
375 ("python-dateutil" ,python-dateutil)
376 ("python-xlrd" ,python-xlrd)))
377 (inputs
378 `(("which" ,which)
379 ("xclip" ,xclip)
380 ("xsel" ,xsel)))
381 (native-inputs
382 `(("python-cython" ,python-cython)
383 ("python-beautifulsoup4" ,python-beautifulsoup4)
384 ("python-lxml" ,python-lxml)
385 ("python-html5lib" ,python-html5lib)
386 ("python-nose" ,python-nose)
387 ("python-pytest" ,python-pytest)
388 ("python-pytest-mock" ,python-pytest-mock)
389 ;; Needed to test clipboard support.
390 ("xorg-server" ,xorg-server-for-tests)))
391 (home-page "https://pandas.pydata.org")
392 (synopsis "Data structures for data analysis, time series, and statistics")
393 (description
394 "Pandas is a Python package providing fast, flexible, and expressive data
395 structures designed to make working with structured (tabular,
396 multidimensional, potentially heterogeneous) and time series data both easy
397 and intuitive. It aims to be the fundamental high-level building block for
398 doing practical, real world data analysis in Python.")
399 (properties `((python2-variant . ,(delay python2-pandas))))
400 (license license:bsd-3)))
401
402 (define-public python-pandas-0.25
403 (package
404 (inherit python-pandas)
405 (version "0.25.3")
406 (source (origin
407 (method url-fetch)
408 (uri (pypi-uri "pandas" version))
409 (sha256
410 (base32
411 "191048m6kdc6yfvqs9w412lq60cfvigrsb57y0x116lwibgp9njj"))))
412 (arguments
413 (substitute-keyword-arguments (package-arguments python-pandas)
414 ((#:phases phases)
415 `(modify-phases ,phases
416 (replace 'patch-which
417 (lambda* (#:key inputs #:allow-other-keys)
418 (let ((which (assoc-ref inputs "which")))
419 (substitute* "pandas/io/clipboard/__init__.py"
420 (("^CHECK_CMD = .*")
421 (string-append "CHECK_CMD = \"" which "\"\n"))))
422 #t))
423 (delete 'prepare-x)))))))
424
425 ;; Pandas 0.24.x are the last versions that support Python 2.
426 (define-public python2-pandas
427 (let ((pandas (package-with-python2
428 (strip-python2-variant python-pandas-0.25))))
429 (package
430 (inherit pandas)
431 (version "0.24.2")
432 (source (origin
433 (method url-fetch)
434 (uri (pypi-uri "pandas" version))
435 (sha256
436 (base32
437 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))
438 (modules '((guix build utils)))
439 (snippet
440 '(begin
441 ;; Adjust for renamed error message in Python 2.7.17. Taken
442 ;; from <https://github.com/pandas-dev/pandas/pull/29294>.
443 (substitute* "pandas/io/parsers.py"
444 (("if 'NULL byte' in msg:")
445 "if 'NULL byte' in msg or 'line contains NUL' in msg:"))
446 #t)))))))
447
448 (define-public python-pyflow
449 (package
450 (name "python-pyflow")
451 (version "1.1.20")
452 (source (origin
453 (method url-fetch)
454 (uri (string-append
455 "https://github.com/Illumina/pyflow/releases/download/v"
456 version "/pyflow-" version ".tar.gz"))
457 (sha256
458 (base32
459 "1bvfvviw58cndyn862qnv9nj3d9cd3a0dm4vc4sd9vwq8a6z1riv"))))
460 (build-system python-build-system)
461 (arguments
462 `(#:tests? #f)) ; There is no test suite.
463 (home-page "https://illumina.github.io/pyflow/")
464 (synopsis "Tool to manage tasks in a task dependency graph")
465 (description "This package is a Python module to manage tasks in the
466 context of a task dependency graph. It has some similarities to make.")
467 (license license:bsd-2)))
468
469 (define-public python-bottleneck
470 (package
471 (name "python-bottleneck")
472 (version "1.3.2")
473 (source
474 (origin
475 (method url-fetch)
476 (uri (pypi-uri "Bottleneck" version))
477 (sha256
478 (base32 "0wz5320jx3n4q2nsvwvc7cpi66b46qbals9v53m955rmcq5ry5r0"))))
479 (build-system python-build-system)
480 (arguments
481 `(#:phases
482 (modify-phases %standard-phases
483 (replace 'check
484 (lambda _
485 (invoke "python" "setup.py" "pytest"))))))
486 (native-inputs
487 `(("python-hypothesis" ,python-hypothesis)
488 ("python-pytest" ,python-pytest)
489 ("python-pytest-runner" ,python-pytest-runner)))
490 (propagated-inputs
491 `(("python-numpy" ,python-numpy)))
492 (home-page "https://github.com/pydata/bottleneck")
493 (synopsis "Fast NumPy array functions written in C")
494 (description
495 "Bottleneck is a collection of fast, NaN-aware NumPy array functions
496 written in C.")
497 (license license:bsd-2)))
498
499 (define-public python-baycomp
500 (package
501 (name "python-baycomp")
502 (version "1.0.2")
503 (source
504 (origin
505 (method url-fetch)
506 (uri (pypi-uri "baycomp" version))
507 (sha256
508 (base32 "1c1354a7b3g8slychjgyjxqdm8z40z9kviyl9n4g9kfpdg0p4d64"))))
509 (build-system python-build-system)
510 (propagated-inputs
511 `(("python-matplotlib" ,python-matplotlib)
512 ("python-numpy" ,python-numpy)
513 ("python-scipy" ,python-scipy)))
514 (home-page "https://github.com/janezd/baycomp")
515 (synopsis "Library for comparison of Bayesian classifiers")
516 (description
517 "Baycomp is a library for Bayesian comparison of classifiers. Functions
518 in the library compare two classifiers on one or on multiple data sets. They
519 compute three probabilities: the probability that the first classifier has
520 higher scores than the second, the probability that differences are within the
521 region of practical equivalence (rope), or that the second classifier has
522 higher scores.")
523 (license license:expat)))
524
525 (define-public python-xarray
526 (package
527 (name "python-xarray")
528 (version "0.15.1")
529 (source (origin
530 (method url-fetch)
531 (uri (pypi-uri "xarray" version))
532 (sha256
533 (base32
534 "1yx8j66b7rn10m2l6gmn8yr9cn38pi5cj0x0wwpy4hdnhy6i7qv4"))))
535 (build-system python-build-system)
536 (native-inputs
537 `(("python-setuptools-scm" ,python-setuptools-scm)
538 ("python-pytest" ,python-pytest)))
539 (propagated-inputs
540 `(("python-numpy" ,python-numpy)
541 ("python-pandas" ,python-pandas)))
542 (arguments
543 `(#:phases
544 (modify-phases %standard-phases
545 (replace 'check
546 (lambda _
547 (invoke "pytest"))))))
548 (home-page "https://github.com/pydata/xarray")
549 (synopsis "N-D labeled arrays and datasets")
550 (description "Xarray (formerly xray) makes working with labelled
551 multi-dimensional arrays simple, efficient, and fun!
552
553 Xarray introduces labels in the form of dimensions, coordinates and attributes
554 on top of raw NumPy-like arrays, which allows for a more intuitive, more
555 concise, and less error-prone developer experience. The package includes a
556 large and growing library of domain-agnostic functions for advanced analytics
557 and visualization with these data structures.")
558 (license license:asl2.0)))
559
560 (define-public python-msgpack-numpy
561 (package
562 (name "python-msgpack-numpy")
563 (version "0.4.6.post0")
564 (source
565 (origin
566 (method url-fetch)
567 (uri (pypi-uri "msgpack-numpy" version))
568 (sha256
569 (base32
570 "0syzy645mwcy7lfjwz6pc8f9p2vv1qk4limc8iina3l5nnf0rjyz"))))
571 (build-system python-build-system)
572 (propagated-inputs
573 `(("python-msgpack" ,python-msgpack)
574 ("python-numpy" ,python-numpy)))
575 (home-page "https://github.com/lebedov/msgpack-numpy")
576 (synopsis
577 "Numpy data serialization using msgpack")
578 (description
579 "This package provides encoding and decoding routines that enable the
580 serialization and deserialization of numerical and array data types provided
581 by numpy using the highly efficient @code{msgpack} format. Serialization of
582 Python's native complex data types is also supported.")
583 (license license:bsd-3)))
584
585 (define-public python-ruffus
586 (package
587 (name "python-ruffus")
588 (version "2.8.4")
589 (source
590 (origin
591 (method url-fetch)
592 (uri (pypi-uri "ruffus" version))
593 (sha256
594 (base32
595 "1ai673k1s94s8b6pyxai8mk17p6zvvyi87rl236fs6ls8mpdklvc"))))
596 (build-system python-build-system)
597 (arguments
598 `(#:phases
599 (modify-phases %standard-phases
600 (delete 'check)
601 (add-after 'install 'check
602 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
603 (when tests?
604 (add-installed-pythonpath inputs outputs)
605 (with-directory-excursion "ruffus/test"
606 (invoke "bash" "run_all_unit_tests3.cmd"))))))))
607 (native-inputs
608 `(("python-pytest" ,python-pytest)))
609 (home-page "http://www.ruffus.org.uk")
610 (synopsis "Light-weight computational pipeline management")
611 (description
612 "Ruffus is designed to allow scientific and other analyses to be
613 automated with the minimum of fuss and the least effort.")
614 (license license:expat)))
615
616 (define-public python-statannot
617 (package
618 (name "python-statannot")
619 (version "0.2.3")
620 (source
621 (origin
622 (method url-fetch)
623 (uri (pypi-uri "statannot" version))
624 (sha256
625 (base32
626 "1f8c2sylzr7lpjbyqxsqlp9xi8rj3d8c9hfh98x4jbb83zxc4026"))))
627 (build-system python-build-system)
628 (propagated-inputs
629 `(("python-numpy" ,python-numpy)
630 ("python-seaborn" ,python-seaborn)
631 ("python-matplotlib" ,python-matplotlib)
632 ("python-pandas" ,python-pandas)
633 ("python-scipy" ,python-scipy)))
634 (home-page
635 "https://github.com/webermarcolivier/statannot")
636 (synopsis "Add annotations to existing plots generated by seaborn")
637 (description
638 "This is a Python package to compute statistical test and add statistical
639 annotations on an existing boxplots and barplots generated by seaborn.")
640 (license license:expat)))
641
642 (define-public python-upsetplot
643 (package
644 (name "python-upsetplot")
645 (version "0.4.1")
646 (source
647 (origin
648 (method url-fetch)
649 (uri (pypi-uri "UpSetPlot" version))
650 (sha256
651 (base32
652 "0kwljcmsvrxm33y3ssham2bwv4a5m31mv96y9h18va0cv7s3mqn1"))))
653 (build-system python-build-system)
654 (arguments
655 `(#:phases
656 (modify-phases %standard-phases
657 (add-after 'unpack 'fix-versioning
658 (lambda _
659 (substitute* "setup.py"
660 (("pytest-cov<2.6") "pytest-cov"))))
661 (replace 'check
662 (lambda* (#:key inputs outputs #:allow-other-keys)
663 (add-installed-pythonpath inputs outputs)
664 (invoke "pytest" "-v" "--doctest-modules"))))))
665 (propagated-inputs
666 `(("python-matplotlib" ,python-matplotlib)
667 ("python-pandas" ,python-pandas)))
668 (native-inputs
669 `(("python-pytest-runner" ,python-pytest-runner)
670 ("python-pytest-cov" ,python-pytest-cov)))
671 (home-page "https://upsetplot.readthedocs.io")
672 (synopsis "Draw UpSet plots with Pandas and Matplotlib")
673 (description
674 "This is a Python implementation of UpSet plots by Lex et al.
675 UpSet plots are used to visualize set overlaps; like Venn diagrams but more
676 readable.")
677 (license license:bsd-3)))
678
679 (define-public python-vedo
680 (package
681 (name "python-vedo")
682 (version "2021.0.3")
683 (source
684 (origin
685 (method git-fetch)
686 (uri (git-reference
687 (url "https://github.com/marcomusy/vedo")
688 (commit version)))
689 (file-name (git-file-name name version))
690 (sha256
691 (base32
692 "18i3ajh5jzhpc86di15lwh4jv97jhm627ii877sa4yhv6abzjfpn"))))
693 (build-system python-build-system)
694 (arguments
695 `(#:phases
696 (modify-phases %standard-phases
697 (add-after 'build 'mpi-setup
698 ,%openmpi-setup)
699 (replace 'check
700 (lambda* (#:key inputs outputs #:allow-other-keys)
701 (setenv "HOME" (getcwd))
702 (add-installed-pythonpath inputs outputs)
703 (with-directory-excursion "tests"
704 (for-each (lambda (dir)
705 (with-directory-excursion dir
706 (invoke "./run_all.sh")))
707 '("common" "dolfin")))
708 #t)))))
709 (inputs ; for the check phase
710 `(("dolfin" ,fenics)
711 ("pkgconfig" ,python-pkgconfig)
712 ("matplotlib" ,python-matplotlib)))
713 (native-inputs ; for python-pkgconfig
714 `(("pkg-config" ,pkg-config)))
715 (propagated-inputs
716 `(("numpy" ,python-numpy)
717 ("vtk" ,vtk)))
718 (home-page "https://github.com/marcomusy/vedo")
719 (synopsis
720 "Analysis and visualization of 3D objects and point clouds")
721 (description
722 "@code{vedo} is a fast and lightweight python module for
723 scientific analysis and visualization. The package provides a wide
724 range of functionalities for working with three-dimensional meshes and
725 point clouds. It can also be used to generate high quality
726 two-dimensional renderings such as scatter plots and histograms.
727 @code{vedo} is based on @code{vtk} and @code{numpy}, with no other
728 dependencies.")
729 ;; vedo is released under the Expat license. Included fonts are
730 ;; covered by the OFL license and textures by the CC0 license.
731 ;; The earth images are in the public domain.
732 (license (list license:expat
733 license:silofl1.1
734 license:cc0
735 license:public-domain))))