diff options
Diffstat (limited to 'gnu/packages/python-science.scm')
-rw-r--r-- | gnu/packages/python-science.scm | 143 |
1 files changed, 110 insertions, 33 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index f35795f922..8504593b1e 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -35,6 +35,7 @@ ;;; 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> ;;; ;;; This file is part of GNU Guix. ;;; @@ -63,7 +64,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 +82,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) @@ -542,26 +543,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)) @@ -2920,19 +2905,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-next)) (propagated-inputs (list python-joblib python-matplotlib @@ -2940,14 +2963,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 @@ -4359,6 +4381,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") |