GNU bug report logs - #41968
[PATCH 0/5] Update python-plotly and python-pandas

Previous Next

Package: guix-patches;

Reported by: Pierre Langlois <pierre.langlois <at> gmx.com>

Date: Sat, 20 Jun 2020 18:24:01 UTC

Severity: normal

Tags: patch

Done: Pierre Langlois <pierre.langlois <at> gmx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 41968 in the body.
You can then email your comments to 41968 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:24:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sat, 20 Jun 2020 18:24:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: guix-patches <at> gnu.org
Subject: [PATCH 0/5] Update python-plotly and python-pandas
Date: Sat, 20 Jun 2020 20:22:50 +0200
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




Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:29:02 GMT) Full text and rfc822 format available.

Message #8 received at 41968 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 1/5] gnu: deeptools: Deprecate in favor of python-deeptools.
Date: Sat, 20 Jun 2020 20:28:31 +0200
[0001-gnu-deeptools-Deprecate-in-favor-of-python-deeptools.patch (text/x-patch, inline)]
From b46bef2216620ac085bea41762904b16f2c6aec5 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> 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 <at> gnu.org>
 ;;; Copyright © 2020 Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
 ;;; Copyright © 2020 Jakub Kądziołka <kuba <at> kadziolka.net>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:30:02 GMT) Full text and rfc822 format available.

Message #11 received at 41968 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 2/5] gnu: python-pandas: Update to 1.0.5.
Date: Sat, 20 Jun 2020 20:29:20 +0200
[0002-gnu-python-pandas-Update-to-1.0.5.patch (text/x-patch, inline)]
From 6b7633a973970e0148fa18007a1fd378a6664a6b Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> 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 <at> tobias.gr>
 ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
 ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul <at> autistici.org>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlois <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:31:02 GMT) Full text and rfc822 format available.

Message #14 received at 41968 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 3/5] gnu: Add python-retrying.
Date: Sat, 20 Jun 2020 20:30:00 +0200
[0003-gnu-Add-python-retrying.patch (text/x-patch, inline)]
From f5ab03bda4a872db340349ef837776314501513e Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> 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 <at> jackhill.us>
 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv <at> posteo.net>
 ;;; Copyright © 2019, 2020 Alex Griffin <a <at> ajgrf.com>
-;;; Copyright © 2019 Pierre Langlois <pierre.langlois <at> gmx.com>
+;;; Copyright © 2019, 2020 Pierre Langlois <pierre.langlois <at> gmx.com>
 ;;; Copyright © 2019 Jacob MacDonald <jaccarmac <at> gmail.com>
 ;;; Copyright © 2019, 2020 Giacomo Leidi <goodoldpaul <at> autistici.org>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:31:02 GMT) Full text and rfc822 format available.

Message #17 received at 41968 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 4/5] gnu: Add python-xarray.
Date: Sat, 20 Jun 2020 20:30:28 +0200
[0004-gnu-Add-python-xarray.patch (text/x-patch, inline)]
From 27ec21904f769c1e8114f767972d9037e1e9f68a Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> 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





Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Sat, 20 Jun 2020 18:32:01 GMT) Full text and rfc822 format available.

Message #20 received at 41968 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968 <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>
Subject: [PATCH 5/5] gnu: python-plotly: Update to 4.8.1.
Date: Sat, 20 Jun 2020 20:31:07 +0200
[0005-gnu-python-plotly-Update-to-4.8.1.patch (text/x-patch, inline)]
From a1526919f28d8ea4a958ef3b672b3187c8c3bd82 Mon Sep 17 00:00:00 2001
From: Pierre Langlois <pierre.langlois <at> 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 <at> flashner.co.il>
 ;;; Copyright © 2019 Andreas Enge <andreas <at> enge.fr>
 ;;; Copyright © 2020 Alexander Krotov <krotov <at> iitp.ru>
+;;; Copyright © 2020 Pierre Langlois <pierre.langlos <at> 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





Reply sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
You have taken responsibility. (Mon, 22 Jun 2020 16:45:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Langlois <pierre.langlois <at> gmx.com>:
bug acknowledged by developer. (Mon, 22 Jun 2020 16:45:02 GMT) Full text and rfc822 format available.

Message #25 received at 41968-done <at> debbugs.gnu.org (full text, mbox):

From: Pierre Langlois <pierre.langlois <at> gmx.com>
To: 41968-done <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>,
 Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#41968: Acknowledgement ([PATCH 0/5] Update python-plotly and
 python-pandas)
Date: Mon, 22 Jun 2020 18:44:41 +0200
Thanks for merging Ludo!

Closing.

Pierre




Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Wed, 24 Jun 2020 19:09:02 GMT) Full text and rfc822 format available.

Message #28 received at 41968-done <at> debbugs.gnu.org (full text, mbox):

From: Marius Bakke <marius <at> gnu.org>
To: Pierre Langlois <pierre.langlois <at> gmx.com>, 41968-done <at> debbugs.gnu.org
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>,
 Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: bug#41968: Acknowledgement ([PATCH 0/5] Update python-plotly and
 python-pandas)
Date: Wed, 24 Jun 2020 21:08:00 +0200
[Message part 1 (text/plain, inline)]
Pierre Langlois <pierre.langlois <at> 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.  :-)
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#41968; Package guix-patches. (Fri, 26 Jun 2020 03:22:02 GMT) Full text and rfc822 format available.

Message #31 received at 41968-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Famulari <leo <at> famulari.name>
To: Marius Bakke <marius <at> gnu.org>
Cc: Pierre Langlois <pierre.langlois <at> gmx.com>,
 Ludovic Courtès <ludo <at> gnu.org>, 41968-done <at> debbugs.gnu.org
Subject: Re: [bug#41968] Acknowledgement ([PATCH 0/5] Update python-plotly
 and python-pandas)
Date: Thu, 25 Jun 2020 23:20:54 -0400
[Message part 1 (text/plain, inline)]
On Wed, Jun 24, 2020 at 09:08:00PM +0200, Marius Bakke wrote:
> Pierre Langlois <pierre.langlois <at> 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!
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 24 Jul 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 275 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.