~ruther/guix-local

42db14eee245b1aa1cb28d01bffe215f668f3158 — Sharlatan Hellseher 1 year, 3 months ago 77a8c24
gnu: python-tdda: Update to 2.2.17.

* gnu/packages/python-science.scm (python-tdda): Update to 2.2.17.
[arguments] <test-flags>: Skip one failing test.
<phases>: Use default 'check, add 'fix-Python3.11-datetime.UTC.
[native-inputs]: Add python-chardet, python-pyarrow, python-pytest, and
python-rich.

Change-Id: I9d268a8656f51484c3d6c59a86b7537e50f864dc
1 files changed, 22 insertions(+), 7 deletions(-)

M gnu/packages/python-science.scm
M gnu/packages/python-science.scm => gnu/packages/python-science.scm +22 -7
@@ 978,23 978,38 @@ cross-validation.")
(define-public python-tdda
  (package
    (name "python-tdda")
    (version "2.0.9")
    (version "2.2.17")
    (source
     (origin
       (method url-fetch)
       (uri (pypi-uri "tdda" version))
       (sha256
        (base32 "1xs91s8b7cshjcqw88qsrjh10xly799k5rf2ycawqfz2mw8sy3br"))))
        (base32 "1l2ph60m20ii4ljgd81wccpp5p8p2m81irr97k7850s2l1qnikcw"))))
    (build-system pyproject-build-system)
    (arguments
     '(#:phases (modify-phases %standard-phases
                  (replace 'check
                    (lambda* (#:key tests? #:allow-other-keys)
                      (when tests?
                        (invoke "tdda" "test")))))))
     (list
      #:test-flags
      #~(list
         ;; One test fails with error: AssertionError: False is not true : 5
         ;; lines are different, starting at line 1
         "--deselect=tdda/test_tdda.py::TestOne::test_ddiff_values_output")
      #:phases
      #~(modify-phases %standard-phases
          ;; "datetime.UTC" is not availalbe in Python 3.10 but in
          ;; 3.11 it's present
          ;; <https://docs.python.org/3/library/datetime.html#datetime.UTC>.
          (add-after 'unpack 'fix-Python3.11-datetime.UTC
            (lambda _
            (substitute* (find-files "." "\\.py")
              (("datetime.UTC")
               "datetime.timezone.utc")))))))
    (native-inputs
     (list python-numpy
           python-chardet
           python-pandas
           python-pyarrow
           python-pytest
           python-rich
           python-setuptools
           python-wheel))
    (home-page "https://www.stochasticsolutions.com")