summaryrefslogtreecommitdiff
path: root/gnu/packages/python-xyz.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r--gnu/packages/python-xyz.scm664
1 files changed, 468 insertions, 196 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 87963f9f19..3ea2763b49 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -131,6 +131,7 @@
;;; Copyright © 2022 Mathieu Laparie <mlaparie@disr.it>
;;; Copyright © 2022 Garek Dyszel <garekdyszel@disroot.org>
;;; Copyright © 2022 Baptiste Strazzulla <bstrazzull@hotmail.fr>
+;;; Copyright © 2022 Nicolas Graves <ngraves@ngraves.fr>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -159,9 +160,11 @@
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages cpp)
#:use-module (gnu packages crypto)
#:use-module (gnu packages databases)
#:use-module (gnu packages dbm)
+ #:use-module (gnu packages digest)
#:use-module (gnu packages django)
#:use-module (gnu packages djvu)
#:use-module (gnu packages docker)
@@ -198,6 +201,7 @@
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
+ #:use-module (gnu packages machine-learning)
#:use-module (gnu packages man)
#:use-module (gnu packages markup)
#:use-module (gnu packages maths)
@@ -562,6 +566,24 @@ and variables you'll need already imported and created.
(home-page "https://github.com/google/python-fire")
(license license:asl2.0)))
+(define-public python-fit-nbinom
+ (package
+ (name "python-fit-nbinom")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "fit_nbinom" version))
+ (sha256
+ (base32
+ "12v8l5i35vjbpvh5i4lw29ys6vpr3z7pysyrx33hxaq09zr015mx"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-numpy python-scipy))
+ (home-page "https://github.com/joachimwolff/fit_nbinom")
+ (synopsis "Negative binomial maximum likelihood estimator")
+ (description "This package provides an implementation in Python using
+scipy and numpy of negative binomial maximum likelihood estimation.")
+ (license license:gpl3+)))
+
(define-public python-dotmap
(package
(name "python-dotmap")
@@ -898,6 +920,24 @@ template")
variables into the markdown template")
(license license:expat)))
+(define-public python-py4j
+ (package
+ (name "python-py4j")
+ (version "0.10.9.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "py4j" version))
+ (sha256
+ (base32
+ "1fwdx92cdaiviradksfyygg05g1fpc3x2lf65bv5rnispcam6vhb"))))
+ (build-system python-build-system)
+ (home-page "https://www.py4j.org/")
+ (synopsis "Dynamically access arbitrary Java objects from Python")
+ (description
+ "This package enables Python programs to dynamically access arbitrary
+Java objects.")
+ (license license:bsd-3)))
+
(define-public python-pymdown-extensions
(package
(name "python-pymdown-extensions")
@@ -921,6 +961,36 @@ variables into the markdown template")
Markdown. All extensions are found under the module namespace of pymdownx.")
(license license:expat)))
+(define-public python-pint
+ (package
+ (name "python-pint")
+ (version "0.19.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "Pint" version))
+ (sha256
+ (base32
+ "1bsbiikm9i4saqc6mc3minkmrgnsgcg734agsvd7icqhyngrim71"))))
+ (build-system python-build-system)
+ (native-inputs
+ (list python-pytest
+ python-pytest-cov
+ python-pytest-mpl
+ python-pytest-subtests
+ python-setuptools-scm
+ python-sparse
+ python-dask
+ python-xarray
+ python-distributed))
+ (home-page "https://github.com/hgrecco/pint")
+ (synopsis "Physical quantities module")
+ (description
+ "Pint is a Python package to define, operate and manipulate physical
+quantities: the product of a numerical value and a unit of measurement. It
+allows arithmetic operations between them and conversions from and to
+different units.")
+ (license license:bsd-3)))
+
(define-public python-plotille
(package
(name "python-plotille")
@@ -1689,21 +1759,14 @@ NetCDF files can also be read and modified. Python-HDF4 is a fork of
(define-public python-h5netcdf
(package
(name "python-h5netcdf")
- (version "1.0.1")
+ (version "1.1.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "h5netcdf" version))
(sha256
- (base32 "1b2dcgf5rwy7pb7hr4prkc5vgcw9qc2was20dmnj90lbrpx08rvp"))))
- (build-system python-build-system)
- (arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv" "h5netcdf/tests")))))))
+ (base32 "0mmzfr6k55zqxxpb64gvdqisak8s1zb2r04yzkmp0wzd7dbknb4k"))))
+ (build-system pyproject-build-system)
(native-inputs
(list python-netcdf4
python-pytest
@@ -1712,9 +1775,11 @@ NetCDF files can also be read and modified. Python-HDF4 is a fork of
(list python-h5py python-packaging))
(home-page "https://h5netcdf.org")
(synopsis "Python interface for the netCDF4 file-format based on h5py")
- (description "This package provides Python interface for the netCDF4
-file-format that reads and writes local or remote HDF5 files directly via h5py
-or h5pyd, without relying on the Unidata netCDF library")
+ (description "This package provides a Python interface for the netCDF4
+file-format that reads and writes local or remote HDF5 files directly via
+@url{h5py, https://www.h5py.org/} or @url{h5pyd,
+https://github.com/HDFGroup/h5pyd}, without relying on the Unidata netCDF
+library.")
(license license:bsd-3)))
(define-public python-h5py
@@ -3008,6 +3073,29 @@ the optional C extension for speedups. Simplejson is also supported on
Python 3.3+.")
(license license:x11)))
+(define-public python-simple-rlp
+ (package
+ (name "python-simple-rlp")
+ (version "0.1.3")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SamuelHaidu/simple-rlp")
+ ;; Upstream doesn't tag the git repo.
+ (commit "342ea269d84da1ddc4a7630cdebc90159261391c")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1nv92sphpkyrncak4qgj50qmgkmj4ycl2szbnv9c7ihgl5df4div"))))
+ (build-system python-build-system)
+ (home-page "https://github.com/SamuelHaidu/simple-rlp")
+ (synopsis
+ "Python implementation of RLP (Recursive Length Prefix) encoding")
+ (description
+ "@code{simple-rlp} is a python implementation of RLP (Recursive Length \
+Prefix) - Encode and decode data structures.")
+ (license license:expat)))
(define-public python-pyicu
(package
@@ -3228,6 +3316,46 @@ existing ones.")
a certain expected condition.")
(license license:expat)))
+(define-public python-pomegranate
+ (package
+ (name "python-pomegranate")
+ (version "0.14.8")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pomegranate" version))
+ (sha256
+ (base32
+ "0gb9srkbxzlkjyfizvxkw5y0bvnfcyiaxapz0hrdaba8j096b5i2"))
+ (modules '((guix build utils)))
+ ;; Delete generated Cython C files.
+ (snippet
+ '(for-each delete-file (find-files "." "\\.c$")))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:phases
+ '(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "python" "setup.py" "test")))))))
+ (propagated-inputs
+ (list python-joblib
+ python-networkx
+ python-numpy
+ python-pyyaml
+ python-scipy))
+ (native-inputs
+ (list python-cython
+ python-nose
+ python-pandas))
+ (home-page "https://pypi.python.org/pypi/pomegranate/")
+ (synopsis "Graphical models library for Python")
+ (description
+ "Pomegranate is a graphical models library for Python, implemented in
+Cython for speed.")
+ (license license:expat)))
+
(define-public python-poyo
(package
(name "python-poyo")
@@ -3668,18 +3796,6 @@ with sensible defaults out of the box.")
(base32 "06kbzd6sjfkqan3miwj9wqyddfxc2b6hi7p5s4dvqjb3gif2bdfj"))))
(arguments `())))
-(define-public python-click-5
- (package (inherit python-click)
- (name "python-click")
- (version "5.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "click" version))
- (sha256
- (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
- (arguments `())))
-
(define-public python-cligj
(package
(name "python-cligj")
@@ -3967,23 +4083,22 @@ memory usage and transliteration quality.")
(define-public python-pyjwt
(package
(name "python-pyjwt")
- (version "2.4.0")
+ (version "2.6.0")
(source
(origin
(method url-fetch)
(uri (pypi-uri "PyJWT" version))
(sha256
(base32
- "1fmbcwfw1463wjzwbcgg3s16rad6kfb1mc5y7jbkp6v9ihh0hafl"))))
- (build-system python-build-system)
- (arguments
- '(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "-vv")))))))
+ "1z85kwr945rbzrn5wabrsmck5x8disa9wc7b3y5gci7w65z5qa39"))))
+ (build-system pyproject-build-system)
(native-inputs
- (list python-cryptography python-pytest))
+ (list python-coverage
+ python-cryptography
+ python-pre-commit
+ python-pytest
+ python-sphinx
+ python-sphinx-rtd-theme))
(home-page "https://github.com/progrium/pyjwt")
(synopsis "JSON Web Token implementation in Python")
(description
@@ -4634,6 +4749,73 @@ accessible for novices, as well as a scripting interface offering the full
flexibility and power of the Python language.")
(license license:gpl3+)))
+(define-public python-dm-tree
+ (package
+ (name "python-dm-tree")
+ (version "0.1.7")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "dm-tree" version))
+ (sha256
+ (base32 "0apxfxgmqh22qpk92zmmf3acqkavhwxz78lnwz026a5rlnncizih"))))
+ (build-system python-build-system)
+ (inputs (list pybind11 abseil-cpp python))
+ (propagated-inputs (list python-wheel
+ python-absl-py
+ python-attrs
+ python-numpy
+ python-wrapt))
+ (arguments
+ (list #:tests? #f
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'build 'build-shared-lib
+ (lambda _
+ (let* ((pybind11 #$(this-package-input "pybind11"))
+ (python #$(this-package-input "python"))
+ (version (python-version python))
+ (abseil-cpp #$(this-package-input "abseil-cpp")))
+ ;; Delete default cmake build.
+ (substitute* "setup.py"
+ (("ext_modules.*") "")
+ (("cmdclass.*") ""))
+ ;; Actual build phase.
+ (mkdir-p "build/temp/tree/")
+ (invoke
+ "gcc" "-pthread" "-Wno-unused-result" "-Wsign-compare"
+ "-DNDEBUG" "-g" "-fwrapv" "-O3" "-Wall"
+ "-fno-semantic-interposition" "-fPIC"
+ "-I" (string-append pybind11
+ "/lib/python" version
+ "/site-packages/pybind11/include")
+ "-I" (string-append python "/include/python"
+ version)
+ "-I" (string-append abseil-cpp "/include")
+ "-c" "tree/tree.cc"
+ "-o" "build/temp/tree/tree.o"
+ "-fvisibility=hidden" "-g0")
+ (mkdir-p "build/lib/tree")
+ (invoke
+ "g++" "-pthread" "-shared"
+ (string-append "-Wl," "-rpath=" python "/lib")
+ "-fno-semantic-interposition"
+ "build/temp/tree/tree.o"
+ "-L" (string-append python "/lib")
+ "-L" (string-append abseil-cpp "/lib")
+ "-l" "absl_int128"
+ "-l" "absl_raw_hash_set"
+ "-l" "absl_raw_logging_internal"
+ "-l" "absl_strings"
+ "-l" "absl_throw_delegate"
+ "-o" "build/lib/tree/_tree.so")))))))
+ (home-page "https://github.com/deepmind/tree")
+ (synopsis "Work with nested data structures in Python")
+ (description "Tree is a python library for working with nested data
+structures. In a way, @code{tree} generalizes the builtin @code{map} function
+which only supports flat sequences, and allows you to apply a function to each
+leaf preserving the overall structure.")
+ (license license:asl2.0)))
+
(define-public python-docutils
(package
(name "python-docutils")
@@ -4831,6 +5013,23 @@ text styles of documentation.")
(description "This package installs Github custom lexers to Pygments.")
(license license:bsd-3)))
+(define-public python-pygtrie
+ (package
+ (name "python-pygtrie")
+ (version "2.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pygtrie" version))
+ (sha256
+ (base32
+ "1qm4xdmzd4q5pc9h5gjdpr5m7lg06k8dvqnjn7d07d3fhani8d90"))))
+ (build-system pyproject-build-system)
+ (home-page "https://github.com/mina86/pygtrie")
+ (synopsis "Pure Python trie data structure implementation")
+ (description
+ "This package provides a pure Python trie data structure implementation.")
+ (license license:asl2.0)))
+
(define-public python-bump2version
(package
(name "python-bump2version")
@@ -10169,40 +10368,37 @@ SVG, EPS, PNG and terminal output.")
(define-public python-seaborn
(package
(name "python-seaborn")
- (version "0.11.2")
+ (version "0.12.0")
(source (origin
(method url-fetch)
(uri (pypi-uri "seaborn" version))
(sha256
(base32
- "1xpl3zb945sihsiwm9q1yyx84sakk1phcg0fprj6i0j0dllfjifg"))
- (patches (search-patches "python-seaborn-kde-test.patch"
- "python-seaborn-2690.patch"))))
+ "08vvnp4ps86857imxz2l5xi2vir5xdcdp3apq4badb4b5llifgw9"))))
(build-system python-build-system)
(arguments
- `(#:phases (modify-phases %standard-phases
- (add-after 'unpack 'patch-more-tests
- (lambda _
- (substitute* "seaborn/tests/test_distributions.py"
- (("get_contour_color\\(ax\\.collections\\[0\\]\\)")
- "get_contour_color(ax.collections[0])")
- (("c\\.get_color\\(\\)") "get_contour_color(c)")
- (("def test_hue_ignores_cmap")
- "def skip_test_hue_ignores_cmap")
- (("def test_fill_artists")
- "def skip_test_fill_artists")
- (("def test_with_rug") "def skip_test_with_rug"))))
- (add-before 'check 'start-xserver
- (lambda _
- (system "Xvfb :1 &")
- (setenv "DISPLAY" ":1")))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "pytest" "seaborn")))))))
+ (list #:modules '((guix build python-build-system)
+ (guix build utils)
+ (ice-9 match))
+ #:phases #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke "python" "-m" "build" "--wheel"
+ "--no-isolation" ".")))
+ (replace 'install
+ (lambda _
+ (match (find-files "dist" "\\.whl$")
+ ((wheel _ ...)
+ (invoke "python" "-m" "pip" "install"
+ (string-append "--prefix=" #$output)
+ wheel)))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv")))))))
(propagated-inputs (list python-pandas python-matplotlib python-numpy
python-scipy))
- (native-inputs (list python-pytest xorg-server-for-tests))
+ (native-inputs (list python-flit-core python-pypa-build python-pytest))
(home-page "https://seaborn.pydata.org/")
(synopsis "Statistical data visualization")
(description
@@ -14709,7 +14905,7 @@ with a new public API, and RPython support.")
(define-public python-hy
(package
(name "python-hy")
- (version "0.24.0")
+ (version "0.25.0")
(source
(origin
(method git-fetch) ; no tests in PyPI release
@@ -14718,7 +14914,7 @@ with a new public API, and RPython support.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "1s458ymd9g3s8k2ccc300jr4w66c7q3vhmhs9z3d3a4qg0xdhs9y"))))
+ (base32 "1am6z9m0s9svysj0wrfz069rpvbqqimphqll3912q4bvdlz6vrjp"))))
(build-system python-build-system)
(arguments
'(#:phases
@@ -15264,7 +15460,10 @@ enhancements to optimization and data fitting problems.")
(delete-file "tests/unit/bokeh/models/test_sources.py")
(delete-file "tests/unit/bokeh/embed/test_bundle.py")
- (invoke "pytest" "-v")))))))
+ ;; XXX: This one test transforms a gif of a red box. It
+ ;; transforms it all right but the base64 doesn't look as
+ ;; expected, probably because of a change in pillow.
+ (invoke "pytest" "-v" "-k" "not test_transform_PIL")))))))
(propagated-inputs
(list node-lts
python-jinja2
@@ -20749,24 +20948,29 @@ while only declaring the test-specific fields.")
(define-public python-marshmallow
(package
(name "python-marshmallow")
- (version "3.9.1")
+ (version "3.19.0")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "marshmallow" version))
- (sha256
- (base32
- "0kizhh3mnhpa08wfnsv1gagy22bpxzxszgbiylkhpz1d8qvwrykk"))))
- (build-system python-build-system)
+ (method url-fetch)
+ (uri (pypi-uri "marshmallow" version))
+ (sha256
+ (base32
+ "0y6vpq2p5841kcw2qil68la0rx9z1vmxzj3dxjv99kjhsq7jq0wh"))))
+ (build-system pyproject-build-system)
(propagated-inputs
- (list python-dateutil python-simplejson))
+ (list python-packaging))
(native-inputs
- (list python-pytest python-pytz))
+ (list python-flake8
+ python-flake8-bugbear
+ python-mypy
+ python-pre-commit
+ python-pytest
+ python-pytz
+ python-simplejson))
(home-page "https://github.com/marshmallow-code/marshmallow")
- (synopsis "Convert complex datatypes to and from native
- Python datatypes")
- (description "@code{marshmallow} provides a library for converting
- complex datatypes to and from native Python datatypes.")
+ (synopsis "Convert complex datatypes to and from native Python datatypes")
+ (description "@code{marshmallow} provides a library for converting complex
+datatypes to and from native Python datatypes.")
(license license:expat)))
(define-public python-marshmallow-jsonapi
@@ -20802,39 +21006,70 @@ while only declaring the test-specific fields.")
(define-public python-apispec
(package
(name "python-apispec")
- (version "4.0.0")
+ (version "6.0.2")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "apispec" version))
- (sha256
+ (method url-fetch)
+ (uri (pypi-uri "apispec" version))
+ (sha256
(base32
- "12n4w5zkn4drcn8izq68vmixmqvz6abviqkdn4ip0kaax3jjh3in"))))
- (build-system python-build-system)
+ "11vqxwdxmm7qmyhdbxk4gnx37nbzmn266ah92gi4pvzd76vq0vg7"))))
+ (build-system pyproject-build-system)
(arguments
- '(#:phases (modify-phases %standard-phases
- (replace 'check
- (lambda _
- (invoke "pytest" "-vv"
- ;; Disable validation tests since they require
- ;; the optional 'prance' library which is not
- ;; yet in Guix.
- "-k" "not openapi_tools_validate"))))))
+ (list
+ ;; Disable validation tests since they require
+ ;; the optional 'prance' library which is not
+ ;; yet in Guix.
+ #:test-flags '(list "-k" "not openapi_tools_validate")))
(propagated-inputs
- (list python-pyyaml))
+ (list python-packaging))
(native-inputs
- (list python-pytest python-marshmallow))
+ (list python-flake8
+ python-flake8-bugbear
+ python-marshmallow
+ python-mypy
+ python-pre-commit
+ python-pytest
+ python-pyyaml))
(home-page "https://github.com/marshmallow-code/apispec")
(synopsis "Swagger/OpenAPI specification generator")
(description "@code{python-apispec} is a pluggable API specification
- generator. It currently supports the OpenAPI specification, formerly known
- as Swagger.")
+generator. It currently supports the OpenAPI specification, formerly known as
+Swagger.")
+ (license license:expat)))
+
+(define-public python-apispec-webframeworks
+ (package
+ (name "python-apispec-webframeworks")
+ (version "0.5.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "apispec-webframeworks" version))
+ (sha256
+ (base32
+ "1wyw30402xq2a8icrsjmy9v43jyvawcjd85ccb2zicqlg4k5pcqd"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-apispec))
+ (native-inputs
+ (list python-bottle
+ python-flake8
+ python-flake8-bugbear
+ python-flask
+ python-mock
+ python-pre-commit
+ python-pytest
+ python-tornado
+ python-tox))
+ (home-page "https://github.com/marshmallow-code/apispec-webframeworks")
+ (synopsis "Web framework plugins for apispec")
+ (description "This package provides plugins for using @code{apispec} with
+web frameworks.")
(license license:expat)))
(define-public python-flasgger
(package
(name "python-flasgger")
- (version "0.6.3")
+ (version "0.9.5")
(source
(origin
(method git-fetch)
@@ -20843,29 +21078,35 @@ while only declaring the test-specific fields.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0yydxsyjnc0clbrjqb1n7587l6cdqvwdagwxk5hkx01qwdfbkvpn"))))
- (build-system python-build-system)
+ (base32 "0a2djgfq905a4in16068qz0ikg88dm4nbckaamhaz2v9khllr0bi"))))
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (substitute* "Makefile"
- (("flake8 flasgger --ignore=F403")
- "flake8 flasgger --ignore=E731,F403"))
- (invoke "py.test"))))))
+ (list
+ ;; This test fails due to missing fixtures
+ #:test-flags '(list "-k" "not test_swag")
+ #:phases
+ '(modify-phases %standard-phases
+ (add-after 'unpack 'prepare-check
+ (lambda _
+ ;; This requires a dummy package "flasgger_package" to be installed.
+ (delete-file "examples/package_example.py")
+ ;; These fail with an internal server error
+ (for-each delete-file '("examples/marshmallow_apispec.py"
+ "examples/validation.py")))))))
(propagated-inputs
(list python-flask python-pyyaml python-jsonschema python-mistune
python-six))
(native-inputs
- (list python-decorator
+ (list python-apispec
+ python-apispec-webframeworks
+ python-decorator
python-flake8
+ python-flask-jwt
python-flask-restful
python-flex
- python-pytest
- python-pytest-cov
python-marshmallow
- python-apispec))
+ python-pytest
+ python-pytest-cov))
(home-page "https://github.com/rochacbruno/flasgger/")
(synopsis "Extract Swagger specs from your Flask project")
(description "@code{python-flasgger} allows extracting Swagger specs
@@ -22082,60 +22323,42 @@ based on the CPython 2.7 and 3.7 parsers.")
(file-name (git-file-name name version))
(sha256
(base32 "1knv353qhkl2imav3jfp6bgq47m8wkkqhq1dzmqg2sv8rsy7zgl7"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- ,#~(modify-phases %standard-phases
- ;; Unfortunately, this doesn't seem to be enough to fix these two
- ;; tests, but we'll patch this anyway.
- (add-after 'unpack 'patch-shell-reference
- (lambda _
- (substitute* "tests/test_completion/test_completion.py"
- (("\"bash\"") (string-append "\"" (which "bash") "\""))
- (("\"/bin/bash\"")
- (string-append "\"" (which "bash") "\"")))))
- (replace 'build
- (lambda _
- (invoke "flit" "build")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (for-each
- (lambda (wheel)
- (format #true wheel)
- (invoke "python" "-m" "pip" "install"
- wheel (string-append "--prefix=" #$output)))
- (find-files "dist" "\\.whl$"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (setenv "HOME" "/tmp") ; some tests need it
-
- ;; This is for completion tests
- (with-output-to-file "/tmp/.bashrc"
- (lambda _ (display "# dummy")))
-
- (setenv "GUIX_PYTHONPATH"
- (string-append (getcwd) ":"
- (getenv "GUIX_PYTHONPATH")))
- (let ((disabled-tests (list "test_show_completion"
- "test_install_completion")))
- (invoke "python" "-m" "pytest" "tests/"
- "-k"
- (string-append "not "
- (string-join disabled-tests
- " and not "))))))))))
+ (list
+ #:test-flags
+ '(let ((disabled-tests (list "test_show_completion"
+ "test_install_completion")))
+ (list "-k" (string-append "not "
+ (string-join disabled-tests
+ " and not "))))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Unfortunately, this doesn't seem to be enough to fix these two
+ ;; tests, but we'll patch this anyway.
+ (add-after 'unpack 'patch-shell-reference
+ (lambda _
+ (substitute* "tests/test_completion/test_completion.py"
+ (("\"bash\"") (string-append "\"" (which "bash") "\""))
+ (("\"/bin/bash\"")
+ (string-append "\"" (which "bash") "\"")))))
+ (add-before 'check 'pre-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp") ; some tests need it
+ ;; This is for completion tests
+ (with-output-to-file "/tmp/.bashrc"
+ (lambda _ (display "# dummy")))))))))
(propagated-inputs
(list python-click))
(native-inputs
(list python-coverage python-flit python-pytest python-rich
python-shellingham))
(home-page "https://github.com/tiangolo/typer")
- (synopsis
- "Typer builds CLI based on Python type hints")
+ (synopsis "Typer builds CLI based on Python type hints")
(description
- "Typer is a library for building CLI applications. It's based on
-Python 3.6+ type hints.")
+ "Typer is a library for building CLI applications. It's based on Python
+3.6+ type hints.")
;; MIT license
(license license:expat)))
@@ -22364,6 +22587,25 @@ working with iterables.")
(description "Lexer and codec to work with LaTeX code in Python.")
(license license:expat)))
+(define-public python-pybloom-live
+ (package
+ (name "python-pybloom-live")
+ (version "4.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pybloom_live" version))
+ (sha256
+ (base32
+ "040i6bjqvl33j30v865shsk30s3h7f16pqwiaj5kig857dfmqm4r"))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-bitarray python-xxhash))
+ (native-inputs (list python-pytest))
+ (home-page "https://github.com/joseph-fox/python-bloomfilter")
+ (synopsis "Bloom filter")
+ (description "This package provides a scalable Bloom filter implemented in
+Python.")
+ (license license:expat)))
+
(define-public python-pybtex
(package
(name "python-pybtex")
@@ -23082,6 +23324,32 @@ environments.")
"PyNamecheap is a Namecheap API client in Python.")
(license license:expat)))
+(define-public python-pynixutil
+ (package
+ (name "python-pynixutil")
+ (version "0.5.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/nix-community/pynixutil")
+ (commit version)))
+ (file-name (git-file-name name version))
+ ;; Derivation test uses nix.
+ (modules '((guix build utils)))
+ (snippet '(delete-file "tests/test_drv.py"))
+ (sha256
+ (base32
+ "1lnspcai7mqpv73bbd8kgyw63fxwgkwvfkl09b2bl5y2g2v7np6m"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list poetry python-pytest))
+ (home-page "https://github.com/nix-community/pynixutil")
+ (synopsis "Utility functions for working with data from Nix in Python")
+ (description
+ "@code{pynixutil} provides functions for base32 encoding/decoding and
+derivation parsing, namingly @code{b32decode()}, @code{b32encode()} and
+@code{drvparse()}.")
+ (license license:expat)))
+
(define-public python-dns-lexicon
(package
(name "python-dns-lexicon")
@@ -23217,14 +23485,14 @@ tool).")
(define-public python-numcodecs
(package
(name "python-numcodecs")
- (version "0.6.4")
+ (version "0.10.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "numcodecs" version))
(sha256
(base32
- "0kbfr8pl3x9glsypbq8hzim003f16ml1b1cvgrh4w1sdvgal6j7g"))
+ "1i2rvm1f23dapcf6w3mj4877jzq5f24bhfa0fafbv1nr7xmqr0r2"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -23234,11 +23502,11 @@ tool).")
"numcodecs/lz4.c"
"numcodecs/vlen.c"
"numcodecs/zstd.c"))))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:tests? #false ; TODO: unclear why numcodecs.* are not found
- #:phases
- (modify-phases %standard-phases
+ (list
+ #:phases
+ '(modify-phases %standard-phases
(add-after 'unpack 'disable-avx2
(lambda _
(setenv "DISABLE_NUMCODECS_AVX2" "1")))
@@ -23255,16 +23523,18 @@ tool).")
"'numcodecs.lz4', libraries=['lz4'], ")
(("'numcodecs.blosc',")
"'numcodecs.blosc', libraries=['blosc'], "))))
- (replace 'check
- (lambda* (#:key tests? inputs outputs #:allow-other-keys)
- (when tests?
- (add-installed-pythonpath inputs outputs)
- (invoke "pytest" "-vv")))))))
+ (add-before 'check 'build-extensions
+ (lambda _
+ ;; Cython extensions have to be built before running the tests.
+ (invoke "python" "setup.py" "build_ext" "--inplace"))))))
(inputs
(list c-blosc lz4 zlib
`(,zstd "lib")))
(propagated-inputs
- (list python-numpy python-msgpack))
+ (list python-entrypoints
+ python-numpy
+ python-msgpack
+ python-typing-extensions-next))
(native-inputs
(list python-cython python-pytest python-setuptools-scm))
(home-page "https://github.com/zarr-developers/numcodecs")
@@ -23294,14 +23564,14 @@ codecs for use in data storage and communication applications.")
(define-public python-zarr
(package
(name "python-zarr")
- (version "2.4.0")
+ (version "2.13.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "zarr" version))
(sha256
(base32
- "026n3sjzjv2gmwx6y72b8ij0hk42bc8zdbvfj5gdqzd4i6wj3ajk"))))
+ "135ls2q7zc98pk61a5cnh88j4hnnavcwasrswdjqyqvcc68b096v"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -23343,29 +23613,26 @@ N-dimensional arrays for Python.")
(sha256
(base32
"0v7npqrg1rdm8jzw22a45c0mqrmsv05r3k88i3lhzi0pzzxca1i1"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'check)
- (replace 'build
- (lambda _
- (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)
- (substitute* "anndata/_metadata.py"
- (("__version__ =.*")
- (string-append "__version__ = \"" ,version "\"\n")))
- ;; ZIP does not support timestamps before 1980.
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (invoke "flit" "build")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (let ((out (assoc-ref outputs "out")))
- (for-each (lambda (wheel)
- (format #true wheel)
- (invoke "python" "-m" "pip" "install"
- wheel (string-append "--prefix=" out)))
- (find-files "dist" "\\.whl$"))))))))
+ (list
+ #:test-flags
+ '(list "-k" "not concatenation.rst")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Doctests require scanpy from (gnu packages bioinformatics)
+ (add-after 'unpack 'disable-doctests
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("--doctest-modules") ""))))
+ (add-before 'build 'set-version
+ (lambda _
+ (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
+ (substitute* "anndata/_metadata.py"
+ (("__version__ =.*")
+ (string-append "__version__ = \"" #$version "\"\n")))
+ ;; ZIP does not support timestamps before 1980.
+ (setenv "SOURCE_DATE_EPOCH" "315532800"))))))
(propagated-inputs
(list python-h5py
python-importlib-metadata
@@ -23374,9 +23641,14 @@ N-dimensional arrays for Python.")
python-packaging
python-pandas
python-scipy
+ python-scikit-learn
python-zarr))
(native-inputs
- (list python-joblib python-pytest python-toml python-flit
+ (list python-boltons
+ python-joblib
+ python-pytest
+ python-toml
+ python-flit
python-setuptools-scm))
(home-page "https://github.com/theislab/anndata")
(synopsis "Annotated data for data analysis pipelines")
@@ -25429,7 +25701,7 @@ scripts to load entry points more quickly.")
(define-public python-funcparserlib
(package
(name "python-funcparserlib")
- (version "1.0.0")
+ (version "1.0.1")
(source
(origin
;; Source tarball on PyPi lacks tests.
@@ -25439,7 +25711,7 @@ scripts to load entry points more quickly.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "00pswdys5c4hpqpvfcy5zqv30gyjvjvagi12811jizw57hxrm1cs"))))
+ (base32 "0dw3i4fyf3j9h1l7xfgs99fc2w2axk6xqk0sdag43k444ss4hkrc"))))
(build-system pyproject-build-system)
(arguments
'(#:phases
@@ -29510,9 +29782,9 @@ simple mock/record and a complete capture/replay framework.")
(when tests?
(invoke "pytest" "-vv")))))))
(inputs
- ;; libyajl is optional, but compiling with it makes faster
+ ;; yajl is optional, but compiling with it makes faster
;; backends available to ijson:
- (list libyajl))
+ (list yajl))
(native-inputs
(list python-pytest))
(build-system python-build-system)