unofficial mirror of guix-patches@gnu.org 
 help / color / Atom feed
* [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas
@ 2020-06-20 18:22 Pierre Langlois
  2020-06-20 18:28 ` [bug#41968] [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools Pierre Langlois
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:22 UTC (permalink / raw)
  To: 41968

Hi Guix!

Recently I wanted to use python-plotly and realized our package could do
with an update, but to do that I also had to update the python-pandas
package otherwise tests wouldn't pass.

So in the end I got 5 patches all together :-).

  * gnu: deeptools: Deprecate in favor of python-deeptools.

    deeptools and python-deeptools are the same package, I looked at
    them since they depend on plotly. I thought I'd merge them as a
    drive-by fix.

  * gnu: python-pandas: Update to 1.0.5.

    I also had to keep versions 0.25 for the python-biom-format package.

  * gnu: Add python-retrying.
  * gnu: Add python-xarray.

    New dependencies.

  * gnu: python-plotly: Update to 4.8.1.

    I've also had to keep the version 2.4.1 around for the
    python-deeptools package.

WDYT?

Thanks,
Pierre




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools.
  2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
@ 2020-06-20 18:28 ` Pierre Langlois
  2020-06-20 18:29 ` [bug#41968] [PATCH 2/5] gnu: python-pandas: Update to 1.0.5 Pierre Langlois
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:28 UTC (permalink / raw)
  To: 41968; +Cc: Pierre Langlois

[-- Attachment #1: 0001-gnu-deeptools-Deprecate-in-favor-of-python-deeptools.patch --]
[-- Type: text/x-patch, Size: 4892 bytes --]

From b46bef2216620ac085bea41762904b16f2c6aec5 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Sat, 20 Jun 2020 18:42:04 +0200
Subject: [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools.

And make sure python-deeptools's tests are running.

* gnu/packages/bioinformatics.scm (python-deeptools): Fetch source using git.
[native-inputs]: Add python-mock and python-nose.
(deeptools): Mark as deprecated.
---
 gnu/packages/bioinformatics.scm | 61 +++++++--------------------------
 1 file changed, 13 insertions(+), 48 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 95f8b16db3..580488fc49 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17,6 +17,7 @@
 ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -53,6 +54,7 @@
   #:use-module (guix build-system ruby)
   #:use-module (guix build-system scons)
   #:use-module (guix build-system trivial)
+  #:use-module (guix deprecation)
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages algebra)
@@ -2406,12 +2408,18 @@ interval trees with associated meta-data.  It is primarily used by the
     (name "python-deeptools")
     (version "3.4.3")
     (source (origin
-              (method url-fetch)
-              (uri (pypi-uri "deepTools" version))
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/deeptools/deepTools.git")
+                    (commit version)))
+              (file-name (git-file-name name version))
               (sha256
                (base32
-                "1azgjniss5ff6a90nicdjkxyjwqmi3gzfn09gra42hwlz19hipxb"))))
+                "0l09vyynz6s6w7fnyd94rpys4a6aja6kp4gli64pngdxdz3md1nl"))))
     (build-system python-build-system)
+    (native-inputs
+     `(("python-mock" ,python-mock)
+       ("python-nose" ,python-nose)))
     (propagated-inputs
      `(("python-matplotlib" ,python-matplotlib)
        ("python-numpy" ,python-numpy)
@@ -2436,6 +2444,8 @@ annotations of the genome.")
     ;; remainder of the code is licensed under the MIT license.
     (license (list license:bsd-3 license:expat))))
 
+(define-deprecated deeptools python-deeptools)
+
 (define-public cutadapt
   (package
     (name "cutadapt")
@@ -2599,51 +2609,6 @@ trees (phylogenies) and characters.")
 with Python.")
     (license license:expat)))
 
-(define-public deeptools
-  (package
-    (name "deeptools")
-    (version "3.1.3")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/deeptools/deepTools.git")
-                    (commit version)))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1vggnf52g6q2vifdl4cyi7s2fnfqq0ky2zrkj5zv2qfzsc3p3siw"))))
-    (build-system python-build-system)
-    (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; This phase fails, but it's not needed.
-         (delete 'reset-gzip-timestamps))))
-    (inputs
-     `(("python-plotly" ,python-plotly)
-       ("python-scipy" ,python-scipy)
-       ("python-numpy" ,python-numpy)
-       ("python-numpydoc" ,python-numpydoc)
-       ("python-matplotlib" ,python-matplotlib)
-       ("python-pysam" ,python-pysam)
-       ("python-py2bit" ,python-py2bit)
-       ("python-pybigwig" ,python-pybigwig)))
-    (native-inputs
-     `(("python-mock" ,python-mock)   ;for tests
-       ("python-nose" ,python-nose)   ;for tests
-       ("python-pytz" ,python-pytz))) ;for tests
-    (home-page "https://github.com/deeptools/deepTools")
-    (synopsis "Tools for normalizing and visualizing deep-sequencing data")
-    (description
-     "DeepTools addresses the challenge of handling the large amounts of data
-that are now routinely generated from DNA sequencing centers.  To do so,
-deepTools contains useful modules to process the mapped reads data to create
-coverage files in standard bedGraph and bigWig file formats.  By doing so,
-deepTools allows the creation of normalized coverage files or the comparison
-between two files (for example, treatment and control).  Finally, using such
-normalized and standardized files, multiple visualizations can be created to
-identify enrichments with functional annotations of the genome.")
-    (license license:gpl3+)))
-
 (define-public delly
   (package
     (name "delly")
-- 
2.26.2





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] [PATCH 2/5] gnu: python-pandas: Update to 1.0.5.
  2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
  2020-06-20 18:28 ` [bug#41968] [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools Pierre Langlois
@ 2020-06-20 18:29 ` Pierre Langlois
  2020-06-20 18:30 ` [bug#41968] [PATCH 3/5] gnu: Add python-retrying Pierre Langlois
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:29 UTC (permalink / raw)
  To: 41968; +Cc: Pierre Langlois

[-- Attachment #1: 0002-gnu-python-pandas-Update-to-1.0.5.patch --]
[-- Type: text/x-patch, Size: 7568 bytes --]

From 6b7633a973970e0148fa18007a1fd378a6664a6b Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Thu, 18 Jun 2020 00:58:41 +0200
Subject: [PATCH 2/5] gnu: python-pandas: Update to 1.0.5.

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.
---
 gnu/packages/bioinformatics.scm |  4 +-
 gnu/packages/python-science.scm | 65 ++++++++++++++++++++++++---------
 2 files changed, 50 insertions(+), 19 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 580488fc49..3ee134db77 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -943,7 +943,9 @@ Python.")
        ("python-future" ,python-future)
        ("python-click" ,python-click)
        ("python-h5py" ,python-h5py)
-       ("python-pandas" ,python-pandas)))
+       ;; FIXME: Upgrade to pandas 1.0 when
+       ;; https://github.com/biocore/biom-format/issues/837 is resolved.
+       ("python-pandas" ,python-pandas-0.25)))
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-pytest" ,python-pytest)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 2f7516b9f6..55fc1be4f9 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -8,6 +8,7 @@
 ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;;
 ;;; 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")
