From 20b545f76835605143c7b9c337dfe0539c102695 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Thu, 18 Jun 2020 00:58:41 +0200 Subject: gnu: python-pandas: Update to 1.0.5. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit But also keep version 0.25.3 around for packages requiring an earlier versions, as well as version 0.24.2 for a version with python2. * gnu/packages/python-science.scm (python-pandas): Update to 1.0.5. [arguments]: Adapt 'patch-which phase. Add new 'prepare-x phase. Do not delete tests that depend on "moto", they are skipped automatically. [propagated-inputs]: Add python-jinja2. [inputs]: Add xsel and xclip. [native-inputs]: Add xorg-server-for-tests so we can test clipboard support. (python-pandas-0.24): New variable. (python2-pandas): Inherit from python-pandas-0.25. * gnu/packages/bioinformatics.scm (python-biom-format)[propagated-inputs]: Switch to python-pandas-0.25. Signed-off-by: Ludovic Courtès --- gnu/packages/python-science.scm | 65 +++++++++++++++++++++++++++++------------ 1 file changed, 47 insertions(+), 18 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 2f7516b9f6b..55fc1be4f9c 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi +;;; Copyright © 2020 Pierre Langlois ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,7 +38,9 @@ #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) #:use-module (gnu packages time) + #:use-module (gnu packages xdisorg) #:use-module (gnu packages xml) + #:use-module (gnu packages xorg) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) @@ -231,13 +234,13 @@ Cython.") (define-public python-pandas (package (name "python-pandas") - (version "0.25.2") + (version "1.0.5") (source (origin (method url-fetch) (uri (pypi-uri "pandas" version)) (sha256 - (base32 "1gp2pvzdiakvgjmykdzdlzrsfbg4vjm49jjdl9s0ha0a3yfs34fa")))) + (base32 "1a2gv3g6jr6vb5ca43fkwjl5xf86wpfz8y3zcy787adjl0hdkib9")))) (build-system python-build-system) (arguments `(#:modules ((guix build utils) @@ -249,8 +252,15 @@ Cython.") (lambda* (#:key inputs #:allow-other-keys) (let ((which (assoc-ref inputs "which"))) (substitute* "pandas/io/clipboard/__init__.py" - (("^CHECK_CMD = .*") - (string-append "CHECK_CMD = \"" which "\"\n")))) + (("^WHICH_CMD = .*") + (string-append "WHICH_CMD = \"" which "\"\n")))) + #t)) + (add-before 'check 'prepare-x + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0") + ;; xsel needs to write a log file. + (setenv "HOME" "/tmp") #t)) (replace 'check (lambda _ @@ -265,25 +275,19 @@ Cython.") (substitute* "setup.cfg" (("addopts = --strict-data-files") "addopts = ")) (with-directory-excursion build-directory - ;; Delete tests that require "moto" which is not yet - ;; in Guix. - (for-each delete-file - '("pandas/tests/io/conftest.py" - "pandas/tests/io/json/test_compression.py" - "pandas/tests/io/parser/test_network.py" - "pandas/tests/io/test_parquet.py")) (invoke "pytest" "-vv" "pandas" "--skip-slow" - "--skip-network" "-k" - ;; XXX: Due to the deleted tests above. - "not test_read_s3_jsonl")))))))) + "--skip-network")))))))) (propagated-inputs - `(("python-numpy" ,python-numpy) + `(("python-jinja2" ,python-jinja2) + ("python-numpy" ,python-numpy) ("python-openpyxl" ,python-openpyxl) ("python-pytz" ,python-pytz) ("python-dateutil" ,python-dateutil) ("python-xlrd" ,python-xlrd))) (inputs - `(("which" ,which))) + `(("which" ,which) + ("xclip" ,xclip) + ("xsel" ,xsel))) (native-inputs `(("python-cython" ,python-cython) ("python-beautifulsoup4" ,python-beautifulsoup4) @@ -291,7 +295,9 @@ Cython.") ("python-html5lib" ,python-html5lib) ("python-nose" ,python-nose) ("python-pytest" ,python-pytest) - ("python-pytest-mock" ,python-pytest-mock))) + ("python-pytest-mock" ,python-pytest-mock) + ;; Needed to test clipboard support. + ("xorg-server" ,xorg-server-for-tests))) (home-page "https://pandas.pydata.org") (synopsis "Data structures for data analysis, time series, and statistics") (description @@ -303,10 +309,33 @@ doing practical, real world data analysis in Python.") (properties `((python2-variant . ,(delay python2-pandas)))) (license license:bsd-3))) +(define-public python-pandas-0.25 + (package + (inherit python-pandas) + (version "0.25.3") + (source (origin + (method url-fetch) + (uri (pypi-uri "pandas" version)) + (sha256 + (base32 + "191048m6kdc6yfvqs9w412lq60cfvigrsb57y0x116lwibgp9njj")))) + (arguments + (substitute-keyword-arguments (package-arguments python-pandas) + ((#:phases phases) + `(modify-phases ,phases + (replace 'patch-which + (lambda* (#:key inputs #:allow-other-keys) + (let ((which (assoc-ref inputs "which"))) + (substitute* "pandas/io/clipboard/__init__.py" + (("^CHECK_CMD = .*") + (string-append "CHECK_CMD = \"" which "\"\n")))) + #t)) + (delete 'prepare-x))))))) + ;; Pandas 0.24.x are the last versions that support Python 2. (define-public python2-pandas (let ((pandas (package-with-python2 - (strip-python2-variant python-pandas)))) + (strip-python2-variant python-pandas-0.25)))) (package (inherit pandas) (version "0.24.2") -- cgit v1.3 From 3417a25156946d5cf69dafa283664a09067d9645 Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Sat, 20 Jun 2020 20:30:28 +0200 Subject: gnu: Add python-xarray. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From 27ec21904f769c1e8114f767972d9037e1e9f68a Mon Sep 17 00:00:00 2001 From: Pierre Langlois Date: Thu, 18 Jun 2020 00:58:02 +0200 Subject: [PATCH 4/5] gnu: Add python-xarray. * gnu/package/python-science.scm (python-xarray): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/python-science.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 55fc1be4f9c..93488945303 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -354,3 +354,38 @@ doing practical, real world data analysis in Python.") (("if 'NULL byte' in msg:") "if 'NULL byte' in msg or 'line contains NUL' in msg:")) #t))))))) + +(define-public python-xarray + (package + (name "python-xarray") + (version "0.15.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "xarray" version)) + (sha256 + (base32 + "1yx8j66b7rn10m2l6gmn8yr9cn38pi5cj0x0wwpy4hdnhy6i7qv4")))) + (build-system python-build-system) + (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-pandas" ,python-pandas))) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "pytest")))))) + (home-page "https://github.com/pydata/xarray") + (synopsis "N-D labeled arrays and datasets") + (description "Xarray (formerly xray) makes working with labelled +multi-dimensional arrays simple, efficient, and fun! + +Xarray introduces labels in the form of dimensions, coordinates and attributes +on top of raw NumPy-like arrays, which allows for a more intuitive, more +concise, and less error-prone developer experience. The package includes a +large and growing library of domain-agnostic functions for advanced analytics +and visualization with these data structures.") + (license license:asl2.0))) -- cgit v1.3 From 4be49afabd71b8508b46ebc702fdfa956261955d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 23 Jun 2020 17:12:39 +0200 Subject: gnu: python-scikit-image: Update to 0.17.2. * gnu/packages/python-science.scm (python-scikit-image): Update to 0.17.2. --- gnu/packages/python-science.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 93488945303..8a15a2820b2 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -201,13 +201,13 @@ Cython.") (define-public python-scikit-image (package (name "python-scikit-image") - (version "0.14.2") + (version "0.17.2") (source (origin (method url-fetch) (uri (pypi-uri "scikit-image" version)) (sha256 - (base32 "07qchljkyxvg5nrm12fvszi7pmjk4m01qp0w0z8syxzxxs20pz8s")))) + (base32 "1cyqqbcbrg3prc36wis0sm3q5rjhd7h9bp33jwfyixzhi02lr5dx")))) (build-system python-build-system) (arguments ;; TODO: Some tests require running X11 server. Disable them? -- cgit v1.3 From 5db8ba1f49f207b2f6c537126f58fbc169d5a8a4 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 23 Jun 2020 17:12:46 +0200 Subject: gnu: Add python-msgpack-numpy. * gnu/packages/python-science.scm (python-msgpack-numpy): New variable. --- gnu/packages/python-science.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 8a15a2820b2..3d6d4e909e8 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -389,3 +389,28 @@ concise, and less error-prone developer experience. The package includes a large and growing library of domain-agnostic functions for advanced analytics and visualization with these data structures.") (license license:asl2.0))) + +(define-public python-msgpack-numpy + (package + (name "python-msgpack-numpy") + (version "0.4.6.post0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "msgpack-numpy" version)) + (sha256 + (base32 + "0syzy645mwcy7lfjwz6pc8f9p2vv1qk4limc8iina3l5nnf0rjyz")))) + (build-system python-build-system) + (propagated-inputs + `(("python-msgpack" ,python-msgpack) + ("python-numpy" ,python-numpy))) + (home-page "https://github.com/lebedov/msgpack-numpy") + (synopsis + "Numpy data serialization using msgpack") + (description + "This package provides encoding and decoding routines that enable the +serialization and deserialization of numerical and array data types provided +by numpy using the highly efficient @code{msgpack} format. Serialization of +Python's native complex data types is also supported.") + (license license:bsd-3))) -- cgit v1.3 From 34432d5a7808a3e9979e7c32dffb938dd27e79a5 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Wed, 8 Jul 2020 11:46:58 +0200 Subject: gnu: Add python-scikit-fuzzy. * gnu/packages/python-science.scm (python-scikit-fuzzy): New variable. Signed-off-by: Nicolas Goaziou --- gnu/packages/python-science.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 3d6d4e909e8..71601c0ea1a 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2020 Pierre Langlois +;;; Copyright © 2020 Vinicius Monego ;;; ;;; This file is part of GNU Guix. ;;; @@ -198,6 +199,37 @@ depends on @code{scipy.weave}. For new code, users are recommended to use Cython.") (license license:bsd-3))) +(define-public python-scikit-fuzzy + (package + (name "python-scikit-fuzzy") + (version "0.4.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "scikit-fuzzy" version)) + (sha256 + (base32 "0bp1n771fj44kdp7a00bcvfwirvv2rc803b7g6yf3va7v0j29c8s")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "nosetests" "-s" "-v" "skfuzzy") + #t))))) + (native-inputs + `(("python-nose" ,python-nose))) + (propagated-inputs + `(("python-networkx" ,python-networkx) + ("python-numpy" ,python-numpy) + ("python-scipy" ,python-scipy))) + (home-page "https://github.com/scikit-fuzzy/scikit-fuzzy") + (synopsis "Fuzzy logic toolkit for SciPy") + (description + "This package implements many useful tools for projects involving fuzzy +logic, also known as grey logic.") + (license license:bsd-3))) + (define-public python-scikit-image (package (name "python-scikit-image") -- cgit v1.3 From 8bebb547d3ad8ea086f029c67cef8d6eafe66805 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Wed, 8 Jul 2020 00:48:41 -0300 Subject: gnu: python-scikit-image: Add dependencies. * gnu/packages/python-science.scm (python-scikit-image)[propagated-inputs]: Add python-imageio and python-tifffile. Signed-off-by: Nicolas Goaziou --- gnu/packages/python-science.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 71601c0ea1a..88843c1fb22 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -248,13 +248,15 @@ logic, also known as grey logic.") (propagated-inputs `(("python-cloudpickle" ,python-cloudpickle) ("python-dask" ,python-dask) + ("python-imageio" ,python-imageio) ("python-matplotlib" ,python-matplotlib) ("python-networkx" ,python-networkx) ("python-numpy" ,python-numpy) ("python-pillow" ,python-pillow) ("python-pywavelets" ,python-pywavelets) ("python-scipy" ,python-scipy) - ("python-six" ,python-six))) + ("python-six" ,python-six) + ("python-tifffile" ,python-tifffile))) (native-inputs `(("python-cython" ,python-cython))) (home-page "https://scikit-image.org/") -- cgit v1.3