gnu: Add python-iris. (scitools)

  • Open
  • quality assurance status badge
Details
2 participants
  • Bruno Victal
  • Vinicius Monego
Owner
unassigned
Submitted by
Vinicius Monego
Severity
normal
V
V
Vinicius Monego wrote on 24 Jun 2021 14:39
(address . guix-patches@gnu.org)
a754efcb38dc252608b560cbaf372bf19b696e10.camel@posteo.net

From 99e02748ab5374266677f47a409749475b4ef8fc Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:10:18 -0300
Subject: [PATCH 1/6] gnu: Add python-imagehash.

* gnu/packages/python-xyz.scm (python-imagehash): New variable.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ec4209108f..c6d8fb1eea 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13018,6 +13018,47 @@ The API is as much as possible the similar to jQuery. pyquery uses lxml for
fast xml and html manipulation.")
(license license:bsd-3)))
+(define-public python-imagehash
+ (package
+ (name "python-imagehash")
+ (version "4.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ImageHash" version))
+ (sha256
+ (base32 "0kgiksjggw2warfz5d04fr3iph47vwxcb8jrlj41ljkhrc3ahsd9"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-pillow" ,python-pillow)
+ ("python-pywavelets" ,python-pywavelets)
+ ("python-scipy" ,python-scipy)
+ ("python-six" ,python-six)))
+ (home-page "https://github.com/JohannesBuchner/imagehash")
+ (synopsis "Image hashing library")
+ (description "ImageHash is an Image hashing library. It supports:
+
+@itemize
+@item Average hashing
+@item Perceptual hashing
+@item Difference hashing
+@item Wavelet hashing
+@item HSV color hashing (colorhash)
+@item Crop-resistant hashing
+@end itemize")
+ (license license:bsd-2)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.32.0
From 4157cb6a4cc43ba529d71b26729cbbd55ce0c9d3 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:22:34 -0300
Subject: [PATCH 2/6] gnu: Add python-xxhash.

* gnu/packages/python-xyz.scm (python-xxhash): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index c6d8fb1eea..e1ec61fb0c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -131,6 +131,7 @@
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages digest)
#:use-module (gnu packages djvu)
#:use-module (gnu packages docker)
#:use-module (gnu packages enchant)
@@ -13059,6 +13060,31 @@ fast xml and html manipulation.")
@end itemize")
(license license:bsd-2)))
+(define-public python-xxhash
+ (package
+ (name "python-xxhash")
+ (version "2.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xxhash" version))
+ (sha256
+ (base32 "0jbvz19acznq00544gcsjg05fkvrmwbnwdfgrvwss3i1ys6avgmp"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'use-system-xxhash
+ (lambda _
+ (setenv "XXHASH_LINK_SO" "1"))))))
+ (inputs
+ `(("xxhash" ,xxhash)))
+ (home-page "https://github.com/ifduyue/python-xxhash")
+ (synopsis "Python binding for xxHash")
+ (description "This package provides a Python interface binding for the
+xxHash non-cryptographic hash algorithm.")
+ (license license:bsd-2)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.32.0
From bd87844e37388d54598bb5638c3e6368f8f8b014 Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:32:59 -0300
Subject: [PATCH 3/6] gnu: Add python-antlr4.

* gnu/packages/python-xyz.scm (python-antlr4): New variable.
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e1ec61fb0c..b102e1c570 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13085,6 +13085,25 @@ fast xml and html manipulation.")
xxHash non-cryptographic hash algorithm.")
(license license:bsd-2)))
+(define-public python-antlr4
+ (package
+ (name "python-antlr4")
+ (version "4.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "antlr4-python3-runtime" version))
+ (sha256
+ (base32 "02xm7ccsf51vh4xsnhlg6pvchm1x3ckgv9kwm222w5drizndr30n"))))
+ (arguments
+ `(#:tests? #f)) ; there are no tests
+ (build-system python-build-system)
+ (home-page "https://www.antlr.org")
+ (synopsis "ANTLR runtime for Python")
+ (description
+ "This package provides a ANTLR runtime for Python.")
+ (license license:bsd-3)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.32.0
From 9b7690968faf0a5a0452f3eee47a486aea11bfda Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Wed, 26 May 2021 13:33:30 -0300
Subject: [PATCH 4/6] gnu: Add python-cf-units.

* gnu/packages/geo.scm (python-cf-units): New variable.
---
gnu/packages/geo.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 546be33e55..3ea7804725 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -58,6 +58,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
@@ -970,6 +971,52 @@ Shapely capabilities
@end itemize")
(license license:lgpl3+)))
+(define-public python-cf-units
+ (package
+ (name "python-cf-units")
+ (version "2.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cf-units" version))
+ (sha256
+ (base32 "0cswphn1cw0qyzglcn4xinr3pfhvbsdyll4hnb702fsfxv9q2cyl"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-doctest
+ (lambda _
+ ;; Two doctests fail.
+ (substitute* "setup.cfg" (("--doctest-modules") ""))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "--pyargs" "cf_units" "-ra"
+ ;; This test failed.
+ "-k" "not test_masked_ndarray")))))))
+ (native-inputs
+ `(("python-coveralls" ,python-coveralls)
+ ("python-cython" ,python-cython)
+ ("python-jinja2" ,python-jinja2)
+ ("python-pep8" ,python-pep8)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (inputs
+ `(("udunits" ,udunits)))
+ (propagated-inputs
+ `(("python-antlr4" ,python-antlr4)
+ ("python-cftime" ,python-cftime)
+ ("python-numpy" ,python-numpy)
+ ("python-six" ,python-six)))
+ (home-page "https://github.com/SciTools/cf-units")
+ (synopsis "Units of measure as required by the CF metadata conventions")
+ (description "This package provides units of measure as required by the
+Climate and Forecast (CF) metadata conventions.")
+ (license license:lgpl3)))
+
(define-public postgis
(package
(name "postgis")
--
2.32.0
From f5425a307ca32542b92f79dad584e8c81b10b8bb Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Thu, 27 May 2021 16:49:27 -0300
Subject: [PATCH 5/6] gnu: Add python-pyke.

* gnu/packages/python-xyz.scm (python-pyke): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b102e1c570..3925a96b77 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5918,6 +5918,39 @@ operators such as union, intersection, and difference.")
search in Python.")
(license license:lgpl3+)))
+(define-public python-pyke
+ (package
+ (name "python-pyke")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "scitools-pyke" version))
+ (sha256
+ (base32 "0q7nxd0gw135922ck155w2nj2vf47k7cgzdqipxlyrgq6q3lkinl"))))
+ (build-system python-build-system)
+ ;; FIXME: two tests are failing with:
+ ;; "AttributeError: 'fc_tests' object has no attribute 'engine'.".
+ (arguments
+ `(#:tests? #f))
+ (home-page "https://sourceforge.net/projects/pyke/")
+ (synopsis "Python Knowledge Engine")
+ (description "Pyke is a Python Knowledge Engine and automatic Python
+program generator. Both forward-chaining and backward-chaining rules (which
+may include Python code) are compiled into Python. It can also automatically
+assemble Python programs out of Python functions which are attached to
+backward-chaining rules.
+
+Features:
+
+@itemize
+@item Automatic programming: generates Python programs.
+@item Forward and backward chaining.
+@item Multiple knowledge engines and rule bases.
+@item Rule-based inheritance.
+@end itemize")
+ (license license:expat)))
+
(define-public python-wurlitzer
(package
(name "python-wurlitzer")
--
2.32.0
From c6c77fe7c130274b5b68ac6fd283bba4dad382ae Mon Sep 17 00:00:00 2001
From: Vinicius Monego <monego@posteo.net>
Date: Mon, 24 May 2021 18:43:03 -0300
Subject: [PATCH 6/6] gnu: Add python-iris.

* gnu/packages/geo.scm (python-iris): New variable.
---
gnu/packages/geo.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (87 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 3ea7804725..65d43849df 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -92,6 +92,7 @@
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
@@ -1017,6 +1018,72 @@ Shapely capabilities
Climate and Forecast (CF) metadata conventions.")
(license license:lgpl3)))
+(define-public python-iris
+ (package
+ (name "python-iris")
+ (version "3.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "scitools-iris" version))
+ (sha256
+ (base32 "1zqicscnnfqpck960xdjng38qk0w0spmcysl89l3smagdsagzxkr"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Some tests require a writable home.
+ (setenv "HOME" "/tmp")
+ ;; Iris will check for "scitools-iris[test]" before running the
+ ;; tests. The complete test set weighs 150MB. Skip this check.
+ (substitute* "setup.py"
+ ((".*tests_require.*") ""))
+ ;; The tests below open external connections.
+ (substitute*
+ "lib/iris/tests/integration/plot/test_vector_plots.py"
+ (("test_2d_plain_latlon") "_test_2d_plain_latlon")
+ (("test_2d_plain_latlon_on_polar_map")
+ "_test_2d_plain_latlon_on_polar_map")
+ (("test_2d_rotated_latlon") "_test_2d_rotated_latlon"))
+ (substitute*
+ "lib/iris/tests/integration/plot/test_plot_2d_coords.py"
+ (("test_2d_coords_contour") "_test_2d_coords_contour"))
+ ;; This one fails with AssertionError.
+ (substitute* "lib/iris/tests/experimental/test_animate.py"
+ (("test_cube_animation") "_test_cube_animation"))
+ ;; Compile Pyke rules before running the tests.
+ (invoke "python" "setup.py" "pyke_rules"))))))
+ (propagated-inputs
+ `(("python-cartopy" ,python-cartopy)
+ ("python-cf-units" ,python-cf-units)
+ ("python-cftime" ,python-cftime)
+ ("python-dask" ,python-dask)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-netcdf4" ,python-netcdf4)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-xxhash" ,python-xxhash)))
+ (native-inputs
+ `(("netcdf" ,netcdf)
+ ("python-black" ,python-black)
+ ("python-filelock" ,python-filelock)
+ ("python-imagehash" ,python-imagehash)
+ ("python-nose" ,python-nose)
+ ("python-pillow" ,python-pillow)
+ ("python-pyke" ,python-pyke)
+ ("python-requests" ,python-requests)
+ ("python-wheel" ,python-wheel)))
+ (home-page "https://github.com/SciTools/iris")
+ (synopsis "Library for analysing and visualising Earth science data")
+ (description "Iris is a Python library for analysing and visualising Earth
+science data. It excels when working with multi-dimensional Earth Science
+data, where tabular representations become unwieldy and inefficient. Iris
+implements a data model based on the CF conventions.")
+ ;; See iris/docs/src/copyright.rst.
+ (license license:lgpl3+)))
+
(define-public postgis
(package
(name "postgis")
--
2.32.0
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 0/6] gnu: Add python-iris (scitools).
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-1-monego@posteo.net
Resending with send-email for convenience, without changes.

Vinicius Monego (6):
gnu: Add python-imagehash.
gnu: Add python-xxhash.
gnu: Add python-antlr4.
gnu: Add python-cf-units.
gnu: Add python-pyke.
gnu: Add python-iris.

gnu/packages/geo.scm | 114 ++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 119 ++++++++++++++++++++++++++++++++++++
2 files changed, 233 insertions(+)

--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 1/6] gnu: Add python-imagehash.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-2-monego@posteo.net
* gnu/packages/python-xyz.scm (python-imagehash): New variable.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d8c3fbec07..eef180b720 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -12995,6 +12995,47 @@ The API is as much as possible the similar to jQuery. pyquery uses lxml for
fast xml and html manipulation.")
(license license:bsd-3)))
+(define-public python-imagehash
+ (package
+ (name "python-imagehash")
+ (version "4.2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "ImageHash" version))
+ (sha256
+ (base32 "0kgiksjggw2warfz5d04fr3iph47vwxcb8jrlj41ljkhrc3ahsd9"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest")))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (propagated-inputs
+ `(("python-numpy" ,python-numpy)
+ ("python-pillow" ,python-pillow)
+ ("python-pywavelets" ,python-pywavelets)
+ ("python-scipy" ,python-scipy)
+ ("python-six" ,python-six)))
+ (home-page "https://github.com/JohannesBuchner/imagehash")
+ (synopsis "Image hashing library")
+ (description "ImageHash is an Image hashing library. It supports:
+
+@itemize
+@item Average hashing
+@item Perceptual hashing
+@item Difference hashing
+@item Wavelet hashing
+@item HSV color hashing (colorhash)
+@item Crop-resistant hashing
+@end itemize")
+ (license license:bsd-2)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 2/6] gnu: Add python-xxhash.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-3-monego@posteo.net
* gnu/packages/python-xyz.scm (python-xxhash): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index eef180b720..2b4ce0cba3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -136,6 +136,7 @@
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages digest)
#:use-module (gnu packages djvu)
#:use-module (gnu packages docker)
#:use-module (gnu packages enchant)
@@ -13036,6 +13037,31 @@ fast xml and html manipulation.")
@end itemize")
(license license:bsd-2)))
+(define-public python-xxhash
+ (package
+ (name "python-xxhash")
+ (version "2.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "xxhash" version))
+ (sha256
+ (base32 "0jbvz19acznq00544gcsjg05fkvrmwbnwdfgrvwss3i1ys6avgmp"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'use-system-xxhash
+ (lambda _
+ (setenv "XXHASH_LINK_SO" "1"))))))
+ (inputs
+ `(("xxhash" ,xxhash)))
+ (home-page "https://github.com/ifduyue/python-xxhash")
+ (synopsis "Python binding for xxHash")
+ (description "This package provides a Python interface binding for the
+xxHash non-cryptographic hash algorithm.")
+ (license license:bsd-2)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 3/6] gnu: Add python-antlr4.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-4-monego@posteo.net
* gnu/packages/python-xyz.scm (python-antlr4): New variable.
---
gnu/packages/python-xyz.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)

Toggle diff (32 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2b4ce0cba3..61b1b7d29c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13062,6 +13062,25 @@ fast xml and html manipulation.")
xxHash non-cryptographic hash algorithm.")
(license license:bsd-2)))
+(define-public python-antlr4
+ (package
+ (name "python-antlr4")
+ (version "4.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "antlr4-python3-runtime" version))
+ (sha256
+ (base32 "02xm7ccsf51vh4xsnhlg6pvchm1x3ckgv9kwm222w5drizndr30n"))))
+ (arguments
+ `(#:tests? #f)) ; there are no tests
+ (build-system python-build-system)
+ (home-page "https://www.antlr.org")
+ (synopsis "ANTLR runtime for Python")
+ (description
+ "This package provides a ANTLR runtime for Python.")
+ (license license:bsd-3)))
+
(define-public python-anyjson
(package
(name "python-anyjson")
--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 4/6] gnu: Add python-cf-units.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-5-monego@posteo.net
* gnu/packages/geo.scm (python-cf-units): New variable.
---
gnu/packages/geo.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)

Toggle diff (67 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 37be78edbf..314165062c 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -58,6 +58,7 @@
#:use-module (gnu packages bash)
#:use-module (gnu packages bison)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages c)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
@@ -898,6 +899,52 @@ Shapely capabilities
@end itemize")
(license license:lgpl3+)))
+(define-public python-cf-units
+ (package
+ (name "python-cf-units")
+ (version "2.1.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cf-units" version))
+ (sha256
+ (base32 "0cswphn1cw0qyzglcn4xinr3pfhvbsdyll4hnb702fsfxv9q2cyl"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'disable-doctest
+ (lambda _
+ ;; Two doctests fail.
+ (substitute* "setup.cfg" (("--doctest-modules") ""))))
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "pytest" "--pyargs" "cf_units" "-ra"
+ ;; This test failed.
+ "-k" "not test_masked_ndarray")))))))
+ (native-inputs
+ `(("python-coveralls" ,python-coveralls)
+ ("python-cython" ,python-cython)
+ ("python-jinja2" ,python-jinja2)
+ ("python-pep8" ,python-pep8)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)
+ ("python-pytest-runner" ,python-pytest-runner)))
+ (inputs
+ `(("udunits" ,udunits)))
+ (propagated-inputs
+ `(("python-antlr4" ,python-antlr4)
+ ("python-cftime" ,python-cftime)
+ ("python-numpy" ,python-numpy)
+ ("python-six" ,python-six)))
+ (home-page "https://github.com/SciTools/cf-units")
+ (synopsis "Units of measure as required by the CF metadata conventions")
+ (description "This package provides units of measure as required by the
+Climate and Forecast (CF) metadata conventions.")
+ (license license:lgpl3)))
+
(define-public postgis
(package
(name "postgis")
--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 5/6] gnu: Add python-pyke.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-6-monego@posteo.net
* gnu/packages/python-xyz.scm (python-pyke): New variable.
---
gnu/packages/python-xyz.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 61b1b7d29c..360650332e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -6009,6 +6009,39 @@ operators such as union, intersection, and difference.")
search in Python.")
(license license:lgpl3+)))
+(define-public python-pyke
+ (package
+ (name "python-pyke")
+ (version "1.1.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "scitools-pyke" version))
+ (sha256
+ (base32 "0q7nxd0gw135922ck155w2nj2vf47k7cgzdqipxlyrgq6q3lkinl"))))
+ (build-system python-build-system)
+ ;; FIXME: two tests are failing with:
+ ;; "AttributeError: 'fc_tests' object has no attribute 'engine'.".
+ (arguments
+ `(#:tests? #f))
+ (home-page "https://sourceforge.net/projects/pyke/")
+ (synopsis "Python Knowledge Engine")
+ (description "Pyke is a Python Knowledge Engine and automatic Python
+program generator. Both forward-chaining and backward-chaining rules (which
+may include Python code) are compiled into Python. It can also automatically
+assemble Python programs out of Python functions which are attached to
+backward-chaining rules.
+
+Features:
+
+@itemize
+@item Automatic programming: generates Python programs.
+@item Forward and backward chaining.
+@item Multiple knowledge engines and rule bases.
+@item Rule-based inheritance.
+@end itemize")
+ (license license:expat)))
+
(define-public python-wurlitzer
(package
(name "python-wurlitzer")
--
2.30.2
V
V
Vinicius Monego wrote on 24 Jul 2021 01:25
[PATCH 6/6] gnu: Add python-iris.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20210723232529.23745-7-monego@posteo.net
* gnu/packages/geo.scm (python-iris): New variable.
---
gnu/packages/geo.scm | 67 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 67 insertions(+)

Toggle diff (87 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 314165062c..36c020e31d 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -92,6 +92,7 @@
#:use-module (gnu packages protobuf)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-check)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
@@ -945,6 +946,72 @@ Shapely capabilities
Climate and Forecast (CF) metadata conventions.")
(license license:lgpl3)))
+(define-public python-iris
+ (package
+ (name "python-iris")
+ (version "3.0.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "scitools-iris" version))
+ (sha256
+ (base32 "1zqicscnnfqpck960xdjng38qk0w0spmcysl89l3smagdsagzxkr"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda _
+ ;; Some tests require a writable home.
+ (setenv "HOME" "/tmp")
+ ;; Iris will check for "scitools-iris[test]" before running the
+ ;; tests. The complete test set weighs 150MB. Skip this check.
+ (substitute* "setup.py"
+ ((".*tests_require.*") ""))
+ ;; The tests below open external connections.
+ (substitute*
+ "lib/iris/tests/integration/plot/test_vector_plots.py"
+ (("test_2d_plain_latlon") "_test_2d_plain_latlon")
+ (("test_2d_plain_latlon_on_polar_map")
+ "_test_2d_plain_latlon_on_polar_map")
+ (("test_2d_rotated_latlon") "_test_2d_rotated_latlon"))
+ (substitute*
+ "lib/iris/tests/integration/plot/test_plot_2d_coords.py"
+ (("test_2d_coords_contour") "_test_2d_coords_contour"))
+ ;; This one fails with AssertionError.
+ (substitute* "lib/iris/tests/experimental/test_animate.py"
+ (("test_cube_animation") "_test_cube_animation"))
+ ;; Compile Pyke rules before running the tests.
+ (invoke "python" "setup.py" "pyke_rules"))))))
+ (propagated-inputs
+ `(("python-cartopy" ,python-cartopy)
+ ("python-cf-units" ,python-cf-units)
+ ("python-cftime" ,python-cftime)
+ ("python-dask" ,python-dask)
+ ("python-matplotlib" ,python-matplotlib)
+ ("python-netcdf4" ,python-netcdf4)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-xxhash" ,python-xxhash)))
+ (native-inputs
+ `(("netcdf" ,netcdf)
+ ("python-black" ,python-black)
+ ("python-filelock" ,python-filelock)
+ ("python-imagehash" ,python-imagehash)
+ ("python-nose" ,python-nose)
+ ("python-pillow" ,python-pillow)
+ ("python-pyke" ,python-pyke)
+ ("python-requests" ,python-requests)
+ ("python-wheel" ,python-wheel)))
+ (home-page "https://github.com/SciTools/iris")
+ (synopsis "Library for analysing and visualising Earth science data")
+ (description "Iris is a Python library for analysing and visualising Earth
+science data. It excels when working with multi-dimensional Earth Science
+data, where tabular representations become unwieldy and inefficient. Iris
+implements a data model based on the CF conventions.")
+ ;; See iris/docs/src/copyright.rst.
+ (license license:lgpl3+)))
+
(define-public postgis
(package
(name "postgis")
--
2.30.2
B
B
Bruno Victal wrote on 31 Mar 2023 01:00
control-msg
(name . control)(address . control@debbugs.gnu.org)
74912071-f536-c8bc-4711-db295b4da0e6@makinata.eu
# done with 5c131aff691fa1cb0fafe71b5f2795902ae056a7
close 55819

# control fail?
close 45449

# no longer relevant
close 33078

# tags
tags 62551 patch
tags 62503 patch
tags 62461 patch
tags 62443 patch
tags 62428 patch
tags 61226 patch
tags 59893 patch
tags 59852 patch
tags 49451 patch
tags 49207 patch
tags 44258 patch


quit
V
V
Vinicius Monego wrote on 9 Jun 2023 16:58
[PATCH v2 1/5] gnu: Add python-imagehash.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230609145854.2581045-1-monego@posteo.net
* gnu/packages/digest.scm (python-imagehash): New variable.
---
gnu/packages/digest.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)

Toggle diff (60 lines)
diff --git a/gnu/packages/digest.scm b/gnu/packages/digest.scm
index 481771804b..405c1769d3 100644
--- a/gnu/packages/digest.scm
+++ b/gnu/packages/digest.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2017, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2021 Ryan Prior <rprior@protonmail.com>
;;; Copyright © 2021, 2022 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2023 Vinicius Monego <monego@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,7 +30,10 @@ (define-module (gnu packages digest)
#:use-module (guix build-system python)
#:use-module (guix build-system trivial)
#:use-module (guix utils)
+ #:use-module (gnu packages check)
#:use-module (gnu packages python-build)
+ #:use-module (gnu packages python-science)
+ #:use-module (gnu packages python-xyz)
#:use-module (ice-9 match))
(define-public wyhash
@@ -129,3 +133,34 @@ (define-public python-xxhash
(description "This package provides Python bindings for the xxHash hash
algorithm.")
(license license:bsd-3)))
+
+(define-public python-imagehash
+ (package
+ (name "python-imagehash")
+ (version "4.3.1")
+ (source
+ (origin
+ (method git-fetch) ;no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/JohannesBuchner/imagehash")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1lw9lxzrzy9s5v3xc35vmh97hlyavnla087fp19k77va6v8vbjjf"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-pytest))
+ (propagated-inputs (list python-numpy python-pillow python-pywavelets
+ python-scipy))
+ (home-page "https://github.com/JohannesBuchner/imagehash")
+ (synopsis "Image hashing library")
+ (description "ImageHash is an image hashing library. It supports:
+
+@itemize
+@item Average hashing
+@item Perceptual hashing
+@item Difference hashing
+@item Wavelet hashing
+@item HSV color hashing (colorhash)
+@item Crop-resistant hashing
+@end itemize")
+ (license license:bsd-2)))
--
2.34.1
V
V
Vinicius Monego wrote on 9 Jun 2023 16:58
[PATCH v2 2/5] gnu: Add python-cf-units.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230609145854.2581045-2-monego@posteo.net
* gnu/packages/geo.scm (python-cf-units): New variable.
---
gnu/packages/geo.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 46 insertions(+)

Toggle diff (59 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 25805fe2e5..2c15df18cc 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1380,6 +1380,52 @@ (define-public postgis
;; doc
license:cc-by-sa3.0))))
+(define-public python-cf-units
+ (package
+ (name "python-cf-units")
+ (version "3.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "cf-units" version))
+ (sha256
+ (base32
+ "0kq76p13ndm8033m0jfbfryhlk3c0iwy1d92sg1f8zqmwi0g3ac8"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; FIXME: 'ImportError: cannot import name '_udunits2' from partially
+ ;; initialized module 'cf_units' (most likely due to a circular import)'.
+ ;; Importing works after the package is built.
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'udunits-path
+ (lambda _
+ (setenv "UDUNITS2_XML_PATH"
+ (string-append
+ #$(this-package-input "udunits")
+ "/share/udunits/udunits2.xml"))))
+ ;; cf-units has a hard dependency on antlr4 4.7.2 and
+ ;; doesn't work with newer versions. Upstream is trying
+ ;; to change it or make antlr4 optional, see
+ ;; https://github.com/SciTools/cf-units/issues/313
+ (delete 'sanity-check))))
+ (propagated-inputs (list java-antlr4-runtime-python
+ python-cftime
+ python-jinja2
+ python-numpy))
+ (inputs (list udunits))
+ (native-inputs (list python-codecov
+ python-cython
+ python-jinja2
+ python-pytest
+ python-pytest-cov
+ python-setuptools-scm))
+ (home-page "https://github.com/SciTools/cf-units")
+ (synopsis "Units of measure as required by the CF metadata conventions")
+ (description "This package provids units of measure as required by the
+ Climate and Forecast (CF) metadata conventions.")
+ (license license:lgpl3+)))
+
(define-public tegola
(package
(name "tegola")
--
2.34.1
V
V
Vinicius Monego wrote on 9 Jun 2023 16:58
[PATCH v2 3/5] gnu: python-dask: Propagate python-importlib-metadata.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230609145854.2581045-3-monego@posteo.net
* gnu/packages/python-xyz.scm (python-dask)[native-inputs]: Move
python-importlib-metadata to...
[propagated-inputs]: ...here.
---
gnu/packages/python-xyz.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9036246bfb..7d5128911f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -25146,6 +25146,7 @@ (define-public python-dask
(propagated-inputs
(list python-cloudpickle
python-fsspec
+ python-importlib-metadata
python-numpy
python-packaging
python-pandas
@@ -25154,7 +25155,6 @@ (define-public python-dask
python-pyyaml))
(native-inputs
(list python-click
- python-importlib-metadata
python-pytest python-pytest-runner python-pytest-rerunfailures
python-versioneer))
(home-page "https://github.com/dask/dask/")
--
2.34.1
V
V
Vinicius Monego wrote on 9 Jun 2023 16:58
[PATCH v2 4/5] gnu: python-cartopy: Add dependencies.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230609145854.2581045-4-monego@posteo.net
* gnu/packages/geo.scm (python-cartopy)[native-inputs]: Add
python-setuptools-scm, python-wheel.
---
gnu/packages/geo.scm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

Toggle diff (17 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 2c15df18cc..c1b028104c 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1303,7 +1303,9 @@ (define-public python-cartopy
(list python-cython
python-flufl-lock
python-pytest
- python-pytest-mpl))
+ python-pytest-mpl
+ python-setuptools-scm
+ python-wheel))
(home-page "https://scitools.org.uk/cartopy/docs/latest/")
(synopsis "Cartographic library for visualisation")
(description
--
2.34.1
V
V
Vinicius Monego wrote on 9 Jun 2023 16:58
[PATCH v2 5/5] gnu: Add python-scitools-iris.
(address . 49207@debbugs.gnu.org)(name . Vinicius Monego)(address . monego@posteo.net)
20230609145854.2581045-5-monego@posteo.net
* gnu/packages/geo.scm (python-scitools-iris): New variable.
---
gnu/packages/geo.scm | 69 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 69 insertions(+)

Toggle diff (89 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c1b028104c..eb58781591 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -73,6 +73,7 @@ (define-module (gnu packages geo)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages datastructures)
+ #:use-module (gnu packages digest)
#:use-module (gnu packages docbook)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
@@ -1428,6 +1429,74 @@ (define-public python-cf-units
Climate and Forecast (CF) metadata conventions.")
(license license:lgpl3+)))
+(define-public python-scitools-iris
+ (package
+ (name "python-scitools-iris")
+ (version "3.6.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "scitools-iris" version))
+ (sha256
+ (base32
+ "08r13aans17qgv93m0hwzwmiqvbgkn5rhp9r5szyv4i99xz62igj"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; Tests below fail because of URL open errors and missing data (which is
+ ;; probably being downloaded).
+ (list #:test-flags
+ #~(list "--ignore" "lib/iris/tests/test_cf.py"
+ "--ignore" "lib/iris/tests/integration/netcdf/test_delayed_save.py"
+ "--ignore" "lib/iris/tests/integration/netcdf/test_thread_safety.py"
+ "--ignore" "lib/iris/tests/integration/plot/test_vector_plots.py"
+ "--ignore" "lib/iris/tests/unit/analysis/regrid/test__CurvilinearRegridder.py"
+ "-k" (string-append "not test_python_versions"
+ " and not test_2d_coords_contour"
+ " and not test_grouped_dim"
+ " and not test_ungrouped_dim"))
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'build-std-names
+ (lambda _
+ ;; Need to build lib/iris/std_names.py before
+ ;; running the tests.
+ (invoke "python" "setup.py" "std_names")
+ ;; Replace some executable paths.
+ (let ((nc #$(this-package-native-input "netcdf")))
+ (substitute* "lib/iris/tests/stock/netcdf.py"
+ (("env_bin_path\\(\"ncgen\"\\)")
+ (format #f "\"~a/bin/ncgen\"" nc)))
+ (substitute* "lib/iris/tests/__init__.py"
+ (("env_bin_path\\(\"ncdump\"\\)")
+ (format #f "\"~a/bin/ncdump\"" nc))))))
+ ;; To avoid the antlr4 error from cf-units.
+ (delete 'sanity-check))))
+ (native-inputs (list netcdf
+ python-click
+ python-filelock
+ python-imagehash
+ python-pytest
+ python-setuptools-scm
+ python-wheel))
+ (propagated-inputs (list python-cartopy
+ python-cf-units
+ python-cftime
+ python-dask
+ python-distributed
+ python-matplotlib
+ python-netcdf4
+ python-numpy
+ python-pyproj
+ python-scipy
+ python-shapely
+ python-xxhash))
+ (home-page "https://github.com/SciTools/iris")
+ (synopsis "Library for analysing and visualising Earth science data")
+ (description
+ "Iris is a Python library for analysing and visualising Earth
++science data. It excels when working with multi-dimensional Earth Science
++data, where tabular representations become unwieldy and inefficient. Iris
++implements a data model based on the CF conventions.")
+ (license license:lgpl3+)))
+
(define-public tegola
(package
(name "tegola")
--
2.34.1
?