~ruther/guix-local

75016a2ee813b80314b75b31026d790318d64284 — Cayetano Santos 2 months ago 243bc42
gnu: python-lifelines: Compute parallel tests.

* gnu/packages/statistics.scm (python-lifelines)[native-inputs]: Add
python-pytest-xdist.
[arguments]: Add --numprocesses flag to #:test-flags, and remove very
slow tests.

Change-Id: Ib2ecc8bec37d9a7f95f992d8af160283b5abe881
1 files changed, 16 insertions(+), 5 deletions(-)

M gnu/packages/statistics.scm
M gnu/packages/statistics.scm => gnu/packages/statistics.scm +16 -5
@@ 1313,16 1313,27 @@ new data from those PDFs.")
     (list
      #:test-flags
      ;; NOTE: Tests take 15-25min to complete on 16 threads and much longer
      ;; in single one, consider to try enabling --numprocesses option.
      #~(list ;; "--numprocesses" (number->string (parallel-job-count))
              ;; This accuracy test fails because 0.012 is not < 0.01.
              "-k" "not test_weibull_with_delayed_entries")))
      ;; in single one, so enabling --numprocesses option.
      #~(list "lifelines/tests"
              "--numprocesses" (number->string (min 16 (parallel-job-count)))
              "-k" (string-join
                    (list
                     ;; This accuracy test fails because 0.012 is not < 0.01.
                     "not test_weibull_with_delayed_entries"
                     ;; These checks are too expensive, last for ages.
                     "test_univariate_fitters_ok_if_given_timedelta"
                     "test_predict_methods_returns_a_scalar_or_a_array_depending_on_input"
                     "test_cumulative_density_ci_is_ordered_correctly"
                     (string-append
                      "test_univariate_fitters_okay_if_"
                      "given_boolean_col_with_object_dtype"))
                    " and not "))))
    (native-inputs
     (list python-dill
           python-flaky
           python-joblib
           python-pytest
           ;; python-pytest-xdist
           python-pytest-xdist          ;see NOTE above
           python-setuptools
           python-wheel))
    (propagated-inputs