guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: python-pandas: Update to 0.22.0.


From: Marius Bakke
Subject: 03/03: gnu: python-pandas: Update to 0.22.0.
Date: Fri, 9 Feb 2018 08:45:39 -0500 (EST)

mbakke pushed a commit to branch core-updates
in repository guix.

commit ce2cfcabfccbd6062ab4029258ab61b308508c62
Author: Marius Bakke <address@hidden>
Date:   Fri Feb 9 14:40:44 2018 +0100

    gnu: python-pandas: Update to 0.22.0.
    
    * gnu/local.mk (dist_patch_DATA): Remove it.
    * gnu/packages/patches/python-pandas-skip-failing-tests.patch: Delete file.
    * gnu/packages/python.scm (python-pandas): Update to 0.22.0.
    [source](patches): Remove.
    [native-inputs]: Add PYTHON-PYTEST and PYTHON-LXML.
    [arguments]: Replace CHECK-PHASE with custom pytest invocation.
    [home-page]: Use HTTPS.
---
 gnu/local.mk                                       |  1 -
 .../patches/python-pandas-skip-failing-tests.patch | 49 ----------------------
 gnu/packages/python.scm                            | 38 +++++++++++++----
 3 files changed, 31 insertions(+), 57 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 9cf14c8..0a7810d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1026,7 +1026,6 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/python-scikit-learn-fix-test-non-determinism.patch      
\
   %D%/packages/patches/python-configobj-setuptools.patch       \
   %D%/packages/patches/python-faker-fix-build-32bit.patch      \
-  %D%/packages/patches/python-pandas-skip-failing-tests.patch  \
   %D%/packages/patches/python-paste-remove-website-test.patch  \
   %D%/packages/patches/python-paste-remove-timing-test.patch   \
   %D%/packages/patches/python-pygit2-disable-network-tests.patch       \
diff --git a/gnu/packages/patches/python-pandas-skip-failing-tests.patch 
b/gnu/packages/patches/python-pandas-skip-failing-tests.patch
deleted file mode 100644
index 8ac330c..0000000
--- a/gnu/packages/patches/python-pandas-skip-failing-tests.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-These tests fail on 32bit architectures.
-
-Upstream bug URL: https://github.com/pandas-dev/pandas/issues/14866
-
---- a/pandas/tests/indexes/common.py   2017-03-09 00:10:26.063996176 +0100
-+++ b/pandas/tests/indexes/common.py   2017-03-09 00:10:53.152844191 +0100
-@@ -119,20 +119,6 @@
-         with tm.assertRaisesRegexp(ValueError, 'Invalid fill method'):
-             idx.get_indexer(idx, method='invalid')
- 
--    def test_ndarray_compat_properties(self):
--
--        idx = self.create_index()
--        self.assertTrue(idx.T.equals(idx))
--        self.assertTrue(idx.transpose().equals(idx))
--
--        values = idx.values
--        for prop in self._compat_props:
--            self.assertEqual(getattr(idx, prop), getattr(values, prop))
--
--        # test for validity
--        idx.nbytes
--        idx.values.nbytes
--
-     def test_repr_roundtrip(self):
- 
-         idx = self.create_index()
---- a/pandas/tools/tests/test_tile.py  2017-03-08 17:47:39.762261841 +0100
-+++ b/pandas/tools/tests/test_tile.py  2017-03-08 17:48:26.831780495 +0100
-@@ -271,19 +271,6 @@
-                                     np.array([0, 0, 1, 1], dtype=np.int8))
-         tm.assert_numpy_array_equal(bins, np.array([0, 1.5, 3]))
- 
--    def test_single_bin(self):
--        # issue 14652
--        expected = Series([0, 0])
--
--        s = Series([9., 9.])
--        result = cut(s, 1, labels=False)
--        tm.assert_series_equal(result, expected)
--
--        s = Series([-9., -9.])
--        result = cut(s, 1, labels=False)
--        tm.assert_series_equal(result, expected)
--
--
- def curpath():
-     pth, _ = os.path.split(os.path.abspath(__file__))
-     return pth
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index ac8927c..6e08e38 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1066,24 +1066,48 @@ human-friendly syntax.")
 (define-public python-pandas
   (package
     (name "python-pandas")
-    (version "0.19.2")
+    (version "0.22.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "pandas" version))
        (sha256
-        (base32 "0540cnbwy2hc4hv2sxfs8i47xi91qzvzxfn80dl785ibiicly3vg"))
-       (patches
-        (search-patches "python-pandas-skip-failing-tests.patch"))))
+        (base32 "0v0fi2i10kwnmlpsl6f1fgajcpx3q6766qf6xqi5kw3ivn8l1aa4"))))
     (build-system python-build-system)
+    (arguments
+     `(#:modules ((guix build utils)
+                  (guix build python-build-system)
+                  (ice-9 ftw)
+                  (srfi srfi-26))
+       #:phases (modify-phases %standard-phases
+                  (replace 'check
+                    (lambda _
+                      (let ((build-directory
+                             (string-append
+                              (getcwd) "/build/"
+                              (car (scandir "build"
+                                            (cut string-prefix? "lib." <>))))))
+                        (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/test_excel.py"))
+                          (invoke "pytest" "-v" "pandas" "-k"
+                                  (string-append
+                                   "not network and not disabled"
+                                   ;; XXX: Due to the deleted tests above.
+                                   " and not test_read_s3_jsonl")))))))))
     (propagated-inputs
      `(("python-numpy" ,python-numpy)
        ("python-pytz" ,python-pytz)
        ("python-dateutil" ,python-dateutil)))
     (native-inputs
-     `(("python-nose" ,python-nose)
-       ("python-cython" ,python-cython)))
-    (home-page "http://pandas.pydata.org";)
+     `(("python-cython" ,python-cython)
+       ("python-lxml" ,python-lxml)
+       ("python-nose" ,python-nose)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://pandas.pydata.org";)
     (synopsis "Data structures for data analysis, time series, and statistics")
     (description
      "Pandas is a Python package providing fast, flexible, and expressive data



reply via email to

[Prev in Thread] Current Thread [Next in Thread]