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