-- 
2.26.2





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] [PATCH 3/5] gnu: Add python-retrying.
  2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
  2020-06-20 18:28 ` [bug#41968] [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools Pierre Langlois
  2020-06-20 18:29 ` [bug#41968] [PATCH 2/5] gnu: python-pandas: Update to 1.0.5 Pierre Langlois
@ 2020-06-20 18:30 ` Pierre Langlois
  2020-06-20 18:30 ` [bug#41968] [PATCH 4/5] gnu: Add python-xarray Pierre Langlois
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:30 UTC (permalink / raw)
  To: 41968; +Cc: Pierre Langlois

[-- Attachment #1: 0003-gnu-Add-python-retrying.patch --]
[-- Type: text/x-patch, Size: 2562 bytes --]

From f5ab03bda4a872db340349ef837776314501513e Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Thu, 18 Jun 2020 00:57:49 +0200
Subject: [PATCH 3/5] gnu: Add python-retrying.

* gnu/packages/python-xyz.scm (python-retrying): New variable.
---
 gnu/packages/python-xyz.scm | 35 ++++++++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e95dec21c2..4a22b42ac2 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -61,7 +61,7 @@
 ;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us>
 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
 ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
-;;; Copyright © 2019 Pierre Langlois <pierre.langlois@gmx.com>
+;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois@gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac@gmail.com>
 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul@autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
@@ -17701,6 +17701,39 @@ on regular expressions.")
               `(("python2-enum34" ,python2-enum34)
                 ,@(package-propagated-inputs reparser))))))
 
+(define-public python-retrying
+  (package
+    (name "python-retrying")
+    (version "1.3.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/rholder/retrying.git")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32
+         "1kqipkbdaw5s1xg0gi29awm03vp1x8dz24pjidgxagvkvrjpzhi7"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-six" ,python-six)))
+    (home-page "https://github.com/rholder/retrying")
+    (synopsis "Library for adding retry behavior")
+    (description "Retrying is a general-purpose retrying library to simplify
+the task of adding retry behavior to just about anything.
+
+Features:
+
+@itemize
+@item Generic Decorator API.
+@item Specify stop condition (i.e. limit by number of attempts).
+@item Specify wait condition (i.e. exponential backoff sleeping between attempts).
+@item Customize retrying on Exceptions.
+@item Customize retrying on expected returned result.
+@end itemize")
+    (license license:asl2.0)))
+
 (define-public python-precis-i18n
   (package
     (name "python-precis-i18n")
-- 
2.26.2





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] [PATCH 4/5] gnu: Add python-xarray.
  2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
                   ` (2 preceding siblings ...)
  2020-06-20 18:30 ` [bug#41968] [PATCH 3/5] gnu: Add python-retrying Pierre Langlois
@ 2020-06-20 18:30 ` Pierre Langlois
  2020-06-20 18:31 ` [bug#41968] [PATCH 5/5] gnu: python-plotly: Update to 4.8.1 Pierre Langlois
       [not found] ` <handler.41968.B.15926773811621.ack@debbugs.gnu.org>
  5 siblings, 0 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:30 UTC (permalink / raw)
  To: 41968; +Cc: Pierre Langlois

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0004-gnu-Add-python-xarray.patch --]
[-- Type: text/x-patch, Size: 2247 bytes --]

From 27ec21904f769c1e8114f767972d9037e1e9f68a Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
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.
---
 gnu/packages/python-science.scm | 35 +++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 55fc1be4f9..9348894530 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)))
