diff options
Diffstat (limited to 'gnu/packages/python-science.scm')
-rw-r--r-- | gnu/packages/python-science.scm | 1176 |
1 files changed, 661 insertions, 515 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index b71f693538..65f385d494 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2016-2020, 2022 Marius Bakke <marius@gnu.org> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018, 2022 Leo Famulari <leo@famulari.name> -;;; Copyright © 2019, 2021, 2022, 2023, 2024 Maxim Cournoyer <maxim.cournoyer@gmail.com> +;;; Copyright © 2019-2025 Maxim Cournoyer <maxim@guixotic.coop> ;;; Copyright © 2019 Giacomo Leidi <goodoldpaul@autistici.org> ;;; Copyright © 2020 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2020-2025 Vinicius Monego <monego@posteo.net> @@ -35,6 +35,8 @@ ;;; Copyright © 2025 Nicolas Graves <ngraves@ngraves.fr> ;;; Copyright © 2025 Mark Walker <mark.damon.walker@gmail.com> ;;; Copyright © 2025 Nguyễn Gia Phong <mcsinyx@disroot.org> +;;; Copyright © 2025 Jake Forster <jakecameron.forster@gmail.com> +;;; Copyright © 2025 Ghislain Vaillant <ghislain.vaillant@inria.fr> ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +65,6 @@ #:use-module (gnu packages cmake) #:use-module (gnu packages compression) #:use-module (gnu packages cpp) - #:use-module (gnu packages crates-io) #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages digest) @@ -82,6 +83,7 @@ #:use-module (gnu packages python) #:use-module (gnu packages python-build) #:use-module (gnu packages python-check) + #:use-module (gnu packages python-compression) #:use-module (gnu packages python-crypto) #:use-module (gnu packages python-graphics) #:use-module (gnu packages python-web) @@ -253,28 +255,36 @@ possibility to differentiate functions that contain matrix functions as (define-public python-anndata (package (name "python-anndata") - (version "0.11.1") + (version "0.12.1") (source (origin ;; The tarball from PyPi doesn't include tests. (method git-fetch) (uri (git-reference - (url "https://github.com/theislab/anndata") - (commit version))) + (url "https://github.com/theislab/anndata") + (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 - "0skmjjvxk5gdsx6fkplszff92jsb4l45j23c6mhq1vdi3wqhqhcw")))) + (base32 "1pwqy1pxsiqf13kfshcbqah1a92x4044s6jyr94488ngpqkr275z")))) (build-system pyproject-build-system) (arguments (list #:test-flags - #~(list "-k" #$(string-append - ;; This one test seemingly freezes - "not test_read_lazy_h5_cluster" - ;; Fails with a numpy deprecation warning - ;; but not an actual failure - " and not test_read_write_X")) + #~(list "--numprocesses" (number->string (parallel-job-count)) + ;; XXX: AttributeError: module 'pyarrow.lib' has no attribute + ;; 'PyExtensionType + "--ignore=tests/test_awkward.py" + "-k" (string-join + ;; TypeError: read_text() takes from 1 to 2 positional + ;; arguments but 4 were given + (list "not test_read_csv" + ;; TypeError: _fix_co_filename() argument 2 must be + ;; str, not PosixPath + "test_hints" + ;; Failed: DID NOT WARN. No warnings of type (<class + ;; 'FutureWarning'>,) were emitted. + "test_readloom_deprecations") + " and not ")) #:phases #~(modify-phases %standard-phases ;; Doctests require scanpy from (gnu packages bioinformatics) @@ -293,15 +303,14 @@ possibility to differentiate functions that contain matrix functions as (setenv "NUMBA_CACHE_DIR" "/tmp")))))) (propagated-inputs (list python-array-api-compat - python-exceptiongroup ;only for Python <3.11 python-h5py python-importlib-metadata + python-legacy-api-wrap python-natsort - python-numcodecs python-packaging python-pandas - python-scipy python-scikit-learn + python-scipy python-setuptools ; For pkg_resources. python-zarr)) (native-inputs @@ -309,17 +318,14 @@ possibility to differentiate functions that contain matrix functions as python-boltons python-dask python-distributed - python-hatchling python-hatch-vcs + python-hatchling python-joblib python-loompy python-matplotlib python-pytest python-pytest-mock - python-pytest-doctestplus python-pytest-xdist - python-toml - python-flit python-setuptools-scm)) (home-page "https://github.com/theislab/anndata") (synopsis "Annotated data for data analysis pipelines") @@ -330,22 +336,49 @@ reduces the code overhead typically encountered when using a mostly object-oriented library such as @code{scikit-learn}.") (license license:bsd-3))) -(define-public python-aplus +(define-public python-anndata-0.11 (package - (name "python-aplus") - (version "0.11.0") + (inherit python-anndata) + (name "python-anndata") + (version "0.11.4") (source (origin - (method url-fetch) - (uri (pypi-uri "aplus" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/theislab/anndata") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1rznc26nlp641rn8gpdngfp79a3fji38yavqakxi35mx2da04msg")))) - (build-system python-build-system) - (home-page "https://github.com/xogeny/aplus") - (synopsis "Promises/A+ for Python") - (description "This package is an implementation of the Promises/A+ -specification and test suite in Python.") - (license license:expat))) + (base32 "05i805k5kvmwp5k0qw9vxvpgjwys284nq529mfn7vwlryz9d247m")))))) + +;; XXX: See: <https://codeberg.org/guix/guix/issues/3093>. +(define-public python-aplus + ;; PyPI release lacks the latest version, Git has no tags. + (let ((commit "1ab8ebec987fb7213766784aad02cbf4410d9036") + (revision "0")) + (package + (name "python-aplus") + (version (git-version "0.11.1" revision commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xogeny/aplus") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "02jcfj7dywvs0sd60c85pxwh0mwsj9p1q27445pba6j489x3dffj")))) + (build-system pyproject-build-system) + (arguments + (list #:tests? #f)) ;they depend on Nose test runner + (native-inputs + (list python-setuptools)) + (home-page "https://github.com/xogeny/aplus") + (synopsis "Promises/A+ for Python") + (description + "This package is an implementation of the Promises/A+ specification and +test suite in Python.") + (license license:expat)))) (define-public python-apted ;; PyPI release lacks tests and there is no Git tag. @@ -384,16 +417,22 @@ supersedes the RTED algorithm for computing the tree edit distance.") (define-public python-asap3 (package (name "python-asap3") - (version "3.13.7") + (version "3.13.9") (source (origin (method url-fetch) (uri (pypi-uri "asap3" version)) (sha256 - (base32 "0z6m9ybiy4fdnzlkfkvyxich18iwlwlgj1jd99fylyfwf8l160am")))) + (base32 "0r4sx93v2ck4m9ykzj9zaar2l9wk4nrb3d3rlik1nqimk6pnnbm2")))) (build-system pyproject-build-system) - (propagated-inputs (list python-ase)) - (native-inputs (list python-setuptools python-wheel which)) + (arguments + (list #:tests? #f)) ;TODO: collecting ... ERROR: Wrong command line. + (native-inputs + (list python-setuptools + which)) ;for build + (propagated-inputs + (list python-ase + python-numpy)) (home-page "https://wiki.fysik.dtu.dk/asap") (synopsis "ASAP - classical potentials for Molecular Dynamics with ASE.") (description "This package provides accelerated simulations and potentials @@ -538,26 +577,10 @@ written in C.") (assoc-ref py:%standard-phases 'build)) (add-after 'build-python-module 'install-python-module (assoc-ref py:%standard-phases 'install))) - #:cargo-inputs - `(("rust-amd" ,rust-amd-0.2) - ("rust-blas" ,rust-blas-0.22) - ("rust-cfg-if" ,rust-cfg-if-1) - ("rust-derive-builder" ,rust-derive-builder-0.11) - ("rust-enum-dispatch" ,rust-enum-dispatch-0.3) ;0.3.8 - ("rust-itertools" ,rust-itertools-0.11) - ("rust-lapack" ,rust-lapack-0.19) - ("rust-lazy-static" ,rust-lazy-static-1) ;1.4 - ("rust-libc" ,rust-libc-0.2) - ("rust-num-derive" ,rust-num-derive-0.2) - ("rust-num-traits" ,rust-num-traits-0.2) - ("rust-pyo3" ,rust-pyo3-0.20) - ("rust-serde" ,rust-serde-1) - ("rust-serde-json" ,rust-serde-json-1) - ("rust-thiserror" ,rust-thiserror-1)) #:features '(list "python") #:install-source? #false)) (inputs - (list maturin)) + (cons maturin (cargo-inputs 'python-clarabel))) (native-inputs (list python-wrapper)) (propagated-inputs (list python-numpy python-scipy)) @@ -801,10 +824,9 @@ parentdir_prefix = dask- (list python-importlib-metadata python-pytest python-pytest-rerunfailures - python-pytest-runner python-pytest-xdist python-versioneer - python-wheel)) + python-setuptools)) (home-page "https://github.com/dask/dask/") (synopsis "Parallel computing with task scheduling") (description @@ -893,19 +915,19 @@ optimization and generally improved organization.") (build-system pyproject-build-system) (arguments (list + ;; tests: 2152 passed, 177 skipped, 6 deselected, 4037 warnings #:test-flags - ;; Flake8 attribute errors. - '(list "--ignore=dask_image/ndfilters/_threshold.py" - "--ignore=dask_image/ndfourier/_utils.py" - "--ignore=dask_image/ndinterp/__init__.py" - "--ignore=dask_image/ndmeasure/__init__.py" - "--ignore=dask_image/ndmeasure/_utils/_find_objects.py" - "--ignore=dask_image/ndmeasure/_utils/_label.py" - "--ignore=tests/test_dask_image/test_ndfilters/test__conv.py" - "--ignore=tests/test_dask_image/test_ndfourier/test_core.py" - "--ignore=tests/test_dask_image/test_ndinterp/test_spline_filter.py" - "--ignore=tests/test_dask_image/test_ndmeasure/test_core.py" - "--ignore=tests/test_dask_image/test_ndmeasure/test_find_objects.py") + #~(list "-k" (string-join + ;; KeyError: 'float32 + (list "not test_spline_filter_output_dtype[None-float32_1]" + "test_spline_filter_output_dtype[-1-float32_1]" + ;; AttributeError: 'str' object has no attribute + ;; 'start' + "test_find_objects" + "test_3d_find_objects" + ;; assert False + "test_find_objects_with_empty_chunks") + " and not ")) #:phases #~(modify-phases %standard-phases (add-before 'build 'set-version @@ -914,23 +936,18 @@ optimization and generally improved organization.") (("^version_file.*") "") (("dynamic = \\[\"version\"\\]") (string-append "version = \"" #$version "\"")))))))) - (propagated-inputs (list python-dask - python-numpy - python-pandas-2 - python-pims - python-scipy - python-tifffile)) (native-inputs - (list python-coverage - python-flake8 - python-pytest - python-pytest-cov - python-pytest-flake8 + (list python-pytest python-pytest-timeout python-setuptools - python-setuptools-scm - python-twine - python-wheel)) + python-setuptools-scm)) + (propagated-inputs + (list python-dask + python-numpy + python-pandas + python-pims + python-scipy + python-tifffile-for-dask-image)) (home-page "https://github.com/dask/dask-image") (synopsis "Distributed image processing") (description "This is a package for image processing with Dask arrays. @@ -942,8 +959,7 @@ Features: @item Includes a few N-D Fourier filters. @item Provides some functions for working with N-D label images. @item Supports a few N-D morphological operators. -@end itemize -") +@end itemize") (license license:bsd-3))) (define-public python-decaylanguage @@ -1368,6 +1384,7 @@ that is 20-25x faster than @code{numpy.histogram2d}.") (sha256 (base32 "19labbgnq85p4r4jbli2p045lgh57larhi2g2anagfxnlzpqdf5a")))) (build-system pyproject-build-system) + (arguments (list #:test-backend #~'unittest)) (propagated-inputs (list python-numpy)) (native-inputs (list python-scipy python-setuptools python-wheel)) (home-page "https://danifold.net/fastcluster.html") @@ -1497,7 +1514,7 @@ trickery (i.e. combining characters) to plot overlaying histograms.") (define-public python-imagehash (package (name "python-imagehash") - (version "4.3.1") + (version "4.3.2") (source (origin (method git-fetch) ;no tests in PyPI @@ -1509,8 +1526,21 @@ trickery (i.e. combining characters) to plot overlaying histograms.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "1lw9lxzrzy9s5v3xc35vmh97hlyavnla087fp19k77va6v8vbjjf")))) + (base32 "1rz1fpwhcx0cbln189bcs61wlwgngcjcn77jvm0yji5s7lshhipy")))) (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + ;; Upstream plans to remove Python 2 compatibility: + ;; https://github.com/JohannesBuchner/imagehash/pull/223 + (add-after 'unpack 'remove-six + (lambda _ + (substitute* (find-files "." ".py$") + (("import six") "") + (("six\\.assertRaisesRegex\\(self, ") + "self.assertRaisesRegex(") + (("six\\.exec_") ""))))))) (native-inputs (list python-pytest python-setuptools @@ -1540,6 +1570,32 @@ Features: @end itemize") (license license:bsd-2))) +(define-public python-legendkit + (package + (name "python-legendkit") + (version "0.3.6") + (source + (origin + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/Marsilea-viz/legendkit") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "03xdhh95w4zydwa4ahp3gyfa6i60c9s5arfcj366knckb1bnpnn9")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pytest)) + (propagated-inputs + (list python-matplotlib)) + (home-page "https://github.com/Marsilea-viz/legendki") + (synopsis "Legend creation and manipulation for matplotlib") + (description + "This package implements a functionality to create and manipulate plot +legends for @code{matplotlib}.") + (license license:expat))) + (define-public python-libneuroml (package (name "python-libneuroml") @@ -1572,6 +1628,39 @@ Features: neuronal models") (license license:bsd-3))) +(define-public python-marsilea + (package + (name "python-marsilea") + (version "0.5.4") + (source + (origin + (method git-fetch) ;no tests in PyPI archive + (uri (git-reference + (url "https://github.com/Marsilea-viz/marsilea") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "09pyfx0gn46ypsp991d3n4a4xx6zlbpss078lw6yywnhl834v2i0")))) + (build-system pyproject-build-system) + (native-inputs + (list python-hatchling + python-pytest)) + (propagated-inputs + (list python-legendkit + python-matplotlib + python-numpy + python-pandas + python-platformdirs + python-scipy + python-seaborn)) + (home-page "https://github.com/Marsilea-viz/marsilea") + (synopsis "Declarative creation of composable visualizations") + (description + "Marsilea is a Python library for creating composable visualizations in a +declarative way. It is built on top of Matplotlib and provides a high-level +API for you to puzzle different visualizations together like logo.") + (license license:expat))) + (define-public python-meshzoo (package (name "python-meshzoo") @@ -1865,7 +1954,11 @@ between dataframe libraries. (sha256 (base32 "1lpgsagmgxzsas7g8yiv6wmyss8q57w92h70fn11rnpadsvx16xz")))) (build-system pyproject-build-system) - (arguments (list #:test-flags #~(list "-c" "/dev/null"))) ;avoid coverage + (arguments + (list + #:test-flags + #~(list "-c" "/dev/null" ;avoid coverage + "-k" "not test_iter_indices_matmul"))) ; flaky (native-inputs (list python-cython python-numpy @@ -2404,19 +2497,19 @@ or as a TikZ file for use in LaTeX documents; (define-public python-qdldl (package (name "python-qdldl") - (version "0.1.7.post2") + (version "0.1.7.post5") (source (origin (method url-fetch) (uri (pypi-uri "qdldl" version)) (sha256 - (base32 "1lspam0k8gnw1yglqxvdv350fq00nkgdfmkizmx7bk0hxjjkj5ab")))) + (base32 "0vi8dgrw32qj03z2dd3zqd0d625pibq3xmlgmidfsnwvqkhrj4qb")))) (build-system pyproject-build-system) (native-inputs (list cmake-minimal pybind11 - python-setuptools - python-wheel)) + python-pytest + python-setuptools)) (propagated-inputs (list python-numpy python-scipy)) (home-page "https://github.com/oxfordcontrol/qdldl-python/") (synopsis "QDLDL LDL factorization routine") @@ -2650,7 +2743,7 @@ CMake.") (define-public python-scikit-fem (package (name "python-scikit-fem") - (version "10.0.2") + (version "11.0.0") (source (origin (method git-fetch) ; no tests in PyPI @@ -2659,7 +2752,7 @@ CMake.") (commit version))) (file-name (git-file-name name version)) (sha256 - (base32 "10kvzm4fmazsrddd83m0903wan67fkj13vdp6w1iw6wm6a0b5h28")))) + (base32 "13zh57raz2qcdfhsvpdlyiba5q0s0lh5b3gmsmh4cfrncrkdh6mh")))) (build-system pyproject-build-system) (arguments (list @@ -2673,11 +2766,11 @@ CMake.") ;; python-jax ; not packed yet python-pytest python-shapely - python-setuptools - python-wheel)) + python-setuptools)) (propagated-inputs (list python-meshio python-numpy + python-matplotlib python-scipy)) (home-page "https://scikit-fem.readthedocs.io/en/latest/") (synopsis "Library for performing finite element assembly") @@ -2785,6 +2878,39 @@ logic, also known as grey logic.") "Scikit-image is a collection of algorithms for image processing.") (license license:bsd-3))) +;; TODO: Port simplified test steps to python-scikit on the next refresh round. +(define-public python-scikit-image-next + (package + (inherit python-scikit-image) + (name "python-scikit-image") + (version "0.25.2") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/scikit-image/scikit-image") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1cr3ki47z9g8kylnff1nrmv5fr3lrgmibl41q0v98pldghnslxdv")))) + (arguments + (list + ;; tests: 8489 passed, 128 skipped + #:test-flags + #~(list "--ignore=benchmarks" + "--pyargs" "skimage") + #:phases + #~(modify-phases %standard-phases + (add-before 'check 'remove-local-skimage + (lambda _ + ;; This would otherwise interfere with finding the installed + ;; skimage when running tests. + (delete-file-recursively "skimage"))) + (add-before 'check 'post-check + (lambda _ + (for-each delete-file-recursively + (find-files #$output "__pycache__" #:directories? #t))))))))) + (define-public python-scikit-misc (package (name "python-scikit-misc") @@ -2845,8 +2971,13 @@ and scientific computing.") (sha256 (base32 "0ycqizgsj7q57asc1bphzhf1fx9zqn0vx5rli7q541bas64hfqiy")))) (build-system pyproject-build-system) - (propagated-inputs (list python-numpy python-pytorch python-scipy)) - (native-inputs (list python-setuptools)) + (native-inputs + (list python-pytest + python-setuptools)) + (propagated-inputs + (list python-numpy + python-pytorch + python-scipy)) (home-page "https://github.com/guofei9987/scikit-opt") (synopsis "Swarm intelligence algorithms in Python") (description @@ -2857,19 +2988,57 @@ swarm algorithm.") (license license:expat))) (define-public python-scikit-optimize + ;; XXX: The project might be not maintained, see + ;; <https://github.com/holgern/scikit-optimize/issues/6>. (package (name "python-scikit-optimize") (version "0.10.2") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/holgern/scikit-optimize") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0pc6avzxz8l32km5jvv3maih0a5x2akxybvxl2hdg04qz2l0kz8b")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/holgern/scikit-optimize") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0pc6avzxz8l32km5jvv3maih0a5x2akxybvxl2hdg04qz2l0kz8b")))) (build-system pyproject-build-system) + (arguments + (list + ;; tests: 398 passed, 1 skipped, 179 warnings + #:test-flags + #~(list "--numprocesses" (number->string (parallel-job-count)) + "-k" (string-join + ;; XXX: As the project is not actively maintained, review + ;; failing test when a fresh release is available. + (list "not test_acq_optimizer" + "test_acq_optimizer_with_time_api" + "test_categorical_init_vals" + "test_consistent_x_iter_dimensions" + "test_early_stopping_delta_x" + "test_early_stopping_delta_x_empty_result_object" + "test_early_stopping_delta_y" + "test_early_stopping_delta_y_with_x0" + "test_exhaust_initial_calls" + "test_fixed_random_states" + "test_init_points_and_models" + "test_init_vals" + "test_init_vals_and_models" + "test_minimizer_api" + "test_minimizer_api_random_only" + "test_minimizer_space_constraint" + "test_minimizer_with_space" + "test_mixed_spaces" + "test_optimizer_base_estimator_string_smoke" + "test_optimizer_base_estimator_string_smoke_njobs" + "test_per_second_api" + "test_repeated_x" + "test_tree_based_minimize") + " and not ")))) + (native-inputs + (list python-pytest + python-pytest-xdist + python-setuptools)) (propagated-inputs (list python-joblib python-matplotlib @@ -2877,14 +3046,13 @@ swarm algorithm.") python-pyaml python-scikit-learn python-scipy)) - (native-inputs - (list python-pytest python-setuptools python-wheel)) (home-page "https://scikit-optimize.github.io/") (synopsis "Sequential model-based optimization toolbox") - (description "Scikit-Optimize, or @code{skopt}, is a simple and efficient -library to minimize (very) expensive and noisy black-box functions. It -implements several methods for sequential model-based optimization. -@code{skopt} aims to be accessible and easy to use in many contexts.") + (description + "Scikit-Optimize, or @code{skopt}, is a simple and efficient library to +minimize (very) expensive and noisy black-box functions. It implements +several methods for sequential model-based optimization. @code{skopt} aims to +be accessible and easy to use in many contexts.") (license license:bsd-3))) (define-public python-scikit-surprise @@ -2936,25 +3104,25 @@ the following purposes in mind: (license license:bsd-3))) (define-public python-scikit-survival - (let ((revision "1") + (let ((revision "0") ;; We need a later commit for support of a more recent sklearn and - ;; numpy 2. - (commit "bceb53ebb8306f959c70fae2be9d552f33dd3f21")) + ;; NumPy 2. + (commit "bc4a8914e8337c3be1b98371a3c26382696215a9")) (package (name "python-scikit-survival") - (version (git-version "0.22.2" revision commit)) + (version (git-version "0.25.0" revision commit)) (source (origin (method git-fetch) (uri (git-reference - (url "https://github.com/sebp/scikit-survival") - (commit commit) - ;; This package contains a copy of Eigen. It would be good to - ;; figure out how to use our own Eigen package. - (recursive? #true))) + (url "https://github.com/sebp/scikit-survival") + (commit commit) + ;; This package contains a copy of Eigen. It would be good to + ;; figure out how to use our own Eigen package. + (recursive? #true))) (file-name (git-file-name name version)) (sha256 - (base32 "1m3z64nv4sgay0mdrrw4q4z5ylx63a9w2x43w1r4g8kpg7z9rdfc")))) + (base32 "001w73sz55vszp18h25dha74r34bbfzl02yh4d6zbli9zvr36hy4")))) (build-system pyproject-build-system) (arguments (list @@ -2966,7 +3134,6 @@ the following purposes in mind: #$(version-major+minor version))))))) (propagated-inputs (list python-ecos - python-importlib-resources python-joblib python-numexpr python-numpy @@ -2975,16 +3142,11 @@ the following purposes in mind: python-scikit-learn python-scipy)) (native-inputs - (list python-black - python-pypa-build - python-coverage - python-cython-3 + (list python-cython python-packaging python-pytest python-setuptools - python-setuptools-scm - python-tomli - python-tox)) + python-setuptools-scm)) (home-page "https://github.com/sebp/scikit-survival") (synopsis "Survival analysis built on top of scikit-learn") (description "Scikit-survival is a Python module for survival analysis @@ -3008,6 +3170,15 @@ cross-validation.") (list #:phases #~(modify-phases %standard-phases + #$@(if (target-x86-32?) + #~((add-after 'unpack 'apply-i686-patch + (lambda _ + (let ((patch-file + #$(local-file + (search-patch "python-scipy-i686.patch")))) + (invoke "patch" "--force" "-p1" "-i" + patch-file))))) + #~()) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -3017,53 +3188,7 @@ cross-validation.") (string-append "import scipy; scipy.test('fast', parallel=" (number->string (parallel-job-count)) - ", verbose=2)")))))) - (add-after 'check 'install-doc - (lambda* (#:key outputs #:allow-other-keys) - ;; FIXME: Documentation cannot be built because it requires - ;; a newer version of pydata-sphinx-theme, which currently - ;; cannot build without internet access: - ;; <https://github.com/pydata/pydata-sphinx-theme/issues/628>. - ;; Keep the phase for easy testing. - (let ((sphinx-build (false-if-exception - (search-input-file input "bin/sphinx-build")))) - (if sphinx-build - (let* ((doc (assoc-ref outputs "doc")) - (data (string-append doc "/share")) - (docdir (string-append - data "/doc/" - #$(package-name this-package) "-" - #$(package-version this-package))) - (html (string-append docdir "/html"))) - (with-directory-excursion "doc" - ;; Build doc. - (invoke "make" "html" - ;; Building the documentation takes a very long time. - ;; Parallelize it. - (string-append "SPHINXOPTS=-j" - (number->string (parallel-job-count)))) - ;; Install doc. - (mkdir-p html) - (copy-recursively "build/html" html))) - (format #t "sphinx-build not found, skipping~%")))))))) - (propagated-inputs - (append - (if (supported-package? python-jupytext) ; Depends on pandoc. - (list python-jupytext) - '()) - (list python-matplotlib - python-mpmath - python-mypy - python-numpy - python-numpydoc - python-pydata-sphinx-theme - python-pydevtool - python-pythran - python-rich-click - python-sphinx - python-threadpoolctl - python-typing-extensions))) - (inputs (list openblas pybind11-2.10)) + ", verbose=2)"))))))))) (native-inputs (list gfortran ;; XXX: Adding gfortran shadows GCC headers, causing a compilation @@ -3072,16 +3197,25 @@ cross-validation.") meson-python pkg-config python-click - python-cython-0.29.35 + python-cython-0 python-doit - python-hypothesis + python-mpmath + python-numpydoc python-pooch python-pycodestyle python-pydevtool python-pytest - python-pytest-cov python-pytest-timeout - python-pytest-xdist)) + python-pytest-xdist + python-pythran + python-rich-click + python-threadpoolctl + python-typing-extensions)) + (inputs + (list openblas + pybind11-2.10)) + (propagated-inputs + (list python-numpy)) (home-page "https://scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up @@ -3293,7 +3427,7 @@ Snakemake and its storage plugins.") python-pytest python-pytest-cov python-setuptools - python-setuptools-scm-next + python-setuptools-scm python-wheel)) (home-page "https://github.com/pydata/sparse/") (synopsis "Library for multi-dimensional sparse arrays") @@ -3504,108 +3638,6 @@ library.") tissue-specificity metrics for gene expression.") (license license:gpl3+))) -(define-public python-pandas-1 - (package - (name "python-pandas") - (version "1.5.3") - (source - (origin - (method url-fetch) - (uri (pypi-uri "pandas" version)) - (sha256 - (base32 "1cdhngylzh352wx5s3sjyznn7a6kmjqcfg97hgqm5h3yb9zgv8vl")))) - (build-system pyproject-build-system) - (arguments - (list - #:test-flags - '(list "--pyargs" "pandas" - "-n" (number->string (parallel-job-count)) - "-m" "not slow and not network and not db" - "-k" - (string-append - ;; TODO: Missing input - "not TestS3" - " and not s3" - ;; No module named 'pandas.io.sas._sas' - " and not test_read_expands_user_home_dir" - " and not test_read_non_existent" - ;; Unknown failures - " and not test_switch_options" - ;; These fail with: td64 doesn't return NotImplemented, see numpy#17017 - " and not test_nat_comparisons" - ;; Crashes - " and not test_bytes_exceed_2gb" - ;; get_subplotspec() returns None; possibly related to - ;; https://github.com/pandas-dev/pandas/issues/54577 - " and not test_plain_axes" - ;; This test fails when run with pytest-xdist - ;; (see https://github.com/pandas-dev/pandas/issues/39096). - " and not test_memory_usage")) - #:phases - #~(modify-phases %standard-phases - (add-after 'unpack 'patch-build-system - (lambda _ - (substitute* "pyproject.toml" - ;; Not all data files are distributed with the tarball. - (("--strict-data-files ") "") - ;; Unknown property "asyncio_mode" - (("asyncio_mode = \"strict\"") "")))) - (add-after 'unpack 'patch-which - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "pandas/io/clipboard/__init__.py" - (("^WHICH_CMD = .*") - (string-append "WHICH_CMD = \"" - (search-input-file inputs "/bin/which") - "\"\n"))))) - (add-before 'check 'prepare-x - (lambda _ - (system "Xvfb &") - (setenv "DISPLAY" ":0") - ;; xsel needs to write a log file. - (setenv "HOME" "/tmp"))) - ;; The compiled libraries are only in the output at this point, - ;; but they are needed to run tests. - ;; FIXME: This should be handled by the pyargs pytest argument, - ;; but is not for some reason. - (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) - (copy-recursively - (string-append (site-packages inputs outputs) - "/pandas/_libs") - "pandas/_libs")))))) - (propagated-inputs - (list python-jinja2 - python-matplotlib - python-numpy - python-openpyxl - python-pytz - python-dateutil - python-xlrd - python-xlsxwriter)) - (inputs - (list which xclip xsel)) - (native-inputs - (list python-cython-0.29.35 - python-beautifulsoup4 - python-lxml - python-html5lib - python-pytest - python-pytest-mock - python-pytest-xdist - python-setuptools - python-wheel - ;; Needed to test clipboard support. - xorg-server-for-tests)) - (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 -structures designed to make working with structured (tabular, -multidimensional, potentially heterogeneous) and time series data both easy -and intuitive. It aims to be the fundamental high-level building block for -doing practical, real world data analysis in Python.") - (license license:bsd-3))) - (define-public python-pandas-2 (package (name "python-pandas") @@ -3662,6 +3694,9 @@ doing practical, real world data analysis in Python.") ;; It requires a fresh python-tzdata, including new ;; timezones. "test_repr" + ;; Fails with Pytest@8.4.1, fixed on main branch. + ;; See: <https://github.com/pandas-dev/pandas/issues/61557>. + "test_groupby_raises_category_on_category" ;; These tests should be skipped on 32bit systems: ;; Cannot cast array data from dtype('int64') to dtype('int32') #$@(if (not (target-64bit?)) @@ -3869,76 +3904,72 @@ idea of the remaining amount of computation to be done.") (define-public python-pandera (package (name "python-pandera") - ;; FIXME: The latest version requires hypothesis >= 6.92.7, which can't be - ;; picked from python-hypothesis-next for some reason. - (version "0.18.0") + (version "0.26.1") (source (origin - ;; No tests in the PyPI tarball. - (method git-fetch) - (uri (git-reference - (url "https://github.com/unionai-oss/pandera") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) + (method url-fetch) + (uri (pypi-uri "pandera" version)) (sha256 - (base32 "14b5aij5zjkwvsimg0v00qvp59mhhq7ljim4qghcn432vkg9gh47")))) + (base32 "10px2wy3rb8gg2jyry8962yrd0m3jq88wgjcpyrk23bp55j5m9c1")))) (build-system pyproject-build-system) (arguments (list + ;; tests: 3093 passed, 48 skipped, 21 xfailed, 8232 warnings #:test-flags - #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) + ;; With higher threads count tests randomly fail during collection. + #~(list "--numprocesses" (number->string (min 4 (parallel-job-count))) + ;; TODO: Ignore tests for not packaged python-ibis-framework, + ;; python-polars, and python-pyspark. + "--ignore=tests/ibis" + "--ignore=tests/polars" "--ignore=tests/pyspark" "-k" (string-join - ;; Failed: DID NOT RAISE <class 'pandera.errors.SchemaError'> - (list "not test_from_records_validates_the_schema" - "test_init_pandas_dataframe_errors" - "test_schema_dtype_crs_without_coerce" - "test_schema_from_dataframe" - "test_schema_model" - "test_validate_coerce_on_init" - ;; multimethod.DispatchError: ('str_length: 0 - ;; methods found', (<class - ;; 'pandas.core.series.Series'>, <class 'NoneType'>, - ;; <class 'int'>), []) - "test_succeeding" - "test_failing" - "test_failing_with_none" - ;; pandera.errors.SchemaError: Error while executing - ;; check function: KeyError("foo") - "test_check_groups" - ;; [pandas_series.py-plugin_mypy.ini-expected_errors13] - ;; - assert 1 == 2 - "test_pandas_stubs_false_positives" - ;; TypeError: type 'Series' is not subscriptable - "test_pandas_modules_importable") + ;; Network access is required. + (list "not test_items_endpoint" + "test_transactions_endpoint" + "test_upload_file_endpoint" + ;; AssertionError: assert dtype('bool') == 'object' + "test_index_dtypes[dask-Index-True-bool]" + "test_index_dtypes[dask-Index-False-bool]" + ;; TypeError: __class__ assignment: 'GeoDataFrame' + ;; object layout differs from 'DataFrame' + "test_schema_model[data0-True]" + "test_schema_from_dataframe[data1-True]" + "test_schema_no_geometry") " and not ")))) - ;; Pandera comes with a lot of extras. We test as many as possible, but do - ;; not include all of them in the propagated-inputs. Currently, we have to - ;; skip the pyspark and io tests due to missing packages python-pyspark - ;; and python-frictionless. - (propagated-inputs (list python-hypothesis-next ;strategies extra - python-modin - python-multimethod - python-numpy - python-packaging - python-pandas - python-pandas-stubs ;mypy extra - python-pydantic-2 - python-scipy ;hypotheses extra - python-typeguard - python-typing-inspect - python-wrapt)) - (native-inputs (list python-dask ;dask extra - python-fastapi ;fastapi extra - python-geopandas ;geopandas extra - python-pyarrow ;needed to run fastapi tests - python-pytest - python-pytest-asyncio - python-pytest-xdist - python-setuptools - python-sphinx - python-uvicorn ;needed to run fastapi tests - python-wheel)) + (native-inputs + (list python-joblib + python-pytest + python-pytest-asyncio + python-pytest-xdist + python-setuptools + python-setuptools-scm + python-uvicorn)) + (inputs + ;; [optional] + ;; Pandera comes with a lot of extras. We test as many as possible, but do + ;; not include all of them in the propagated-inputs. Currently, we have to + ;; skip the pyspark and io tests due to missing packages python-pyspark + ;; and python-frictionless. + (list python-dask + python-distributed + python-geopandas + python-hypothesis + ;; python-ibis-framework ;missing from Guix + python-modin + python-numpy + python-pandas + ;; python-polars ;missing from Guix + ;; python-pyspark ;missing from Guix + ;; python-ray ;missing from Guix + python-scipy + python-shapely)) + (propagated-inputs + (list python-packaging + python-pydantic-2 + python-typeguard + python-typing-extensions + python-typing-inspect)) (home-page "https://github.com/unionai-oss/pandera") (synopsis "Perform data validation on dataframe-like objects") (description @@ -3982,19 +4013,25 @@ production-critical data pipelines or reproducible research settings. With ;; marked turtle can be skipped using "-m" "not turtle". (arguments (list - #:test-flags '(list - "-n" (number->string (parallel-job-count)) - ;; Tries to connect to the internet. - "-k" (string-append "not test_is_connected" - ;; Test files are not included - " and not test_read_commandline_bad_cmd") - ;; Test files are not included - "--ignore=tests/io/test_read_csvs.py" - ;; Polars has not been packaged yet. - "--ignore=tests/polars" - ;; PySpark has not been packaged yet. - "--ignore=tests/spark/functions/test_clean_names_spark.py" - "--ignore=tests/spark/functions/test_update_where_spark.py") + ;; tests: 1042 passed, 2 skipped, 2 deselected, 45 xfailed, 6 xpassed, + ;; 735 warnings + #:test-flags + ;; The tests take quite long, so consider adding the "-n" line and + ;; adding python-pytest-xdist to the native-inputs when testing. + ;; However, the tests are not deterministic when ran with -n, so + ;; disable again before committing. + #~(list ;; "-n" (number->string (parallel-job-count)) + ;; Test files are not included. + "--ignore=tests/io/test_read_csvs.py" + ;; Polars has not been packaged yet. + "--ignore=tests/polars" + ;; PySpark has not been packaged yet. + "--ignore=tests/spark/functions/test_clean_names_spark.py" + "--ignore=tests/spark/functions/test_update_where_spark.py" + ;; Tries to connect to the internet. + "-k" (string-append "not test_is_connected" + ;; Test files are not included. + " and not test_read_commandline_bad_cmd")) #:phases #~(modify-phases %standard-phases (add-before 'check 'set-env-ci @@ -4002,20 +4039,22 @@ production-critical data pipelines or reproducible research settings. With ;; Some tests are skipped if the JANITOR_CI_MACHINE ;; variable is not set. (setenv "JANITOR_CI_MACHINE" "1")))))) + ;; TODO: Remove python-requests and inject its target data to make the + ;; package behaviour reproducible. (propagated-inputs (list python-multipledispatch python-natsort python-pandas-flavor + python-requests python-scipy ;; Optional imports. python-biopython ;biology submodule python-unyt)) ;engineering submodule (native-inputs (list python-pytest - python-pytest-xdist + ;;python-pytest-xdist ;only for -n when testing + python-setuptools ;; Optional imports. We do not propagate them due to ;; their size. python-numba ;speedup of joins - python-setuptools - python-wheel rdkit)) ;chemistry submodule (home-page "https://github.com/pyjanitor-devs/pyjanitor") (synopsis "Tools for cleaning and transforming pandas DataFrames") @@ -4083,6 +4122,10 @@ y, z)}.") (build-system pyproject-build-system) (arguments (list + ;; FIXME: find more reliable tests file(s), all tests from + ;; test_typing.py fail with error: ModuleNotFoundError: No module named + ;; 'distutils.msvccompiler'. + #:tests? #f #:test-flags '(list (string-append "--numprocesses=" (number->string (parallel-job-count))) @@ -4171,6 +4214,8 @@ changed, it made sense to abstract away the nuisance of having to re-learn them.") (license license:bsd-3))) +;; XXX: Not maintained since 2019. The project was archived by the owner on +;; Nov 2, 2020. It is now read-only. (define-public python-fbpca (package (name "python-fbpca") @@ -4181,7 +4226,10 @@ them.") (sha256 (base32 "1lbjqhqsdmqk86lb86q3ywf7561zmdny1dfvgwqkyrkr4ij7f1hm")))) - (build-system python-build-system) + (build-system pyproject-build-system) + (arguments + (list #:test-flags #~(list "fbpca.py"))) + (native-inputs (list python-pytest python-setuptools)) (propagated-inputs (list python-numpy python-scipy)) (home-page "https://fbpca.readthedocs.io/") @@ -4296,6 +4344,61 @@ units. It defines the @code{unyt.array.unyt_array} and for handling arrays and scalars with units,respectively") (license license:bsd-3))) +(define-public python-uproot + (package + (name "python-uproot") + (version "5.6.4") + (source + (origin + (method url-fetch) + (uri (pypi-uri "uproot" version)) + (sha256 + (base32 "024k5kjwcd2nw5hfxhpl0x9p5aq0qrg0nlh9v24vr39rcqadh52a")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + #~(list + ;; conftest.py is not required and it imports modules we do not use. + "--noconftest" + ;; There is no easy way to skip tests that require the network, so + ;; just run a handful of tests that pass. + "tests/test_0351_write_TList.py" + "tests/test_0352_write_THashList.py" + "tests/test_0439_check_awkward_before_numpy.py" + "tests/test_0976_path_object_split.py" + "tests/test_1198_coalesce.py" + "tests/test_1264_write_NumPy_array_of_strings.py" + "tests/test_1318_dont_compare_big_endian_in_awkward.py") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'set-version + (lambda _ + ;; Version is determined dynamically from .git. + (substitute* "pyproject.toml" + (("\\[project\\]") + (string-append "[project]" "\n" "version = \"" + #$version "\"")) + (("\"version\"") ""))))))) + (native-inputs + (list python-hatch-vcs + python-pytest + python-pytest-timeout + python-setuptools)) + (propagated-inputs + (list python-awkward + python-cramjam + python-fsspec + python-numpy + python-packaging + python-xxhash)) + (home-page "https://uproot.readthedocs.io") + (synopsis "ROOT I/O in Python using NumPy") + (description + "Uproot is a Python library for reading and writing ROOT files. It uses +NumPy and does not depend on C++ ROOT.") + (license license:bsd-3))) + (define-public python-upsetplot (package (name "python-upsetplot") @@ -4949,9 +5052,9 @@ and more (chdir "packages/python/plotly")))))) (native-inputs (list python-ipywidgets + python-nbformat python-pytest python-setuptools - python-wheel python-xarray)) (propagated-inputs (list python-ipython @@ -5094,16 +5197,127 @@ and aims to provide a similar API and functionality in Python.") (name "python-pyvista") (version "0.44.2") (source - ;; The PyPI tarball does not contain the tests. (origin (method git-fetch) (uri (git-reference - (url "https://github.com/pyvista/pyvista") - (commit (string-append "v" version)))) + (url "https://github.com/pyvista/pyvista") + (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 (base32 "0lnh4cvf6wld7hm293015d80ny0vnsk96ckfvc2crzd1b79ch1v5")))) (build-system pyproject-build-system) + (arguments + (list + ;; tests: 5891 passed, 623 skipped, 355 deselected, 3 xfailed, 167 warnings + #:test-flags + ;; TODO: Find out what's going on with skipped tests. + #~(list "--ignore=tests/plotting/test_charts.py" + "--ignore=tests/examples/test_download_files.py" + "--ignore=tests/examples/test_downloads.py" + "--ignore=tests/plotting/test_texture.py" + "-k" (string-join + (list "not test_actor_texture" + "test_add_multiple" + "test_add_timer_event" + "test_avsucd_reader" + "test_binarymarchingcubesreader" + "test_bmpreader" + "test_box_axes" + "test_byureader" + "test_cast_to_numpy_raises" + "test_compute_boundary_mesh_quality" + "test_connectivity_" + "test_dataset_loader_cubemap" + "test_dataset_loader_dicom" + "test_dataset_loader_from_nested_files_and_directory" + "test_dataset_loader_from_nested_multiblock" + "test_dataset_loader_one_file" + "test_dataset_loader_two_files_both_loadable" + "test_dataset_loader_two_files_one_loadable" + "test_dcmreader" + "test_demreader" + "test_ensight_multi_block_io" + "test_ensightreader_arrays" + "test_ensightreader_time_sets" + "test_ensightreader_timepoints" + "test_facetreader" + "test_fluentcffreader" + "test_gambitreader" + "test_gaussian_cubes_reader" + "test_gesignareader" + "test_gif_reader" + "test_hdf_reader" + "test_hdr_reader" + "test_init_cmap" + "test_interpolate" + "test_jpegreader" + "test_legend_" + "test_load_dataset_no_reader" + "test_load_theme" + "test_meta_image_reader" + "test_multiblockplot3dreader" + "test_nifti_reader" + "test_nrrd_reader" + "test_objreader" + "test_only_screenshots_flag" + "test_openfoam_case_type" + "test_openfoam_cell_to_point_default" + "test_openfoam_patch_arrays" + "test_openfoam_skip_zero_time" + "test_openfoamreader_active_time" + "test_openfoamreader_arrays_time" + "test_openfoamreader_read_data_time_point" + "test_openfoamreader_read_data_time_value" + "test_particle_reader" + "test_partition" + "test_pdbreader" + "test_plot3dmetareader" + "test_plot_return_img_with_cpos" + "test_plot_return_img_without_cpos" + "test_png_reader" + "test_pnm_reader" + "test_prostar_reader" + "test_protein_ribbon" + "test_pvdreader" + "test_pvdreader_no_part_group" + "test_pvdreader_no_time_group" + "test_read_cgns" + "test_repr" + "test_save_before_close_callback" + "test_slc_reader" + "test_stlreader" + "test_tecplotreader" + "test_tiff_reader" + "test_timer" + "test_translate_direction_collinear" + "test_user_logo" + "test_xdmf_reader") + " and not ")) + #:phases + #~(modify-phases %standard-phases + ;; vtk check fails in sanity-check, comment out + (add-after 'unpack 'patch-pyproject + (lambda _ + (substitute* "pyproject.toml" + (("'vtk<9\\.4\\.0'," all) (string-append "#" all))))) + (add-after 'unpack 'fix-failing-tests + (lambda _ + (substitute* "tests/plotting/test_plotting.py" + (("\"\"\"Determine if using mesa.\"\"\"" all) + (string-append all "\n return False"))) + (substitute* "tests/test_meshio.py" + (("cow = .*$" all) (string-append "#" all "\n")) + ((", cow") "")))) + ;; test phase writes files to $HOME + (add-before 'check 'redirect-HOME + (lambda _ + (setenv "HOME" "/tmp")))))) + (native-inputs + (list python-ipython + python-pytest + python-scipy + python-tqdm + python-trimesh)) (propagated-inputs (list python-imageio python-matplotlib @@ -5113,127 +5327,6 @@ and aims to provide a similar API and functionality in Python.") python-pooch python-scooby vtk)) - ;; packages needed for testing - (native-inputs (list python-pytest - python-scipy - python-ipython - python-trimesh - python-tqdm)) - (arguments - '(#:phases - (modify-phases %standard-phases - ;; vtk check fails in sanity-check, comment out - (add-after 'unpack 'patch-pyproject - (lambda _ - (substitute* "pyproject.toml" - (("'vtk<9\\.4\\.0'," all) (string-append "#" all))))) - (add-after 'unpack 'fix-failing-tests - (lambda _ - (rename-file "tests/plotting/test_charts.py" "tests/plotting/_test_charts.py") - (rename-file "tests/examples/test_download_files.py" "tests/examples/_test_download_files.py") - (rename-file "tests/examples/test_downloads.py" "tests/examples/_test_downloads.py") - (rename-file "tests/plotting/test_texture.py" "tests/plotting/_test_texture.py") - (substitute* "tests/plotting/test_plotting.py" - (("\"\"\"Determine if using mesa.\"\"\"" all) - (string-append all "\n return False"))) - (substitute* "tests/test_meshio.py" - (("cow = .*$" all) (string-append "#" all "\n")) - ((", cow") "")) - (substitute* "tests/core/test_dataset.py" - (("test_partition") "_test_partition")) - (substitute* "tests/core/test_composite.py" - (("test_ensight_multi_block_io") "_test_ensight_multi_block_io")) - (substitute* "tests/core/test_dataset_filters.py" - (("test_connectivity_.*$" all) (string-append "_" all)) - (("test_compute_boundary_mesh_quality") "_test_compute_boundary_mesh_quality")) - (substitute* "tests/core/test_polydata_filters.py" - (("test_protein_ribbon") "_test_protein_ribbon")) - (substitute* "tests/core/test_validation.py" - (("test_cast_to_numpy_raises") "_test_cast_to_numpy_raises")) - (substitute* "tests/plotting/test_actor.py" - (("test_actor_texture") "_test_actor_texture")) - (substitute* "tests/plotting/test_lookup_table.py" - (("test_init_cmap") "_test_init_cmap") - (("test_repr") "_test_repr")) - (substitute* "tests/plotting/test_plotter.py" - (("test_add_multiple") "_test_add_multiple") - (("test_plot_return_img_without_cpos") "_test_plot_return_img_without_cpos") - (("test_plot_return_img_with_cpos") "_test_plot_return_img_with_cpos") - (("test_only_screenshots_flag") "_test_only_screenshots_flag")) - (substitute* "tests/plotting/test_plotting_utilities.py" - (("test_gif_reader") "_test_gif_reader")) - (substitute* "tests/plotting/test_render_window_interactor.py" - (("test_timer") "_test_timer") - (("test_add_timer_event") "_test_add_timer_event") - (("test_interpolate") "_test_interpolate")) - (substitute* "tests/plotting/test_renderer.py" - (("test_legend_.*$" all) (string-append "_" all))) - (substitute* "tests/plotting/test_theme.py" - (("test_box_axes") "_test_box_axes") - (("test_load_theme") "_test_load_theme") - (("test_save_before_close_callback") "_test_save_before_close_callback") - (("test_user_logo") "_test_user_logo")) - (substitute* "tests/core/test_geometric_sources.py" - (("test_translate_direction_collinear") "_test_translate_direction_collinear")) - (substitute* "tests/examples/test_dataset_loader.py" - (("test_dataset_loader_one_file") "_test_dataset_loader_one_file") - (("test_dataset_loader_two_files_one_loadable") "_test_dataset_loader_two_files_one_loadable") - (("test_dataset_loader_two_files_both_loadable") "_test_dataset_loader_two_files_both_loadable") - (("test_dataset_loader_cubemap") "_test_dataset_loader_cubemap") - (("test_dataset_loader_dicom") "_test_dataset_loader_dicom") - (("test_dataset_loader_from_nested_files_and_directory") "_test_dataset_loader_from_nested_files_and_directory") - (("test_dataset_loader_from_nested_multiblock") "_test_dataset_loader_from_nested_multiblock") - (("test_load_dataset_no_reader") "_test_load_dataset_no_reader")) - (substitute* "tests/core/test_reader.py" - (("test_ensightreader_arrays") "_test_ensightreader_arrays") - (("test_ensightreader_timepoints") "_test_ensightreader_timepoints") - (("test_ensightreader_time_sets") "_test_ensightreader_time_sets") - (("test_dcmreader") "_test_dcmreader") - (("test_objreader") "_test_objreader") - (("test_stlreader") "_test_stlreader") - (("test_tecplotreader") "_test_tecplotreader") - (("test_byureader") "_test_byureader") - (("test_facetreader") "_test_facetreader") - (("test_plot3dmetareader") "_test_plot3dmetareader") - (("test_multiblockplot3dreader") "_test_multiblockplot3dreader") - (("test_binarymarchingcubesreader") "_test_binarymarchingcubesreader") - (("test_pvdreader") "_test_pvdreader") - (("test_pvdreader_no_time_group") "_test_pvdreader_no_time_group") - (("test_pvdreader_no_part_group") "_test_pvdreader_no_part_group") - (("test_openfoamreader_arrays_time") "_test_openfoamreader_arrays_time") - (("test_openfoamreader_active_time") "_test_openfoamreader_active_time") - (("test_openfoamreader_read_data_time_value") "_test_openfoamreader_read_data_time_value") - (("test_openfoamreader_read_data_time_point") "_test_openfoamreader_read_data_time_point") - (("test_openfoam_skip_zero_time") "_test_openfoam_skip_zero_time") - (("test_openfoam_cell_to_point_default") "_test_openfoam_cell_to_point_default") - (("test_openfoam_patch_arrays") "_test_openfoam_patch_arrays") - (("test_openfoam_case_type") "_test_openfoam_case_type") - (("test_read_cgns") "_test_read_cgns") - (("test_bmpreader") "_test_bmpreader") - (("test_demreader") "_test_demreader") - (("test_jpegreader") "_test_jpegreader") - (("test_meta_image_reader") "_test_meta_image_reader") - (("test_nifti_reader") "_test_nifti_reader") - (("test_nrrd_reader") "_test_nrrd_reader") - (("test_png_reader") "_test_png_reader") - (("test_pnm_reader") "_test_pnm_reader") - (("test_slc_reader") "_test_slc_reader") - (("test_tiff_reader") "_test_tiff_reader") - (("test_hdr_reader") "_test_hdr_reader") - (("test_avsucd_reader") "_test_avsucd_reader") - (("test_hdf_reader") "_test_hdf_reader") - (("test_xdmf_reader") "_test_xdmf_reader") - (("test_fluentcffreader") "_test_fluentcffreader") - (("test_gambitreader") "_test_gambitreader") - (("test_gaussian_cubes_reader") "_test_gaussian_cubes_reader") - (("test_gesignareader") "_test_gesignareader") - (("test_pdbreader") "_test_pdbreader") - (("test_particle_reader") "_test_particle_reader") - (("test_prostar_reader") "_test_prostar_reader")))) - ;; test phase writes files to $HOME - (add-before 'check 'redirect-HOME - (lambda _ - (setenv "HOME" "/tmp")))))) (home-page "https://docs.pyvista.org/") (synopsis "3D plotting and mesh analysis through VTK") (description @@ -5251,6 +5344,54 @@ powerful visualization backend to facilitate rapid prototyping, analysis, and visual integration of spatially referenced datasets.") (license license:expat))) +(define-public python-pyvistaqt + (package + (name "python-pyvistaqt") + (version "0.11.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pyvista/pyvistaqt") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "04f9cd98k463pdrpi8jby411x9mc0ih62gl0nv0h9w3r7pwl61yl")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-pytest + (lambda _ + (substitute* "tests/conftest.py" + (("pytest.skip") + "pytest.mark.skipif")))) + (add-before 'check 'before-check + (lambda _ + ;; Testing requires write access. + (setenv "HOME" "/tmp") + ;; Testing requires a running xorg server. + (system "Xvfb :99 -screen 0 1024x768x24 &") + (setenv "DISPLAY" ":99.0")))))) + (propagated-inputs (list python-pyvista python-qtpy)) + (native-inputs (list python-ipython + python-matplotlib + python-numpy + python-pytest + python-pytest-cov + python-pytest-qt + python-setuptools + python-sphinx-gallery + xorg-server)) + (home-page "https://github.com/pyvista/pyvistaqt") + (synopsis "Qt support for PyVista") + (description + "@code{pyvistaqt} is a helper module for @code{pyvista} to enable you to +plot using Qt by placing a vtk-widget into a background renderer. This can be +quite useful when you desire to update your plot in real-time.") + (license license:expat))) + (define-public python-simplespectral (package (name "python-simplespectral") @@ -5431,34 +5572,37 @@ data.") (license license:expat))) (define-public python-supersmoother - (package - (name "python-supersmoother") - (version "0.4") - (source - (origin - (method git-fetch) ; no package in PyPI - (uri (git-reference - (url "https://github.com/jakevdp/supersmoother") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 "1lkj8l2mpki6x2pxcwlrplx63lhi8h9v2rzxgjfb0cppsfr8m1wp")))) - (build-system pyproject-build-system) - (native-inputs - (list python-pytest - python-scipy - python-setuptools - python-wheel)) - (propagated-inputs - (list python-numpy)) - (home-page "http://github.com/jakevdp/supersmoother") - (synopsis "Python implementation of Friedman's Supersmoother") - (description - "This package provides an efficient implementation of + ;; 0.4 was release in 2017, there a lot of changes on master branch + ;; providing tests fixtures. + (let ((commit "0a81544ac6bb33bdb08deeba69e97a4ceebcebcf") + (revision "0")) + (package + (name "python-supersmoother") + (version (git-version "0.4" revision commit)) + (source + (origin + (method git-fetch) ; no package in PyPI + (uri (git-reference + (url "https://github.com/jakevdp/supersmoother") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1r79nssw4a44zizvqg8y685nv3asdfj440s227phfww6kz33s3la")))) + (build-system pyproject-build-system) + (native-inputs + (list python-pytest + python-scipy + python-setuptools)) + (propagated-inputs + (list python-numpy)) + (home-page "http://github.com/jakevdp/supersmoother") + (synopsis "Python implementation of Friedman's Supersmoother") + (description + "This package provides an efficient implementation of @url{https://www.slac.stanford.edu/pubs/slacpubs/3250/slac-pub-3477.pdf, Friedman's SuperSmoother} based in Python. It makes use of numpy for fast numerical computation.") - (license license:bsd-2))) + (license license:bsd-2)))) (define-public python-pylems (package @@ -5547,18 +5691,20 @@ compagnies.") (define-public python-pyqtgraph (package (name "python-pyqtgraph") - (version "0.13.3") + (version "0.13.7") (source (origin (method url-fetch) (uri (pypi-uri "pyqtgraph" version)) (sha256 - (base32 "1kiazyc8mqyx0479qdcvdclzq0g1hpp93dyq8444w1f72628s42q")))) + (base32 "1qyr461hcvhgy02slfkgrbip2xwa8zz6dvmi1476v6f66lclzy34")))) (build-system pyproject-build-system) (arguments - ;; This test fails. It suggests to disable assert rewriting in Pytest, - ;; but it still doesn't pass. - (list #:test-flags #~'("-k" "not test_reload") + (list #:test-flags + ;; The test_reload test fails. It suggests to disable assert + ;; rewriting in Pytest, but it still doesn't pass. + #~(list "-k" "not test_reload" + "-n" (number->string (parallel-job-count))) #:phases #~(modify-phases %standard-phases (add-before 'check 'set-qpa |