[PATCH 1/3] gnu: Add python-pooch.

  • Done
  • quality assurance status badge
Details
2 participants
  • Nicolas Goaziou
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 9 Mar 2021 15:12
(address . guix-patches@gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210309141209.1651-1-monego@posteo.net
* gnu/packages/python-xyz.scm (python-pooch): New variable.
---
gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 912b9db62b..c1b67bffc6 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -19248,6 +19248,31 @@ library: to minimize boilerplate code in traditional extension modules by
inferring type information using compile-time introspection.")
(license license:bsd-3)))
+(define-public python-pooch
+ (package
+ (name "python-pooch")
+ (version "1.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pooch" version))
+ (sha256
+ (base32 "1618adsg9r8fsv422sv35z1i723q3a1iir5v7dv2sklh4pl4im1h"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:tests? #f)) ;requires online data
+ (propagated-inputs
+ `(("python-appdirs" ,python-appdirs)
+ ("python-packaging" ,python-packaging)
+ ("python-requests" ,python-requests)))
+ (home-page "https://github.com/fatiando/pooch")
+ (synopsis "Manage your Python library's sample data files")
+ (description
+ "Pooch manages your Python library's sample data files: it automatically
+downloads and stores them in a local directory, with support for versioning
+and corruption checks.")
+ (license license:bsd-3)))
+
(define-public python-fasteners
(package
(name "python-fasteners")
--
2.30.1
V
V
Vinicius Monego wrote on 9 Mar 2021 15:15
[PATCH 2/3] gnu: python-scikit-image: Update to 0.18.1.
(address . 47022@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210309141555.1892-1-monego@posteo.net
* gnu/packages/python-science.scm (python-scikit-image): Update to 0.18.1.
[propagated-inputs]: Remove python-six.
---
gnu/packages/python-science.scm | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

Toggle diff (45 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index a1e2b57669..250ab4a192 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -9,7 +9,7 @@
;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
-;;; Copyright © 2020 Vinicius Monego <monego@posteo.net>
+;;; Copyright © 2020, 2021 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Greg Hogan <code@greghogan.com>
;;;
;;; 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)))
--
2.30.1
V
V
Vinicius Monego wrote on 9 Mar 2021 15:15
[PATCH 3/3] gnu: scikit-image: Enable tests.
(address . 47022@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210309141555.1892-2-monego@posteo.net
* gnu/packages/python-science.scm (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.
---
gnu/packages/python-science.scm | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 250ab4a192..552c4c50cd 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
--
2.30.1
V
V
Vinicius Monego wrote on 9 Mar 2021 16:51
[PATCH v2 3/3] gnu: python-scikit-image: Enable tests.
(address . 47022@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210309155114.5517-1-monego@posteo.net
* 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.
---
Same patch, only changed commit message.

gnu/packages/python-science.scm | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 250ab4a192..552c4c50cd 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
--
2.30.1
N
N
Nicolas Goaziou wrote on 13 Mar 2021 14:07
Re: [bug#47022] [PATCH 1/3] gnu: Add python-pooch.
(name . Vinicius Monego)(address . monego@posteo.net)(address . 47022-done@debbugs.gnu.org)
87blbnxkuw.fsf@nicolasgoaziou.fr
Hello,

Vinicius Monego <monego@posteo.net> writes:

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-pooch): New variable.

Applied all three patches (v2 for the last one).

Thank you.

Regards,
--
Nicolas Goaziou
Closed
?