From 4d0fdde344509c4fa37bc7e5dd1e391fd50a8b2e Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 12 Mar 2021 13:34:13 +0100 Subject: gnu: Add python-statannot. * gnu/packages/python-science.scm (python-statannot): New variable. --- gnu/packages/python-science.scm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 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 a1e2b57669..5221f41af7 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2016, 2020 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2020, 2021 Ricardo Wurmus ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Hartmut Goebel @@ -531,3 +531,29 @@ 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))) + +(define-public python-statannot + (package + (name "python-statannot") + (version "0.2.3") + (source + (origin + (method url-fetch) + (uri (pypi-uri "statannot" version)) + (sha256 + (base32 + "1f8c2sylzr7lpjbyqxsqlp9xi8rj3d8c9hfh98x4jbb83zxc4026")))) + (build-system python-build-system) + (propagated-inputs + `(("python-numpy" ,python-numpy) + ("python-seaborn" ,python-seaborn) + ("python-matplotlib" ,python-matplotlib) + ("python-pandas" ,python-pandas) + ("python-scipy" ,python-scipy))) + (home-page + "https://github.com/webermarcolivier/statannot") + (synopsis "Add annotations to existing plots generated by seaborn") + (description + "This is a Python package to compute statistical test and add statistical +annotations on an existing boxplots and barplots generated by seaborn.") + (license license:expat))) -- cgit v1.2.3 From 456355c2538be4288b407ace7d0d769fb16a2076 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 12 Mar 2021 13:56:12 +0100 Subject: gnu: Add python-upsetplot. * gnu/packages/python-science.scm (python-upsetplot): New variable. --- gnu/packages/python-science.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 5221f41af7..391d37dcce 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -557,3 +557,40 @@ Python's native complex data types is also supported.") "This is a Python package to compute statistical test and add statistical annotations on an existing boxplots and barplots generated by seaborn.") (license license:expat))) + +(define-public python-upsetplot + (package + (name "python-upsetplot") + (version "0.4.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "UpSetPlot" version)) + (sha256 + (base32 + "0kwljcmsvrxm33y3ssham2bwv4a5m31mv96y9h18va0cv7s3mqn1")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'fix-versioning + (lambda _ + (substitute* "setup.py" + (("pytest-cov<2.6") "pytest-cov")))) + (replace 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (invoke "pytest" "-v" "--doctest-modules")))))) + (propagated-inputs + `(("python-matplotlib" ,python-matplotlib) + ("python-pandas" ,python-pandas))) + (native-inputs + `(("python-pytest-runner" ,python-pytest-runner) + ("python-pytest-cov" ,python-pytest-cov))) + (home-page "https://upsetplot.readthedocs.io") + (synopsis "Draw UpSet plots with Pandas and Matplotlib") + (description + "This is a Python implementation of UpSet plots by Lex et al. +UpSet plots are used to visualize set overlaps; like Venn diagrams but more +readable.") + (license license:bsd-3))) -- cgit v1.2.3 From 36062f16b6bce9e5178ba4614d1c8e763a96eb64 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Tue, 9 Mar 2021 11:15:54 -0300 Subject: gnu: python-scikit-image: Update to 0.18.1. * gnu/packages/python-science.scm (python-scikit-image): Update to 0.18.1. [propagated-inputs]: Remove python-six. Signed-off-by: Nicolas Goaziou --- gnu/packages/python-science.scm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 391d37dcce..409745819b 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2020 Pierre Langlois -;;; Copyright © 2020 Vinicius Monego +;;; Copyright © 2020, 2021 Vinicius Monego ;;; Copyright © 2021 Greg Hogan ;;; ;;; This file is part of GNU Guix. @@ -240,18 +240,18 @@ logic, also known as grey logic.") (define-public python-scikit-image (package (name "python-scikit-image") - (version "0.17.2") + (version "0.18.1") (source (origin (method url-fetch) (uri (pypi-uri "scikit-image" version)) (sha256 - (base32 "1cyqqbcbrg3prc36wis0sm3q5rjhd7h9bp33jwfyixzhi02lr5dx")))) + (base32 "0wgisa03smhrphcjnhq7waa5vyyd32b67hblapjbqrqqj751idpv")))) (build-system python-build-system) (arguments ;; TODO: Some tests require running X11 server. Disable them? '(#:tests? #f)) - ;; See DEPENDS.txt for the list of build and run time requiremnts + ;; See requirements/ for the list of build and run time requirements. (propagated-inputs `(("python-cloudpickle" ,python-cloudpickle) ("python-dask" ,python-dask) @@ -262,7 +262,6 @@ logic, also known as grey logic.") ("python-pillow" ,python-pillow) ("python-pywavelets" ,python-pywavelets) ("python-scipy" ,python-scipy) - ("python-six" ,python-six) ("python-tifffile" ,python-tifffile))) (native-inputs `(("python-cython" ,python-cython))) -- cgit v1.2.3 From 0455c19fa56396a460d6f707a39b6da6502b90e8 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Tue, 9 Mar 2021 12:51:14 -0300 Subject: gnu: python-scikit-image: Enable tests. * gnu/packages/python-science.scm (python-scikit-image)[arguments]: Add phases related to tests. [native-inputs]: Add python-codecov, python-flake8, python-pytest, python-pytest-cov, python-pytest-localserver, python-wheel. Signed-off-by: Nicolas Goaziou --- gnu/packages/python-science.scm | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 409745819b..79ee7c8bb2 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -36,6 +36,8 @@ #:use-module (gnu packages maths) #:use-module (gnu packages perl) #:use-module (gnu packages python) + #:use-module (gnu packages python-build) + #:use-module (gnu packages python-check) #:use-module (gnu packages python-web) #:use-module (gnu packages python-xyz) #:use-module (gnu packages sphinx) @@ -249,9 +251,25 @@ logic, also known as grey logic.") (base32 "0wgisa03smhrphcjnhq7waa5vyyd32b67hblapjbqrqqj751idpv")))) (build-system python-build-system) (arguments - ;; TODO: Some tests require running X11 server. Disable them? - '(#:tests? #f)) + `(#:phases + (modify-phases %standard-phases + (add-before 'build 'change-home-dir + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp") + #t)) + (replace 'build + (lambda _ + (invoke "make"))) + (replace 'check + (lambda _ + ;; The following tests require online data. + (invoke "python" "-m" "pytest" "skimage" "--doctest-modules" "-k" + (string-append "not test_ndim" + " and not test_skin"))))))) ;; See requirements/ for the list of build and run time requirements. + ;; NOTE: scikit-image has an optional dependency on python-pooch, however + ;; propagating it would enable many more tests that require online data. (propagated-inputs `(("python-cloudpickle" ,python-cloudpickle) ("python-dask" ,python-dask) @@ -264,7 +282,13 @@ logic, also known as grey logic.") ("python-scipy" ,python-scipy) ("python-tifffile" ,python-tifffile))) (native-inputs - `(("python-cython" ,python-cython))) + `(("python-codecov" ,python-codecov) + ("python-cython" ,python-cython) + ("python-flake8" ,python-flake8) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-localserver" ,python-pytest-localserver) + ("python-wheel" ,python-wheel))) (home-page "https://scikit-image.org/") (synopsis "Image processing in Python") (description -- cgit v1.2.3