[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
152/166: gnu: python-pandas: Build and run tests in parallel.
From: |
guix-commits |
Subject: |
152/166: gnu: python-pandas: Build and run tests in parallel. |
Date: |
Tue, 19 Apr 2022 09:18:12 -0400 (EDT) |
apteryx pushed a commit to branch wip-ipython+polyglossia
in repository guix.
commit 9e9457cf59705055064f21101c8f00ad1e375585
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Mon Apr 18 15:27:38 2022 -0400
gnu: python-pandas: Build and run tests in parallel.
* gnu/packages/python-science.scm (python-pandas)
[phases]{enable-parallel-build}: New phase.
{check}: Add xdist -n option. Skip test_memory_usage test.
[native-inputs]: Add python-pytest-xdist.
---
gnu/packages/python-science.scm | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 1852a16047..7721b04c31 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -412,6 +412,12 @@ library.")
(srfi srfi-26))
#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'enable-parallel-build
+ (lambda _
+ (substitute* "setup.py"
+ (("\"-j\", type=int, default=1")
+ (format #f "\"-j\", type=int, default=~a"
+ (parallel-job-count))))))
(add-after 'unpack 'patch-which
(lambda* (#:key inputs #:allow-other-keys)
(let ((which (assoc-ref inputs "which")))
@@ -438,6 +444,7 @@ library.")
(when tests?
(invoke "pytest" "-vv" "pandas" "--skip-slow"
"--skip-network"
+ "-n" (number->string (parallel-job-count))
"-k"
(string-append
;; These test access the internet (see:
@@ -447,7 +454,11 @@ library.")
"not test_wrong_url"
;; TODO: Missing input
" and not TestS3"
- " and not s3"))))))))))
+ " and not s3"
+ ;; This test fails when run with pytest-xdist
+ ;; (see:
+ ;;
https://github.com/pandas-dev/pandas/issues/39096).
+ " and not test_memory_usage"))))))))))
(propagated-inputs
(list python-jinja2
python-numpy
@@ -465,6 +476,7 @@ library.")
python-html5lib
python-pytest
python-pytest-mock
+ python-pytest-xdist
;; Needed to test clipboard support.
xorg-server-for-tests))
(home-page "https://pandas.pydata.org")
- 128/166: gnu: Add python-strict-rfc3339., (continued)
- 128/166: gnu: Add python-strict-rfc3339., guix-commits, 2022/04/19
- 139/166: gnu: python-sqlalchemy: Run tests in parallel via xdist., guix-commits, 2022/04/19
- 90/166: gnu: python-click: Update to 8.1.2 and honor TESTS?., guix-commits, 2022/04/19
- 97/166: gnu: Add python-debugpy., guix-commits, 2022/04/19
- 102/166: gnu: python-nest-asyncio: Update to 1.5.5., guix-commits, 2022/04/19
- 110/166: gnu: python-bleach: Update to 5.0.0., guix-commits, 2022/04/19
- 113/166: gnu: python-nbconvert: Update to 6.5.0., guix-commits, 2022/04/19
- 115/166: gnu: python-nbval: Fix build., guix-commits, 2022/04/19
- 131/166: gnu: Add python-openapi-spec-validator., guix-commits, 2022/04/19
- 132/166: gnu: Add python-cbor2., guix-commits, 2022/04/19
- 152/166: gnu: python-pandas: Build and run tests in parallel.,
guix-commits <=
- 155/166: gnu: python-pynndescent: Update to 0.5.6., guix-commits, 2022/04/19
- 89/166: gnu: Add font-gfs-ambrosia., guix-commits, 2022/04/19
- 111/166: gnu: Add texlive-unicode-math., guix-commits, 2022/04/19
- 120/166: gnu: python-sphinx: Propagate TexLive dependencies., guix-commits, 2022/04/19
- 119/166: gnu: Add python-docrepr., guix-commits, 2022/04/19
- 130/166: gnu: Add python-openapi-schema-validator., guix-commits, 2022/04/19
- 135/166: gnu: Add python-httpx-bootstrap., guix-commits, 2022/04/19
- 147/166: gnu: Add python-jupyterlab-server., guix-commits, 2022/04/19
- 156/166: gnu: python-umap-learn: Update to 0.5.3., guix-commits, 2022/04/19
- 98/166: gnu: python-greenlet: Update to 1.1.2., guix-commits, 2022/04/19