--
2.26.2





^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] [PATCH 5/5] gnu: python-plotly: Update to 4.8.1.
  2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
                   ` (3 preceding siblings ...)
  2020-06-20 18:30 ` [bug#41968] [PATCH 4/5] gnu: Add python-xarray Pierre Langlois
@ 2020-06-20 18:31 ` Pierre Langlois
       [not found] ` <handler.41968.B.15926773811621.ack@debbugs.gnu.org>
  5 siblings, 0 replies; 9+ messages in thread
From: Pierre Langlois @ 2020-06-20 18:31 UTC (permalink / raw)
  To: 41968; +Cc: Pierre Langlois

[-- Attachment #1: 0005-gnu-python-plotly-Update-to-4.8.1.patch --]
[-- Type: text/x-patch, Size: 5802 bytes --]

From a1526919f28d8ea4a958ef3b672b3187c8c3bd82 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois@gmx.com>
Date: Thu, 18 Jun 2020 00:59:09 +0200
Subject: [PATCH 5/5] gnu: python-plotly: Update to 4.8.1.

But keep version 2.4.1 around for packages that still need it and for python2
support.

* gnu/packages/graph.scm (python-plotly): Update to 4.8.1.
[source]: Use git-fetch so that tests are also included.
[arguments]: Enable tests.
[home-page]: Follow redirect.
(python-plotly-2.4.1): New variable.
(python2-plotly): Inherit from python-plotly-2.4.1.
* gnu/packages/bioinformatics.scm (python-deeptools)[native-inputs]: Depend on
python-plotly-2.4.1.
---
 gnu/packages/bioinformatics.scm |  2 +-
 gnu/packages/graph.scm          | 74 ++++++++++++++++++++++++++-------
 2 files changed, 61 insertions(+), 15 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 3ee134db77..ce54c613b0 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2431,7 +2431,7 @@ interval trees with associated meta-data.  It is primarily used by the
        ("python-pysam" ,python-pysam)
        ("python-scipy" ,python-scipy)
        ("python-deeptoolsintervals" ,python-deeptoolsintervals)
-       ("python-plotly" ,python-plotly)))
+       ("python-plotly" ,python-plotly-2.4.1)))
     (home-page "https://pypi.org/project/deepTools/")
     (synopsis "Useful tools for exploring deep sequencing data")
     (description "This package addresses the challenge of handling large amounts
diff --git a/gnu/packages/graph.scm b/gnu/packages/graph.scm
index dc8f2c64a2..762ee30632 100644
--- a/gnu/packages/graph.scm
+++ b/gnu/packages/graph.scm
@@ -5,6 +5,7 @@
 ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Andreas Enge <andreas@enge.fr>
 ;;; Copyright © 2020 Alexander Krotov <krotov@iitp.ru>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlos@gmx.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -235,25 +236,49 @@ lines.")
 (define-public python-plotly
   (package
     (name "python-plotly")
-    (version "2.4.1")
-    (source
-      (origin
-        (method url-fetch)
-        (uri (pypi-uri "plotly" version))
-        (sha256
-         (base32
-          "0s9gk2fl53x8wwncs3fwii1vzfngr0sskv15v3mpshqmrqfrk27m"))))
+    (version "4.8.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/plotly/plotly.py.git")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "08ab677gr85m10zhixr6dnmlfws8q6sra7nhyb8nf3r8dx1ffqhz"))))
     (build-system python-build-system)
     (arguments
-     '(#:tests? #f)) ; The tests are not distributed in the release
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'chdir
+           (lambda _
+             (chdir "packages/python/plotly")
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "pytest" "-x" "plotly/tests/test_core")
+             (invoke "pytest" "-x" "plotly/tests/test_io")
+             ;; FIXME: Add optional dependencies and enable their tests.
+             ;; (invoke "pytest" "-x" "plotly/tests/test_optional")
+             (invoke "pytest" "_plotly_utils/tests")))
+         (add-before 'reset-gzip-timestamps 'make-files-writable
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (for-each (lambda (file) (chmod file #o644))
+                 (find-files out "\\.gz"))
+               #t))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)))
     (propagated-inputs
      `(("python-decorator" ,python-decorator)
-       ("python-nbformat" ,python-nbformat)
+       ("python-ipywidgets" ,python-ipywidgets)
        ("python-pandas" ,python-pandas)
-       ("python-pytz" ,python-pytz)
        ("python-requests" ,python-requests)
-       ("python-six" ,python-six)))
-    (home-page "https://plot.ly/python/")
+       ("python-retrying" ,python-retrying)
+       ("python-six" ,python-six)
+       ("python-statsmodels" ,python-statsmodels)
+       ("python-xarray" ,python-xarray)))
+    (home-page "https://plotly.com/python/")
     (synopsis "Interactive plotting library for Python")
     (description "Plotly's Python graphing library makes interactive,
 publication-quality graphs online.  Examples of how to make line plots, scatter
@@ -261,8 +286,29 @@ plots, area charts, bar charts, error bars, box plots, histograms, heatmaps,
 subplots, multiple-axes, polar charts, and bubble charts. ")
     (license license:expat)))
 
+(define-public python-plotly-2.4.1
+  (package (inherit python-plotly)
+    (version "2.4.1")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "plotly" version))
+        (sha256
+         (base32
+          "0s9gk2fl53x8wwncs3fwii1vzfngr0sskv15v3mpshqmrqfrk27m"))))
+   (native-inputs '())
+   (propagated-inputs
+    `(("python-decorator" ,python-decorator)
+      ("python-nbformat" ,python-nbformat)
+      ("python-pandas" ,python-pandas)
+      ("python-pytz" ,python-pytz)
+      ("python-requests" ,python-requests)
+      ("python-six" ,python-six)))
+    (arguments
+     '(#:tests? #f)))) ; The tests are not distributed in the release
+
 (define-public python2-plotly
-  (package-with-python2 python-plotly))
+  (package-with-python2 python-plotly-2.4.1))
 
 (define-public python-louvain
   (package
-- 
2.26.2





^ permalink raw reply	[flat|nested] 9+ messages in thread

* bug#41968: Acknowledgement ([PATCH 0/5] Update python-plotly and python-pandas)
       [not found] ` <handler.41968.B.15926773811621.ack@debbugs.gnu.org>
@ 2020-06-22 16:44   ` Pierre Langlois
  2020-06-24 19:08     ` [bug#41968] " Marius Bakke
  0 siblings, 1 reply; 9+ messages in thread
From: Pierre Langlois @ 2020-06-22 16:44 UTC (permalink / raw)
  To: 41968-done; +Cc: Pierre Langlois, Ludovic Courtès

Thanks for merging Ludo!

Closing.

Pierre




^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] Acknowledgement ([PATCH 0/5] Update python-plotly and python-pandas)
  2020-06-22 16:44   ` bug#41968: Acknowledgement ([PATCH 0/5] Update python-plotly and python-pandas) Pierre Langlois
@ 2020-06-24 19:08     ` Marius Bakke
  2020-06-26  3:20       ` Leo Famulari
  0 siblings, 1 reply; 9+ messages in thread
From: Marius Bakke @ 2020-06-24 19:08 UTC (permalink / raw)
  To: Pierre Langlois, 41968-done; +Cc: Pierre Langlois, Ludovic Courtès

[-- Attachment #1: Type: text/plain, Size: 212 bytes --]

Pierre Langlois <pierre.langlois@gmx.com> writes:

> Thanks for merging Ludo!

By the way, consider applying for commit access, as you have delivered a
steady stream of quality patches.  I'll vouch for you.  :-)

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [bug#41968] Acknowledgement ([PATCH 0/5] Update python-plotly and python-pandas)
  2020-06-24 19:08     ` [bug#41968] " Marius Bakke
@ 2020-06-26  3:20       ` Leo Famulari
  0 siblings, 0 replies; 9+ messages in thread
From: Leo Famulari @ 2020-06-26  3:20 UTC (permalink / raw)
  To: Marius Bakke; +Cc: Pierre Langlois, Ludovic Courtès, 41968-done

[-- Attachment #1: Type: text/plain, Size: 309 bytes --]

On Wed, Jun 24, 2020 at 09:08:00PM +0200, Marius Bakke wrote:
> Pierre Langlois <pierre.langlois@gmx.com> writes:
> 
> > Thanks for merging Ludo!
> 
> By the way, consider applying for commit access, as you have delivered a
> steady stream of quality patches.  I'll vouch for you.  :-)

Yes, please!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, back to index

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-20 18:22 [bug#41968] [PATCH 0/5] Update python-plotly and python-pandas Pierre Langlois
2020-06-20 18:28 ` [bug#41968] [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools Pierre Langlois
2020-06-20 18:29 ` [bug#41968] [PATCH 2/5] gnu: python-pandas: Update to 1.0.5 Pierre Langlois
2020-06-20 18:30 ` [bug#41968] [PATCH 3/5] gnu: Add python-retrying Pierre Langlois
2020-06-20 18:30 ` [bug#41968] [PATCH 4/5] gnu: Add python-xarray Pierre Langlois
2020-06-20 18:31 ` [bug#41968] [PATCH 5/5] gnu: python-plotly: Update to 4.8.1 Pierre Langlois
     [not found] ` <handler.41968.B.15926773811621.ack@debbugs.gnu.org>
2020-06-22 16:44   ` bug#41968: Acknowledgement ([PATCH 0/5] Update python-plotly and python-pandas) Pierre Langlois
2020-06-24 19:08     ` [bug#41968] " Marius Bakke
2020-06-26  3:20       ` Leo Famulari

unofficial mirror of guix-patches@gnu.org 

Archives are clonable:
	git clone --mirror https://yhetil.org/guix-patches/1 guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ https://yhetil.org/guix-patches \
		guix-patches@gnu.org
	public-inbox-index guix-patches

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://news.yhetil.org/yhetil.gnu.guix.patches


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git