| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2015, 2016, 2018, 2020-2025 Ricardo Wurmus <[email protected]> |
| 3 | ;;; Copyright © 2015 Federico Beffa <[email protected]> |
| 4 | ;;; Copyright © 2016 Ben Woodcroft <[email protected]> |
| 5 | ;;; Copyright © 2016,2024 Hartmut Goebel <[email protected]> |
| 6 | ;;; Copyright © 2016, 2021-2025 Efraim Flashner <[email protected]> |
| 7 | ;;; Copyright © 2016-2020, 2022 Marius Bakke <[email protected]> |
| 8 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <[email protected]> |
| 9 | ;;; Copyright © 2018, 2022 Leo Famulari <[email protected]> |
| 10 | ;;; Copyright © 2019-2026 Maxim Cournoyer <[email protected]> |
| 11 | ;;; Copyright © 2019 Giacomo Leidi <[email protected]> |
| 12 | ;;; Copyright © 2020-2025 Nicolas Goaziou <[email protected]> |
| 13 | ;;; Copyright © 2020 Pierre Langlois <[email protected]> |
| 14 | ;;; Copyright © 2020-2026 Vinicius Monego <[email protected]> |
| 15 | ;;; Copyright © 2021 Greg Hogan <[email protected]> |
| 16 | ;;; Copyright © 2021 Mădălin Ionel Patrașcu <[email protected]> |
| 17 | ;;; Copyright © 2021 Roel Janssen <[email protected]> |
| 18 | ;;; Copyright © 2021 Paul Garlick <[email protected]> |
| 19 | ;;; Copyright © 2021 Arun Isaac <[email protected]> |
| 20 | ;;; Copyright © 2021 Vagrant Cascadian <[email protected]> |
| 21 | ;;; Copyright © 2021, 2023 Felix Gruber <[email protected]> |
| 22 | ;;; Copyright © 2022 Malte Frank Gerdes <[email protected]> |
| 23 | ;;; Copyright © 2021, 2022 Guillaume Le Vaillant <[email protected]> |
| 24 | ;;; Copyright © 2022 Paul A. Patience <[email protected]> |
| 25 | ;;; Copyright © 2022 Wiktor Żelazny <[email protected]> |
| 26 | ;;; Copyright © 2022 Eric Bavier <[email protected]> |
| 27 | ;;; Copyright © 2022 kiasoc5 <[email protected]> |
| 28 | ;;; Copyright © 2022, 2024 Antero Mejr <[email protected]> |
| 29 | ;;; Copyright © 2022 jgart <[email protected]> |
| 30 | ;;; Copyright © 2022 Sarah Morgensen <[email protected]> |
| 31 | ;;; Copyright © 2023, 2024 Troy Figiel <[email protected]> |
| 32 | ;;; Copyright © 2024-2026 Sharlatan Hellseher <[email protected]> |
| 33 | ;;; Copyright © 2024 Marco Baggio <[email protected]> |
| 34 | ;;; Copyright © 2024 Nicolas Graves <[email protected]> |
| 35 | ;;; Copyright © 2024 Rick Huijzer <[email protected]> |
| 36 | ;;; Copyright © 2025 Nicolas Graves <[email protected]> |
| 37 | ;;; Copyright © 2025 Mark Walker <[email protected]> |
| 38 | ;;; Copyright © 2025 Nguyễn Gia Phong <[email protected]> |
| 39 | ;;; Copyright © 2025 Jake Forster <[email protected]> |
| 40 | ;;; Copyright © 2025 Ghislain Vaillant <[email protected]> |
| 41 | ;;; Copyright © 2025 Janneke Nieuwenhuizen <[email protected]> |
| 42 | ;;; |
| 43 | ;;; This file is part of GNU Guix. |
| 44 | ;;; |
| 45 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 46 | ;;; under the terms of the GNU General Public License as published by |
| 47 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 48 | ;;; your option) any later version. |
| 49 | ;;; |
| 50 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 51 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 52 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 53 | ;;; GNU General Public License for more details. |
| 54 | ;;; |
| 55 | ;;; You should have received a copy of the GNU General Public License |
| 56 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 57 | |
| 58 | (define-module (gnu packages python-science) |
| 59 | #:use-module ((guix licenses) #:prefix license:) |
| 60 | #:use-module (gnu packages) |
| 61 | #:use-module (gnu packages algebra) |
| 62 | #:use-module (gnu packages base) |
| 63 | #:use-module (gnu packages bioinformatics) |
| 64 | #:use-module (gnu packages boost) |
| 65 | #:use-module (gnu packages build-tools) |
| 66 | #:use-module (gnu packages check) |
| 67 | #:use-module (gnu packages chemistry) |
| 68 | #:use-module (gnu packages cmake) |
| 69 | #:use-module (gnu packages compression) |
| 70 | #:use-module (gnu packages cpp) |
| 71 | #:use-module (gnu packages cross-base) |
| 72 | #:use-module (gnu packages crypto) |
| 73 | #:use-module (gnu packages databases) |
| 74 | #:use-module (gnu packages digest) |
| 75 | #:use-module (gnu packages duckdb) |
| 76 | #:use-module (gnu packages elf) |
| 77 | #:use-module (gnu packages gcc) |
| 78 | #:use-module (gnu packages geo) |
| 79 | #:use-module (gnu packages gl) |
| 80 | #:use-module (gnu packages graphviz) |
| 81 | #:use-module (gnu packages image) |
| 82 | #:use-module (gnu packages image-processing) |
| 83 | #:use-module (gnu packages jemalloc) |
| 84 | #:use-module (gnu packages jupyter) |
| 85 | #:use-module (gnu packages machine-learning) |
| 86 | #:use-module (gnu packages maths) |
| 87 | #:use-module (gnu packages mpi) |
| 88 | #:use-module (gnu packages networking) |
| 89 | #:use-module (gnu packages ninja) |
| 90 | #:use-module (gnu packages nss) |
| 91 | #:use-module (gnu packages pcre) |
| 92 | #:use-module (gnu packages perl) |
| 93 | #:use-module (gnu packages pkg-config) |
| 94 | #:use-module (gnu packages python) |
| 95 | #:use-module (gnu packages python-build) |
| 96 | #:use-module (gnu packages python-check) |
| 97 | #:use-module (gnu packages python-compression) |
| 98 | #:use-module (gnu packages python-crypto) |
| 99 | #:use-module (gnu packages python-graphics) |
| 100 | #:use-module (gnu packages python-web) |
| 101 | #:use-module (gnu packages python-xyz) |
| 102 | #:use-module (gnu packages qt) |
| 103 | #:use-module (gnu packages rust) |
| 104 | #:use-module (gnu packages rust-apps) |
| 105 | #:use-module (gnu packages serialization) |
| 106 | #:use-module (gnu packages simulation) |
| 107 | #:use-module (gnu packages sphinx) |
| 108 | #:use-module (gnu packages ssh) |
| 109 | #:use-module (gnu packages statistics) |
| 110 | #:use-module (gnu packages tbb) |
| 111 | #:use-module (gnu packages time) |
| 112 | #:use-module (gnu packages tls) |
| 113 | #:use-module (gnu packages version-control) |
| 114 | #:use-module (gnu packages xdisorg) |
| 115 | #:use-module (gnu packages xml) |
| 116 | #:use-module (gnu packages xorg) |
| 117 | #:use-module (guix packages) |
| 118 | #:use-module (guix gexp) |
| 119 | #:use-module (guix deprecation) |
| 120 | #:use-module (guix download) |
| 121 | #:use-module (guix git-download) |
| 122 | #:use-module (guix utils) |
| 123 | #:use-module (guix build-system cargo) |
| 124 | #:use-module (guix build-system cmake) |
| 125 | #:use-module (guix build-system meson) |
| 126 | #:use-module (guix build-system python) |
| 127 | #:use-module (guix build-system pyproject)) |
| 128 | |
| 129 | (define-public pyre |
| 130 | (package |
| 131 | (name "pyre") |
| 132 | (version "1.12.5") |
| 133 | (source |
| 134 | (origin |
| 135 | (method git-fetch) |
| 136 | (uri (git-reference |
| 137 | (url "https://github.com/pyre/pyre") |
| 138 | (commit (string-append "v" version)))) |
| 139 | (file-name (git-file-name name version)) |
| 140 | (sha256 |
| 141 | (base32 |
| 142 | "0crmssga481q2ggwcmj40nj5n9975wri14p609jdr9hwg4vdyvj2")))) |
| 143 | (build-system cmake-build-system) |
| 144 | (arguments |
| 145 | (list |
| 146 | #:imported-modules (append %cmake-build-system-modules |
| 147 | %pyproject-build-system-modules) |
| 148 | #:modules '((guix build cmake-build-system) |
| 149 | ((guix build pyproject-build-system) #:prefix py:) |
| 150 | (guix build utils)) |
| 151 | #:configure-flags |
| 152 | #~(list (string-append "-DPYRE_VERSION=" #$version) |
| 153 | (string-append "-DPYRE_DEST_PACKAGES=" |
| 154 | (py:site-packages %build-inputs %outputs))) |
| 155 | #:phases |
| 156 | #~(modify-phases %standard-phases |
| 157 | (add-after 'unpack 'enable-bytecode-determinism |
| 158 | (assoc-ref py:%standard-phases 'enable-bytecode-determinism)) |
| 159 | ;; Move the check phase after the Python 'pyre' module |
| 160 | ;; is installed and made available. |
| 161 | (delete 'check) |
| 162 | (add-after 'install 'add-to-pythonpath |
| 163 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 164 | (py:add-installed-pythonpath inputs outputs))) |
| 165 | (add-after 'add-to-pythonpath 'wrap |
| 166 | (assoc-ref py:%standard-phases 'wrap)) |
| 167 | (add-after 'add-to-pythonpath 'check |
| 168 | (lambda* (#:key tests? parallel-tests? #:allow-other-keys) |
| 169 | (when tests? |
| 170 | (setenv "CTEST_OUTPUT_ON_FAILURE" "1") |
| 171 | (let ((ignored-tests |
| 172 | (list |
| 173 | ;; The MPI tests are failing for unknown reasons (see: |
| 174 | ;; https://github.com/pyre/pyre/issues/126). |
| 175 | "tests.mpi" |
| 176 | ;; These tests have a cleanup phase that fails |
| 177 | ;; non-deterministically (see: |
| 178 | ;; https://github.com/pyre/pyre/issues/125). |
| 179 | "tests.pyre.lib.viz.flow" |
| 180 | ;; This test expects a TCP port 22 to be listening. |
| 181 | "tests.pyre.pkg.ipc.tcp.py" |
| 182 | ;; These postgres tests require a running postgresql |
| 183 | ;; daemon; they are also skipped in upstream CI. |
| 184 | "tests.postgres.ext" |
| 185 | ;; This test fails due to pre-1980 timestamps, not |
| 186 | ;; supported by ZIP. |
| 187 | "tests.pyre.pkg.filesystem.zip_open.py" |
| 188 | ;; This one trips on the patched python3 shebang. |
| 189 | "tests.pyre.pkg.filesystem.local_open.py"))) |
| 190 | (invoke "ctest" |
| 191 | "-j" (if parallel-tests? |
| 192 | (number->string (parallel-job-count)) |
| 193 | "1") |
| 194 | "-E" (string-join ignored-tests "|"))))))))) |
| 195 | (native-inputs (list openssh-sans-x python python-numpy pybind11-2 zip)) |
| 196 | (inputs (list gsl hdf5 openmpi postgresql)) |
| 197 | (propagated-inputs (list python-pyyaml)) ;for the Python bindings |
| 198 | (home-page "http://pyre.orthologue.com/") |
| 199 | (synopsis "Framework for building Scientific applications") |
| 200 | (description |
| 201 | "This package provides a framework for building scientific applications. |
| 202 | It aims to bring state of the art software design practices to scientific |
| 203 | computing, with the goal of providing a strong skeleton on which to build |
| 204 | scientific codes by steering the implementation towards usability and |
| 205 | maintainability.") |
| 206 | (license license:bsd-3))) |
| 207 | |
| 208 | (define-public python-adjusttext |
| 209 | (package |
| 210 | (name "python-adjusttext") |
| 211 | (version "1.3.0") |
| 212 | (source |
| 213 | (origin |
| 214 | (method url-fetch) |
| 215 | (uri (pypi-uri "adjusttext" version)) |
| 216 | (sha256 |
| 217 | (base32 "18dw5kqxan4m8kvw3w1lm0p69gj95i7rcgmcfs485x1s8pa5rdsa")))) |
| 218 | (build-system pyproject-build-system) |
| 219 | (arguments |
| 220 | (list #:tests? #false)) ;there are none |
| 221 | (native-inputs |
| 222 | (list python-setuptools |
| 223 | python-wheel)) |
| 224 | (propagated-inputs |
| 225 | (list python-matplotlib |
| 226 | python-numpy |
| 227 | python-scipy)) |
| 228 | (home-page "https://github.com/Phlya/adjustText") |
| 229 | (synopsis "Adjust text position in matplotlib plots to minimize overlaps") |
| 230 | (description |
| 231 | "Often when we want to label multiple points on a graph the text will |
| 232 | start heavily overlapping with both other labels and data points. This can be |
| 233 | a major problem requiring manual solution. However this can be largely |
| 234 | automated by smart placing of the labels (difficult) or iterative adjustment |
| 235 | of their positions to minimize overlaps (relatively easy). This library |
| 236 | implements the latter option to help with matplotlib graphs.") |
| 237 | (license license:expat))) |
| 238 | |
| 239 | (define-public python-algopy |
| 240 | (package |
| 241 | (name "python-algopy") |
| 242 | (version "0.7.2") |
| 243 | (source |
| 244 | (origin |
| 245 | (method url-fetch) |
| 246 | (uri (pypi-uri "algopy" version)) |
| 247 | (sha256 |
| 248 | (base32 "0l9d4pkbal6m6q8v6w5zr9wlij4sfycc8i2w7irk0i4n8hyvm0ja")))) |
| 249 | (build-system pyproject-build-system) |
| 250 | (native-inputs |
| 251 | (list python-pytest |
| 252 | python-setuptools)) |
| 253 | (propagated-inputs |
| 254 | (list python-numpy |
| 255 | python-scipy)) |
| 256 | (home-page "https://pythonhosted.org/algopy") |
| 257 | (synopsis "Algorithmic Differentation in Python") |
| 258 | (description |
| 259 | "AlgoPy provides a functionality to differentiate functions implemented |
| 260 | as computer programs by using Algorithmic Differentiation (AD) techniques in |
| 261 | the forward and reverse mode. |
| 262 | |
| 263 | The forward mode propagates univariate Taylor polynomials of arbitrary order. |
| 264 | Hence it is also possible to use AlgoPy to evaluate higher-order derivative |
| 265 | tensors. The reverse mode is also known as backpropagation and can be found |
| 266 | in similar form in tools like PyTorch. Speciality of AlgoPy is the |
| 267 | possibility to differentiate functions that contain matrix functions as |
| 268 | +,-,*,/, dot, solve, qr, eigh, cholesky.") |
| 269 | (license license:bsd-3))) |
| 270 | |
| 271 | (define-public python-anndata |
| 272 | (package |
| 273 | (name "python-anndata") |
| 274 | (version "0.12.7") |
| 275 | (source |
| 276 | (origin |
| 277 | (method git-fetch) |
| 278 | (uri (git-reference |
| 279 | (url "https://github.com/theislab/anndata") |
| 280 | (commit version))) |
| 281 | (file-name (git-file-name name version)) |
| 282 | (sha256 |
| 283 | (base32 "1404x0z37z7xfdzkkafh62amchikrz0ssyc83rn6pv3dd4nn8nid")))) |
| 284 | (build-system pyproject-build-system) |
| 285 | (arguments |
| 286 | (list |
| 287 | ;; tests: 4167 passed, 1208 skipped, 12 xfailed, 2225 warnings |
| 288 | #:test-flags |
| 289 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 290 | ;; XXX: AttributeError: module 'pyarrow.lib' has no attribute |
| 291 | ;; 'PyExtensionType' |
| 292 | "--ignore=tests/test_awkward.py" |
| 293 | ;; These tests require CUDA backed package: |
| 294 | ;; <https://github.com/cupy/cupy>. |
| 295 | "--deselect=sts/test_views.py::test_view_of_view" |
| 296 | #$@(map (lambda (test) (string-append "--deselect=" |
| 297 | "tests/" |
| 298 | test)) |
| 299 | (list "test_concatenate.py::test_concatenate_layers" |
| 300 | "test_concatenate.py::test_concat_different_types_dask" |
| 301 | "test_concatenate.py::test_concat_on_var_outer_join" |
| 302 | "test_concatenate.py::test_concatenate_layers_misaligned" |
| 303 | "test_concatenate.py::test_concatenate_layers_outer" |
| 304 | "test_concatenate.py::test_concatenate_roundtrip" |
| 305 | "test_concatenate.py::test_error_on_mixed_device" |
| 306 | "test_concatenate.py::test_nan_merge" |
| 307 | "test_concatenate.py::test_pairwise_concat" |
| 308 | "test_concatenate.py::test_transposed_concat" |
| 309 | "test_dask.py::test_dask_to_disk_view" |
| 310 | "test_dask.py::test_dask_to_memory_unbacked" |
| 311 | "test_gpu.py::test_adata_raw_gpu" |
| 312 | "test_gpu.py::test_gpu" |
| 313 | "test_gpu.py::test_raw_gpu" |
| 314 | "test_helpers.py::test_as_cupy_dask" |
| 315 | "test_helpers.py::test_as_dask_functions" |
| 316 | "test_io_elementwise.py::test_io_spec_cupy" |
| 317 | "test_obsmvarm.py::test_1d_declaration" |
| 318 | "test_obsmvarm.py::test_1d_set" |
| 319 | "test_views.py::test_ellipsis_index" |
| 320 | "test_views.py::test_modify_view_component" |
| 321 | "test_views.py::test_set_scalar_subset_X" |
| 322 | "test_views.py::test_view_different_type_indices" |
| 323 | "test_views.py::test_view_of_view")) |
| 324 | "-k" (string-join |
| 325 | ;; TypeError: _fix_co_filename() argument 2 must be str, |
| 326 | ;; not PosixPath |
| 327 | (list "not test_hints" |
| 328 | ;; ValueError: Cannot convert. CSC format must be |
| 329 | ;; 2D. Got 1D |
| 330 | "test_backed_modification_sparse[csc_matrix]" |
| 331 | ;; Failed: DID NOT WARN. No warnings of type (<class |
| 332 | ;; 'FutureWarning'>,) were emitted. |
| 333 | "test_old_format_warning_thrown") |
| 334 | " and not ")) |
| 335 | #:phases |
| 336 | #~(modify-phases %standard-phases |
| 337 | ;; Doctests require scanpy from (gnu packages bioinformatics) |
| 338 | (add-after 'unpack 'disable-doctests |
| 339 | (lambda _ |
| 340 | (substitute* "pyproject.toml" |
| 341 | (("--doctest-modules") "")))) |
| 342 | ;; Numba needs a writable dir to cache functions. |
| 343 | (add-before 'check 'set-numba-cache-dir |
| 344 | (lambda _ |
| 345 | (setenv "NUMBA_CACHE_DIR" "/tmp")))))) |
| 346 | (native-inputs |
| 347 | (list hdf5 ;for h5diff, tests/test_io_backwards_compat.py |
| 348 | python-awkward |
| 349 | python-boltons |
| 350 | python-dask |
| 351 | python-distributed |
| 352 | python-filelock |
| 353 | python-hatch-vcs |
| 354 | python-hatchling |
| 355 | python-joblib |
| 356 | python-loompy |
| 357 | python-matplotlib |
| 358 | python-openpyxl |
| 359 | python-pyarrow |
| 360 | python-pytest |
| 361 | python-pytest-mock |
| 362 | python-pytest-randomly |
| 363 | python-pytest-xdist |
| 364 | python-scikit-learn |
| 365 | python-setuptools-scm)) |
| 366 | (propagated-inputs |
| 367 | (list python-array-api-compat |
| 368 | python-h5py |
| 369 | python-legacy-api-wrap |
| 370 | python-natsort |
| 371 | python-numpy |
| 372 | python-packaging |
| 373 | python-pandas |
| 374 | python-scipy |
| 375 | python-zarr)) |
| 376 | (home-page "https://github.com/theislab/anndata") |
| 377 | (synopsis "Annotated data for data analysis pipelines") |
| 378 | (description "Anndata is a package for simple (functional) high-level APIs |
| 379 | for data analysis pipelines. In this context, it provides an efficient, |
| 380 | scalable way of keeping track of data together with learned annotations and |
| 381 | reduces the code overhead typically encountered when using a mostly |
| 382 | object-oriented library such as @code{scikit-learn}.") |
| 383 | (license license:bsd-3))) |
| 384 | |
| 385 | (define-public python-anndata-0.11 |
| 386 | (package |
| 387 | (inherit python-anndata) |
| 388 | (name "python-anndata") |
| 389 | (version "0.11.4") |
| 390 | (source |
| 391 | (origin |
| 392 | (method git-fetch) |
| 393 | (uri (git-reference |
| 394 | (url "https://github.com/theislab/anndata") |
| 395 | (commit version))) |
| 396 | (file-name (git-file-name name version)) |
| 397 | (sha256 |
| 398 | (base32 "05i805k5kvmwp5k0qw9vxvpgjwys284nq529mfn7vwlryz9d247m")))))) |
| 399 | |
| 400 | ;; A bare minimal package, mainly to use in tests and reduce closure |
| 401 | ;; size. Tests are left out in the main package to slim down native-inputs. |
| 402 | (define-public python-anndata-minimal |
| 403 | (package/inherit python-anndata |
| 404 | (name "python-anndata-minimal") |
| 405 | (arguments |
| 406 | (substitute-keyword-arguments (package-arguments python-anndata) |
| 407 | ((#:tests? _ #t) #f))) |
| 408 | (native-inputs |
| 409 | (list python-hatch-vcs |
| 410 | python-hatchling |
| 411 | python-setuptools-scm)))) |
| 412 | |
| 413 | ;; XXX: See: <https://codeberg.org/guix/guix/issues/3093>. |
| 414 | (define-public python-aplus |
| 415 | ;; PyPI release lacks the latest version, Git has no tags. |
| 416 | (let ((commit "1ab8ebec987fb7213766784aad02cbf4410d9036") |
| 417 | (revision "0")) |
| 418 | (package |
| 419 | (name "python-aplus") |
| 420 | (version (git-version "0.11.1" revision commit)) |
| 421 | (source |
| 422 | (origin |
| 423 | (method git-fetch) |
| 424 | (uri (git-reference |
| 425 | (url "https://github.com/xogeny/aplus") |
| 426 | (commit commit))) |
| 427 | (file-name (git-file-name name version)) |
| 428 | (sha256 |
| 429 | (base32 "02jcfj7dywvs0sd60c85pxwh0mwsj9p1q27445pba6j489x3dffj")))) |
| 430 | (build-system pyproject-build-system) |
| 431 | (arguments |
| 432 | (list #:tests? #f)) ;they depend on Nose test runner |
| 433 | (native-inputs |
| 434 | (list python-setuptools)) |
| 435 | (home-page "https://github.com/xogeny/aplus") |
| 436 | (synopsis "Promises/A+ for Python") |
| 437 | (description |
| 438 | "This package is an implementation of the Promises/A+ specification and |
| 439 | test suite in Python.") |
| 440 | (license license:expat)))) |
| 441 | |
| 442 | (define-public python-apted |
| 443 | ;; PyPI release lacks tests and there is no Git tag. |
| 444 | (let ((commit "828b3e3f4c053f7d35f0b55b0d5597e8041719ac") |
| 445 | (revision "0")) |
| 446 | (package |
| 447 | (name "python-apted") |
| 448 | (version (git-version "1.0.3" revision commit)) |
| 449 | (source |
| 450 | (origin |
| 451 | (method git-fetch) |
| 452 | (uri (git-reference |
| 453 | (url "https://github.com/JoaoFelipe/apted") |
| 454 | (commit commit))) |
| 455 | (file-name (git-file-name name version)) |
| 456 | (sha256 |
| 457 | (base32 "1vw1sbn41cysmhr4ib58cw3hzs1xjxwb1d8r1yhrqgjk5q6ckjw7")))) |
| 458 | (build-system pyproject-build-system) |
| 459 | (arguments |
| 460 | (list |
| 461 | #:test-flags |
| 462 | #~(list "--deselect=apted/tests/test_chained.py::test_factory" |
| 463 | "--deselect=apted/tests/test_correctness.py::test_factory" |
| 464 | "--deselect=apted/tests/test_per_edit_operation_correctness.py::test_factory"))) |
| 465 | (native-inputs |
| 466 | (list python-pytest |
| 467 | python-setuptools |
| 468 | python-wheel)) |
| 469 | (home-page "https://github.com/JoaoFelipe/apted") |
| 470 | (synopsis "Algorithm for the tree edit distance") |
| 471 | (description |
| 472 | "This is a Python implementation of the APTED algorithm,which |
| 473 | supersedes the RTED algorithm for computing the tree edit distance.") |
| 474 | (license license:expat)))) |
| 475 | |
| 476 | (define-public python-asap3 |
| 477 | (package |
| 478 | (name "python-asap3") |
| 479 | (version "3.13.10") |
| 480 | (source |
| 481 | (origin |
| 482 | (method url-fetch) |
| 483 | (uri (pypi-uri "asap3" version)) |
| 484 | (sha256 |
| 485 | (base32 "1qpy9nnwv692hd3cg70n2zwjank25mlsfvvirklijwis3m4lfqg4")))) |
| 486 | (build-system pyproject-build-system) |
| 487 | (native-inputs |
| 488 | (list python-pytest |
| 489 | python-setuptools |
| 490 | which)) ;for build |
| 491 | (propagated-inputs |
| 492 | (list python-ase |
| 493 | python-numpy)) |
| 494 | (home-page "https://wiki.fysik.dtu.dk/asap") |
| 495 | (synopsis "ASAP - classical potentials for Molecular Dynamics with ASE.") |
| 496 | (description "This package provides accelerated simulations and potentials |
| 497 | of solids.") |
| 498 | (license license:lgpl3))) |
| 499 | |
| 500 | (define-public python-ase |
| 501 | (package |
| 502 | (name "python-ase") |
| 503 | (version "3.26.0") |
| 504 | (source |
| 505 | (origin |
| 506 | (method url-fetch) |
| 507 | (uri (pypi-uri "ase" version)) |
| 508 | (sha256 |
| 509 | (base32 "0xahqqyxkxrjh1g23icydngrvc8iv3lnd4iys9i802jvfxas6wd0")))) |
| 510 | (build-system pyproject-build-system) |
| 511 | (arguments |
| 512 | (list |
| 513 | ;; tests: 2 failed, 2999 passed, 566 skipped, 5 xfailed, 47 warnings |
| 514 | #:test-flags |
| 515 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 516 | ;; DeprecationWarning. |
| 517 | "--deselect" |
| 518 | "ase/test/fio/test_espresso.py::test_pw_input_write_nested_flat" |
| 519 | ;; UserWarning. |
| 520 | "--deselect" |
| 521 | "ase/test/fio/test_espresso.py::TestConstraints::test_fix_scaled"))) |
| 522 | (native-inputs |
| 523 | (list python-pytest |
| 524 | python-pytest-xdist |
| 525 | python-setuptools)) |
| 526 | (inputs (list spglib)) |
| 527 | (propagated-inputs |
| 528 | (list python-matplotlib |
| 529 | python-numpy |
| 530 | python-scipy)) |
| 531 | (home-page "https://wiki.fysik.dtu.dk/ase/") |
| 532 | (synopsis "Atomic Simulation Environment") |
| 533 | (description "This package provides a set of tools and Python modules for |
| 534 | setting up, manipulating, running, visualizing and analyzing atomistic |
| 535 | simulations.") |
| 536 | (license license:lgpl2.1+))) |
| 537 | |
| 538 | (define-public python-baycomp |
| 539 | (package |
| 540 | (name "python-baycomp") |
| 541 | (version "1.0.3") |
| 542 | (source |
| 543 | (origin |
| 544 | (method url-fetch) |
| 545 | (uri (pypi-uri "baycomp" version)) |
| 546 | (sha256 |
| 547 | (base32 "1v6s4mfr6xzjbv9a2v89hywm6fbv5nii0qczvcfjanvdn7bmmcij")))) |
| 548 | (build-system pyproject-build-system) |
| 549 | (native-inputs |
| 550 | (list python-pytest python-setuptools python-wheel)) |
| 551 | (propagated-inputs |
| 552 | (list python-matplotlib python-numpy python-scipy)) |
| 553 | (home-page "https://github.com/janezd/baycomp") |
| 554 | (synopsis "Library for comparison of Bayesian classifiers") |
| 555 | (description |
| 556 | "Baycomp is a library for Bayesian comparison of classifiers. Functions |
| 557 | in the library compare two classifiers on one or on multiple data sets. They |
| 558 | compute three probabilities: the probability that the first classifier has |
| 559 | higher scores than the second, the probability that differences are within the |
| 560 | region of practical equivalence (rope), or that the second classifier has |
| 561 | higher scores.") |
| 562 | (license license:expat))) |
| 563 | |
| 564 | (define-public python-boost-histogram |
| 565 | (package |
| 566 | (name "python-boost-histogram") |
| 567 | (version "1.7.1") |
| 568 | (source |
| 569 | (origin |
| 570 | (method url-fetch) |
| 571 | (uri (pypi-uri "boost_histogram" version)) |
| 572 | (sha256 |
| 573 | (base32 "06av8lxvvfafn4xbqakx2fbdcq0djbs7w6j4vn4ji8wgd39dglvf")))) |
| 574 | (build-system pyproject-build-system) |
| 575 | ;; This package bundles files from Boost::Histogram and doesn't provide |
| 576 | ;; a way to use a system library. |
| 577 | (propagated-inputs (list python-numpy)) |
| 578 | (native-inputs (list cmake-minimal |
| 579 | pybind11-2 |
| 580 | python-pytest |
| 581 | python-pytest-benchmark |
| 582 | python-scikit-build-core |
| 583 | python-setuptools-scm)) |
| 584 | (home-page "https://boost-histogram.readthedocs.io/en/latest/") |
| 585 | (synopsis "Python bindings for the Boost::Histogram library") |
| 586 | (description |
| 587 | "This package provides Python bindings for the Boost::Histogram library, |
| 588 | one of the fastest libraries for histogramming.") |
| 589 | (license license:bsd-3))) |
| 590 | |
| 591 | (define-public python-bottleneck |
| 592 | (package |
| 593 | (name "python-bottleneck") |
| 594 | (version "1.4.2") |
| 595 | (source |
| 596 | (origin |
| 597 | (method url-fetch) |
| 598 | (uri (pypi-uri "bottleneck" version)) |
| 599 | (sha256 |
| 600 | (base32 "1x29yj4yr12v646si63gkxj9b6lx1xk65536wqy4i9fyk4bqx3ps")))) |
| 601 | (build-system pyproject-build-system) |
| 602 | (arguments |
| 603 | (list |
| 604 | #:phases |
| 605 | #~(modify-phases %standard-phases |
| 606 | (add-before 'check 'rebuild-ext |
| 607 | (lambda _ |
| 608 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) |
| 609 | (native-inputs (list python-pytest |
| 610 | python-setuptools |
| 611 | python-wheel)) |
| 612 | (propagated-inputs (list python-numpy)) |
| 613 | (home-page "https://github.com/pydata/bottleneck") |
| 614 | (synopsis "Fast NumPy array functions written in C") |
| 615 | (description |
| 616 | "Bottleneck is a collection of fast, NaN-aware NumPy array functions |
| 617 | written in C.") |
| 618 | (license license:bsd-2))) |
| 619 | |
| 620 | (define-public python-clarabel |
| 621 | (package |
| 622 | (name "python-clarabel") |
| 623 | (version "0.7.1") |
| 624 | (source |
| 625 | (origin |
| 626 | (method url-fetch) |
| 627 | (uri (pypi-uri "clarabel" version)) |
| 628 | (sha256 |
| 629 | (base32 "15k32ynvh45n9q905bxwamh5w5cia9bxzmwz69wbribmyhsv22m3")) |
| 630 | (patches |
| 631 | (search-patches "python-clarabel-blas.patch")))) |
| 632 | (build-system cargo-build-system) |
| 633 | (arguments |
| 634 | (list |
| 635 | #:imported-modules `(,@%cargo-build-system-modules |
| 636 | ,@%pyproject-build-system-modules) |
| 637 | #:modules '((guix build cargo-build-system) |
| 638 | ((guix build pyproject-build-system) #:prefix py:) |
| 639 | (guix build utils)) |
| 640 | #:phases |
| 641 | #~(modify-phases %standard-phases |
| 642 | (add-after 'build 'build-python-module |
| 643 | (assoc-ref py:%standard-phases 'build)) |
| 644 | (add-after 'build-python-module 'install-python-module |
| 645 | (assoc-ref py:%standard-phases 'install))) |
| 646 | #:features '(list "python") |
| 647 | #:install-source? #false)) |
| 648 | (inputs |
| 649 | (cons maturin (cargo-inputs 'python-clarabel))) |
| 650 | (native-inputs |
| 651 | (list python-wrapper)) |
| 652 | (propagated-inputs (list python-numpy python-scipy)) |
| 653 | (home-page "https://github.com/oxfordcontrol/Clarabel.rs") |
| 654 | (synopsis "Interior-point solver for convex conic optimisation problems") |
| 655 | (description "Clarabel.rs is a Rust implementation of an interior point |
| 656 | numerical solver for convex optimization problems using a novel homogeneous |
| 657 | embedding.") |
| 658 | (license license:asl2.0))) |
| 659 | |
| 660 | (define-public python-cmasher |
| 661 | (package |
| 662 | (name "python-cmasher") |
| 663 | (version "1.9.2") |
| 664 | (source |
| 665 | (origin |
| 666 | (method url-fetch) |
| 667 | (uri (pypi-uri "cmasher" version)) |
| 668 | (sha256 |
| 669 | (base32 "1xbzyla0l5i5vv86q4vwv33qmqzfzhhj6zry1lhy6ikir37c543c")))) |
| 670 | (build-system pyproject-build-system) |
| 671 | ;; tests: 65 passed, 2 skipped |
| 672 | (native-inputs |
| 673 | (list python-pytest |
| 674 | python-hatchling)) |
| 675 | (propagated-inputs |
| 676 | (list python-colorspacious |
| 677 | python-matplotlib |
| 678 | python-numpy)) |
| 679 | (home-page "https://cmasher.readthedocs.io") |
| 680 | (synopsis "Scientific colormaps utilities") |
| 681 | (description |
| 682 | "The CMasher package provides a collection of scientific colormaps and utility |
| 683 | functions to be used by different Python packages and projects, mainly in |
| 684 | combination with Matplotlib. It offers several alternatives to commonly used |
| 685 | colormaps, like chroma and rainforest for jet; sunburst for hot; neutral for |
| 686 | binary; and fusion and redshift for coolwarm.") |
| 687 | (license license:bsd-3))) |
| 688 | |
| 689 | (define-public python-cmcrameri |
| 690 | (package |
| 691 | (name "python-cmcrameri") |
| 692 | (version "1.9") |
| 693 | (source |
| 694 | (origin |
| 695 | (method url-fetch) |
| 696 | (uri (pypi-uri "cmcrameri" version)) |
| 697 | (sha256 |
| 698 | (base32 "0h3n6lngq5jnqywl3f6p554qbh95vk3vwdq18pnkzc1yynvzkyjn")))) |
| 699 | (build-system pyproject-build-system) |
| 700 | (propagated-inputs (list python-matplotlib python-numpy python-packaging)) |
| 701 | (native-inputs (list python-setuptools python-setuptools-scm)) |
| 702 | (home-page "https://github.com/callumrollo/cmcrameri") |
| 703 | (synopsis "Perceptually uniform colormaps by Fabio Crameri") |
| 704 | (description "This package provides a Python wrapper around Fabio |
| 705 | Crameri's perceptually uniform colormaps for scientific data visualization.") |
| 706 | (license license:expat))) |
| 707 | |
| 708 | (define-public python-cmocean |
| 709 | (package |
| 710 | (name "python-cmocean") |
| 711 | (version "4.0.3") |
| 712 | (source |
| 713 | (origin |
| 714 | (method url-fetch) |
| 715 | (uri (pypi-uri "cmocean" version)) |
| 716 | (sha256 |
| 717 | (base32 "0z0d4ma6i228gwpgnkai8scs9bmzz41rirlnqpmb8hazzfcq71ip")))) |
| 718 | (build-system pyproject-build-system) |
| 719 | (native-inputs |
| 720 | (list python-pytest |
| 721 | python-setuptools |
| 722 | python-wheel)) |
| 723 | (propagated-inputs |
| 724 | (list python-matplotlib |
| 725 | python-numpy |
| 726 | python-packaging)) |
| 727 | (home-page "https://github.com/matplotlib/cmocean") |
| 728 | (synopsis "Colormaps for Oceanography") |
| 729 | (description |
| 730 | "This package contains colormaps for commonly-used oceanographic |
| 731 | variables. Most of the colormaps started from @code{matplotlib} colormaps, |
| 732 | but have now been adjusted using the viscm tool to be perceptually uniform.") |
| 733 | (license license:expat))) |
| 734 | |
| 735 | (define-public python-corner |
| 736 | (package |
| 737 | (name "python-corner") |
| 738 | (version "2.2.2") |
| 739 | (source |
| 740 | (origin |
| 741 | (method git-fetch) ;no tests in PyPi archive |
| 742 | (uri (git-reference |
| 743 | (url "https://github.com/dfm/corner.py") |
| 744 | (commit (string-append "v" version)))) |
| 745 | (file-name (git-file-name name version)) |
| 746 | (sha256 |
| 747 | (base32 "1i4dk4jxh0saysya2cnsfwlxwpldbdl174i9pwi4qj82av9jr2ii")))) |
| 748 | (build-system pyproject-build-system) |
| 749 | (arguments |
| 750 | (list |
| 751 | #:test-flags |
| 752 | #~(list |
| 753 | ;; XXX: Disable tests which failed with mismatched images, check why. |
| 754 | "-k" (string-append "not test_labels[png]" |
| 755 | " and not test_title_quantiles[png]" |
| 756 | " and not test_title_quantiles_default[png]" |
| 757 | " and not test_title_quantiles_raises[png]" |
| 758 | " and not test_bins[png]" |
| 759 | " and not test_bins_log[png]" |
| 760 | " and not test_titles1[png]" |
| 761 | " and not test_titles2[png]" |
| 762 | " and not test_pandas[png]" |
| 763 | " and not test_tight[png]" |
| 764 | " and not test_extended_overplotting[png]" |
| 765 | " and not test_reverse_overplotting[png]" |
| 766 | " and not test_arviz[png]" |
| 767 | " and not test_range_fig_arg[png]")))) |
| 768 | (propagated-inputs |
| 769 | (list python-matplotlib)) |
| 770 | (native-inputs |
| 771 | (list python-arviz python-pytest python-scipy python-setuptools-scm)) |
| 772 | (home-page "http://corner.readthedocs.io/") |
| 773 | (synopsis "Make some beautiful corner plots") |
| 774 | (description |
| 775 | "This Python module uses @code{matplotlib} to visualize multidimensional |
| 776 | samples using a scatterplot matrix. In these visualizations, each one- and |
| 777 | two-dimensional projection of the sample is plotted to reveal covariances. |
| 778 | corner was originally conceived to display the results of Markov Chain Monte |
| 779 | Carlo simulations and the defaults are chosen with this application in mind but |
| 780 | it can be used for displaying many qualitatively different samples.") |
| 781 | (license license:bsd-2))) |
| 782 | |
| 783 | (define-public python-cvxpy |
| 784 | (package |
| 785 | (name "python-cvxpy") |
| 786 | (version "1.7.5") |
| 787 | (source |
| 788 | (origin |
| 789 | (method url-fetch) |
| 790 | (uri (pypi-uri "cvxpy" version)) |
| 791 | (sha256 |
| 792 | (base32 "0p9zp2ci1zw56hy2q0w18s3kb1h3j0j4m4gw2sg6a9qw00c24lab")))) |
| 793 | (build-system pyproject-build-system) |
| 794 | (arguments |
| 795 | (list |
| 796 | ;; tests: 1344 passed, 391 skipped, 4 deselected, 237 warnings |
| 797 | #:test-flags |
| 798 | #~(list #$@(map (lambda (test) (string-append "--deselect=" |
| 799 | "cvxpy/tests/" |
| 800 | "test_cone2cone.py::" |
| 801 | test)) |
| 802 | ;; cvxpy.error.SolverError: Either candidate conic |
| 803 | ;; solvers (['GLPK_MI', 'SCIPY']) do not support the |
| 804 | ;; cones output by the problem (SOC, NonNeg, Zero), or |
| 805 | ;; there are not enough constraints in the problem. |
| 806 | (list "TestSlacks::test_mi_socp_2" |
| 807 | ;; cvxpy.error.SolverError: Solver 'CVXOPT' |
| 808 | ;; failed. Try another solver, or solve with |
| 809 | ;; verbose=True for more information. |
| 810 | "TestOpRelConeQuad::test_oprelcone_1_m1_k3_complex" |
| 811 | "TestOpRelConeQuad::test_oprelcone_1_m3_k1_complex" |
| 812 | ;; cvxpy.error.SolverError: Solver 'CVXOPT' |
| 813 | ;; failed. Try another solver, or solve with |
| 814 | ;; verbose=True for more information. |
| 815 | "TestOpRelConeQuad::test_oprelcone_2"))) |
| 816 | #:phases |
| 817 | #~(modify-phases %standard-phases |
| 818 | (add-before 'check 'set-ci-environment |
| 819 | (lambda _ |
| 820 | ;; Activate hypothesis CI profile to suppress |
| 821 | ;; HealthCheck.too_slow which fails on slow build machines. |
| 822 | (setenv "CI" "1")))))) |
| 823 | (native-inputs |
| 824 | (list pybind11-2 |
| 825 | python-pytest |
| 826 | python-setuptools)) |
| 827 | (propagated-inputs |
| 828 | (list python-clarabel |
| 829 | python-numpy |
| 830 | python-osqp |
| 831 | python-scipy |
| 832 | python-scs |
| 833 | ;; [optional] |
| 834 | ;; python-cuopt-cu12 |
| 835 | python-cvxopt |
| 836 | ;; python-cylp ;FIXME: <https://codeberg.org/guix/guix/issues/2912> |
| 837 | ;; python-daqp |
| 838 | ;; python-diffcp |
| 839 | python-ecos |
| 840 | ;; python-gurobipy |
| 841 | ;; python-highspy |
| 842 | ;; python-mosek |
| 843 | ;; python-nvidia-cuda-runtime-cu12 |
| 844 | ;; python-ortools |
| 845 | ;; python-piqp |
| 846 | ;; python-proxsuite |
| 847 | ;; python-pyscipopt |
| 848 | ;; python-qoco |
| 849 | #;python-xpress)) |
| 850 | (home-page "https://github.com/cvxpy/cvxpy") |
| 851 | (synopsis "DSL for modeling convex optimization problems") |
| 852 | (description |
| 853 | "This package provides a domain-specific language for modeling convex |
| 854 | optimization problems in Python.") |
| 855 | (license license:asl2.0))) |
| 856 | |
| 857 | ;; Note: Remember to update python-distributed when updating dask. |
| 858 | (define-public python-dask |
| 859 | (package |
| 860 | (name "python-dask") |
| 861 | (version "2025.11.0") |
| 862 | (source |
| 863 | (origin |
| 864 | (method git-fetch) |
| 865 | (uri (git-reference |
| 866 | (url "https://github.com/dask/dask/") |
| 867 | (commit version))) |
| 868 | (file-name (git-file-name name version)) |
| 869 | (sha256 |
| 870 | (base32 "12m4p4zfm96fjsm45wppdrylsi71vjr0ywplz6q7fhw9vbhk0kki")))) |
| 871 | (build-system pyproject-build-system) |
| 872 | (arguments |
| 873 | (list |
| 874 | ;; tests: 15277 passed, 751 skipped, 261 xfailed, 280 xpassed, 90 warnings |
| 875 | #:test-flags |
| 876 | #~(list "-m" "not gpu and not slow and not network" |
| 877 | "--pyargs" "dask" |
| 878 | "--numprocesses" (number->string (min 4 (parallel-job-count))) |
| 879 | "--reruns=3" |
| 880 | "-k" (string-join |
| 881 | ;; This one cannot be interrupted. |
| 882 | (list "not test_interrupt" |
| 883 | ;; AttributeError: 'Array' object has no attribute |
| 884 | ;; 'expr' |
| 885 | "test_blockwise" |
| 886 | "test_is_dask_collection_doesnt_materialize") |
| 887 | " and not ")) |
| 888 | #:phases |
| 889 | #~(modify-phases %standard-phases |
| 890 | (add-after 'unpack 'fix-pytest-config |
| 891 | (lambda _ |
| 892 | (substitute* "pyproject.toml" |
| 893 | ((".*--cov-config=pyproject.toml.*") "")))) |
| 894 | (add-before 'check 'remove-local-source |
| 895 | (lambda _ |
| 896 | (delete-file-recursively "dask")))))) |
| 897 | (native-inputs |
| 898 | (list python-pytest |
| 899 | python-pytest-asyncio |
| 900 | python-pytest-mock |
| 901 | python-pytest-rerunfailures |
| 902 | python-pytest-timeout |
| 903 | python-pytest-xdist |
| 904 | python-setuptools |
| 905 | python-setuptools-scm-next |
| 906 | tzdata-for-tests)) |
| 907 | (propagated-inputs |
| 908 | (list python-click |
| 909 | python-cloudpickle |
| 910 | python-fsspec |
| 911 | python-importlib-metadata |
| 912 | python-packaging |
| 913 | python-partd |
| 914 | python-pyyaml |
| 915 | python-toolz |
| 916 | ;; [optional] |
| 917 | python-lz4 |
| 918 | python-numpy |
| 919 | python-pandas |
| 920 | python-pyarrow)) |
| 921 | (home-page "https://github.com/dask/dask/") |
| 922 | (synopsis "Parallel computing with task scheduling") |
| 923 | (description |
| 924 | "Dask is a flexible parallel computing library for analytics. It |
| 925 | consists of two components: dynamic task scheduling optimized for computation, |
| 926 | and large data collections like parallel arrays, dataframes, and lists that |
| 927 | extend common interfaces like NumPy, Pandas, or Python iterators to |
| 928 | larger-than-memory or distributed environments. These parallel collections |
| 929 | run on top of the dynamic task schedulers.") |
| 930 | (license license:bsd-3))) |
| 931 | |
| 932 | (define-public python-dask-image |
| 933 | (package |
| 934 | (name "python-dask-image") |
| 935 | (version "2025.11.0") |
| 936 | (source |
| 937 | (origin |
| 938 | (method url-fetch) |
| 939 | (uri (pypi-uri "dask_image" version)) |
| 940 | (sha256 |
| 941 | (base32 "1cx07dh09yqq6swyziiy9mb2f27ywja18gylfly1874a7af1mks5")))) |
| 942 | (build-system pyproject-build-system) |
| 943 | (arguments |
| 944 | (list |
| 945 | ;; tests: 2171 passed, 177 skipped, 3405 warnings |
| 946 | #:phases |
| 947 | #~(modify-phases %standard-phases |
| 948 | (add-after 'unpack 'fix-pytest-config |
| 949 | (lambda _ |
| 950 | (substitute* "pyproject.toml" |
| 951 | (("--flake8") ""))))))) |
| 952 | (native-inputs |
| 953 | (list python-pytest |
| 954 | python-pytest-timeout |
| 955 | python-setuptools |
| 956 | python-setuptools-scm-next)) |
| 957 | (propagated-inputs |
| 958 | (list python-dask |
| 959 | python-numpy |
| 960 | python-pandas |
| 961 | python-pims |
| 962 | python-scipy |
| 963 | python-tifffile)) |
| 964 | (home-page "https://github.com/dask/dask-image") |
| 965 | (synopsis "Distributed image processing") |
| 966 | (description "This is a package for image processing with Dask arrays. |
| 967 | Features: |
| 968 | |
| 969 | @itemize |
| 970 | @item Provides support for loading image files. |
| 971 | @item Implements commonly used N-D filters. |
| 972 | @item Includes a few N-D Fourier filters. |
| 973 | @item Provides some functions for working with N-D label images. |
| 974 | @item Supports a few N-D morphological operators. |
| 975 | @end itemize") |
| 976 | (license license:bsd-3))) |
| 977 | |
| 978 | (define-public python-decaylanguage |
| 979 | (package |
| 980 | (name "python-decaylanguage") |
| 981 | (version "0.20.2") |
| 982 | (source |
| 983 | (origin |
| 984 | (method url-fetch) |
| 985 | (uri (pypi-uri "decaylanguage" version)) |
| 986 | (sha256 |
| 987 | (base32 "1l867w7srvx0hwfys56469lzdkcs2awbwjpj573bjqv2ngdycmwb")))) |
| 988 | (build-system pyproject-build-system) |
| 989 | (arguments |
| 990 | (list |
| 991 | ;; This file fails to be collected with "DeprecationWarning: setDaemon() |
| 992 | ;; is deprecated, set the daemon attribute instead". |
| 993 | #:test-flags #~(list "--ignore" "tests/test_convert.py"))) |
| 994 | (propagated-inputs (list python-attrs |
| 995 | python-graphviz |
| 996 | python-hepunits |
| 997 | python-lark |
| 998 | python-numpy |
| 999 | python-pandas |
| 1000 | python-particle |
| 1001 | python-plumbum)) |
| 1002 | (native-inputs (list python-hatch-vcs |
| 1003 | python-hatchling |
| 1004 | python-pytest)) |
| 1005 | (home-page "https://decaylanguage.readthedocs.io/en/latest/") |
| 1006 | (synopsis "Language to describe, manipulate and convert particle decays") |
| 1007 | (description "DecayLanguage implements a language to describe and convert |
| 1008 | particle decays between digital representations, effectively making it |
| 1009 | possible to interoperate several fitting programs. Particular interest is |
| 1010 | given to programs dedicated to amplitude analyses.") |
| 1011 | (license license:bsd-3))) |
| 1012 | |
| 1013 | (define-public python-deepdish |
| 1014 | ;; XXX: The project may no longer be compatible with the version of NumPy |
| 1015 | ;; packed in Guix (now 1.26.4, and 2.3.1), use the latest commit containing |
| 1016 | ;; fixes. See: <https://github.com/uchicago-cs/deepdish/issues/50>. |
| 1017 | ;; However, there is a maintained fork that appears to be a good |
| 1018 | ;; replacement: https://github.com/portugueslab/flammkuchen. |
| 1019 | (let ((commit "3f2dff7a03f1b31f6924b665ad5b8c299329c1cd") |
| 1020 | (revision "0")) |
| 1021 | (package |
| 1022 | (name "python-deepdish") |
| 1023 | (version (git-version "0.3.7" revision commit)) |
| 1024 | (source |
| 1025 | (origin |
| 1026 | (method git-fetch) |
| 1027 | (uri (git-reference |
| 1028 | (url "https://github.com/uchicago-cs/deepdish") |
| 1029 | (commit commit))) |
| 1030 | (file-name (git-file-name name version)) |
| 1031 | (sha256 |
| 1032 | (base32 "1n3r6z5zd18kdmzyg1gkm9lqi573szlxbls1ck5wjn4a14ar9fw3")))) |
| 1033 | (arguments |
| 1034 | ;; Disable few failing tests to pass the build. |
| 1035 | (list |
| 1036 | #:test-flags |
| 1037 | #~(list "-k" (string-append "not test_pad" |
| 1038 | " and not test_pad_repeat_border" |
| 1039 | " and not test_pad_repeat_border_corner" |
| 1040 | " and not test_pad_to_size")) |
| 1041 | #:phases |
| 1042 | #~(modify-phases %standard-phases |
| 1043 | (add-after 'unpack 'dont-vendor-six |
| 1044 | (lambda _ |
| 1045 | (delete-file "deepdish/six.py") |
| 1046 | (substitute* "deepdish/io/hdf5io.py" |
| 1047 | (("from deepdish import six") "import six")) |
| 1048 | (substitute* "deepdish/io/ls.py" |
| 1049 | (("from deepdish import io, six, __version__") |
| 1050 | "from deepdish import io, __version__ |
| 1051 | import six |
| 1052 | "))))))) |
| 1053 | (build-system pyproject-build-system) |
| 1054 | (native-inputs |
| 1055 | (list python-pytest |
| 1056 | python-pandas |
| 1057 | python-setuptools)) |
| 1058 | (propagated-inputs |
| 1059 | (list python-numpy-1 |
| 1060 | python-scipy |
| 1061 | python-six |
| 1062 | python-tables)) |
| 1063 | (home-page "https://github.com/uchicago-cs/deepdish") |
| 1064 | (synopsis "Python library for HDF5 file saving and loading") |
| 1065 | (description |
| 1066 | "Deepdish is a Python library to load and save HDF5 files. |
| 1067 | The primary feature of deepdish is its ability to save and load all kinds of |
| 1068 | data as HDF5. It can save any Python data structure, offering the same ease |
| 1069 | of use as pickling or @code{numpy.save}, but with the language |
| 1070 | interoperability offered by HDF5.") |
| 1071 | (license license:bsd-3)))) |
| 1072 | |
| 1073 | (define-public python-distributed |
| 1074 | (package |
| 1075 | (name "python-distributed") |
| 1076 | (version "2025.11.0") |
| 1077 | (source |
| 1078 | (origin |
| 1079 | (method git-fetch) |
| 1080 | (uri (git-reference |
| 1081 | (url "https://github.com/dask/distributed") |
| 1082 | (commit version))) |
| 1083 | (file-name (git-file-name name version)) |
| 1084 | (sha256 |
| 1085 | (base32 "1ljzgbbs61si8b3qvxf7fb74wdhnj2mfg9a5nfngqv662fnibabg")))) |
| 1086 | (build-system pyproject-build-system) |
| 1087 | (arguments |
| 1088 | (list |
| 1089 | ;; TODO: Test suite requires networking for most of the tests or special |
| 1090 | ;; care, find a way to enable some unit tests, see: |
| 1091 | ;; <.github/workflows/tests.yaml>. |
| 1092 | #:tests? #f |
| 1093 | #:phases |
| 1094 | #~(modify-phases %standard-phases |
| 1095 | (add-after 'unpack 'fix-pytest-config |
| 1096 | (lambda _ |
| 1097 | (substitute* "pyproject.toml" |
| 1098 | (("--cov-config.*") ""))))))) |
| 1099 | (native-inputs |
| 1100 | (list python-setuptools |
| 1101 | python-setuptools-scm-next)) |
| 1102 | (propagated-inputs |
| 1103 | (list python-click |
| 1104 | python-cloudpickle |
| 1105 | python-dask |
| 1106 | python-jinja2 |
| 1107 | python-locket |
| 1108 | python-msgpack |
| 1109 | python-packaging |
| 1110 | python-psutil |
| 1111 | python-pyyaml |
| 1112 | python-sortedcontainers |
| 1113 | python-tblib |
| 1114 | python-toolz |
| 1115 | python-tornado |
| 1116 | python-urllib3 |
| 1117 | python-zict)) |
| 1118 | (home-page "https://distributed.dask.org") |
| 1119 | (synopsis "Distributed scheduler for Dask") |
| 1120 | (description "Dask.distributed is a lightweight library for distributed |
| 1121 | computing in Python. It extends both the @code{concurrent.futures} and |
| 1122 | @code{dask} APIs to moderate sized clusters.") |
| 1123 | (license license:bsd-3))) |
| 1124 | |
| 1125 | (define-public python-ecos |
| 1126 | (package |
| 1127 | (name "python-ecos") |
| 1128 | (version "2.0.13") |
| 1129 | (source |
| 1130 | (origin |
| 1131 | (method git-fetch) |
| 1132 | (uri (git-reference |
| 1133 | (url "https://github.com/embotech/ecos-python") |
| 1134 | (commit (string-append "v" version)) |
| 1135 | (recursive? #true))) |
| 1136 | (file-name (git-file-name name version)) |
| 1137 | (sha256 |
| 1138 | (base32 "16ljq8maflfkgbw16rldg6cy14vgz2pb3b2iga60i7yzkq2ikmyw")))) |
| 1139 | (build-system pyproject-build-system) |
| 1140 | (propagated-inputs (list python-numpy python-scipy)) |
| 1141 | (native-inputs (list python-pytest python-setuptools python-wheel)) |
| 1142 | (home-page "https://github.com/embotech/ecos") |
| 1143 | (synopsis "Embedded Cone Solver") |
| 1144 | (description |
| 1145 | "This is the Python package for ECOS: Embedded Cone Solver. ECOS is |
| 1146 | numerical software for solving convex second-order cone programs (SOCPs).") |
| 1147 | (license license:gpl3))) |
| 1148 | |
| 1149 | (define-public python-efficient-apriori |
| 1150 | (package |
| 1151 | (name "python-efficient-apriori") |
| 1152 | (version "2.0.6") |
| 1153 | (source |
| 1154 | (origin |
| 1155 | (method url-fetch) |
| 1156 | (uri (pypi-uri "efficient_apriori" version)) |
| 1157 | (sha256 |
| 1158 | (base32 "0vmdp8qkir7jrmwgpzajssyxh6q78m0q16pr1v657vla9x5wxn2s")))) |
| 1159 | (build-system pyproject-build-system) |
| 1160 | (arguments |
| 1161 | (list |
| 1162 | #:test-flags |
| 1163 | #~(list "--doctest-modules" "-vv" "efficient_apriori"))) |
| 1164 | (native-inputs (list python-setuptools python-pytest)) |
| 1165 | (home-page "https://github.com/tommyod/Efficient-Apriori") |
| 1166 | (synopsis "An efficient Python implementation of the Apriori algorithm.") |
| 1167 | (description "An efficient Python implementation of the Apriori algorithm, |
| 1168 | which uncovers hidden structures in categorical data") |
| 1169 | (license license:expat))) |
| 1170 | |
| 1171 | (define-public python-fast-histogram |
| 1172 | (package |
| 1173 | (name "python-fast-histogram") |
| 1174 | (version "0.14") |
| 1175 | (source |
| 1176 | (origin |
| 1177 | (method url-fetch) |
| 1178 | (uri (pypi-uri "fast_histogram" version)) |
| 1179 | (sha256 |
| 1180 | (base32 "1sk9xa85cgm4sylzblwv3qr2dmm0ic06zkwxqa2xlazjiawp629r")))) |
| 1181 | (build-system pyproject-build-system) |
| 1182 | (arguments |
| 1183 | (list |
| 1184 | #:phases |
| 1185 | #~(modify-phases %standard-phases |
| 1186 | (add-before 'check 'build-extensions |
| 1187 | (lambda _ |
| 1188 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) |
| 1189 | (native-inputs |
| 1190 | (list python-hypothesis |
| 1191 | python-pytest |
| 1192 | python-setuptools |
| 1193 | python-setuptools-scm |
| 1194 | python-wheel)) |
| 1195 | (propagated-inputs |
| 1196 | (list python-numpy)) |
| 1197 | (home-page "https://github.com/astrofrog/fast-histogram") |
| 1198 | (synopsis "Fast simple 1D and 2D histograms") |
| 1199 | (description |
| 1200 | "The fast-histogram mini-package aims to provide simple and fast |
| 1201 | histogram functions for regular bins that don't compromise on performance. It |
| 1202 | doesn't do anything complicated - it just implements a simple histogram |
| 1203 | algorithm in C and keeps it simple. The aim is to have functions that are |
| 1204 | fast but also robust and reliable. The result is a 1D histogram function here |
| 1205 | that is 7-15x faster than @code{numpy.histogram}, and a 2D histogram function |
| 1206 | that is 20-25x faster than @code{numpy.histogram2d}.") |
| 1207 | (license license:bsd-3))) |
| 1208 | |
| 1209 | (define-public python-fastcluster |
| 1210 | (package |
| 1211 | (name "python-fastcluster") |
| 1212 | (version "1.3.0") |
| 1213 | (source |
| 1214 | (origin |
| 1215 | (method url-fetch) |
| 1216 | (uri (pypi-uri "fastcluster" version)) |
| 1217 | (sha256 |
| 1218 | (base32 "00nzjrk8cp3kwm0qax5xxg61dxq9b8s3jspsqx4skyn3lpmkl8ym")))) |
| 1219 | (build-system pyproject-build-system) |
| 1220 | (native-inputs |
| 1221 | (list python-pytest |
| 1222 | python-scipy |
| 1223 | python-setuptools)) |
| 1224 | (propagated-inputs |
| 1225 | (list python-numpy)) |
| 1226 | (home-page "https://danifold.net/fastcluster.html") |
| 1227 | (synopsis "Fast hierarchical clustering routines for R and Python") |
| 1228 | (description "The fastcluster package implements seven common hierarchical |
| 1229 | clustering schemes efficiently. The package is made with two interfaces to |
| 1230 | standard software: R and Python.") |
| 1231 | (license license:bsd-2))) |
| 1232 | |
| 1233 | (define-public python-fgivenx |
| 1234 | (package |
| 1235 | (name "python-fgivenx") |
| 1236 | ;; See: https://github.com/handley-lab/fgivenx/issues/30 |
| 1237 | (properties '((commit . "cf51dbf8b7efdd8d84f055740a069a5b882dcf77") |
| 1238 | (revision . "0"))) |
| 1239 | (version (git-version "2.4.2" |
| 1240 | (assoc-ref properties 'revision) |
| 1241 | (assoc-ref properties 'commit))) |
| 1242 | (source |
| 1243 | (origin |
| 1244 | (method git-fetch) |
| 1245 | (uri (git-reference |
| 1246 | (url "https://github.com/handley-lab/fgivenx") |
| 1247 | (commit (assoc-ref properties 'commit)))) |
| 1248 | (file-name (git-file-name name version)) |
| 1249 | (sha256 |
| 1250 | (base32 "1z9lwrjvz977gk6z7zqj8d21yi0xcz67mj1737yzzdc8c03nzg9w")))) |
| 1251 | (build-system pyproject-build-system) |
| 1252 | ;; tests: 25 passed, 1 warning |
| 1253 | (native-inputs |
| 1254 | (list python-pytest |
| 1255 | python-pytest-mpl |
| 1256 | python-setuptools)) |
| 1257 | (propagated-inputs |
| 1258 | (list python-matplotlib |
| 1259 | python-numpy |
| 1260 | python-scipy |
| 1261 | ;; [optional] |
| 1262 | python-getdist |
| 1263 | python-joblib |
| 1264 | python-tqdm)) |
| 1265 | (home-page "https://github.com/handley-lab/fgivenx") |
| 1266 | (synopsis "Functional Posterior Plotter") |
| 1267 | (description |
| 1268 | "@code{fgivenx} is a Python package for plotting posteriors of functions. |
| 1269 | It is currently used in astronomy, but will be of use to any scientists |
| 1270 | performing Bayesian analyses which have predictive posteriors that are |
| 1271 | functions. |
| 1272 | |
| 1273 | This package allows one to plot a predictive posterior of a function, |
| 1274 | dependent on sampled parameters. It assumes one has a Bayesian posterior |
| 1275 | @code{Post(theta|D,M)} described by a set of posterior samples |
| 1276 | @code{{theta_i}~Post}. If there is a function parameterised by theta |
| 1277 | @code{y=f(x;theta)}, then this script will produce a contour plot of the |
| 1278 | conditional posterior @code{P(y|x,D,M)} in the @code{(x,y)} plane.") |
| 1279 | (license license:expat))) |
| 1280 | |
| 1281 | (define-public python-formulaic |
| 1282 | (package |
| 1283 | (name "python-formulaic") |
| 1284 | (version "1.0.1") |
| 1285 | (source |
| 1286 | (origin |
| 1287 | (method url-fetch) |
| 1288 | (uri (pypi-uri "formulaic" version)) |
| 1289 | (sha256 |
| 1290 | (base32 "18gvd3f2x358jj0df8vx5fhhnvzw047rsrs03vmvqnxaly97kpb4")))) |
| 1291 | (build-system pyproject-build-system) |
| 1292 | (propagated-inputs (list python-astor |
| 1293 | python-cached-property |
| 1294 | python-interface-meta |
| 1295 | python-numpy |
| 1296 | python-pandas |
| 1297 | python-scipy |
| 1298 | python-typing-extensions |
| 1299 | python-wrapt)) |
| 1300 | (native-inputs (list python-hatchling python-hatch-vcs python-pytest)) |
| 1301 | (home-page "https://github.com/matthewwardrop/formulaic") |
| 1302 | (synopsis "Implementation of Wilkinson formulas") |
| 1303 | (description "Formulaic is a high-performance implementation of Wilkinson |
| 1304 | formulas for Python.") |
| 1305 | (license license:expat))) |
| 1306 | |
| 1307 | (define-public python-geosketch |
| 1308 | (package |
| 1309 | (name "python-geosketch") |
| 1310 | (version "1.3") |
| 1311 | (source |
| 1312 | (origin |
| 1313 | (method git-fetch) |
| 1314 | (uri (git-reference |
| 1315 | (url "https://github.com/brianhie/geosketch") |
| 1316 | (commit (string-append "v" version)))) |
| 1317 | (file-name (git-file-name name version)) |
| 1318 | (sha256 |
| 1319 | (base32 "0lnynk4r87zqck5mmj33axmly34hh7lrlmfy1qidrw7xihy28g5a")))) |
| 1320 | (build-system pyproject-build-system) |
| 1321 | ;; XXX: Avoid circular dependency on python-scanorama. |
| 1322 | (arguments (list #:tests? #f)) |
| 1323 | (native-inputs (list python-setuptools)) |
| 1324 | (propagated-inputs (list python-fbpca python-numpy python-scikit-learn)) |
| 1325 | (home-page "https://github.com/brianhie/geosketch") |
| 1326 | (synopsis "Geometry-preserving random sampling") |
| 1327 | (description "geosketch is a Python package that implements the geometric |
| 1328 | sketching algorithm described by Brian Hie, Hyunghoon Cho, Benjamin DeMeo, |
| 1329 | Bryan Bryson, and Bonnie Berger in \"Geometric sketching compactly summarizes |
| 1330 | the single-cell transcriptomic landscape\", Cell Systems (2019). This package |
| 1331 | provides an example implementation of the algorithm as well as scripts |
| 1332 | necessary for reproducing the experiments in the paper.") |
| 1333 | (license license:expat))) |
| 1334 | |
| 1335 | (define-public python-hepunits |
| 1336 | (package |
| 1337 | (name "python-hepunits") |
| 1338 | (version "2.4.4") |
| 1339 | (source |
| 1340 | (origin |
| 1341 | (method url-fetch) |
| 1342 | (uri (pypi-uri "hepunits" version)) |
| 1343 | (sha256 |
| 1344 | (base32 "1sq597amy82wnw7q61i9q2ylmp1cpnwdg7jrzxmv6kryz8lyfihq")))) |
| 1345 | (build-system pyproject-build-system) |
| 1346 | (native-inputs (list python-hatch-vcs |
| 1347 | python-hatchling |
| 1348 | python-pint |
| 1349 | python-pytest)) |
| 1350 | (home-page "https://github.com/scikit-hep/hepunits") |
| 1351 | (synopsis "Units and constants in the HEP system of units") |
| 1352 | (description "@code{hepunits} collects the most commonly used units and |
| 1353 | constants in the HEP System of Units, as derived from the basic units |
| 1354 | originally defined by the CLHEP project.") |
| 1355 | (license license:bsd-3))) |
| 1356 | |
| 1357 | (define-public python-hist |
| 1358 | (package |
| 1359 | (name "python-hist") |
| 1360 | (version "2.10.1") |
| 1361 | (source |
| 1362 | (origin |
| 1363 | (method url-fetch) |
| 1364 | (uri (pypi-uri "hist" version)) |
| 1365 | (sha256 |
| 1366 | (base32 "0bhv8bf7zizxf7nsps5hyfppjk1ry0z6pwrwhz44xmm6g6nfdj6y")))) |
| 1367 | (build-system pyproject-build-system) |
| 1368 | (propagated-inputs (list python-boost-histogram |
| 1369 | python-histoprint |
| 1370 | python-numpy |
| 1371 | python-typing-extensions)) |
| 1372 | (native-inputs (list python-hatch-vcs |
| 1373 | python-hatchling |
| 1374 | python-pytest |
| 1375 | python-pytest-mpl)) |
| 1376 | (home-page "https://hist.readthedocs.io/en/latest/") |
| 1377 | (synopsis "Hist classes and utilities") |
| 1378 | (description |
| 1379 | "Hist is an analyst-friendly front-end for @code{boost-histogram}.") |
| 1380 | (license license:bsd-3))) |
| 1381 | |
| 1382 | (define-public python-histoprint |
| 1383 | (package |
| 1384 | (name "python-histoprint") |
| 1385 | (version "2.6.0") |
| 1386 | (source |
| 1387 | (origin |
| 1388 | (method url-fetch) |
| 1389 | (uri (pypi-uri "histoprint" version)) |
| 1390 | (sha256 |
| 1391 | (base32 "07d2lk64gwhjvw4wccvwks3j4ig7g99q627jjxz4ans5a29p5pz1")))) |
| 1392 | (build-system pyproject-build-system) |
| 1393 | (propagated-inputs (list python-click python-numpy python-uhi)) |
| 1394 | (native-inputs (list python-awkward |
| 1395 | python-boost-histogram |
| 1396 | python-hatch-vcs |
| 1397 | python-hatchling |
| 1398 | python-pytest |
| 1399 | python-rich)) |
| 1400 | (home-page "https://github.com/scikit-hep/histoprint") |
| 1401 | (synopsis "Pretty print histograms to the console") |
| 1402 | (description "Histoprint uses a mix of terminal color codes and Unicode |
| 1403 | trickery (i.e. combining characters) to plot overlaying histograms.") |
| 1404 | (license license:expat))) |
| 1405 | |
| 1406 | (define-public python-imagehash |
| 1407 | (package |
| 1408 | (name "python-imagehash") |
| 1409 | (version "4.3.2") |
| 1410 | (source |
| 1411 | (origin |
| 1412 | (method git-fetch) ;no tests in PyPI |
| 1413 | (uri (git-reference |
| 1414 | ;; It's an effective and maintained fork of |
| 1415 | ;; <https://github.com/bunchesofdonald/photohash> project, which |
| 1416 | ;; has the latest release in 2016. |
| 1417 | (url "https://github.com/JohannesBuchner/imagehash") |
| 1418 | (commit (string-append "v" version)))) |
| 1419 | (file-name (git-file-name name version)) |
| 1420 | (sha256 |
| 1421 | (base32 "1rz1fpwhcx0cbln189bcs61wlwgngcjcn77jvm0yji5s7lshhipy")))) |
| 1422 | (build-system pyproject-build-system) |
| 1423 | (arguments |
| 1424 | (list |
| 1425 | #:phases |
| 1426 | #~(modify-phases %standard-phases |
| 1427 | ;; Upstream plans to remove Python 2 compatibility: |
| 1428 | ;; https://github.com/JohannesBuchner/imagehash/pull/223 |
| 1429 | (add-after 'unpack 'remove-six |
| 1430 | (lambda _ |
| 1431 | (substitute* (find-files "." ".py$") |
| 1432 | (("import six") "") |
| 1433 | (("six\\.assertRaisesRegex\\(self, ") |
| 1434 | "self.assertRaisesRegex(") |
| 1435 | (("six\\.exec_") ""))))))) |
| 1436 | (native-inputs |
| 1437 | (list python-pytest |
| 1438 | python-setuptools |
| 1439 | python-wheel)) |
| 1440 | (propagated-inputs |
| 1441 | (list python-numpy |
| 1442 | python-pillow |
| 1443 | python-pywavelets |
| 1444 | python-scipy)) |
| 1445 | (home-page "https://github.com/JohannesBuchner/imagehash") |
| 1446 | (synopsis "Perceptual Image Hashing library") |
| 1447 | (description |
| 1448 | "This package implements a functionality to tell whether two images look |
| 1449 | nearly identical. The image hash algorithms (average, perceptual, difference, |
| 1450 | wavelet) analyse the image structure on luminance (without color information). |
| 1451 | The color hash algorithm analyses the color distribution and black & gray |
| 1452 | fractions (without position information). |
| 1453 | |
| 1454 | Features: |
| 1455 | @itemize |
| 1456 | @item average hashing |
| 1457 | @item perceptual hashing |
| 1458 | @item difference hashing |
| 1459 | @item wavelet hashing |
| 1460 | @item HSV color hashing (colorhash) |
| 1461 | @item crop-resistant hashing |
| 1462 | @end itemize") |
| 1463 | (license license:bsd-2))) |
| 1464 | |
| 1465 | (define-public python-iminuit |
| 1466 | (package |
| 1467 | (name "python-iminuit") |
| 1468 | (version "2.32.0") |
| 1469 | (source |
| 1470 | (origin |
| 1471 | (method url-fetch) |
| 1472 | (uri (pypi-uri "iminuit" version)) |
| 1473 | (sha256 |
| 1474 | (base32 "1lpprnn6h1f065b4aay6cr2bk6s5h3fv3gfnbbkrp5b5hv8k8ax3")))) |
| 1475 | (build-system pyproject-build-system) |
| 1476 | (arguments |
| 1477 | (list #:test-flags #~(list "-k" "not test_interactive_pyside6"))) |
| 1478 | (native-inputs |
| 1479 | (list cmake-minimal |
| 1480 | pybind11-2 |
| 1481 | python-annotated-types |
| 1482 | python-boost-histogram |
| 1483 | python-ipykernel |
| 1484 | python-jacobi |
| 1485 | python-joblib |
| 1486 | python-pydantic |
| 1487 | python-pytest |
| 1488 | python-resample |
| 1489 | python-scikit-build-core |
| 1490 | python-tabulate)) |
| 1491 | ;; All inputs besides python-numpy are optional but greatly improve |
| 1492 | ;; the package. |
| 1493 | ;; FIXME: Numba segfaults Python in some tests. |
| 1494 | (propagated-inputs |
| 1495 | (list python-ipywidgets |
| 1496 | python-matplotlib |
| 1497 | ;; python-numba |
| 1498 | ;; python-numba-stats |
| 1499 | python-numpy |
| 1500 | python-scipy |
| 1501 | python-unicodeitplus)) |
| 1502 | (home-page "https://github.com/scikit-hep/iminuit") |
| 1503 | (synopsis "Python interface for MINUIT2") |
| 1504 | (description |
| 1505 | "@code{iminuit} is a Jupyter-friendly Python interface for the @code{Minuit2} |
| 1506 | C++ library maintained by CERN's ROOT team. |
| 1507 | |
| 1508 | Minuit was designed to optimize statistical cost functions, for |
| 1509 | maximum-likelihood and least-squares fits. It provides the best-fit |
| 1510 | parameters and error estimates from likelihood profile analysis. |
| 1511 | |
| 1512 | Optionally, Iminuit supports SciPy minimizers as alternatives to Minuit's |
| 1513 | MIGRAD algorithm and Numba accelerated functions.") |
| 1514 | ;; Python interface under MIT Expat, Iminuit C++ library under LGPL v2.1+. |
| 1515 | (license (list license:expat license:lgpl2.1+)))) |
| 1516 | |
| 1517 | (define-public python-jacobi |
| 1518 | (package |
| 1519 | (name "python-jacobi") |
| 1520 | (version "0.9.2") |
| 1521 | (source |
| 1522 | (origin |
| 1523 | (method url-fetch) |
| 1524 | (uri (pypi-uri "jacobi" version)) |
| 1525 | (sha256 |
| 1526 | (base32 "0a08680q6rnl6b1azq0lzd8r08pgnjd9ynwivb1g2vi4ccb4h7y1")))) |
| 1527 | (build-system pyproject-build-system) |
| 1528 | (arguments |
| 1529 | (list |
| 1530 | #:phases |
| 1531 | #~(modify-phases %standard-phases |
| 1532 | (add-after 'unpack 'fix-pytest-config |
| 1533 | (lambda _ |
| 1534 | (substitute* "pyproject.toml" |
| 1535 | ;; AttributeError: module 'numpy' has no attribute |
| 1536 | ;; 'VisibleDeprecationWarning' |
| 1537 | ((".*error::numpy.VisibleDeprecationWarning.*") ""))))))) |
| 1538 | (native-inputs |
| 1539 | (list python-pytest |
| 1540 | python-pytest-benchmark |
| 1541 | python-setuptools |
| 1542 | python-setuptools-scm)) |
| 1543 | (propagated-inputs |
| 1544 | (list python-numpy)) |
| 1545 | (home-page "https://github.com/hdembinski/jacobi") |
| 1546 | (synopsis "Compute numerical derivatives") |
| 1547 | (description |
| 1548 | "This package provides fast numerical derivatives for analytic |
| 1549 | functions with arbitrary round-off error and error propagation.") |
| 1550 | (license license:expat))) |
| 1551 | |
| 1552 | (define-public python-legendkit |
| 1553 | (package |
| 1554 | (name "python-legendkit") |
| 1555 | (version "0.3.6") |
| 1556 | (source |
| 1557 | (origin |
| 1558 | (method git-fetch) ;no tests in PyPI archive |
| 1559 | (uri (git-reference |
| 1560 | (url "https://github.com/Marsilea-viz/legendkit") |
| 1561 | (commit (string-append "v" version)))) |
| 1562 | (file-name (git-file-name name version)) |
| 1563 | (sha256 |
| 1564 | (base32 "03xdhh95w4zydwa4ahp3gyfa6i60c9s5arfcj366knckb1bnpnn9")))) |
| 1565 | (build-system pyproject-build-system) |
| 1566 | (native-inputs |
| 1567 | (list python-hatchling |
| 1568 | python-pytest)) |
| 1569 | (propagated-inputs |
| 1570 | (list python-matplotlib)) |
| 1571 | (home-page "https://github.com/Marsilea-viz/legendki") |
| 1572 | (synopsis "Legend creation and manipulation for matplotlib") |
| 1573 | (description |
| 1574 | "This package implements a functionality to create and manipulate plot |
| 1575 | legends for @code{matplotlib}.") |
| 1576 | (license license:expat))) |
| 1577 | |
| 1578 | (define-public python-libneuroml |
| 1579 | (package |
| 1580 | (name "python-libneuroml") |
| 1581 | (version "0.6.7") |
| 1582 | (source |
| 1583 | (origin |
| 1584 | (method git-fetch) |
| 1585 | (uri (git-reference |
| 1586 | (url "https://github.com/NeuralEnsemble/libNeuroML.git") |
| 1587 | (commit (string-append "v" version)))) |
| 1588 | (file-name (git-file-name name version)) |
| 1589 | (sha256 |
| 1590 | (base32 "1x5sgm0250zdfnw16cbmgl45hz2kfmww5lghpyhlcadgnbzyq3dx")))) |
| 1591 | (build-system pyproject-build-system) |
| 1592 | ;; tests: 116 passed, 5 xfailed, 5 warnings |
| 1593 | (native-inputs |
| 1594 | (list python-pytest |
| 1595 | python-numpy |
| 1596 | python-setuptools |
| 1597 | python-tables)) |
| 1598 | (propagated-inputs |
| 1599 | (list python-lxml |
| 1600 | python-natsort |
| 1601 | python-networkx)) |
| 1602 | (home-page "https://libneuroml.readthedocs.org/en/latest/") |
| 1603 | (synopsis |
| 1604 | "Python library for working with NeuroML descriptions of neuronal models") |
| 1605 | (description |
| 1606 | "This package provides a Python library for working with NeuroML descriptions of |
| 1607 | neuronal models") |
| 1608 | (license license:bsd-3))) |
| 1609 | |
| 1610 | (define-public python-marsilea |
| 1611 | (package |
| 1612 | (name "python-marsilea") |
| 1613 | (version "0.5.4") |
| 1614 | (source |
| 1615 | (origin |
| 1616 | (method git-fetch) ;no tests in PyPI archive |
| 1617 | (uri (git-reference |
| 1618 | (url "https://github.com/Marsilea-viz/marsilea") |
| 1619 | (commit (string-append "v" version)))) |
| 1620 | (file-name (git-file-name name version)) |
| 1621 | (sha256 |
| 1622 | (base32 "09pyfx0gn46ypsp991d3n4a4xx6zlbpss078lw6yywnhl834v2i0")))) |
| 1623 | (build-system pyproject-build-system) |
| 1624 | (native-inputs |
| 1625 | (list python-hatchling |
| 1626 | python-pytest)) |
| 1627 | (propagated-inputs |
| 1628 | (list python-legendkit |
| 1629 | python-matplotlib |
| 1630 | python-numpy |
| 1631 | python-pandas |
| 1632 | python-platformdirs |
| 1633 | python-scipy |
| 1634 | python-seaborn)) |
| 1635 | (home-page "https://github.com/Marsilea-viz/marsilea") |
| 1636 | (synopsis "Declarative creation of composable visualizations") |
| 1637 | (description |
| 1638 | "Marsilea is a Python library for creating composable visualizations in a |
| 1639 | declarative way. It is built on top of Matplotlib and provides a high-level |
| 1640 | API for you to puzzle different visualizations together like logo.") |
| 1641 | (license license:expat))) |
| 1642 | |
| 1643 | (define-public python-meshzoo |
| 1644 | (package |
| 1645 | (name "python-meshzoo") |
| 1646 | (version "0.9.4") |
| 1647 | (source |
| 1648 | (origin |
| 1649 | (method git-fetch) |
| 1650 | (uri (git-reference |
| 1651 | (url "https://github.com/diego-hayashi/meshzoo") |
| 1652 | (commit (string-append "v" version)))) |
| 1653 | (file-name (git-file-name name version)) |
| 1654 | (sha256 |
| 1655 | (base32 "107byfppbq16fqyp2hw7ydcvvahspzq0hzvlvzqg2zxi1aigbr68")))) |
| 1656 | (build-system pyproject-build-system) |
| 1657 | (propagated-inputs |
| 1658 | (list python-numpy)) |
| 1659 | (native-inputs (list python-flit-core python-matplotlib python-pytest)) |
| 1660 | (home-page "https://github.com/diego-hayashi/meshzoo") |
| 1661 | (synopsis "Mesh generator for simple geometries") |
| 1662 | (description |
| 1663 | "@code{meshzoo} is a mesh generator for finite element or finite |
| 1664 | volume computations for simple domains like regular polygons, disks, |
| 1665 | spheres, cubes, etc.") |
| 1666 | (license license:gpl3+))) |
| 1667 | |
| 1668 | (define-public python-modin |
| 1669 | (package |
| 1670 | (name "python-modin") |
| 1671 | (version "0.37.1") |
| 1672 | (source |
| 1673 | (origin |
| 1674 | (method git-fetch) |
| 1675 | (uri (git-reference |
| 1676 | (url "https://github.com/modin-project/modin") |
| 1677 | (commit version))) |
| 1678 | (file-name (git-file-name name version)) |
| 1679 | (sha256 |
| 1680 | (base32 "1kqdx3b7sb3895ynypb6swf2jly26xvdghqqrm9ahqps16cn9dx9")))) |
| 1681 | (build-system pyproject-build-system) |
| 1682 | (arguments |
| 1683 | (list |
| 1684 | ;; tests: |
| 1685 | ;; - api: 5 passed |
| 1686 | ;; - dask: 269 passed, 2 skipped, 93 xfailed, 191 warnings |
| 1687 | ;; - python: 269 passed, 2 skipped, 93 xfailed, 197 warnings |
| 1688 | #:test-flags |
| 1689 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 1690 | ;; AssertionError: assert 'array <...> |
| 1691 | "-k" (string-join |
| 1692 | (list "not test_repr[100]" |
| 1693 | "test_repr[size1]" |
| 1694 | "test_repr[size2]" |
| 1695 | "test_repr[size3]" |
| 1696 | "test_repr[size4]" |
| 1697 | "test_repr[size5]" |
| 1698 | "test_repr[size6]" |
| 1699 | "test_repr[size7]" |
| 1700 | "test_repr[size8]" |
| 1701 | "test_repr[size9]") |
| 1702 | " and not ") |
| 1703 | "modin/tests/numpy") |
| 1704 | #:phases |
| 1705 | #~(modify-phases %standard-phases |
| 1706 | (add-after 'unpack 'versioneer |
| 1707 | (lambda _ |
| 1708 | (invoke "versioneer" "install") |
| 1709 | (substitute* "setup.py" |
| 1710 | (("version=versioneer.get_version\\(),") |
| 1711 | (string-append "version='" #$version "',"))))) |
| 1712 | (add-after 'unpack 'fix-pytest-config |
| 1713 | (lambda _ |
| 1714 | (substitute* "setup.cfg" |
| 1715 | ((" --cov-.*--cov-report=") "")))) |
| 1716 | (replace 'check |
| 1717 | (lambda* (#:key tests? test-flags #:allow-other-keys) |
| 1718 | (when tests? |
| 1719 | ;; API basic tests |
| 1720 | (invoke "pytest" "-vv" |
| 1721 | "modin/tests/test_executions_api.py" |
| 1722 | "modin/tests/test_headers.py" |
| 1723 | "modin/tests/core/test_dispatcher.py::test_add_option") |
| 1724 | ;; More complex engine tests, the complete set up requires |
| 1725 | ;; database access and AWS credentials, see: |
| 1726 | ;; <.github/workflows/ci.yml >. |
| 1727 | (setenv "MODIN_ENGINE" "dask") |
| 1728 | (apply invoke "pytest" "-vv" test-flags) |
| 1729 | (setenv "MODIN_ENGINE" "python") |
| 1730 | (apply invoke "pytest" "-vv" test-flags))))))) |
| 1731 | (native-inputs |
| 1732 | (list python-boto3 |
| 1733 | python-pytest |
| 1734 | python-pytest-xdist |
| 1735 | python-s3fs |
| 1736 | python-setuptools |
| 1737 | python-versioneer)) |
| 1738 | (propagated-inputs |
| 1739 | (list python-fsspec |
| 1740 | python-numpy |
| 1741 | python-packaging |
| 1742 | python-pandas |
| 1743 | python-psutil |
| 1744 | python-typing-extensions |
| 1745 | ;; [optinoal] |
| 1746 | python-dask |
| 1747 | python-distributed)) |
| 1748 | (home-page "https://github.com/modin-project/modin") |
| 1749 | (synopsis "Make your pandas code run faster") |
| 1750 | (description |
| 1751 | "Modin uses Ray or Dask to provide an effortless way to speed up your |
| 1752 | pandas notebooks, scripts, and libraries. Unlike other distributed DataFrame |
| 1753 | libraries, Modin provides seamless integration and compatibility with existing |
| 1754 | pandas code.") |
| 1755 | (license license:asl2.0))) |
| 1756 | |
| 1757 | (define-public python-mpl-scatter-density |
| 1758 | (package |
| 1759 | (name "python-mpl-scatter-density") |
| 1760 | (version "0.8") |
| 1761 | (source |
| 1762 | (origin |
| 1763 | (method url-fetch) |
| 1764 | (uri (pypi-uri "mpl_scatter_density" version)) |
| 1765 | (sha256 |
| 1766 | (base32 "0cynk1rk6k2xklgv69difphrz6id77x3xb58kbs4mc4q7z6bvfid")))) |
| 1767 | (build-system pyproject-build-system) |
| 1768 | (arguments |
| 1769 | (list |
| 1770 | ;; See <https://github.com/astrofrog/mpl-scatter-density/issues/42>. |
| 1771 | #:test-flags #~(list "-k" "not test_default_dpi"))) |
| 1772 | (native-inputs |
| 1773 | (list python-pytest |
| 1774 | python-pytest-cov |
| 1775 | python-pytest-mpl |
| 1776 | python-setuptools |
| 1777 | python-setuptools-scm |
| 1778 | python-wheel)) |
| 1779 | (propagated-inputs |
| 1780 | (list python-fast-histogram |
| 1781 | python-matplotlib |
| 1782 | python-numpy)) |
| 1783 | (home-page "https://github.com/astrofrog/mpl-scatter-density") |
| 1784 | (synopsis "Matplotlib helpers to make density scatter plots") |
| 1785 | (description |
| 1786 | "This package provides functionality to make it easy to make scatter |
| 1787 | density maps, both for interactive and non-interactive use.") |
| 1788 | (license license:bsd-2))) |
| 1789 | |
| 1790 | (define-public python-mpsplines |
| 1791 | ;; No release on PyPI no git tag, use the latest commit. |
| 1792 | (let ((commit "4967655fca8f4d0fc0685486c8ec2f1fe2f199d2") |
| 1793 | (revision "0")) |
| 1794 | (package |
| 1795 | (name "python-mpsplines") |
| 1796 | (version (git-version "0.0.0" revision commit)) |
| 1797 | (source |
| 1798 | (origin |
| 1799 | (method git-fetch) |
| 1800 | (uri (git-reference |
| 1801 | (url "https://github.com/jararias/mpsplines") |
| 1802 | (commit commit))) |
| 1803 | (file-name (git-file-name name version)) |
| 1804 | (sha256 |
| 1805 | (base32 "1wqfvjp1d6xzb07qnq72h76f0mx7za9pasgw3qp3ciaycmlkvdr3")))) |
| 1806 | (build-system pyproject-build-system) |
| 1807 | (arguments |
| 1808 | (list #:tests? #f)) ; no tests provided |
| 1809 | (native-inputs |
| 1810 | (list python-setuptools |
| 1811 | python-wheel)) |
| 1812 | (propagated-inputs |
| 1813 | (list python-scipy |
| 1814 | python-numpy |
| 1815 | python-loguru)) |
| 1816 | (home-page "https://github.com/jararias/mpsplines") |
| 1817 | (synopsis "Mean preserving interpolation with splines") |
| 1818 | (description |
| 1819 | "Thi package implements a functionality for mean-preserving |
| 1820 | interpolation of 1D data (for example, time series) with splines.") |
| 1821 | (license license:bsd-3)))) |
| 1822 | |
| 1823 | (define-public python-msgpack-numpy |
| 1824 | (package |
| 1825 | (name "python-msgpack-numpy") |
| 1826 | (version "0.4.8") |
| 1827 | (source |
| 1828 | (origin |
| 1829 | (method url-fetch) |
| 1830 | (uri (pypi-uri "msgpack-numpy" version)) |
| 1831 | (sha256 |
| 1832 | (base32 |
| 1833 | "0sbfanbkfs6c77np4vz0ayrwnv99bpn5xgj5fnf2yhhk0lcd6ry6")))) |
| 1834 | (build-system pyproject-build-system) |
| 1835 | (arguments |
| 1836 | (list #:test-backend #~'unittest)) |
| 1837 | (native-inputs |
| 1838 | (list python-setuptools)) |
| 1839 | (propagated-inputs |
| 1840 | (list python-msgpack python-numpy)) |
| 1841 | (home-page "https://github.com/lebedov/msgpack-numpy") |
| 1842 | (synopsis |
| 1843 | "Numpy data serialization using msgpack") |
| 1844 | (description |
| 1845 | "This package provides encoding and decoding routines that enable the |
| 1846 | serialization and deserialization of numerical and array data types provided |
| 1847 | by numpy using the highly efficient @code{msgpack} format. Serialization of |
| 1848 | Python's native complex data types is also supported.") |
| 1849 | (license license:bsd-3))) |
| 1850 | |
| 1851 | (define-public python-multiscale-spatial-image |
| 1852 | (package |
| 1853 | (name "python-multiscale-spatial-image") |
| 1854 | (version "2.0.3") |
| 1855 | (source |
| 1856 | (origin |
| 1857 | (method url-fetch) |
| 1858 | (uri (pypi-uri "multiscale_spatial_image" version)) |
| 1859 | (sha256 |
| 1860 | (base32 "1avcc7hrgyza793i02vjfvyn2bg0ag50h1pagapbpj65hl3v4whb")))) |
| 1861 | (build-system pyproject-build-system) |
| 1862 | ;; All interesting tests require file downloads over IPFS. |
| 1863 | (arguments (list #:tests? #false)) |
| 1864 | (propagated-inputs |
| 1865 | (list python-dask |
| 1866 | python-numpy |
| 1867 | python-dateutil |
| 1868 | python-spatial-image |
| 1869 | python-xarray |
| 1870 | python-xarray-dataclass |
| 1871 | python-zarr)) |
| 1872 | (native-inputs |
| 1873 | (list python-hatchling)) |
| 1874 | (home-page "https://github.com/spatial-image/multiscale-spatial-image") |
| 1875 | (synopsis "Multi-dimensional spatial image data structure") |
| 1876 | (description |
| 1877 | "This package lets you generate a multiscale, chunked, multi-dimensional |
| 1878 | spatial image data structure that can serialized to OME-NGFF. Each scale is a |
| 1879 | scientific Python Xarray spatial-image Dataset, organized into nodes of an |
| 1880 | Xarray Datatree.") |
| 1881 | (license license:asl2.0))) |
| 1882 | |
| 1883 | (define-public python-narwhals |
| 1884 | (package |
| 1885 | (name "python-narwhals") |
| 1886 | (version "2.15.0") |
| 1887 | (source |
| 1888 | (origin |
| 1889 | (method url-fetch) |
| 1890 | (uri (pypi-uri "narwhals" version)) |
| 1891 | (sha256 |
| 1892 | (base32 "0rd9z4pmp7cm1l11iahwxwkgl48ki3fiynj4d110i5cxp5smjn59")))) |
| 1893 | (build-system pyproject-build-system) |
| 1894 | (arguments |
| 1895 | (list |
| 1896 | ;; tests: 2846 passed, 215 skipped, 59 xfailed |
| 1897 | #:test-flags |
| 1898 | #~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 1899 | ;; Run a minimal portion of tests, the complete test suite |
| 1900 | ;; requires Polars, PySpark and SqlFrame packages. |
| 1901 | "--constructors=pandas" |
| 1902 | "-k" (string-join |
| 1903 | ;; XXX: ValueError: Minimum version of modin supported by Narwhals is |
| 1904 | ;; (0, 8, 2), found: (0,) |
| 1905 | (list "not test_allow_series" |
| 1906 | "test_cross_join_non_pandas" |
| 1907 | "test_eager_only_eager" |
| 1908 | "test_from_native_roundtrip_identity" |
| 1909 | "test_namespace_series_from_iterable" |
| 1910 | "test_series_only" |
| 1911 | "test_to_native_namespace") |
| 1912 | " and not ")))) |
| 1913 | (native-inputs |
| 1914 | (list python-pytest |
| 1915 | python-pytest-xdist |
| 1916 | python-pytest-env |
| 1917 | python-hatchling)) |
| 1918 | (propagated-inputs |
| 1919 | ;; [core] |
| 1920 | (list python-duckdb |
| 1921 | python-pandas |
| 1922 | ;; python-polars ;https://codeberg.org/guix/guix/pulls/2570 |
| 1923 | python-pyarrow |
| 1924 | ;; python-sqlframe |
| 1925 | ;; [optional] |
| 1926 | ;; python-cudf |
| 1927 | python-dask |
| 1928 | ;; python-ibis-framework |
| 1929 | python-modin |
| 1930 | python-packaging |
| 1931 | ;; python-pyarrow-hotfix |
| 1932 | ;; python-pyspark |
| 1933 | python-rich)) |
| 1934 | (home-page "https://narwhals-dev.github.io/narwhals/") |
| 1935 | (synopsis "Compatibility layer between dataframe libraries") |
| 1936 | (description |
| 1937 | "This package provides an extremely lightweight compatibility layer |
| 1938 | between dataframe libraries. |
| 1939 | @itemize |
| 1940 | @item full API support: cuDF, Modin, pandas, Polars, PyArrow |
| 1941 | @item lazy-only support: Dask, DuckDB, Ibis, PySpark, SQLFrame |
| 1942 | @end itemize") |
| 1943 | (license license:expat))) |
| 1944 | |
| 1945 | ;; A bare minimal package, mainly to use in tests and reduce closure |
| 1946 | ;; size. Tests are left out in the main package to slim down native-inputs. |
| 1947 | (define-public python-narwhals-minimal |
| 1948 | (package/inherit python-narwhals |
| 1949 | (name "python-narwhals-minimal") |
| 1950 | (arguments |
| 1951 | (substitute-keyword-arguments (package-arguments python-anndata) |
| 1952 | ((#:tests? _ #t) #f))) |
| 1953 | (native-inputs |
| 1954 | (list python-hatchling)) |
| 1955 | ;; All Narwals dependencies are optional. |
| 1956 | (propagated-inputs '()))) |
| 1957 | |
| 1958 | (define-public python-ndindex |
| 1959 | (package |
| 1960 | (name "python-ndindex") |
| 1961 | (version "1.10.1") |
| 1962 | (source |
| 1963 | (origin |
| 1964 | (method url-fetch) |
| 1965 | (uri (pypi-uri "ndindex" version)) |
| 1966 | (sha256 |
| 1967 | (base32 "048gc4pwvsyxkz7brph1fwmlgjd35alimvnb3248y91iy30i6q8g")))) |
| 1968 | (build-system pyproject-build-system) |
| 1969 | (arguments |
| 1970 | (list |
| 1971 | ;; tests: 121 passed, 1 deselected, 3 warnings |
| 1972 | #:test-flags |
| 1973 | #~(list "--pyargs" "ndindex" |
| 1974 | "-c" "/dev/null" ;avoid coverage |
| 1975 | "-k" "not test_iter_indices_matmul") ; flaky |
| 1976 | #:phases |
| 1977 | #~(modify-phases %standard-phases |
| 1978 | (add-before 'check 'remove-local-source |
| 1979 | (lambda _ |
| 1980 | (delete-file-recursively "ndindex")))))) |
| 1981 | (native-inputs |
| 1982 | (list python-cython |
| 1983 | python-numpy |
| 1984 | python-pytest |
| 1985 | python-setuptools |
| 1986 | python-sympy)) |
| 1987 | (home-page "https://quansight-labs.github.io/ndindex/") |
| 1988 | (synopsis "Python library for manipulating indices of ndarrays") |
| 1989 | (description "This package provides a Python library for manipulating |
| 1990 | indices of @code{ndarrays}.") |
| 1991 | (license license:expat))) |
| 1992 | |
| 1993 | (define-public python-nestcheck |
| 1994 | (package |
| 1995 | (name "python-nestcheck") |
| 1996 | ;; 0.2.1 was placed in 2019, there are a lot of changes providing |
| 1997 | ;; comparability with Python 3.11, use the latest commit from master's |
| 1998 | ;; HEAD. |
| 1999 | (properties '((commit . "513ef962ef7b0d66377686f9fe0a9e354dad48b3") |
| 2000 | (revision . "0"))) |
| 2001 | (version (git-version "0.2.1" |
| 2002 | (assoc-ref properties 'revision) |
| 2003 | (assoc-ref properties 'commit))) |
| 2004 | (source |
| 2005 | (origin |
| 2006 | (method git-fetch) |
| 2007 | (uri (git-reference |
| 2008 | (url "https://github.com/ejhigson/nestcheck") |
| 2009 | (commit (assoc-ref properties 'commit)))) |
| 2010 | (file-name (git-file-name name version)) |
| 2011 | (sha256 |
| 2012 | (base32 "0zzms2jkiapawnjyr5i7c61m7pmg6yd3nmpv23bdx51glz2fmglc")))) |
| 2013 | (build-system pyproject-build-system) |
| 2014 | (arguments |
| 2015 | (list |
| 2016 | ;; tests: 58 passed, 6 deselected, 10 warnings |
| 2017 | #:test-flags |
| 2018 | ;; TypeError: MultiIndex.set_levels() got an unexpected keyword argument |
| 2019 | ;; 'inplace' |
| 2020 | #~(list "-k" (string-append "not test_run_list_error_summary" |
| 2021 | ;; AttributeError: 'Series' object has no |
| 2022 | ;; attribute 'iteritems' |
| 2023 | " and not test_kde_plot_df" |
| 2024 | ;; Test is not determenistic and fails with |
| 2025 | ;; assertion not equal for DF array. |
| 2026 | " and not test_summary_df")) |
| 2027 | #:phases |
| 2028 | #~(modify-phases %standard-phases |
| 2029 | (add-after 'unpack 'use-pytest |
| 2030 | (lambda _ |
| 2031 | (substitute* "tests/test_core.py" |
| 2032 | (("'nose'") "'pytest'"))))))) |
| 2033 | (native-inputs |
| 2034 | (list python-pytest |
| 2035 | python-setuptools)) |
| 2036 | (propagated-inputs |
| 2037 | (list python-fgivenx |
| 2038 | python-matplotlib |
| 2039 | python-numpy |
| 2040 | python-pandas |
| 2041 | python-scipy |
| 2042 | python-tqdm)) |
| 2043 | (home-page "https://github.com/ejhigson/nestcheck") |
| 2044 | (synopsis "Nested sampling calculations utilities") |
| 2045 | (description |
| 2046 | "This package implements a functionality to work with |
| 2047 | @url{https://en.wikipedia.org/wiki/Nested_sampling_algorithm, Nested |
| 2048 | sampling}, a popular numerical method for Bayesian computation, which |
| 2049 | simultaneously generates samples from the posterior distribution and an |
| 2050 | estimate of the Bayesian evidence for a given likelihood and prior. |
| 2051 | @code{nestcheck} provides Python utilities for analysing samples produced by |
| 2052 | nested sampling, and estimating uncertainties on nested sampling |
| 2053 | calculations (which have different statistical properties to calculations |
| 2054 | using other numerical methods).") |
| 2055 | (license license:expat))) |
| 2056 | |
| 2057 | (define-public python-nibabel |
| 2058 | (package |
| 2059 | (name "python-nibabel") |
| 2060 | (version "5.3.2") |
| 2061 | (source |
| 2062 | (origin |
| 2063 | (method url-fetch) |
| 2064 | (uri (pypi-uri "nibabel" version)) |
| 2065 | (sha256 |
| 2066 | (base32 "16snprwgp7qzp51j3mx0zdn7brvx6r14ankldi24ny0w7d8adp0b")))) |
| 2067 | (build-system pyproject-build-system) |
| 2068 | (arguments |
| 2069 | (list |
| 2070 | ;; AttributeError: 'dict' object has no attribute 'add'. |
| 2071 | #:test-flags #~(list "-k" "not test_first and not test_second"))) |
| 2072 | (propagated-inputs (list python-importlib-resources python-numpy |
| 2073 | python-packaging python-typing-extensions)) |
| 2074 | (native-inputs (list python-hatch-vcs |
| 2075 | python-hatchling |
| 2076 | python-pytest |
| 2077 | python-pytest-httpserver |
| 2078 | python-pytest-xdist)) |
| 2079 | (home-page "https://nipy.org/nibabel/") |
| 2080 | (synopsis "Read and write access to common neuroimaging file formats") |
| 2081 | (description |
| 2082 | "@code{nibabel} is a library that provides read and write access to |
| 2083 | common neuroimaging file formats, including: ANALYZE (plain, SPM99, SPM2 |
| 2084 | and later), GIFTI, NIfTI1, NIfTI2, CIFTI-2, MINC1, MINC2, AFNI BRIK/HEAD, |
| 2085 | ECAT and Philips PAR/REC. In addition, NiBabel also supports FreeSurfer’s |
| 2086 | MGH, geometry, annotation and morphometry files, and provides some limited |
| 2087 | support for DICOM.") |
| 2088 | (license license:expat))) ; and other non-copyleft licenses |
| 2089 | |
| 2090 | (define-public python-numba-stats |
| 2091 | (package |
| 2092 | (name "python-numba-stats") |
| 2093 | (version "1.11.0") |
| 2094 | (source |
| 2095 | (origin |
| 2096 | (method url-fetch) |
| 2097 | (uri (pypi-uri "numba_stats" version)) |
| 2098 | (sha256 |
| 2099 | (base32 "1m5gwrc3liqydpix5ckyc7s5ysvgvinbznnkcvk2xjz13lwfy2s8")))) |
| 2100 | (build-system pyproject-build-system) |
| 2101 | (native-inputs |
| 2102 | (list python-pytest |
| 2103 | python-setuptools |
| 2104 | python-setuptools-scm)) |
| 2105 | (propagated-inputs |
| 2106 | (list python-numba |
| 2107 | python-numpy |
| 2108 | python-scipy)) |
| 2109 | (home-page "https://github.com/scikit-hep/numba-stats") |
| 2110 | (synopsis "Accelerated implementations of SciPy probability distributions") |
| 2111 | (description |
| 2112 | "This package provides Numba-accelerated implementations of common SciPy |
| 2113 | probability distributions and others used in particle physics. |
| 2114 | |
| 2115 | The supported distributions are: |
| 2116 | |
| 2117 | @itemize |
| 2118 | @item Uniform |
| 2119 | @item (Truncated) Normal |
| 2120 | @item Log-normal |
| 2121 | @item Poisson |
| 2122 | @item Binomial |
| 2123 | @item (Truncated) Exponential |
| 2124 | @item Student's t |
| 2125 | @item Voigtian |
| 2126 | @item Crystal Ball |
| 2127 | @item Generalised double-sided Crystal Ball |
| 2128 | @item Tsallis-Hagedorn, a model for the minimum bias pT distribution |
| 2129 | @item Q-Gaussian |
| 2130 | @item Bernstein density (not normalized to unity) |
| 2131 | @item Cruijff density (not normalized to unity) |
| 2132 | @item CMS-Shape |
| 2133 | @item Generalized Argus |
| 2134 | @end itemize") |
| 2135 | (license license:expat))) |
| 2136 | |
| 2137 | (define-public python-numdifftools |
| 2138 | (package |
| 2139 | (name "python-numdifftools") |
| 2140 | (version "0.9.42") |
| 2141 | (source |
| 2142 | (origin |
| 2143 | (method url-fetch) |
| 2144 | (uri (pypi-uri "numdifftools" version)) |
| 2145 | (sha256 |
| 2146 | (base32 "1hgv3jhf4y9qrizkwfryj2b56zd0i2dvzig1y7r4ng193wbparl6")))) |
| 2147 | (build-system pyproject-build-system) |
| 2148 | (arguments |
| 2149 | (list |
| 2150 | ;; tests: 177 passed, 3 skipped, 2 deselected, 971 warnings |
| 2151 | #:test-flags |
| 2152 | #~(list "-m" "not benchmark and not slow") |
| 2153 | #:phases |
| 2154 | #~(modify-phases %standard-phases |
| 2155 | (add-after 'unpack 'fix-pytest-config |
| 2156 | (lambda _ |
| 2157 | (substitute* "pyproject.toml" |
| 2158 | ((" --cov=numdifftools --cov-report=xml") ""))))))) |
| 2159 | (native-inputs |
| 2160 | (list python-algopy |
| 2161 | python-line-profiler |
| 2162 | python-pdm-backend |
| 2163 | python-pytest |
| 2164 | python-statsmodels)) |
| 2165 | (propagated-inputs |
| 2166 | (list python-numpy |
| 2167 | python-scipy |
| 2168 | ;; [optional] |
| 2169 | python-matplotlib)) |
| 2170 | (home-page "https://github.com/pbrod/numdifftools") |
| 2171 | (synopsis "Solves automatic numerical differentiation problems") |
| 2172 | (description |
| 2173 | "This package implements a functionality to solve automatic numerical |
| 2174 | differentiation problems in one or more variables. Finite differences are |
| 2175 | used in an adaptive manner, coupled with a Richardson extrapolation |
| 2176 | methodology to provide a maximally accurate result. The user can configure |
| 2177 | many options like; changing the order of the method or the extrapolation, even |
| 2178 | allowing the user to specify whether complex-step, central, forward or |
| 2179 | backward differences are used.") |
| 2180 | (license license:bsd-3))) |
| 2181 | |
| 2182 | (define-public python-numpoly |
| 2183 | (package |
| 2184 | (name "python-numpoly") |
| 2185 | (version "1.3.9") |
| 2186 | (source |
| 2187 | (origin |
| 2188 | (method git-fetch) |
| 2189 | (uri (git-reference |
| 2190 | (url "https://github.com/jonathf/numpoly") |
| 2191 | (commit version))) |
| 2192 | (file-name (git-file-name name version)) |
| 2193 | (sha256 |
| 2194 | (base32 "1abz6ch2bzghbzwkvrr2yrg6zkkaz4wn7qqc5810szryrv0is3ih")))) |
| 2195 | (build-system pyproject-build-system) |
| 2196 | (arguments |
| 2197 | (list |
| 2198 | ;; tests: 221 passed, 4 warnings |
| 2199 | #:phases |
| 2200 | #~(modify-phases %standard-phases |
| 2201 | (add-after 'unpack 'set-version |
| 2202 | ;; Version is hardcoded. |
| 2203 | (lambda _ |
| 2204 | (substitute* "pyproject.toml" |
| 2205 | (("0.1.0") |
| 2206 | #$version)))) |
| 2207 | (add-before 'check 'remove-local-source |
| 2208 | (lambda _ |
| 2209 | (delete-file-recursively "numpoly")))))) |
| 2210 | (native-inputs |
| 2211 | (list python-cython |
| 2212 | python-pytest |
| 2213 | python-setuptools |
| 2214 | python-sympy)) |
| 2215 | (propagated-inputs |
| 2216 | (list python-importlib-metadata |
| 2217 | python-numpy)) |
| 2218 | (home-page "https://numpoly.readthedocs.io/en/master/") |
| 2219 | (synopsis "Polynomials as a numpy datatype") |
| 2220 | (description "Numpoly is a generic library for creating, manipulating and |
| 2221 | evaluating arrays of polynomials based on @code{numpy.ndarray objects}.") |
| 2222 | ;; Tests fail with dtype mismatches on 32-bit architectures, suggesting |
| 2223 | ;; that numpoly only supports 64 bit platforms. |
| 2224 | (supported-systems '("x86_64-linux" "aarch64-linux" "powerpc64le-linux")) |
| 2225 | (license license:bsd-2))) |
| 2226 | |
| 2227 | (define-public python-numpy-groupies |
| 2228 | (package |
| 2229 | (name "python-numpy-groupies") |
| 2230 | (version "0.11.3") |
| 2231 | (source |
| 2232 | (origin |
| 2233 | (method url-fetch) |
| 2234 | (uri (pypi-uri "numpy_groupies" version)) |
| 2235 | (sha256 |
| 2236 | (base32 "1q13gi0018maifhn6dkwi0pprr3p7ikv9r3zffg6p1ayspdazm5f")))) |
| 2237 | (build-system pyproject-build-system) |
| 2238 | (native-inputs |
| 2239 | (list python-numba |
| 2240 | python-pandas |
| 2241 | python-pytest |
| 2242 | python-setuptools |
| 2243 | python-setuptools-scm)) |
| 2244 | (propagated-inputs |
| 2245 | (list python-numpy)) |
| 2246 | (home-page "https://github.com/ml31415/numpy-groupies") |
| 2247 | (synopsis "Tools for group-indexing operations: aggregated sum and more") |
| 2248 | (description |
| 2249 | "This package provides optimized tools for group-indexing operations: |
| 2250 | aggregated sum and more.") |
| 2251 | (license license:bsd-3))) |
| 2252 | |
| 2253 | (define-public python-opt-einsum |
| 2254 | (package |
| 2255 | (name "python-opt-einsum") |
| 2256 | (version "3.3.0") |
| 2257 | (source (origin |
| 2258 | (method url-fetch) |
| 2259 | (uri (pypi-uri "opt_einsum" version)) |
| 2260 | (sha256 |
| 2261 | (base32 |
| 2262 | "0jb5lia0q742d1713jk33vlj41y61sf52j6pgk7pvhxvfxglgxjr")))) |
| 2263 | (build-system pyproject-build-system) |
| 2264 | (propagated-inputs (list python-numpy)) |
| 2265 | (native-inputs |
| 2266 | (list python-pytest python-pytest-cov python-setuptools python-wheel)) |
| 2267 | (home-page "https://github.com/dgasmith/opt_einsum") |
| 2268 | (synopsis "Optimizing numpys einsum function") |
| 2269 | (description |
| 2270 | "Optimized einsum can significantly reduce the overall execution time of |
| 2271 | einsum-like expressions by optimizing the expression's contraction order and |
| 2272 | dispatching many operations to canonical BLAS, cuBLAS, or other specialized |
| 2273 | routines. Optimized einsum is agnostic to the backend and can handle NumPy, |
| 2274 | Dask, PyTorch, Tensorflow, CuPy, Sparse, Theano, JAX, and Autograd arrays as |
| 2275 | well as potentially any library which conforms to a standard API. See the |
| 2276 | documentation for more information.") |
| 2277 | (license license:expat))) |
| 2278 | |
| 2279 | (define-public python-osfclient |
| 2280 | (package |
| 2281 | (name "python-osfclient") |
| 2282 | (version "0.0.5") |
| 2283 | (source |
| 2284 | (origin |
| 2285 | (method git-fetch) |
| 2286 | (uri (git-reference |
| 2287 | (url "https://github.com/osfclient/osfclient") |
| 2288 | (commit version))) |
| 2289 | (file-name (git-file-name name version)) |
| 2290 | (sha256 |
| 2291 | (base32 "1ympjh028xgwkzvhwqa31rack1h8nni7zzn2alp1819m4pm8hysn")))) |
| 2292 | (build-system pyproject-build-system) |
| 2293 | (arguments |
| 2294 | (list |
| 2295 | #:test-flags |
| 2296 | ;; 2 tests fail with assertion not equal: |
| 2297 | ;; AssertionError: assert 16 == (4 + (4 * 2)) |
| 2298 | ;; See: <https://github.com/osfclient/osfclient/issues/214>. |
| 2299 | #~(list "-k" |
| 2300 | (string-append "not test_recursive_upload" |
| 2301 | " and not nottest_recursive_upload_with_subdir")))) |
| 2302 | (native-inputs |
| 2303 | (list python-pytest |
| 2304 | python-mock |
| 2305 | python-setuptools)) |
| 2306 | (propagated-inputs |
| 2307 | (list python-requests |
| 2308 | python-six |
| 2309 | python-tqdm)) |
| 2310 | (home-page "https://github.com/osfclient/osfclient") |
| 2311 | (synopsis "Python library and command-line client for file storage on OSF") |
| 2312 | (description |
| 2313 | "The @code{osfclient} is a python library and a command-line client for |
| 2314 | up- and downloading files to and from @url{https://osf.io/, Open Science |
| 2315 | Framework} projects. The @acronym{OSF, Open Science Framework} is an open |
| 2316 | source project which facilitates the open collaboration of researchers on the |
| 2317 | web, by sharing data and other research outputs.") |
| 2318 | (license license:bsd-3))) |
| 2319 | |
| 2320 | (define-public python-osqp |
| 2321 | (package |
| 2322 | (name "python-osqp") |
| 2323 | (version "1.0.5") |
| 2324 | (source |
| 2325 | (origin |
| 2326 | (method git-fetch) |
| 2327 | (uri (git-reference |
| 2328 | (url "https://github.com/osqp/osqp-python") |
| 2329 | (commit (string-append "v" version)) |
| 2330 | (recursive? #true))) |
| 2331 | (file-name (git-file-name name version)) |
| 2332 | (sha256 |
| 2333 | (base32 "0b5j0hv6dlbs3dm9xvs2ijnjr2r8xnchs4jyk3dx16qhcp85wklb")))) |
| 2334 | (build-system pyproject-build-system) |
| 2335 | (arguments |
| 2336 | (list |
| 2337 | ;; tests: 47 passed, 3 skipped, 1027 warnings |
| 2338 | #:test-flags |
| 2339 | ;; These tests require the module "vec_emosqp", which we don't have. |
| 2340 | #~(list "--ignore=src/osqp/tests/codegen_vectors_test.py" |
| 2341 | ;; These tests need "mat_emosqp". |
| 2342 | "--ignore=src/osqp/tests/codegen_matrices_test.py") |
| 2343 | #:phases |
| 2344 | #~(modify-phases %standard-phases |
| 2345 | (add-after 'unpack 'fix-osqp-source-location |
| 2346 | ;; XXX: Maybe implement it as CMake configure flags, otherwise |
| 2347 | ;; each package depending on osqp needs to have this phase? |
| 2348 | (lambda _ |
| 2349 | (copy-recursively #$(package-source |
| 2350 | (this-package-native-input "osqp")) |
| 2351 | "osqp") |
| 2352 | (substitute* "osqp/algebra/_common/lin_sys/qdldl/qdldl.cmake" |
| 2353 | (("Fetching/configuring QDLDL solver") |
| 2354 | (format #f "Adding/configuring QDLDL solver from: ~a" |
| 2355 | #$(package-source |
| 2356 | (this-package-native-input "qdldl")))) |
| 2357 | (("GIT_REPOSITORY https://github.com/osqp/qdldl\\.git") |
| 2358 | (format #f "SOURCE_DIR ~a" |
| 2359 | #$(package-source |
| 2360 | (this-package-native-input "qdldl")))) |
| 2361 | (("GIT_TAG v0.1.8") |
| 2362 | "")) |
| 2363 | (substitute* "CMakeLists.txt" |
| 2364 | (("Fetching/configuring OSQP") |
| 2365 | (format #f "Adding/configuring OSQP: ~a" |
| 2366 | (string-append (getcwd) "/osqp"))) |
| 2367 | (("GIT_REPOSITORY https://github.com/osqp/osqp\\.git") |
| 2368 | (format #f "SOURCE_DIR ~a" |
| 2369 | (string-append (getcwd) "/osqp"))) |
| 2370 | (("GIT_TAG v1.0.0") |
| 2371 | ""))))))) |
| 2372 | (native-inputs |
| 2373 | (list cmake-minimal |
| 2374 | osqp |
| 2375 | pybind11-2 |
| 2376 | python-pytest |
| 2377 | python-pytorch |
| 2378 | python-scikit-build-core |
| 2379 | python-setuptools-scm |
| 2380 | qdldl)) |
| 2381 | (propagated-inputs |
| 2382 | (list python-jinja2 |
| 2383 | python-joblib |
| 2384 | python-numpy |
| 2385 | python-scipy |
| 2386 | python-setuptools)) |
| 2387 | (home-page "https://osqp.org/") |
| 2388 | (synopsis "OSQP: operator splitting QP solver") |
| 2389 | (description "The OSQP (Operator Splitting Quadratic Program) solver is a |
| 2390 | numerical optimization package.") |
| 2391 | (license license:asl2.0))) |
| 2392 | |
| 2393 | (define-public python-particle |
| 2394 | (package |
| 2395 | (name "python-particle") |
| 2396 | (version "0.26.1") |
| 2397 | (source |
| 2398 | (origin |
| 2399 | (method url-fetch) |
| 2400 | (uri (pypi-uri "particle" version)) |
| 2401 | (sha256 |
| 2402 | (base32 "1iwhfljihqlxacqxx9c782hp5mp54ks6fwzrirbdcmldmp89hxhh")))) |
| 2403 | (build-system pyproject-build-system) |
| 2404 | (propagated-inputs (list python-attrs |
| 2405 | python-hepunits |
| 2406 | python-typing-extensions)) |
| 2407 | (native-inputs (list python-hatch-vcs |
| 2408 | python-hatchling |
| 2409 | python-pandas |
| 2410 | python-pytest |
| 2411 | python-pytest-benchmark |
| 2412 | python-tabulate)) |
| 2413 | (home-page "https://github.com/scikit-hep/particle") |
| 2414 | (synopsis "Extended PDG particle data and MC identification codes") |
| 2415 | (description |
| 2416 | "@code{Particle} provides a pythonic interface to the Particle Data Group |
| 2417 | (PDG) particle data tables and particle identification codes, with extended |
| 2418 | particle information and extra goodies.") |
| 2419 | (license license:bsd-3))) |
| 2420 | |
| 2421 | (define-public python-pint |
| 2422 | (package |
| 2423 | (name "python-pint") |
| 2424 | (version "0.24.4") |
| 2425 | (source |
| 2426 | (origin |
| 2427 | (method url-fetch) |
| 2428 | (uri (pypi-uri "pint" version)) |
| 2429 | (sha256 |
| 2430 | (base32 "100vp5jg2sqj5wxaflj1rqjv2pk4fd55l2h2sdn7m0vlnlwm89rm")))) |
| 2431 | (build-system pyproject-build-system) |
| 2432 | (arguments |
| 2433 | (list |
| 2434 | #:test-flags #~(list "--ignore=pint/testsuite/benchmarks") |
| 2435 | #:phases |
| 2436 | #~(modify-phases %standard-phases |
| 2437 | (add-before 'check 'pre-check |
| 2438 | (lambda _ |
| 2439 | ;; PermissionError: [Errno 13] Permission denied: |
| 2440 | ;; '/homeless-shelter' |
| 2441 | (setenv "HOME" "/tmp")))))) |
| 2442 | (native-inputs |
| 2443 | (list python-pytest |
| 2444 | python-pytest-mpl |
| 2445 | python-pytest-subtests |
| 2446 | python-setuptools |
| 2447 | python-setuptools-scm |
| 2448 | python-wheel)) |
| 2449 | (propagated-inputs |
| 2450 | (list python-flexcache |
| 2451 | python-flexparser |
| 2452 | python-platformdirs |
| 2453 | python-typing-extensions)) |
| 2454 | (home-page "https://github.com/hgrecco/pint") |
| 2455 | (synopsis "Physical quantities module") |
| 2456 | (description |
| 2457 | "Pint is a Python package to define, operate and manipulate physical |
| 2458 | quantities: the product of a numerical value and a unit of measurement. It |
| 2459 | allows arithmetic operations between them and conversions from and to |
| 2460 | different units.") |
| 2461 | (license license:bsd-3))) |
| 2462 | |
| 2463 | (define-public python-pyamg |
| 2464 | (package |
| 2465 | (name "python-pyamg") |
| 2466 | (version "5.3.0") |
| 2467 | (source (origin |
| 2468 | (method url-fetch) |
| 2469 | (uri (pypi-uri "pyamg" version)) |
| 2470 | (modules '((guix build utils))) |
| 2471 | (snippet |
| 2472 | ;; Delete autogenerated files, regenerate in a phase. |
| 2473 | #~(begin |
| 2474 | (for-each |
| 2475 | (lambda (file) |
| 2476 | (delete-file (string-append "pyamg/amg_core/" file))) |
| 2477 | '("air_bind.cpp" |
| 2478 | "evolution_strength_bind.cpp" |
| 2479 | "graph_bind.cpp" |
| 2480 | "krylov_bind.cpp" |
| 2481 | "linalg_bind.cpp" |
| 2482 | "relaxation_bind.cpp" |
| 2483 | "ruge_stuben_bind.cpp" |
| 2484 | "smoothed_aggregation_bind.cpp" |
| 2485 | "tests/bind_examples_bind.cpp")))) |
| 2486 | (sha256 |
| 2487 | (base32 |
| 2488 | "02w6xy3i0qcpsfc64zw8k15mi6qykq65h3d98vi9p6fdlkqx08sk")))) |
| 2489 | (arguments |
| 2490 | (list |
| 2491 | ;; tests: 40 passed, 1 skipped |
| 2492 | #:phases |
| 2493 | #~(modify-phases %standard-phases |
| 2494 | ;; Regenerate the autogenerated files. |
| 2495 | (add-after 'unpack 'amg-core-bind-them |
| 2496 | (lambda _ |
| 2497 | ;; bindthem.py heavily depends on location to produce *_bind.cpp |
| 2498 | ;; file, make it available in tests as well. |
| 2499 | (copy-file "pyamg/amg_core/bindthem.py" |
| 2500 | "pyamg/amg_core/tests/bindthem.py") |
| 2501 | (with-directory-excursion "pyamg/amg_core" |
| 2502 | (substitute* "bindthem.py" |
| 2503 | (("/usr/bin/env python3") (which "python3"))) |
| 2504 | (invoke "sh" "generate.sh")) |
| 2505 | (with-directory-excursion "pyamg/amg_core/tests" |
| 2506 | (invoke "python" "bindthem.py" "bind_examples.h")))) |
| 2507 | (add-before 'check 'pre-check |
| 2508 | (lambda _ |
| 2509 | (copy-recursively "pyamg/tests" "tests") |
| 2510 | (delete-file-recursively "pyamg")))))) |
| 2511 | (build-system pyproject-build-system) |
| 2512 | (native-inputs |
| 2513 | (list pybind11-2 |
| 2514 | python-cppheaderparser |
| 2515 | python-pytest |
| 2516 | python-pyyaml |
| 2517 | python-setuptools |
| 2518 | python-setuptools-scm)) |
| 2519 | (propagated-inputs |
| 2520 | (list python-numpy |
| 2521 | python-scipy)) |
| 2522 | (home-page "https://github.com/pyamg/pyamg") |
| 2523 | (synopsis "Algebraic Multigrid Solvers in Python") |
| 2524 | (description "PyAMG is a Python library of Algebraic Multigrid |
| 2525 | (AMG) solvers. It features implementations of: |
| 2526 | @itemize |
| 2527 | @item Ruge-Stuben (RS) or Classical AMG |
| 2528 | @item AMG based on Smoothed Aggregation (SA) |
| 2529 | @item Adaptive Smoothed Aggregation (αSA) |
| 2530 | @item Compatible Relaxation (CR) |
| 2531 | @item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc. |
| 2532 | @end itemize") |
| 2533 | (license license:expat))) |
| 2534 | |
| 2535 | (define-public python-pyet |
| 2536 | (package |
| 2537 | (name "python-pyet") |
| 2538 | (version "1.3.1") |
| 2539 | (source |
| 2540 | (origin |
| 2541 | (method url-fetch) |
| 2542 | (uri (pypi-uri "pyet" version)) |
| 2543 | (sha256 |
| 2544 | (base32 "1dblsx0bv1g453hcx5vwij1zgankwgwvhwllqkn47k578h038xvy")))) |
| 2545 | (build-system pyproject-build-system) |
| 2546 | (native-inputs |
| 2547 | (list python-mock |
| 2548 | python-pytest |
| 2549 | python-setuptools |
| 2550 | python-wheel)) |
| 2551 | (propagated-inputs |
| 2552 | (list python-pandas |
| 2553 | python-xarray)) |
| 2554 | (home-page "https://github.com/pyet-org/pyet") |
| 2555 | (synopsis "Python package for evapotranspiration calculation") |
| 2556 | (description |
| 2557 | "This package provides a Python library for calculating |
| 2558 | Evapotranspiration using various standard methods.") |
| 2559 | (license license:expat))) |
| 2560 | |
| 2561 | (define-public python-pykdtree |
| 2562 | (package |
| 2563 | (name "python-pykdtree") |
| 2564 | (version "1.4.2") |
| 2565 | (source |
| 2566 | (origin |
| 2567 | (method url-fetch) |
| 2568 | (uri (pypi-uri "pykdtree" version)) |
| 2569 | (sha256 |
| 2570 | (base32 "1xb5xdp32s5ffcbbb6vlrj4i70hdknajvr9yhzx0wld52rx9caxx")))) |
| 2571 | (build-system pyproject-build-system) |
| 2572 | (arguments |
| 2573 | (list |
| 2574 | ;; FIXME: Tests are unable to import properly, but it seems to work in |
| 2575 | ;; real conditions. |
| 2576 | #:tests? #f |
| 2577 | #:phases |
| 2578 | #~(modify-phases %standard-phases |
| 2579 | (add-after 'install 'fix-site-packages |
| 2580 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2581 | (with-directory-excursion (site-packages inputs outputs) |
| 2582 | (for-each delete-file (find-files "." "test*")))))))) |
| 2583 | (native-inputs |
| 2584 | (list python-cython python-pytest python-setuptools python-wheel)) |
| 2585 | (propagated-inputs |
| 2586 | (list python-numpy)) |
| 2587 | (home-page "https://github.com/storpipfugl/pykdtree") |
| 2588 | (synopsis "Fast kd-tree implementation with OpenMP-enabled queries") |
| 2589 | (description |
| 2590 | "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour |
| 2591 | search in Python.") |
| 2592 | (license license:lgpl3+))) |
| 2593 | |
| 2594 | (define-public python-pynetdicom |
| 2595 | (package |
| 2596 | (name "python-pynetdicom") |
| 2597 | (version "2.1.1") |
| 2598 | (source (origin |
| 2599 | (method url-fetch) |
| 2600 | (uri (pypi-uri "pynetdicom" version)) |
| 2601 | (sha256 |
| 2602 | (base32 |
| 2603 | "1smzrnc93nmv8jz4np9knas74a46b1nhb3hjpf8n9vfpxypgnwcn")))) |
| 2604 | (build-system pyproject-build-system) |
| 2605 | (arguments |
| 2606 | (list |
| 2607 | #:test-flags |
| 2608 | ;; Tests takes about 10-15min to complete, and not thread save. |
| 2609 | ;; Skip tests that require networking. |
| 2610 | #~(list "-k" (string-append |
| 2611 | " not TestFindSCP" |
| 2612 | " and not TestQRGetServiceClass" |
| 2613 | " and not TestQRMoveServiceClass" |
| 2614 | " and not TestStoreSCP" |
| 2615 | " and not test_ae.py" |
| 2616 | " and not test_echoscp.py" |
| 2617 | " and not test_qrscp_echo.py" |
| 2618 | " and not test_storescp.py" |
| 2619 | " and not test_pr_level_patient" |
| 2620 | " and not test_pr_level_series" |
| 2621 | " and not test_scp_cancelled")))) |
| 2622 | (native-inputs (list python-numpydoc |
| 2623 | python-poetry-core |
| 2624 | python-pytest)) |
| 2625 | (propagated-inputs (list python-pydicom |
| 2626 | python-pyfakefs |
| 2627 | python-sqlalchemy)) |
| 2628 | (home-page "https://github.com/pydicom/pynetdicom") |
| 2629 | (synopsis "Python implementation of the DICOM networking protocol") |
| 2630 | (description |
| 2631 | "@code{pynetdicom} is a Python package that implements the DICOM |
| 2632 | networking protocol. It allows the easy creation of DICOM |
| 2633 | @acronym{SCUs,Service Class Users} and @acronym{SCPs,Service Class |
| 2634 | Providers}.") |
| 2635 | (license license:expat))) |
| 2636 | |
| 2637 | (define-public python-pyzx |
| 2638 | (package |
| 2639 | (name "python-pyzx") |
| 2640 | (version "0.9.0") |
| 2641 | (source |
| 2642 | (origin |
| 2643 | (method git-fetch) ; no tests in PyPI |
| 2644 | (uri (git-reference |
| 2645 | (url "https://github.com/zxcalc/pyzx") |
| 2646 | (commit (string-append "v" version)))) |
| 2647 | (file-name (git-file-name name version)) |
| 2648 | (sha256 |
| 2649 | (base32 "1bnmz08w1bmipir1wnn1k3fw64rply7891xns22qfj6yh0j1n6rj")))) |
| 2650 | (build-system pyproject-build-system) |
| 2651 | (arguments (list #:test-flags |
| 2652 | #~(list |
| 2653 | ;; Ignore long running tests |
| 2654 | "--ignore=tests/long_test.py" |
| 2655 | "--ignore=tests/long_scalar_test.py") |
| 2656 | #:phases |
| 2657 | #~(modify-phases %standard-phases |
| 2658 | (add-before 'check 'pre-check |
| 2659 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 2660 | (setenv "HOME" "/tmp") |
| 2661 | ;; Matplotlib needs to be able to write its |
| 2662 | ;; configuration file somewhere. |
| 2663 | (setenv "MPLCONFIGDIR" "/tmp")))))) |
| 2664 | (native-inputs (list python-pytest |
| 2665 | python-setuptools |
| 2666 | python-wheel)) |
| 2667 | (propagated-inputs (list python-ipywidgets |
| 2668 | python-lark |
| 2669 | python-numpy |
| 2670 | python-pyperclip |
| 2671 | python-tqdm)) |
| 2672 | (home-page "https://github.com/zxcalc/pyzx") |
| 2673 | (synopsis "Quantum circuit rewriting and optimisation using the ZX-calculus") |
| 2674 | (description |
| 2675 | "PyZX is a Python tool implementing the theory of ZX-calculus for the |
| 2676 | creation, visualisation, and automated rewriting of large-scale quantum |
| 2677 | circuits. PyZX currently allows you to: |
| 2678 | |
| 2679 | @itemize |
| 2680 | @item Read in quantum circuits in the file format of QASM, Quipper or Quantomatic; |
| 2681 | @item Rewrite circuits into a pseudo-normal form using the ZX-calculus; |
| 2682 | @item Extract new simplified circuits from these reduced graphs; |
| 2683 | @item Visualise the ZX-graphs and rewrites using either Matplotlib, Quantomatic |
| 2684 | or as a TikZ file for use in LaTeX documents; |
| 2685 | @item Output the optimised circuits in QASM, QC or QUIPPER format. |
| 2686 | @end itemize") |
| 2687 | (license license:asl2.0))) |
| 2688 | |
| 2689 | (define-public python-qdldl |
| 2690 | (package |
| 2691 | (name "python-qdldl") |
| 2692 | (version "0.1.7.post5") |
| 2693 | (source |
| 2694 | (origin |
| 2695 | (method url-fetch) |
| 2696 | (uri (pypi-uri "qdldl" version)) |
| 2697 | (sha256 |
| 2698 | (base32 "0vi8dgrw32qj03z2dd3zqd0d625pibq3xmlgmidfsnwvqkhrj4qb")))) |
| 2699 | (build-system pyproject-build-system) |
| 2700 | (native-inputs |
| 2701 | (list cmake-minimal |
| 2702 | pybind11-2 |
| 2703 | python-pytest |
| 2704 | python-setuptools)) |
| 2705 | (propagated-inputs (list python-numpy python-scipy)) |
| 2706 | (home-page "https://github.com/oxfordcontrol/qdldl-python/") |
| 2707 | (synopsis "QDLDL LDL factorization routine") |
| 2708 | (description "This package provides a Python interface to the QDLDL LDL |
| 2709 | factorization routine for quasi-definite linear system.") |
| 2710 | (license license:asl2.0))) |
| 2711 | |
| 2712 | (define-public python-quantities |
| 2713 | (package |
| 2714 | (name "python-quantities") |
| 2715 | (version "0.16.4") |
| 2716 | (source |
| 2717 | (origin |
| 2718 | (method url-fetch) |
| 2719 | (uri (pypi-uri "quantities" version)) |
| 2720 | (sha256 |
| 2721 | (base32 "0dmzk17hd0c6lzjlipjpc52jdifknpvxq15javn19n3f9yvxxdpm")))) |
| 2722 | (build-system pyproject-build-system) |
| 2723 | (arguments |
| 2724 | (list |
| 2725 | #:phases |
| 2726 | #~(modify-phases %standard-phases |
| 2727 | (add-before 'check 'pre-check |
| 2728 | (lambda _ |
| 2729 | (setenv "PY_IGNORE_IMPORTMISMATCH" "1")))))) |
| 2730 | (native-inputs |
| 2731 | (list python-pytest |
| 2732 | python-setuptools |
| 2733 | python-setuptools-scm)) |
| 2734 | (propagated-inputs |
| 2735 | (list python-numpy)) |
| 2736 | (home-page "https://github.com/python-quantities/python-quantities") |
| 2737 | (synopsis "Support for physical quantities with units, based on NumPy") |
| 2738 | (description |
| 2739 | "Quantities is designed to handle arithmetic and conversions of physical |
| 2740 | quantities, which have a magnitude, dimensionality specified by various units, |
| 2741 | and possibly an uncertainty. It builds on the NumPy library and is designed |
| 2742 | to work with @code{numpy.ufuncs}, many of which are already supported.") |
| 2743 | ;; OSI approved, BSD like, see doc/user/license.rst. |
| 2744 | (license license:bsd-3))) |
| 2745 | |
| 2746 | (define-public python-qutip |
| 2747 | (package |
| 2748 | (name "python-qutip") |
| 2749 | (version "5.2.2") |
| 2750 | (source |
| 2751 | (origin |
| 2752 | (method url-fetch) |
| 2753 | (uri (pypi-uri "qutip" version)) |
| 2754 | (sha256 |
| 2755 | (base32 "0rl4piaj13g7g5i9wgdqc60q59dhk4lr34hw8v7xgnw6wkhiflb2")) |
| 2756 | (modules '((guix build utils))) |
| 2757 | (snippet |
| 2758 | #~(begin |
| 2759 | (use-modules (ice-9 string-fun)) |
| 2760 | ;; Delete cythonized files. Not all cpp files are generated |
| 2761 | ;; by Cython, delete only those with accompanying Cython |
| 2762 | ;; file extensions (.pyx, .pxd). |
| 2763 | (for-each (lambda (file) |
| 2764 | (when (or-map |
| 2765 | (lambda (cython-ext) |
| 2766 | (file-exists? (string-replace-substring |
| 2767 | file ".cpp" cython-ext))) |
| 2768 | (list ".pyx" ".pxd")) |
| 2769 | (delete-file file))) |
| 2770 | (find-files "." ".cpp")))))) |
| 2771 | (build-system pyproject-build-system) |
| 2772 | (arguments |
| 2773 | (list |
| 2774 | ;; tests: 15987 passed, 167 skipped, 95 deselected, 5 xfailed, 71 warnings |
| 2775 | #:test-flags |
| 2776 | #~(list "-m" "not flaky and not slow" ;ignore flaky and slow tests |
| 2777 | "--ignore=tests/solver/") ;depends on loky |
| 2778 | #:phases |
| 2779 | #~(modify-phases %standard-phases |
| 2780 | (add-before 'check 'remove-local-source |
| 2781 | (lambda _ |
| 2782 | (copy-recursively "qutip/tests" "tests") |
| 2783 | (delete-file-recursively "qutip")))))) |
| 2784 | (native-inputs |
| 2785 | (list python-cython |
| 2786 | python-pytest |
| 2787 | python-pytest-rerunfailures |
| 2788 | python-setuptools)) |
| 2789 | (propagated-inputs |
| 2790 | (list python-numpy |
| 2791 | python-packaging |
| 2792 | python-scipy |
| 2793 | ;; [optional] |
| 2794 | python-cvxopt |
| 2795 | python-cvxpy |
| 2796 | ;; python-loky ;not packaged yet in Guix |
| 2797 | python-mpi4py |
| 2798 | python-mpmath |
| 2799 | python-tqdm)) |
| 2800 | (home-page "https://qutip.org") |
| 2801 | (synopsis "Quantum Toolbox in Python") |
| 2802 | (description |
| 2803 | "QuTiP is a library for simulating the dynamics of closed and open quantum |
| 2804 | systems. It aims to provide numerical simulations of a wide variety of quantum |
| 2805 | mechanical problems, including those with Hamiltonians and/or collapse operators |
| 2806 | with arbitrary time-dependence, commonly found in a wide range of physics |
| 2807 | applications.") |
| 2808 | (license license:bsd-3))) |
| 2809 | |
| 2810 | (define-public python-ruffus |
| 2811 | (package |
| 2812 | (name "python-ruffus") |
| 2813 | (version "2.8.4") |
| 2814 | (source |
| 2815 | (origin |
| 2816 | (method url-fetch) |
| 2817 | (uri (pypi-uri "ruffus" version)) |
| 2818 | (sha256 |
| 2819 | (base32 "1ai673k1s94s8b6pyxai8mk17p6zvvyi87rl236fs6ls8mpdklvc")))) |
| 2820 | (build-system pyproject-build-system) |
| 2821 | (arguments |
| 2822 | (list |
| 2823 | #:phases |
| 2824 | #~(modify-phases %standard-phases |
| 2825 | (replace 'check |
| 2826 | (lambda* (#:key tests? #:allow-other-keys) |
| 2827 | (when tests? |
| 2828 | (with-directory-excursion "ruffus/test" |
| 2829 | (invoke "bash" "run_all_unit_tests3.cmd")))))))) |
| 2830 | (native-inputs (list python-pytest python-setuptools)) |
| 2831 | (home-page "http://www.ruffus.org.uk") |
| 2832 | (synopsis "Light-weight computational pipeline management") |
| 2833 | (description |
| 2834 | "Ruffus is designed to allow scientific and other analyses to be |
| 2835 | automated with the minimum of fuss and the least effort.") |
| 2836 | (license license:expat))) |
| 2837 | |
| 2838 | (define-public python-salib |
| 2839 | (package |
| 2840 | (name "python-salib") |
| 2841 | (version "1.5.2") |
| 2842 | (source |
| 2843 | (origin |
| 2844 | (method git-fetch) |
| 2845 | (uri (git-reference |
| 2846 | (url "https://github.com/SALib/SALib") |
| 2847 | (commit (string-append "v" version)))) |
| 2848 | (file-name (git-file-name name version)) |
| 2849 | (sha256 |
| 2850 | (base32 "0v7l6qbxgclz644fq1vmakfasxcdhg1g019b5w47hlxqw8fx0ipl")))) |
| 2851 | (build-system pyproject-build-system) |
| 2852 | ;; tests: 190 passed, 1 xfailed, 28 warnings |
| 2853 | (native-inputs |
| 2854 | (list python-hatch-vcs |
| 2855 | python-hatchling |
| 2856 | python-pytest)) |
| 2857 | (propagated-inputs |
| 2858 | (list python-matplotlib |
| 2859 | python-multiprocess |
| 2860 | python-numpy |
| 2861 | python-pandas |
| 2862 | python-scipy)) |
| 2863 | (home-page "https://salib.readthedocs.io/en/latest/") |
| 2864 | (synopsis "Tools for global sensitivity analysis") |
| 2865 | (description "SALib provides tools for global sensitivity analysis. It |
| 2866 | contains Sobol', Morris, FAST, DGSM, PAWN, HDMR, Moment Independent and |
| 2867 | fractional factorial methods.") |
| 2868 | (license license:expat))) |
| 2869 | |
| 2870 | (define-public python-scikit-allel |
| 2871 | (package |
| 2872 | (name "python-scikit-allel") |
| 2873 | (version "1.3.13") |
| 2874 | (source |
| 2875 | (origin |
| 2876 | (method url-fetch) |
| 2877 | (uri (pypi-uri "scikit_allel" version)) |
| 2878 | (sha256 |
| 2879 | (base32 "0d9yadzhsjjqkh6rz273f53iwczk0c7pv9dajzcrmfnk036b8f4s")))) |
| 2880 | (build-system pyproject-build-system) |
| 2881 | (arguments |
| 2882 | (list |
| 2883 | #:test-flags |
| 2884 | '(list "-k" |
| 2885 | (string-append |
| 2886 | ;; AttributeError: 'Dataset' object has no attribute 'asstr' |
| 2887 | "not test_vcf_to_hdf5" |
| 2888 | " and not test_vcf_to_hdf5_exclude" |
| 2889 | " and not test_vcf_to_hdf5_rename" |
| 2890 | " and not test_vcf_to_hdf5_group" |
| 2891 | " and not test_vcf_to_hdf5_ann" |
| 2892 | ;; Does not work with recent hmmlearn |
| 2893 | " and not test_roh_mhmm_0pct" |
| 2894 | " and not test_roh_mhmm_100pct")) |
| 2895 | #:phases |
| 2896 | '(modify-phases %standard-phases |
| 2897 | (add-before 'check 'build-ext |
| 2898 | (lambda _ |
| 2899 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) |
| 2900 | (propagated-inputs |
| 2901 | (list python-dask python-numpy)) |
| 2902 | (native-inputs |
| 2903 | (list htslib |
| 2904 | python-cython |
| 2905 | python-h5py |
| 2906 | python-hmmlearn |
| 2907 | python-numexpr |
| 2908 | python-numpy |
| 2909 | python-pytest |
| 2910 | python-setuptools |
| 2911 | python-setuptools-scm |
| 2912 | python-wheel |
| 2913 | python-zarr)) |
| 2914 | (home-page "https://github.com/cggh/scikit-allel") |
| 2915 | (synopsis "Explore and analyze genetic variation data") |
| 2916 | (description |
| 2917 | "This package provides utilities for exploratory analysis of large scale |
| 2918 | genetic variation data.") |
| 2919 | (license license:expat))) |
| 2920 | |
| 2921 | (define-public python-scikit-build-core |
| 2922 | (package |
| 2923 | (name "python-scikit-build-core") |
| 2924 | (version "0.11.2") |
| 2925 | (source |
| 2926 | (origin |
| 2927 | (method url-fetch) |
| 2928 | (uri (pypi-uri "scikit_build_core" version)) |
| 2929 | (sha256 |
| 2930 | (base32 "0baaava7jvc69r5j803vjxvf2cnx0f3gjhqalipp7l4d1cgwg3vp")))) |
| 2931 | (build-system pyproject-build-system) |
| 2932 | ;; Tests are aborted with the admonition: "setup.py install is |
| 2933 | ;; deprecated. Use build and pip and other standards-based tools." |
| 2934 | (arguments (list #:tests? #false)) |
| 2935 | (propagated-inputs (list python-importlib-metadata |
| 2936 | python-importlib-resources |
| 2937 | python-packaging |
| 2938 | python-pathspec |
| 2939 | python-tomli |
| 2940 | python-typing-extensions)) |
| 2941 | (native-inputs (list pybind11-2 |
| 2942 | python-cattrs |
| 2943 | python-fastjsonschema |
| 2944 | python-hatch-fancy-pypi-readme |
| 2945 | python-hatch-vcs |
| 2946 | python-hatchling |
| 2947 | python-numpy |
| 2948 | python-pypa-build |
| 2949 | python-pytest |
| 2950 | python-pytest-subprocess |
| 2951 | python-rich |
| 2952 | python-setuptools |
| 2953 | python-setuptools-scm |
| 2954 | python-virtualenv |
| 2955 | python-wheel)) |
| 2956 | (home-page "https://github.com/scikit-build/scikit-build-core") |
| 2957 | (synopsis "Build backend for CMake based projects") |
| 2958 | (description "Scikit-build-core is a build backend for Python that uses |
| 2959 | CMake to build extension modules. It has a simple yet powerful static |
| 2960 | configuration system in pyproject.toml, and supports almost unlimited |
| 2961 | flexibility via CMake. It was initially developed to support the demanding |
| 2962 | needs of scientific users, but can build any sort of package that uses |
| 2963 | CMake.") |
| 2964 | (license license:asl2.0))) |
| 2965 | |
| 2966 | (define-public python-scikit-fem |
| 2967 | (package |
| 2968 | (name "python-scikit-fem") |
| 2969 | (version "11.0.0") |
| 2970 | (source |
| 2971 | (origin |
| 2972 | (method git-fetch) ; no tests in PyPI |
| 2973 | (uri (git-reference |
| 2974 | (url "https://github.com/kinnala/scikit-fem") |
| 2975 | (commit version))) |
| 2976 | (file-name (git-file-name name version)) |
| 2977 | (sha256 |
| 2978 | (base32 "13zh57raz2qcdfhsvpdlyiba5q0s0lh5b3gmsmh4cfrncrkdh6mh")))) |
| 2979 | (build-system pyproject-build-system) |
| 2980 | (arguments |
| 2981 | (list |
| 2982 | #:test-flags #~(list |
| 2983 | ;; Tests require Jax. |
| 2984 | "--ignore=tests/test_autodiff.py" |
| 2985 | "--ignore=tests/test_examples.py"))) |
| 2986 | (native-inputs |
| 2987 | (list python-autograd |
| 2988 | python-pyamg |
| 2989 | ;; python-jax ; not packed yet |
| 2990 | python-pytest |
| 2991 | python-shapely |
| 2992 | python-setuptools)) |
| 2993 | (propagated-inputs |
| 2994 | (list python-meshio |
| 2995 | python-numpy |
| 2996 | python-matplotlib |
| 2997 | python-scipy)) |
| 2998 | (home-page "https://scikit-fem.readthedocs.io/en/latest/") |
| 2999 | (synopsis "Library for performing finite element assembly") |
| 3000 | (description |
| 3001 | "@code{scikit-fem} is a library for performing finite element assembly. |
| 3002 | Its main purpose is the transformation of bilinear forms into sparse matrices |
| 3003 | and linear forms into vectors.") |
| 3004 | (license license:bsd-3))) |
| 3005 | |
| 3006 | (define-public python-scikit-fuzzy |
| 3007 | (package |
| 3008 | (name "python-scikit-fuzzy") |
| 3009 | (version "0.5.0") |
| 3010 | (source |
| 3011 | (origin |
| 3012 | (method url-fetch) |
| 3013 | (uri (pypi-uri "scikit_fuzzy" version)) |
| 3014 | (sha256 |
| 3015 | (base32 "0zsfyd8cpd2l82fwh3smxbwhb3bkqwlq17cbav53axma4c2k9r9f")))) |
| 3016 | (build-system pyproject-build-system) |
| 3017 | (arguments |
| 3018 | (list |
| 3019 | #:test-flags #~(list "--pyargs" "skfuzzy"))) |
| 3020 | (native-inputs |
| 3021 | (list python-pytest python-setuptools python-wheel)) |
| 3022 | (propagated-inputs |
| 3023 | (list python-networkx python-numpy python-scipy)) |
| 3024 | (home-page "https://github.com/scikit-fuzzy/scikit-fuzzy") |
| 3025 | (synopsis "Fuzzy logic toolkit for SciPy") |
| 3026 | (description |
| 3027 | "This package implements many useful tools for projects involving fuzzy |
| 3028 | logic, also known as grey logic.") |
| 3029 | (license license:bsd-3))) |
| 3030 | |
| 3031 | (define-public python-scikit-image |
| 3032 | (package |
| 3033 | (name "python-scikit-image") |
| 3034 | (version "0.26.0") |
| 3035 | (source |
| 3036 | (origin |
| 3037 | (method git-fetch) |
| 3038 | (uri (git-reference |
| 3039 | (url "https://github.com/scikit-image/scikit-image") |
| 3040 | (commit (string-append "v" version)))) |
| 3041 | (file-name (git-file-name name version)) |
| 3042 | (sha256 |
| 3043 | (base32 "1x90jad3jqin8ws1j1i89zrajpcbn1h87nl5yxxf5cs3b7ha13rf")))) |
| 3044 | (build-system pyproject-build-system) |
| 3045 | (arguments |
| 3046 | (list |
| 3047 | #:test-flags |
| 3048 | #~(list "--ignore=benchmarks/" |
| 3049 | ;; RuntimeWarning: divide by zero encountered in scalar divide |
| 3050 | ;; (see: |
| 3051 | ;; <https://github.com/scikit-image/scikit-image/issues/7348>). |
| 3052 | "-k" "not test_ellipse_parameter_stability"))) |
| 3053 | (propagated-inputs |
| 3054 | (list python-imageio |
| 3055 | python-lazy-loader |
| 3056 | python-networkx |
| 3057 | python-numpy |
| 3058 | python-packaging |
| 3059 | python-pillow |
| 3060 | python-scipy |
| 3061 | python-tifffile |
| 3062 | ;; [optional] |
| 3063 | ;; python-astropy |
| 3064 | ;; python-cloudpickle |
| 3065 | ;; python-dask |
| 3066 | ;; python-matplotlib |
| 3067 | ;; python-pooch |
| 3068 | ;; python-pyamg |
| 3069 | ;; python-pywavelets |
| 3070 | ;; python-scikit-learn |
| 3071 | #;python-simpleitk)) |
| 3072 | (native-inputs |
| 3073 | (list python-meson |
| 3074 | python-pytest |
| 3075 | python-pytest-localserver |
| 3076 | python-pytest-pretty |
| 3077 | python-pythran)) |
| 3078 | (home-page "https://scikit-image.org/") |
| 3079 | (synopsis "Image processing in Python") |
| 3080 | (description |
| 3081 | "Scikit-image is a collection of algorithms for image processing.") |
| 3082 | (license license:bsd-3))) |
| 3083 | |
| 3084 | (define-public python-scikit-misc |
| 3085 | (package |
| 3086 | (name "python-scikit-misc") |
| 3087 | (version "0.5.1") |
| 3088 | (source |
| 3089 | (origin |
| 3090 | (method url-fetch) |
| 3091 | (uri (pypi-uri "scikit_misc" version)) |
| 3092 | (sha256 |
| 3093 | (base32 "18sj7qa3kk4pqh3rzg2c64lf03nciv9cf985yh1h2kpqqndgdhf5")))) |
| 3094 | (build-system pyproject-build-system) |
| 3095 | (arguments |
| 3096 | (list |
| 3097 | #:test-flags |
| 3098 | '(list "--pyargs" "skmisc") |
| 3099 | #:phases |
| 3100 | #~(modify-phases %standard-phases |
| 3101 | (add-after 'unpack 'fix-pytest-config |
| 3102 | (lambda _ |
| 3103 | ;; Drop test coverage requirements. |
| 3104 | (substitute* "pyproject.toml" |
| 3105 | (("--cov(-[^ ]*)?=[^ ]*") "")))) |
| 3106 | (add-after 'unpack 'fix-version |
| 3107 | (lambda _ |
| 3108 | (call-with-output-file "skmisc/_version.py" |
| 3109 | (lambda (port) |
| 3110 | (display (string-append "__version__ = \"" #$version "\"") |
| 3111 | port))) |
| 3112 | (substitute* "meson.build" |
| 3113 | (("^ version: run_command.*") |
| 3114 | (string-append " version: '" #$version "',\n"))) |
| 3115 | (substitute* "pyproject.toml" |
| 3116 | (("dynamic = \\['version'\\]") |
| 3117 | (string-append "version = \"" #$version "\"")))))))) |
| 3118 | (native-inputs |
| 3119 | (list gfortran |
| 3120 | python-meson |
| 3121 | python-spin |
| 3122 | python-pytest |
| 3123 | python-setuptools)) |
| 3124 | (propagated-inputs |
| 3125 | (list python-numpy)) |
| 3126 | (home-page "https://has2k1.github.io/scikit-misc/stable") |
| 3127 | (synopsis "Miscellaneous tools for scientific computing.") |
| 3128 | (description "This package provides miscellaneous tools for data analysis |
| 3129 | and scientific computing.") |
| 3130 | (license license:bsd-3))) |
| 3131 | |
| 3132 | (define-public python-scikit-opt |
| 3133 | (package |
| 3134 | (name "python-scikit-opt") |
| 3135 | (version "0.6.6") |
| 3136 | (source |
| 3137 | (origin |
| 3138 | (method url-fetch) |
| 3139 | (uri (pypi-uri "scikit-opt" version)) |
| 3140 | (sha256 |
| 3141 | (base32 "0ycqizgsj7q57asc1bphzhf1fx9zqn0vx5rli7q541bas64hfqiy")))) |
| 3142 | (build-system pyproject-build-system) |
| 3143 | (native-inputs |
| 3144 | (list python-pytest |
| 3145 | python-setuptools)) |
| 3146 | (propagated-inputs |
| 3147 | (list python-numpy |
| 3148 | python-pytorch |
| 3149 | python-scipy)) |
| 3150 | (home-page "https://github.com/guofei9987/scikit-opt") |
| 3151 | (synopsis "Swarm intelligence algorithms in Python") |
| 3152 | (description |
| 3153 | "Scikit-opt (or sko) is a Python module implementing @dfn{swarm |
| 3154 | intelligence} algorithms: genetic algorithm, particle swarm optimization, |
| 3155 | simulated annealing, ant colony algorithm, immune algorithm, artificial fish |
| 3156 | swarm algorithm.") |
| 3157 | (license license:expat))) |
| 3158 | |
| 3159 | (define-public python-scikit-optimize |
| 3160 | ;; XXX: The project might be not maintained, see |
| 3161 | ;; <https://github.com/holgern/scikit-optimize/issues/6>. |
| 3162 | (package |
| 3163 | (name "python-scikit-optimize") |
| 3164 | (version "0.10.2") |
| 3165 | (source |
| 3166 | (origin |
| 3167 | (method git-fetch) |
| 3168 | (uri (git-reference |
| 3169 | (url "https://github.com/holgern/scikit-optimize") |
| 3170 | (commit (string-append "v" version)))) |
| 3171 | (file-name (git-file-name name version)) |
| 3172 | (sha256 |
| 3173 | (base32 "0pc6avzxz8l32km5jvv3maih0a5x2akxybvxl2hdg04qz2l0kz8b")))) |
| 3174 | (build-system pyproject-build-system) |
| 3175 | (arguments |
| 3176 | (list |
| 3177 | ;; tests: 398 passed, 1 skipped, 179 warnings |
| 3178 | #:test-flags |
| 3179 | #~(list "--numprocesses" (number->string (parallel-job-count)) |
| 3180 | "-k" (string-join |
| 3181 | ;; XXX: As the project is not actively maintained, review |
| 3182 | ;; failing test when a fresh release is available. |
| 3183 | (list "not test_acq_optimizer" |
| 3184 | "test_acq_optimizer_with_time_api" |
| 3185 | "test_categorical_init_vals" |
| 3186 | "test_consistent_x_iter_dimensions" |
| 3187 | "test_early_stopping_delta_x" |
| 3188 | "test_early_stopping_delta_x_empty_result_object" |
| 3189 | "test_early_stopping_delta_y" |
| 3190 | "test_early_stopping_delta_y_with_x0" |
| 3191 | "test_exhaust_initial_calls" |
| 3192 | "test_fixed_random_states" |
| 3193 | "test_init_points_and_models" |
| 3194 | "test_init_vals" |
| 3195 | "test_init_vals_and_models" |
| 3196 | "test_minimizer_api" |
| 3197 | "test_minimizer_api_random_only" |
| 3198 | "test_minimizer_space_constraint" |
| 3199 | "test_minimizer_with_space" |
| 3200 | "test_mixed_spaces" |
| 3201 | "test_optimizer_base_estimator_string_smoke" |
| 3202 | "test_optimizer_base_estimator_string_smoke_njobs" |
| 3203 | "test_per_second_api" |
| 3204 | "test_repeated_x" |
| 3205 | "test_tree_based_minimize") |
| 3206 | " and not ")))) |
| 3207 | (native-inputs |
| 3208 | (list python-pytest |
| 3209 | python-pytest-xdist |
| 3210 | python-setuptools)) |
| 3211 | (propagated-inputs |
| 3212 | (list python-joblib |
| 3213 | python-matplotlib |
| 3214 | python-numpy |
| 3215 | python-pyaml |
| 3216 | python-scikit-learn |
| 3217 | python-scipy)) |
| 3218 | (home-page "https://scikit-optimize.github.io/") |
| 3219 | (synopsis "Sequential model-based optimization toolbox") |
| 3220 | (description |
| 3221 | "Scikit-Optimize, or @code{skopt}, is a simple and efficient library to |
| 3222 | minimize (very) expensive and noisy black-box functions. It implements |
| 3223 | several methods for sequential model-based optimization. @code{skopt} aims to |
| 3224 | be accessible and easy to use in many contexts.") |
| 3225 | (license license:bsd-3))) |
| 3226 | |
| 3227 | (define-public python-scikit-surprise |
| 3228 | (package |
| 3229 | (name "python-scikit-surprise") |
| 3230 | (version "1.1.4") |
| 3231 | (source |
| 3232 | (origin |
| 3233 | (method git-fetch) |
| 3234 | (uri (git-reference |
| 3235 | (url "https://github.com/NicolasHug/Surprise") |
| 3236 | (commit (string-append "v" version)))) |
| 3237 | (file-name (git-file-name name version)) |
| 3238 | (sha256 |
| 3239 | (base32 "15ckx2i41vs21sa3yqyj12zr0h4zrcdf3lrwcy2c1cq2bjq7mnvz")))) |
| 3240 | (build-system pyproject-build-system) |
| 3241 | (arguments |
| 3242 | (list |
| 3243 | ;; tests: 82 passed |
| 3244 | #:phases |
| 3245 | #~(modify-phases %standard-phases |
| 3246 | (add-before 'sanity-check 'set-home |
| 3247 | (lambda _ |
| 3248 | ;; Change from /homeless-shelter to /tmp for write |
| 3249 | ;; permission. |
| 3250 | (setenv "HOME" "/tmp")))))) |
| 3251 | (native-inputs |
| 3252 | (list python-cython |
| 3253 | python-pandas |
| 3254 | python-pytest |
| 3255 | python-setuptools)) |
| 3256 | (propagated-inputs |
| 3257 | (list python-joblib |
| 3258 | python-numpy-1 |
| 3259 | python-scikit-learn)) |
| 3260 | (home-page "https://surpriselib.com/") |
| 3261 | (synopsis "Recommender system library for Scikit-learn") |
| 3262 | (description |
| 3263 | "This package provides a Python library for building and analyzing |
| 3264 | recommender systems that deal with explicit rating data. It was designed with |
| 3265 | the following purposes in mind: |
| 3266 | @itemize |
| 3267 | @item Provide tools to handle downloaded or user-provided datasets. |
| 3268 | @item Provide ready-to-use prediction algorithms and similarity measures. |
| 3269 | @item Provide a base for creating custom algorithms. |
| 3270 | @item Provide tools to evaluate, analyse and compare algorithm performance. |
| 3271 | @item Provide documentation with precise details regarding library algorithms. |
| 3272 | @end itemize") |
| 3273 | (license license:bsd-3))) |
| 3274 | |
| 3275 | (define-public python-scikit-survival |
| 3276 | (package |
| 3277 | (name "python-scikit-survival") |
| 3278 | (version "0.26.0") |
| 3279 | (source |
| 3280 | (origin |
| 3281 | (method git-fetch) |
| 3282 | (uri (git-reference |
| 3283 | (url "https://github.com/sebp/scikit-survival") |
| 3284 | (commit (string-append "v" version)) |
| 3285 | ;; TODO: This package contains a copy of Eigen in |
| 3286 | ;; sksurv/linear_model/src. It would be good to figure out |
| 3287 | ;; how to use our own Eigen package. |
| 3288 | (recursive? #true))) |
| 3289 | (file-name (git-file-name name version)) |
| 3290 | (sha256 |
| 3291 | (base32 "0r0xi9saz247ph6bgrc3iknq0m60d8rs4sl4mdv4s1zja80w1cp8")))) |
| 3292 | (build-system pyproject-build-system) |
| 3293 | (arguments |
| 3294 | (list |
| 3295 | ;; tests: 1013 passed, 105 warnings |
| 3296 | #:test-flags |
| 3297 | #~(list "--durations=10" ;to help in spotting long running tests |
| 3298 | "--numprocesses" (number->string (min 4 (parallel-job-count)))))) |
| 3299 | (propagated-inputs |
| 3300 | (list python-ecos |
| 3301 | python-joblib |
| 3302 | python-numexpr |
| 3303 | python-numpy |
| 3304 | python-osqp |
| 3305 | python-pandas |
| 3306 | python-scikit-learn |
| 3307 | python-scipy)) |
| 3308 | (native-inputs |
| 3309 | (list python-cython |
| 3310 | python-packaging |
| 3311 | python-pytest |
| 3312 | python-pytest-xdist |
| 3313 | python-setuptools |
| 3314 | python-setuptools-scm)) |
| 3315 | (home-page "https://github.com/sebp/scikit-survival") |
| 3316 | (synopsis "Survival analysis built on top of scikit-learn") |
| 3317 | (description "Scikit-survival is a Python module for survival analysis |
| 3318 | built on top of scikit-learn. It allows doing survival analysis while |
| 3319 | utilizing the power of scikit-learn, e.g., for pre-processing or doing |
| 3320 | cross-validation.") |
| 3321 | (license license:gpl3+))) |
| 3322 | |
| 3323 | (define-public python-scipy |
| 3324 | (package |
| 3325 | (name "python-scipy") |
| 3326 | (version "1.16.3") |
| 3327 | ;; TODO: PyPI archive bundles extra in subprojects: |
| 3328 | ;; - https://github.com/boostorg/math |
| 3329 | ;; - https://github.com/scipy/HiGHS |
| 3330 | ;; - https://github.com/scipy/xsf |
| 3331 | ;; - qhull |
| 3332 | (source |
| 3333 | (origin |
| 3334 | (method url-fetch) |
| 3335 | (uri (pypi-uri "scipy" version)) |
| 3336 | (sha256 |
| 3337 | (base32 "1jxf6mjr3whbh23p8bnlcyiss5rsamq37qgys8xz8qi781cpds01")))) |
| 3338 | (build-system pyproject-build-system) |
| 3339 | (arguments |
| 3340 | (list |
| 3341 | ;; tests: 78689 passed, 4982 skipped, 319 xfailed, 19 xpassed, 2660 warnings |
| 3342 | #:configure-flags |
| 3343 | ''(("setup-args" . #("-Duse-system-libraries=all"))) |
| 3344 | #:test-flags |
| 3345 | #~(list "--durations=10" |
| 3346 | "--numprocesses" (number->string (min 4 (parallel-job-count))) |
| 3347 | "--pyargs" "scipy" |
| 3348 | "-k" (string-join |
| 3349 | ;; Network access is requied. |
| 3350 | (list "not test_ascent" |
| 3351 | "test_electrocardiogram" |
| 3352 | "test_existence_all" |
| 3353 | "test_face" |
| 3354 | ;; pycparser.ply.yacc.YaccError: Unable to build parser |
| 3355 | "test_callbacks" |
| 3356 | "test_bad_callbacks" |
| 3357 | ;; AssertionError: Items are not equal: ACTUAL: |
| 3358 | ;; np.complex128(inf+nanj) DESIRED: (inf+0j) |
| 3359 | "test_expm1_complex" |
| 3360 | ;; AssertionError: Not equal to tolerance rtol=1e-07, atol=0 |
| 3361 | "test_log1p_complex" |
| 3362 | ;; AssertionError: Not equal to tolerance rtol=5e-09, atol=0 |
| 3363 | "test_nctdtr_accuracy[3.0-5.0--2.0-1.5645373999149622e-09-5e-09]" |
| 3364 | ;; Bad results (X out of Y) for the following points |
| 3365 | ;; (in output 0): |
| 3366 | "test_spherical_in_complex" |
| 3367 | "test_spherical_jn_complex" |
| 3368 | "test_spherical_kn" |
| 3369 | "test_spherical_yn_complex" |
| 3370 | ;; Not equal to tolerance rtol=1e-07, atol=0 |
| 3371 | "test_negative_real_gh14582[spherical_in-False]" |
| 3372 | "test_negative_real_gh14582[spherical_in-True]" |
| 3373 | "test_negative_real_gh14582[spherical_jn-False]" |
| 3374 | "test_negative_real_gh14582[spherical_jn-True]" |
| 3375 | "test_negative_real_gh14582[spherical_yn-False]" |
| 3376 | "test_negative_real_gh14582[spherical_yn-True]" |
| 3377 | ;; Failed: DID NOT WARN. No warnings of type (<class |
| 3378 | ;; 'RuntimeWarning'>,) were emitted. |
| 3379 | "test_boost_eval_issue_14606") |
| 3380 | " and not ")) |
| 3381 | #:phases |
| 3382 | #~(modify-phases %standard-phases |
| 3383 | (add-after 'set-paths 'hide-gfortran |
| 3384 | ;; See: <https://issues.guix.gnu.org/73439#45>. |
| 3385 | (lambda* (#:key inputs #:allow-other-keys) |
| 3386 | (let ((gfortran #$(this-package-native-input "gfortran"))) |
| 3387 | (setenv "CPLUS_INCLUDE_PATH" |
| 3388 | (string-join |
| 3389 | (delete (string-append gfortran "/include/c++") |
| 3390 | (string-split (getenv "CPLUS_INCLUDE_PATH") #\:)) |
| 3391 | ":"))))) |
| 3392 | (replace 'check |
| 3393 | (lambda* (#:key test-flags tests? #:allow-other-keys) |
| 3394 | (when tests? |
| 3395 | ;; Step out of the source directory to avoid interference. |
| 3396 | ;; See: <.github/workflows/linux.yml> for any other posible |
| 3397 | ;; tests setup. |
| 3398 | (with-directory-excursion "/tmp" |
| 3399 | (setenv "HOME" "/tmp") |
| 3400 | (setenv "PYTHONOPTIMIZE" "2") |
| 3401 | (apply invoke "pytest" "-vv" test-flags)))))))) |
| 3402 | (native-inputs |
| 3403 | (list gfortran |
| 3404 | pkg-config |
| 3405 | python-click |
| 3406 | python-doit |
| 3407 | python-hypothesis |
| 3408 | python-meson |
| 3409 | python-mpmath |
| 3410 | python-numpydoc |
| 3411 | python-pooch |
| 3412 | python-pycodestyle |
| 3413 | python-pydevtool |
| 3414 | python-pytest |
| 3415 | python-pytest-timeout |
| 3416 | python-pytest-xdist |
| 3417 | python-pythran |
| 3418 | python-rich-click |
| 3419 | python-threadpoolctl |
| 3420 | python-typing-extensions)) |
| 3421 | (inputs |
| 3422 | (list boost-1.88 |
| 3423 | openblas |
| 3424 | pybind11-2 |
| 3425 | qhull |
| 3426 | xsimd)) |
| 3427 | (propagated-inputs |
| 3428 | (list python-numpy)) |
| 3429 | (home-page "https://scipy.org/") |
| 3430 | (synopsis "The Scipy library provides efficient numerical routines") |
| 3431 | (description "The SciPy library is one of the core packages that make up |
| 3432 | the SciPy stack. It provides many user-friendly and efficient numerical |
| 3433 | routines such as routines for numerical integration and optimization.") |
| 3434 | (license license:bsd-3))) |
| 3435 | |
| 3436 | (define-public python-simple-pid |
| 3437 | (package |
| 3438 | (name "python-simple-pid") |
| 3439 | (version "2.0.1") |
| 3440 | (source (origin |
| 3441 | (method url-fetch) |
| 3442 | (uri (pypi-uri "simple_pid" version)) |
| 3443 | (sha256 |
| 3444 | (base32 |
| 3445 | "17p9bgka5yv5lbnbk374yjccrlizm572wv3xb479072lahf7cwap")))) |
| 3446 | (build-system pyproject-build-system) |
| 3447 | (native-inputs |
| 3448 | (list python-pytest python-setuptools python-wheel)) |
| 3449 | (home-page "https://github.com/m-lundberg/simple-pid") |
| 3450 | (synopsis "Easy to use PID controller") |
| 3451 | (description "This package provides a simple and easy-to-use @acronym{PID, |
| 3452 | proportional-integral-derivative} controller.") |
| 3453 | (license license:expat))) |
| 3454 | |
| 3455 | (define-public python-snakemake-interface-common |
| 3456 | (package |
| 3457 | (name "python-snakemake-interface-common") |
| 3458 | (version "1.17.4") |
| 3459 | (source |
| 3460 | (origin |
| 3461 | (method git-fetch) |
| 3462 | (uri (git-reference |
| 3463 | (url "https://github.com/snakemake/snakemake-interface-common") |
| 3464 | (commit (string-append "v" version)))) |
| 3465 | (file-name (git-file-name name version)) |
| 3466 | (sha256 |
| 3467 | (base32 "19fyqs048zdvrmq5sdayzch850kwsyv2x6xn57cjjzcm4zpjrh9w")))) |
| 3468 | (build-system pyproject-build-system) |
| 3469 | (arguments |
| 3470 | (list #:phases |
| 3471 | #~(modify-phases %standard-phases |
| 3472 | (replace 'check |
| 3473 | (lambda* (#:key tests? #:allow-other-keys) |
| 3474 | (when tests? |
| 3475 | (invoke "python3" "tests/tests.py"))))))) |
| 3476 | (native-inputs (list python-poetry-core python-pytest)) |
| 3477 | (propagated-inputs (list python-argparse-dataclass python-configargparse)) |
| 3478 | (home-page "https://github.com/snakemake/snakemake-interface-common") |
| 3479 | (synopsis "Common functions and classes for Snakemake and its plugins") |
| 3480 | (description "This package provides common functions and classes |
| 3481 | for Snakemake and its plugins.") |
| 3482 | (license license:expat))) |
| 3483 | |
| 3484 | (define-public python-snakemake-interface-executor-plugins |
| 3485 | (package |
| 3486 | (name "python-snakemake-interface-executor-plugins") |
| 3487 | (version "9.3.3") |
| 3488 | (source |
| 3489 | (origin |
| 3490 | (method git-fetch) |
| 3491 | (uri (git-reference |
| 3492 | (url (string-append "https://github.com/snakemake/" |
| 3493 | "snakemake-interface-executor-plugins")) |
| 3494 | (commit (string-append "v" version)))) |
| 3495 | (file-name (git-file-name name version)) |
| 3496 | (sha256 |
| 3497 | (base32 "1kjjcgkk1rbavb687x5ayw35ayhsnhpg9262k317x911wqpsj2fm")))) |
| 3498 | (build-system pyproject-build-system) |
| 3499 | (arguments |
| 3500 | (list |
| 3501 | #:phases |
| 3502 | #~(modify-phases %standard-phases |
| 3503 | (replace 'check |
| 3504 | (lambda* (#:key tests? #:allow-other-keys) |
| 3505 | (when tests? |
| 3506 | (invoke "python3" "tests/tests.py"))))))) |
| 3507 | (propagated-inputs (list python-argparse-dataclass |
| 3508 | python-snakemake-interface-common |
| 3509 | python-throttler)) |
| 3510 | (native-inputs (list python-poetry-core python-pytest)) |
| 3511 | (home-page (string-append "https://github.com/snakemake/" |
| 3512 | "python-snakemake-interface-executor-plugins")) |
| 3513 | (synopsis "Interface for Snakemake executor plugins") |
| 3514 | (description |
| 3515 | "This package provides a stable interface for interactions between Snakemake and |
| 3516 | its executor plugins.") |
| 3517 | (license license:expat))) |
| 3518 | |
| 3519 | (define-public python-snakemake-interface-report-plugins |
| 3520 | (package |
| 3521 | (name "python-snakemake-interface-report-plugins") |
| 3522 | (version "1.1.0") |
| 3523 | (source |
| 3524 | (origin |
| 3525 | (method git-fetch) |
| 3526 | (uri (git-reference |
| 3527 | (url (string-append "https://github.com/snakemake/" |
| 3528 | "snakemake-interface-report-plugins")) |
| 3529 | (commit (string-append "v" version)))) |
| 3530 | (file-name (git-file-name name version)) |
| 3531 | (sha256 |
| 3532 | (base32 "0i6z9vk6nv2m3jsym0glrb7h9isdlfza2yq14vbqcslybdi9ykfa")))) |
| 3533 | (build-system pyproject-build-system) |
| 3534 | (arguments |
| 3535 | (list |
| 3536 | #:tests? #f ;circular dependency on snakemake |
| 3537 | #:phases |
| 3538 | #~(modify-phases %standard-phases |
| 3539 | (replace 'check |
| 3540 | (lambda* (#:key tests? #:allow-other-keys) |
| 3541 | (when tests? |
| 3542 | (invoke "python3" "tests/tests.py"))))))) |
| 3543 | (propagated-inputs (list python-snakemake-interface-common python-pytest)) |
| 3544 | (native-inputs (list python-poetry-core)) |
| 3545 | (home-page (string-append "https://github.com/snakemake/" |
| 3546 | "python-snakemake-interface-report-plugins")) |
| 3547 | (synopsis "Interface for Snakemake report plugins") |
| 3548 | (description "This package provides a stable interface for interactions |
| 3549 | between Snakemake and its report plugins.") |
| 3550 | (license license:expat))) |
| 3551 | |
| 3552 | (define-public python-snakemake-interface-software-deployment-plugins |
| 3553 | (package |
| 3554 | (name "python-snakemake-interface-software-deployment-plugins") |
| 3555 | (version "0.6.1") |
| 3556 | (source |
| 3557 | (origin |
| 3558 | (method git-fetch) |
| 3559 | (uri (git-reference |
| 3560 | (url (string-append "https://github.com/snakemake/" |
| 3561 | "snakemake-interface-software-deployment-plugins")) |
| 3562 | (commit (string-append "v" version)))) |
| 3563 | (file-name (git-file-name name version)) |
| 3564 | (sha256 |
| 3565 | (base32 "0b4kkznfyfck9f92pkimhyl13ljisfn67rsilm1a5inq2ywpmxba")))) |
| 3566 | (build-system pyproject-build-system) |
| 3567 | (arguments |
| 3568 | (list |
| 3569 | #:phases |
| 3570 | #~(modify-phases %standard-phases |
| 3571 | (replace 'check |
| 3572 | (lambda* (#:key tests? #:allow-other-keys) |
| 3573 | (when tests? |
| 3574 | (invoke "python3" "tests/tests.py"))))))) |
| 3575 | (propagated-inputs (list python-argparse-dataclass |
| 3576 | python-snakemake-interface-common)) |
| 3577 | (native-inputs (list python-poetry-core)) |
| 3578 | (home-page (string-append "https://github.com/snakemake/" |
| 3579 | "snakemake-interface-software-deployment-plugins")) |
| 3580 | (synopsis "Interface for Snakemake software deployment plugins") |
| 3581 | (description |
| 3582 | "This package provides a stable interface for interactions between Snakemake and |
| 3583 | its software deployment plugins.") |
| 3584 | (license license:expat))) |
| 3585 | |
| 3586 | (define-public python-snakemake-interface-storage-plugins |
| 3587 | (package |
| 3588 | (name "python-snakemake-interface-storage-plugins") |
| 3589 | (version "3.6.0") |
| 3590 | (source |
| 3591 | (origin |
| 3592 | (method git-fetch) |
| 3593 | (uri (git-reference |
| 3594 | (url (string-append "https://github.com/snakemake/" |
| 3595 | "snakemake-interface-storage-plugins")) |
| 3596 | (commit (string-append "v" version)))) |
| 3597 | (file-name (git-file-name name version)) |
| 3598 | (sha256 |
| 3599 | (base32 "1dh52nkvq9zhh28xmbbq74kzhzagcy48d3vgb39bd3ckjz8libgy")))) |
| 3600 | (build-system pyproject-build-system) |
| 3601 | (arguments |
| 3602 | (list |
| 3603 | #:tests? #f ;circular dependency on snakemake |
| 3604 | #:phases |
| 3605 | #~(modify-phases %standard-phases |
| 3606 | (add-after 'unpack 'relax-requirements |
| 3607 | (lambda _ |
| 3608 | (substitute* "pyproject.toml" |
| 3609 | (("wrapt = \".*\"") |
| 3610 | "wrapt = \"*\"")))) |
| 3611 | (replace 'check |
| 3612 | (lambda* (#:key tests? #:allow-other-keys) |
| 3613 | (when tests? |
| 3614 | (invoke "python3" "tests/tests.py"))))))) |
| 3615 | (propagated-inputs (list python-reretry python-snakemake-interface-common |
| 3616 | python-throttler python-wrapt)) |
| 3617 | (native-inputs (list python-poetry-core python-pytest)) |
| 3618 | (home-page (string-append "https://github.com/snakemake/" |
| 3619 | "snakemake-interface-storage-plugins")) |
| 3620 | (synopsis "Interface for Snakemake storage plugins") |
| 3621 | (description |
| 3622 | "This package provides a stable interface for interactions between |
| 3623 | Snakemake and its storage plugins.") |
| 3624 | (license license:expat))) |
| 3625 | |
| 3626 | (define-public python-snakemake-executor-plugin-slurm-jobstep |
| 3627 | (package |
| 3628 | (name "python-snakemake-executor-plugin-slurm-jobstep") |
| 3629 | (version "0.3.0") |
| 3630 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep") |
| 3631 | (source |
| 3632 | (origin |
| 3633 | (method git-fetch) |
| 3634 | (uri (git-reference |
| 3635 | (url home-page) |
| 3636 | (commit (string-append "v" version)))) |
| 3637 | (file-name (git-file-name name version)) |
| 3638 | (sha256 |
| 3639 | (base32 "0ly15ywmbfcm5z7jy7dxiidpw3immsdd2k80vrm4pza721irxcar")))) |
| 3640 | (build-system pyproject-build-system) |
| 3641 | (arguments |
| 3642 | (list #:phases |
| 3643 | #~(modify-phases %standard-phases |
| 3644 | (replace 'check |
| 3645 | (lambda* (#:key tests? #:allow-other-keys) |
| 3646 | (when tests? |
| 3647 | (invoke "python3" "tests/tests.py"))))))) |
| 3648 | (native-inputs (list python-poetry-core |
| 3649 | snakemake)) |
| 3650 | (synopsis "Snakemake executor plugin: slurm-jobstep") |
| 3651 | (description "A Snakemake executor plugin for running srun jobs inside of |
| 3652 | SLURM jobs (meant for internal use by python-snakemake-executor-plugin-slurm).") |
| 3653 | (license license:expat))) |
| 3654 | |
| 3655 | (define-public python-snakemake-executor-plugin-slurm |
| 3656 | (package |
| 3657 | (name "python-snakemake-executor-plugin-slurm") |
| 3658 | (version "1.7.0") |
| 3659 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm/") |
| 3660 | (source |
| 3661 | (origin |
| 3662 | (method git-fetch) |
| 3663 | (uri (git-reference |
| 3664 | (url home-page) |
| 3665 | (commit (string-append "v" version)))) |
| 3666 | (file-name (git-file-name name version)) |
| 3667 | (sha256 |
| 3668 | (base32 "0x7ghrkvmxqbcjl69hxp5axa1av3s0mdc0i9xjg8qjnd3hgd82r3")))) |
| 3669 | (build-system pyproject-build-system) |
| 3670 | (arguments |
| 3671 | (list #:phases |
| 3672 | #~(modify-phases %standard-phases |
| 3673 | (replace 'check |
| 3674 | (lambda* (#:key tests? #:allow-other-keys) |
| 3675 | (when tests? |
| 3676 | (invoke "python3" "tests/tests.py"))))))) |
| 3677 | (native-inputs (list python-pandas |
| 3678 | python-poetry-core |
| 3679 | python-pytest |
| 3680 | python-snakemake-executor-plugin-slurm-jobstep |
| 3681 | snakemake)) |
| 3682 | (synopsis "Snakemake executor plugin: slurm") |
| 3683 | (description "A Snakemake executor plugin for running SLURM jobs.") |
| 3684 | (license license:expat))) |
| 3685 | |
| 3686 | (define-public python-sparse |
| 3687 | (package |
| 3688 | (name "python-sparse") |
| 3689 | (version "0.15.5") |
| 3690 | (source |
| 3691 | (origin |
| 3692 | (method url-fetch) |
| 3693 | (uri (pypi-uri "sparse" version)) |
| 3694 | (sha256 |
| 3695 | (base32 |
| 3696 | "0rp29gp82qwwkq210pzh2qmlqhi2007nb7p7nwqmrkgmjq6cwxjc")))) |
| 3697 | (build-system pyproject-build-system) |
| 3698 | (propagated-inputs |
| 3699 | (list python-numba python-numpy python-scipy)) |
| 3700 | (native-inputs |
| 3701 | (list python-dask |
| 3702 | python-pytest |
| 3703 | python-pytest-cov |
| 3704 | python-setuptools |
| 3705 | python-setuptools-scm |
| 3706 | python-wheel)) |
| 3707 | (home-page "https://github.com/pydata/sparse/") |
| 3708 | (synopsis "Library for multi-dimensional sparse arrays") |
| 3709 | (description |
| 3710 | "This package implements sparse arrays of arbitrary dimension on top of |
| 3711 | @code{numpy} and @code{scipy.sparse}. Sparse array is a matrix in which most |
| 3712 | of the elements are zero. @code{python-sparse} generalizes the |
| 3713 | @code{scipy.sparse.coo_matrix} and @code{scipy.sparse.dok_matrix} layouts, but |
| 3714 | extends beyond just rows and columns to an arbitrary number of dimensions. |
| 3715 | Additionally, this project maintains compatibility with the |
| 3716 | @code{numpy.ndarray} interface rather than the @code{numpy.matrix} interface |
| 3717 | used in @code{scipy.sparse}. These differences make this project useful in |
| 3718 | certain situations where @code{scipy.sparse} matrices are not well suited, but |
| 3719 | it should not be considered a full replacement. It lacks layouts that are not |
| 3720 | easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and |
| 3721 | depends on @code{scipy.sparse} for some computations.") |
| 3722 | (license license:bsd-3))) |
| 3723 | |
| 3724 | (define-public python-tdda |
| 3725 | (package |
| 3726 | (name "python-tdda") |
| 3727 | (version "2.2.17") |
| 3728 | (source |
| 3729 | (origin |
| 3730 | (method url-fetch) |
| 3731 | (uri (pypi-uri "tdda" version)) |
| 3732 | (sha256 |
| 3733 | (base32 "1l2ph60m20ii4ljgd81wccpp5p8p2m81irr97k7850s2l1qnikcw")))) |
| 3734 | (build-system pyproject-build-system) |
| 3735 | (arguments |
| 3736 | (list |
| 3737 | ;; tests: 276 passed, 14 skipped, 2 deselected |
| 3738 | #:test-flags |
| 3739 | #~(list |
| 3740 | ;; One test fails with error: AssertionError: False is not true : 5 |
| 3741 | ;; lines are different, starting at line 1 |
| 3742 | "--deselect=tdda/test_tdda.py::TestOne::test_ddiff_values_output" |
| 3743 | ;; TypeError: 'property' object is not iterable |
| 3744 | "--deselect=tdda/test_tdda.py::TestPandasDataFrames::test_types_match") |
| 3745 | #:phases |
| 3746 | #~(modify-phases %standard-phases |
| 3747 | ;; "datetime.UTC" is not availalbe in Python 3.10 but in |
| 3748 | ;; 3.11 it's present |
| 3749 | ;; <https://docs.python.org/3/library/datetime.html#datetime.UTC>. |
| 3750 | (add-after 'unpack 'fix-Python3.11-datetime.UTC |
| 3751 | (lambda _ |
| 3752 | (substitute* (find-files "." "\\.py") |
| 3753 | (("datetime.UTC") |
| 3754 | "datetime.timezone.utc"))))))) |
| 3755 | (native-inputs |
| 3756 | (list python-numpy |
| 3757 | python-chardet |
| 3758 | python-pandas |
| 3759 | python-pyarrow |
| 3760 | python-pytest |
| 3761 | python-rich |
| 3762 | python-setuptools)) |
| 3763 | (home-page "https://www.stochasticsolutions.com") |
| 3764 | (synopsis "Test-driven data analysis library for Python") |
| 3765 | (description |
| 3766 | "The TDDA Python module provides command-line and Python API support |
| 3767 | for the overall process of data analysis, through tools that perform |
| 3768 | reference testing, constraint discovery for data, automatic inference |
| 3769 | of regular expressions from text data and automatic test generation.") |
| 3770 | (license license:expat))) ; MIT License |
| 3771 | |
| 3772 | (define-public python-traittypes |
| 3773 | (package |
| 3774 | (name "python-traittypes") |
| 3775 | (version "0.2.1") |
| 3776 | (source |
| 3777 | (origin |
| 3778 | (method url-fetch) |
| 3779 | (uri (pypi-uri "traittypes" version)) |
| 3780 | (sha256 |
| 3781 | (base32 "1mlv93irdrgxrhnhq3ksi9585d55bpi4mv9dha4p8gkkjiia4vxy")))) |
| 3782 | (build-system pyproject-build-system) |
| 3783 | (arguments |
| 3784 | (list |
| 3785 | ;; This one test fails because it doesn't raise an expected exception. |
| 3786 | #:test-flags '(list "-k" "not test_bad_values") |
| 3787 | #:phases |
| 3788 | '(modify-phases %standard-phases |
| 3789 | (add-after 'unpack 'numpy-compatibility |
| 3790 | (lambda _ |
| 3791 | (substitute* "traittypes/tests/test_traittypes.py" |
| 3792 | (("np\\.int") "int"))))))) |
| 3793 | (propagated-inputs (list python-traitlets)) |
| 3794 | (native-inputs |
| 3795 | (list python-numpy |
| 3796 | python-pandas |
| 3797 | python-pynose |
| 3798 | python-pytest |
| 3799 | python-setuptools |
| 3800 | python-xarray)) |
| 3801 | (home-page "https://github.com/jupyter-widgets/traittypes") |
| 3802 | (synopsis "Trait types for NumPy, SciPy and friends") |
| 3803 | (description "The goal of this package is to provide a reference |
| 3804 | implementation of trait types for common data structures used in the scipy |
| 3805 | stack such as numpy arrays or pandas and xarray data structures. These are |
| 3806 | out of the scope of the main traitlets project but are a common requirement to |
| 3807 | build applications with traitlets in combination with the scipy stack.") |
| 3808 | (license license:bsd-3))) |
| 3809 | |
| 3810 | (define-public python-trimesh |
| 3811 | (package |
| 3812 | (name "python-trimesh") |
| 3813 | (version "4.5.3") |
| 3814 | (source |
| 3815 | (origin |
| 3816 | (method git-fetch) ; no tests in PyPI |
| 3817 | (uri (git-reference |
| 3818 | (url "https://github.com/mikedh/trimesh") |
| 3819 | (commit version))) |
| 3820 | (file-name (git-file-name name version)) |
| 3821 | (sha256 |
| 3822 | (base32 "17fyapp8nffnnf95bmcvllvg41fjlpvlv6qndbm048hnyayixxld")))) |
| 3823 | (build-system pyproject-build-system) |
| 3824 | (arguments |
| 3825 | (list |
| 3826 | #:test-flags |
| 3827 | ;; XXX: When more optional modules are available review |
| 3828 | ;; disabled tests once again. |
| 3829 | ;; |
| 3830 | ;; Disable tests requiring optional, not packed modules. |
| 3831 | #~(list "-k" (string-join |
| 3832 | (list "not test_bezier_example" |
| 3833 | "test_discrete" |
| 3834 | "test_dxf" |
| 3835 | "test_ply_path_bezier" |
| 3836 | "test_ply_path_line" |
| 3837 | "test_ply_path_multi" |
| 3838 | "test_revolve" |
| 3839 | "test_screw" |
| 3840 | "test_simple_closed" |
| 3841 | "test_simple_extrude" |
| 3842 | "test_simple_open" |
| 3843 | "test_slice_onplane" |
| 3844 | "test_spline_3D" |
| 3845 | "test_svg" |
| 3846 | ;; Following tests require network: |
| 3847 | "test_fuze" |
| 3848 | "test_remote") |
| 3849 | " and not ")) |
| 3850 | #:phases |
| 3851 | #~(modify-phases %standard-phases |
| 3852 | ;; XXX: It struggles to load and fails with error: AttributeError: |
| 3853 | ;; module 'trimesh' has no attribute '__main__'. |
| 3854 | (delete 'sanity-check)))) |
| 3855 | (native-inputs |
| 3856 | (list python-pyinstrument |
| 3857 | python-pytest)) |
| 3858 | (propagated-inputs |
| 3859 | (list ;; python-cascadio ; not packed yet, optional |
| 3860 | python-chardet |
| 3861 | python-colorlog |
| 3862 | python-httpx |
| 3863 | python-jsonschema |
| 3864 | python-lxml |
| 3865 | ;; python-mapbox-earcut ; not packed yet, optional |
| 3866 | ;; python-manifold3d ; not packed yet, optional |
| 3867 | python-meshio |
| 3868 | python-networkx |
| 3869 | python-numpy |
| 3870 | ;; python-openctm ; not packed yet, optional |
| 3871 | python-pillow |
| 3872 | python-psutil |
| 3873 | python-pycollada |
| 3874 | python-pyglet |
| 3875 | python-requests |
| 3876 | python-rtree |
| 3877 | python-scikit-image |
| 3878 | python-scipy |
| 3879 | python-setuptools |
| 3880 | python-shapely |
| 3881 | ;; python-svg-path ; not packed yet, optional |
| 3882 | python-sympy |
| 3883 | ;; python-vhacdx ; not packed yet, optional |
| 3884 | ;; python-xatlas ; not packed yet, optional |
| 3885 | python-xxhash)) |
| 3886 | (home-page "https://github.com/mikedh/trimesh") |
| 3887 | (synopsis "Python library for loading and using triangular meshes") |
| 3888 | (description |
| 3889 | "Trimesh is a pure Python library for loading and using triangular meshes |
| 3890 | with an emphasis on watertight surfaces. The goal of the library is to |
| 3891 | provide a full featured and well tested Trimesh object which allows for easy |
| 3892 | manipulation and analysis, in the style of the Polygon object in the Shapely |
| 3893 | library.") |
| 3894 | (license license:expat))) |
| 3895 | |
| 3896 | (define-public python-tspex |
| 3897 | (package |
| 3898 | (name "python-tspex") |
| 3899 | ;; 0.6.3 is not tagged; must be this one, as it is the latest, from the |
| 3900 | ;; day of the release, and the commit message is "Bump to 0.6.3". |
| 3901 | (properties '((commit . "d393ff497b7c14d673e792bd6c84ddd734be1239") |
| 3902 | (revision . "0"))) |
| 3903 | (version (git-version "0.6.3" |
| 3904 | (assoc-ref properties 'revision) |
| 3905 | (assoc-ref properties 'commit))) |
| 3906 | (source |
| 3907 | (origin |
| 3908 | (method git-fetch) |
| 3909 | (uri (git-reference |
| 3910 | (url "https://github.com/apcamargo/tspex") |
| 3911 | (commit (assoc-ref properties 'commit)))) |
| 3912 | (file-name (git-file-name name version)) |
| 3913 | (sha256 |
| 3914 | (base32 "0khhnahhn0jp9y14q6wgq0xqadqszwn1iq3y562bhfmv09f4j1ik")))) |
| 3915 | (build-system pyproject-build-system) |
| 3916 | (arguments |
| 3917 | (list |
| 3918 | #:phases |
| 3919 | #~(modify-phases %standard-phases |
| 3920 | (add-after 'unpack 'remove-coverage |
| 3921 | (lambda _ |
| 3922 | (substitute* "pytest.ini" |
| 3923 | (("--cov.*") "")))) |
| 3924 | ;; The seaborn styles have different names. |
| 3925 | (add-after 'unpack 'fix-seaborn |
| 3926 | (lambda _ |
| 3927 | (substitute* (find-files "." ".py$") |
| 3928 | (("seaborn-") "seaborn-v0_8-"))))))) |
| 3929 | (native-inputs |
| 3930 | (list python-pytest |
| 3931 | python-setuptools)) |
| 3932 | (propagated-inputs |
| 3933 | (list python-matplotlib |
| 3934 | python-numpy |
| 3935 | python-pandas |
| 3936 | python-seaborn |
| 3937 | python-xlrd)) |
| 3938 | (home-page "https://apcamargo.github.io/tspex/") |
| 3939 | (synopsis "Calculate tissue-specificity metrics for gene expression") |
| 3940 | (description |
| 3941 | "This package provides a Python package for calculating |
| 3942 | tissue-specificity metrics for gene expression.") |
| 3943 | (license license:gpl3+))) |
| 3944 | |
| 3945 | (define-public python-pandas |
| 3946 | (package |
| 3947 | (name "python-pandas") |
| 3948 | (version "2.3.3") |
| 3949 | (source |
| 3950 | (origin |
| 3951 | (method git-fetch) |
| 3952 | (uri (git-reference |
| 3953 | (url "https://github.com/pandas-dev/pandas") |
| 3954 | (commit (string-append "v" version)))) |
| 3955 | (file-name (git-file-name name version)) |
| 3956 | (sha256 |
| 3957 | (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg")) |
| 3958 | (patches (search-patches "python-pandas-2-no-pytz_datetime.patch")))) |
| 3959 | (build-system pyproject-build-system) |
| 3960 | (arguments |
| 3961 | (list |
| 3962 | ;; tests: 174115 passed, 24224 skipped, 990 xfailed, 77 xpassed, 110 warnings |
| 3963 | #:test-flags |
| 3964 | #~(list "-m" (string-join |
| 3965 | (list "not db" "network" "single_cpu" "slow" "slow_arm") |
| 3966 | " and not ") |
| 3967 | "--numprocesses" (number->string (min 4 (parallel-job-count))) |
| 3968 | "-k" (string-join |
| 3969 | (list "not test_git_version" |
| 3970 | "test_parsing_tzlocal_deprecated" |
| 3971 | "test_show_versions_console") |
| 3972 | " and not ")) |
| 3973 | #:phases |
| 3974 | #~(modify-phases %standard-phases |
| 3975 | (add-after 'unpack 'version-set-by-guix |
| 3976 | (lambda _ |
| 3977 | (with-output-to-file "_version.py" |
| 3978 | (lambda _ |
| 3979 | (display |
| 3980 | (string-append "__version__ = \"" #$version "\"")))))) |
| 3981 | (replace 'check |
| 3982 | (lambda* (#:key inputs outputs test-flags tests? #:allow-other-keys) |
| 3983 | (when tests? |
| 3984 | (setenv "HOME" "/tmp") |
| 3985 | (with-directory-excursion |
| 3986 | (string-append (string-append (site-packages inputs outputs) |
| 3987 | "/pandas")) |
| 3988 | (apply invoke "pytest" "-vv" test-flags)))))))) |
| 3989 | (propagated-inputs |
| 3990 | (list python-numpy |
| 3991 | python-dateutil |
| 3992 | python-pytz |
| 3993 | python-tzdata |
| 3994 | ;; XXX: Pandas lists a lot of optional dependencies which are not |
| 3995 | ;; hard requirements, leave them listed here and commented out for |
| 3996 | ;; the reference purpose. Try to keep closure as bare minimal as |
| 3997 | ;; possible. |
| 3998 | ;; |
| 3999 | ;; [optional] |
| 4000 | ;; python-adbc-driver-postgresql |
| 4001 | ;; python-adbc-driver-sqlite |
| 4002 | ;; python-beautifulsoup4 |
| 4003 | ;; python-bottleneck |
| 4004 | ;; python-fastparquet |
| 4005 | ;; python-fsspec |
| 4006 | ;; python-gcsfs |
| 4007 | ;; python-html5lib |
| 4008 | ;; python-hypothesis |
| 4009 | ;; python-jinja2 |
| 4010 | ;; python-lxml |
| 4011 | ;; python-matplotlib |
| 4012 | ;; python-numba |
| 4013 | ;; python-numexpr |
| 4014 | ;; python-odfpy |
| 4015 | ;; python-openpyxl |
| 4016 | ;; python-psycopg2 |
| 4017 | ;; python-pyarrow |
| 4018 | ;; python-pyiceberg |
| 4019 | ;; python-pymysql |
| 4020 | ;; python-pyqt5 |
| 4021 | ;; python-pyreadstat |
| 4022 | ;; python-python-calamine |
| 4023 | ;; python-pytz |
| 4024 | ;; python-pyxlsb |
| 4025 | ;; python-qtpy |
| 4026 | ;; python-s3fs |
| 4027 | ;; python-scipy |
| 4028 | ;; python-sqlalchemy |
| 4029 | ;; python-tables |
| 4030 | ;; python-tabulate |
| 4031 | ;; python-xarray |
| 4032 | ;; python-xlrd |
| 4033 | ;; python-xlsxwriter |
| 4034 | #;python-zstandard)) |
| 4035 | (inputs |
| 4036 | (list xclip xsel)) |
| 4037 | (native-inputs |
| 4038 | (list python-meson |
| 4039 | python-lxml |
| 4040 | python-pytest |
| 4041 | python-pytest-asyncio |
| 4042 | python-pytest-xdist |
| 4043 | python-versioneer |
| 4044 | tzdata-for-tests)) |
| 4045 | (home-page "https://pandas.pydata.org") |
| 4046 | (synopsis "Data structures for data analysis, time series, and statistics") |
| 4047 | (description |
| 4048 | "Pandas is a Python package providing fast, flexible, and expressive data |
| 4049 | structures designed to make working with structured (tabular, |
| 4050 | multidimensional, potentially heterogeneous) and time series data both easy |
| 4051 | and intuitive. It aims to be the fundamental high-level building block for |
| 4052 | doing practical, real world data analysis in Python.") |
| 4053 | (license license:bsd-3))) |
| 4054 | |
| 4055 | (define-public python-pandas-stubs |
| 4056 | (package |
| 4057 | (name "python-pandas-stubs") |
| 4058 | ;; The versioning follows that of Pandas and uses the date of the |
| 4059 | ;; python-pandas-stubs release. |
| 4060 | (version "2.3.3.251219") |
| 4061 | (source |
| 4062 | (origin |
| 4063 | (method git-fetch) |
| 4064 | (uri (git-reference |
| 4065 | (url "https://github.com/pandas-dev/pandas-stubs") |
| 4066 | (commit (string-append "v" version)))) |
| 4067 | (file-name (git-file-name name version)) |
| 4068 | (sha256 |
| 4069 | (base32 "1xh753wv5dbc59qp7fas323181mlblvhqmd9a4g7zzhaa2mxmzqs")))) |
| 4070 | (build-system pyproject-build-system) |
| 4071 | (arguments |
| 4072 | (list |
| 4073 | ;; tests: 1619 passed, 12 skipped, 7 deselected |
| 4074 | #:test-flags |
| 4075 | #~(list |
| 4076 | ;; ImportError: Missing optional dependency 'python-calamine'. |
| 4077 | "--deselect=tests/test_io.py::test_read_excel" |
| 4078 | "--deselect=tests/test_io.py::test_excel_reader"))) |
| 4079 | (native-inputs |
| 4080 | (list python-beautifulsoup4 |
| 4081 | python-fsspec |
| 4082 | python-html5lib |
| 4083 | python-jinja2 |
| 4084 | python-loguru |
| 4085 | python-lxml |
| 4086 | python-matplotlib |
| 4087 | python-mypy |
| 4088 | python-numexpr |
| 4089 | python-odfpy |
| 4090 | python-openpyxl |
| 4091 | python-pandas |
| 4092 | python-poetry-core |
| 4093 | python-pyarrow |
| 4094 | python-pyreadstat |
| 4095 | python-pytest |
| 4096 | python-scipy |
| 4097 | python-sqlalchemy-2 |
| 4098 | python-tabulate |
| 4099 | python-typing-extensions |
| 4100 | python-xarray |
| 4101 | python-xlrd |
| 4102 | python-xlsxwriter |
| 4103 | ;; Not packaged yet |
| 4104 | ;; |
| 4105 | ;; python-calamine |
| 4106 | ;; python-poethepoet |
| 4107 | ;; python-pyarrow-stubs |
| 4108 | ;; python-pyrefly |
| 4109 | ;; python-python-calamine |
| 4110 | ;; python-pyxlsb |
| 4111 | ;; python-scipy-stubs |
| 4112 | ;; python-ty |
| 4113 | ;; python-types-python-dateutil |
| 4114 | tzdata-for-tests)) |
| 4115 | (propagated-inputs |
| 4116 | (list python-numpy |
| 4117 | python-types-pytz)) |
| 4118 | (home-page "https://pandas.pydata.org") |
| 4119 | (synopsis "Type annotations for pandas") |
| 4120 | (description |
| 4121 | "This package contains public type stubs for @code{python-pandas}, following |
| 4122 | the convention of providing stubs in a separate package, as specified in |
| 4123 | @acronym{PEP, Python Enhancement Proposal} 561. The stubs cover the most |
| 4124 | typical use cases of @code{python-pandas}. In general, these stubs are |
| 4125 | narrower than what is possibly allowed by @code{python-pandas}, but follow a |
| 4126 | convention of suggesting best recommended practices for using |
| 4127 | @code{python-pandas}.") |
| 4128 | (license license:bsd-3))) |
| 4129 | |
| 4130 | (define-public python-pandarallel |
| 4131 | (package |
| 4132 | (name "python-pandarallel") |
| 4133 | (version "1.6.5") |
| 4134 | (source |
| 4135 | (origin |
| 4136 | (method git-fetch) ; no tests in PyPI |
| 4137 | (uri (git-reference |
| 4138 | (url "https://github.com/nalepae/pandarallel/") |
| 4139 | (commit (string-append "v" version)))) |
| 4140 | (file-name (git-file-name name version)) |
| 4141 | (sha256 |
| 4142 | (base32 "0r2wlxlwp4wia0vm15k4cp421mwa20k4k5g2ml01inprj8bl1p0p")))) |
| 4143 | (build-system pyproject-build-system) |
| 4144 | (arguments |
| 4145 | (list |
| 4146 | #:test-flags #~(list "-n" (number->string (parallel-job-count))))) |
| 4147 | (propagated-inputs |
| 4148 | (list python-dill |
| 4149 | python-pandas |
| 4150 | python-psutil)) |
| 4151 | (native-inputs |
| 4152 | (list python-mkdocs-material |
| 4153 | python-numpy |
| 4154 | python-pytest |
| 4155 | python-pytest-cov |
| 4156 | python-pytest-xdist |
| 4157 | python-setuptools |
| 4158 | python-wheel)) |
| 4159 | (home-page "https://nalepae.github.io/pandarallel/") |
| 4160 | (synopsis "Tool to parallelize Pandas operations across CPUs") |
| 4161 | (description |
| 4162 | "@code{pandarallel} allows any Pandas user to take advantage of their |
| 4163 | multi-core computer, while Pandas uses only one core. @code{pandarallel} also |
| 4164 | offers nice progress bars (available on Notebook and terminal) to get an rough |
| 4165 | idea of the remaining amount of computation to be done.") |
| 4166 | (license license:bsd-3))) |
| 4167 | |
| 4168 | (define-public python-pandera |
| 4169 | (package |
| 4170 | (name "python-pandera") |
| 4171 | (version "0.27.1") |
| 4172 | (source |
| 4173 | (origin |
| 4174 | (method url-fetch) |
| 4175 | (uri (pypi-uri "pandera" version)) |
| 4176 | (sha256 |
| 4177 | (base32 "1x5vjp1ra252ncyfsfrc7vck5snx807mpwzd0hvv0vpi9v096934")))) |
| 4178 | (build-system pyproject-build-system) |
| 4179 | (arguments |
| 4180 | (list |
| 4181 | ;; tests: 3033 passed, 51 skipped, 11 xfailed, 8385 warnings |
| 4182 | #:test-flags |
| 4183 | ;; With higher threads count tests randomly fail during collection. |
| 4184 | #~(list "--numprocesses" (number->string (min 4 (parallel-job-count))) |
| 4185 | ;; TODO: Ignore tests for not packaged python-ibis-framework, |
| 4186 | ;; python-polars, and python-pyspark. |
| 4187 | "--ignore=tests/ibis" |
| 4188 | "--ignore=tests/polars" |
| 4189 | "--ignore=tests/pyspark" |
| 4190 | ;; E ModuleNotFoundError: No module named 'sphinx' |
| 4191 | "--ignore=tests/pandas/test_docs_setting_column_widths.py" |
| 4192 | ;; Nework access is required. |
| 4193 | "--ignore=tests/fastapi/test_app.py" |
| 4194 | ;; TypeError: __class__ assignment: 'GeoDataFrame' object layout |
| 4195 | ;; differs from 'DataFrame' |
| 4196 | "-k" (string-join |
| 4197 | (list "not test_schema_model[data0-True]" |
| 4198 | "test_schema_from_dataframe[data1-True]" |
| 4199 | "test_schema_no_geometry" |
| 4200 | ;; The most of the tests from this goup XFAIL or fail. |
| 4201 | "test_pandas_stubs_false_positives") |
| 4202 | " and not ")))) |
| 4203 | (native-inputs |
| 4204 | (list python-joblib |
| 4205 | python-pytest |
| 4206 | python-pytest-asyncio |
| 4207 | python-pytest-xdist |
| 4208 | python-setuptools |
| 4209 | python-setuptools-scm |
| 4210 | python-uvicorn)) |
| 4211 | (inputs |
| 4212 | ;; [optional] |
| 4213 | ;; Pandera comes with a lot of extras. We test as many as possible, but do |
| 4214 | ;; not include all of them in the propagated-inputs. Currently, we have to |
| 4215 | ;; skip the pyspark and io tests due to missing packages python-pyspark |
| 4216 | ;; and python-frictionless. |
| 4217 | (list python-dask |
| 4218 | python-distributed |
| 4219 | python-geopandas |
| 4220 | python-hypothesis |
| 4221 | ;; python-ibis-framework ;missing from Guix |
| 4222 | python-modin |
| 4223 | python-numpy |
| 4224 | python-pandas |
| 4225 | ;; python-polars ;missing from Guix |
| 4226 | ;; python-pyspark ;missing from Guix |
| 4227 | ;; python-ray ;missing from Guix |
| 4228 | python-scipy |
| 4229 | python-shapely)) |
| 4230 | (propagated-inputs |
| 4231 | (list python-packaging |
| 4232 | python-pydantic |
| 4233 | python-typeguard |
| 4234 | python-typing-extensions |
| 4235 | python-typing-inspect)) |
| 4236 | (home-page "https://github.com/unionai-oss/pandera") |
| 4237 | (synopsis "Perform data validation on dataframe-like objects") |
| 4238 | (description |
| 4239 | "@code{python-pandera} provides a flexible and expressive API for |
| 4240 | performing data validation on dataframe-like objects to make data processing |
| 4241 | pipelines more readable and robust. Dataframes contain information that |
| 4242 | @code{python-pandera} explicitly validates at runtime. This is useful in |
| 4243 | production-critical data pipelines or reproducible research settings. With |
| 4244 | @code{python-pandera}, you can: |
| 4245 | |
| 4246 | @itemize |
| 4247 | @item Define a schema once and use it to validate different dataframe types. |
| 4248 | @item Check the types and properties of columns. |
| 4249 | @item Perform more complex statistical validation like hypothesis testing. |
| 4250 | @item Seamlessly integrate with existing data pipelines via function decorators. |
| 4251 | @item Define dataframe models with the class-based API with pydantic-style syntax. |
| 4252 | @item Synthesize data from schema objects for property-based testing. |
| 4253 | @item Lazily validate dataframes so that all validation rules are executed. |
| 4254 | @item Integrate with a rich ecosystem of tools like @code{python-pydantic}, |
| 4255 | @code{python-fastapi} and @code{python-mypy}. |
| 4256 | @end itemize") |
| 4257 | (license license:expat))) |
| 4258 | |
| 4259 | (define-public python-pyjanitor |
| 4260 | (package |
| 4261 | (name "python-pyjanitor") |
| 4262 | (version "0.32.5") |
| 4263 | (source |
| 4264 | (origin |
| 4265 | (method git-fetch) |
| 4266 | (uri (git-reference |
| 4267 | (url "https://github.com/pyjanitor-devs/pyjanitor") |
| 4268 | (commit (string-append "v" version)))) |
| 4269 | (file-name (git-file-name name version)) |
| 4270 | (sha256 |
| 4271 | (base32 "058w2mq42v55xkqv3cvxry53sj2qh1v64ad4gc5qb8a3is453a07")))) |
| 4272 | (build-system pyproject-build-system) |
| 4273 | ;; Pyjanitor has an extensive test suite. For quick debugging, the tests |
| 4274 | ;; marked turtle can be skipped using "-m" "not turtle". |
| 4275 | (arguments |
| 4276 | (list |
| 4277 | ;; tests: 1030 passed, 2 skipped, 42 xfailed, 6 xpassed, 594 warnings |
| 4278 | #:test-flags |
| 4279 | ;; The tests take quite long, so consider adding the "-n" line and |
| 4280 | ;; adding python-pytest-xdist to the native-inputs when testing. |
| 4281 | ;; However, the tests are not deterministic, enen they are enabled in |
| 4282 | ;; project's CI (.github/workflows/tests.yml), when ran with "-n, |
| 4283 | ;; --numprocesses" , so disable again before committing. |
| 4284 | #~(list ;; "--numprocesses" (number->string (min 8 (parallel-job-count))) |
| 4285 | ;; Test files are not included. |
| 4286 | "--ignore=tests/io/test_read_csvs.py" |
| 4287 | ;; Polars has not been packaged yet. |
| 4288 | "--ignore=tests/polars/" |
| 4289 | ;; PySpark has not been packaged yet. |
| 4290 | "--ignore=tests/spark/" |
| 4291 | ;; Tries to connect to the internet. |
| 4292 | "-k" (string-append "not test_is_connected" |
| 4293 | ;; Test files are not included. |
| 4294 | " and not test_read_commandline_bad_cmd" |
| 4295 | ;; XXX: Fatal Python error: Segmentation fault |
| 4296 | " and not test_maccs_keys_fingerprint" |
| 4297 | " and not test_morgan_fingerprint_counts" |
| 4298 | " and not test_morgan_fingerprint_bits" |
| 4299 | ;; AssertionError: DataFrame.iloc[:, 1] |
| 4300 | ;; (column name="cities") are different |
| 4301 | " and not test_various_sorted")) |
| 4302 | #:phases |
| 4303 | #~(modify-phases %standard-phases |
| 4304 | (add-before 'check 'set-env-ci |
| 4305 | (lambda _ |
| 4306 | ;; Some tests are skipped if the JANITOR_CI_MACHINE |
| 4307 | ;; variable is not set. |
| 4308 | (setenv "JANITOR_CI_MACHINE" "1")))))) |
| 4309 | (propagated-inputs (list python-multipledispatch |
| 4310 | python-natsort |
| 4311 | python-pandas-flavor |
| 4312 | python-scipy |
| 4313 | ;; [optional] |
| 4314 | python-biopython |
| 4315 | python-unyt)) |
| 4316 | (native-inputs (list python-numba |
| 4317 | python-openpyxl |
| 4318 | python-pytest |
| 4319 | ;;python-pytest-xdist ;only for -n when testing |
| 4320 | ;; TODO: Remove python-requests and inject its target |
| 4321 | ;; data to make the package behaviour reproducible. |
| 4322 | python-requests |
| 4323 | python-setuptools |
| 4324 | rdkit)) |
| 4325 | (home-page "https://github.com/pyjanitor-devs/pyjanitor") |
| 4326 | (synopsis "Tools for cleaning and transforming Pandas DataFrames") |
| 4327 | (description |
| 4328 | "@code{pyjanitor} provides a set of data cleaning routines for |
| 4329 | @code{pandas} DataFrames. These routines extend the method chaining API |
| 4330 | defined by @code{pandas} for a subset of its methods. Originally, this |
| 4331 | package was a port of the R package by the same name and it is inspired by the |
| 4332 | ease-of-use and expressiveness of the @code{dplyr} package.") |
| 4333 | (license license:expat))) |
| 4334 | |
| 4335 | (define-public python-pymcubes |
| 4336 | (package |
| 4337 | (name "python-pymcubes") |
| 4338 | (version "0.1.6") |
| 4339 | (source |
| 4340 | (origin |
| 4341 | (method git-fetch) ; no tests in PyPI |
| 4342 | (uri (git-reference |
| 4343 | (url "https://github.com/pmneila/PyMCubes") |
| 4344 | (commit (string-append "v" version)))) |
| 4345 | (file-name (git-file-name name version)) |
| 4346 | (sha256 |
| 4347 | (base32 "1v2qhc4pwanx6a8k843mbh45yk77n3w63sy5lzk5c3q4pkvfj1b9")))) |
| 4348 | (build-system pyproject-build-system) |
| 4349 | (arguments |
| 4350 | (list |
| 4351 | #:phases |
| 4352 | #~(modify-phases %standard-phases |
| 4353 | (add-before 'check 'prepare-test-environment |
| 4354 | (lambda _ |
| 4355 | ;; FileNotFoundError: [Errno 2] No such file or directory: |
| 4356 | ;; 'output/test.obj' |
| 4357 | (mkdir "output") |
| 4358 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) |
| 4359 | (native-inputs |
| 4360 | (list python-cython |
| 4361 | python-pytest |
| 4362 | python-setuptools |
| 4363 | python-wheel)) |
| 4364 | (propagated-inputs |
| 4365 | (list python-pycollada |
| 4366 | python-numpy |
| 4367 | python-scipy)) |
| 4368 | (home-page "https://github.com/pmneila/PyMCubes") |
| 4369 | (synopsis "Marching cubes for Python") |
| 4370 | (description |
| 4371 | "@code{PyMCubes} is an implementation of the marching cubes algorithm to |
| 4372 | extract iso-surfaces from volumetric data. The volumetric data can be given |
| 4373 | as a three-dimensional @code{NumPy} array or as a Python function @code{f(x, |
| 4374 | y, z)}.") |
| 4375 | (license license:bsd-3))) |
| 4376 | |
| 4377 | (define-public python-pythran |
| 4378 | (package |
| 4379 | (name "python-pythran") |
| 4380 | (version "0.17.0") |
| 4381 | (source |
| 4382 | (origin |
| 4383 | (method git-fetch) |
| 4384 | (uri (git-reference |
| 4385 | (url "https://github.com/serge-sans-paille/pythran") |
| 4386 | (commit (string-append "v" version)))) |
| 4387 | (file-name (git-file-name name version)) |
| 4388 | (sha256 |
| 4389 | (base32 "1rm9lfbz5qvah1m0rr5gaaahkf1gzwlw1ysvym2l2yh0clglav94")))) |
| 4390 | (build-system pyproject-build-system) |
| 4391 | (arguments |
| 4392 | (list |
| 4393 | ;; FIXME: find more reliable tests file(s), all tests from |
| 4394 | ;; test_typing.py fail with error: ModuleNotFoundError: No module named |
| 4395 | ;; 'distutils.msvccompiler'. |
| 4396 | #:tests? #f)) |
| 4397 | (native-inputs |
| 4398 | (list python-setuptools)) |
| 4399 | (propagated-inputs |
| 4400 | (list boost ;headers need to be available |
| 4401 | xsimd |
| 4402 | python-beniget |
| 4403 | python-gast |
| 4404 | python-numpy |
| 4405 | python-ply)) |
| 4406 | (home-page "https://github.com/serge-sans-paille/pythran") |
| 4407 | (synopsis "Ahead of Time compiler for numeric kernels") |
| 4408 | (description |
| 4409 | "Pythran is an ahead of time compiler for a subset of the Python |
| 4410 | language, with a focus on scientific computing. It takes a Python module |
| 4411 | annotated with a few interface descriptions and turns it into a native |
| 4412 | Python module with the same interface, but (hopefully) faster.") |
| 4413 | (license license:bsd-3))) |
| 4414 | |
| 4415 | (define-public python-pyts |
| 4416 | (let ((commit "4f3d97bcb1016d33dbfaef68c0931756a4552410") |
| 4417 | (revision "0")) |
| 4418 | (package |
| 4419 | (name "python-pyts") |
| 4420 | (version (git-version "0.13.0" revision commit)) |
| 4421 | (source |
| 4422 | (origin |
| 4423 | (method git-fetch) |
| 4424 | (uri (git-reference |
| 4425 | (url "https://github.com/johannfaouzi/pyts") |
| 4426 | (commit commit))) |
| 4427 | (file-name (git-file-name name version)) |
| 4428 | (sha256 |
| 4429 | (base32 "16hlxwajdz44qs8vi7bhiania2b3201fv3pqiwsx79rb554bvl66")))) |
| 4430 | (build-system pyproject-build-system) |
| 4431 | (arguments |
| 4432 | (list |
| 4433 | #:test-flags |
| 4434 | #~(list "--pyargs" "pyts" |
| 4435 | ;; Most likely a flaky test. |
| 4436 | "--deselect=preprocessing/transformer.py::\ |
| 4437 | pyts.preprocessing.transformer.QuantileTransformer"))) |
| 4438 | (propagated-inputs |
| 4439 | (list python-joblib |
| 4440 | python-numba |
| 4441 | python-numpy |
| 4442 | python-scikit-learn |
| 4443 | python-scipy)) |
| 4444 | (native-inputs |
| 4445 | (list python-pytest python-pytest-cov python-setuptools)) |
| 4446 | (home-page "https://github.com/johannfaouzi/pyts") |
| 4447 | (synopsis "Python package for time series classification") |
| 4448 | (description |
| 4449 | "pyts is a Python package for time series classification. It aims to |
| 4450 | make time series classification easily accessible by providing preprocessing |
| 4451 | and utility tools, and implementations of state-of-the-art algorithms. Most |
| 4452 | of these algorithms transform time series, thus pyts provides several tools to |
| 4453 | perform these transformations.") |
| 4454 | (license license:bsd-3)))) |
| 4455 | |
| 4456 | (define-public python-spin |
| 4457 | (package |
| 4458 | (name "python-spin") |
| 4459 | (version "0.8") |
| 4460 | (source |
| 4461 | (origin |
| 4462 | (method url-fetch) |
| 4463 | (uri (pypi-uri "spin" version)) |
| 4464 | (sha256 |
| 4465 | (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7")))) |
| 4466 | (build-system pyproject-build-system) |
| 4467 | (propagated-inputs (list python-click python-colorama python-tomli)) |
| 4468 | (native-inputs (list python-pytest python-setuptools python-wheel)) |
| 4469 | (home-page "https://github.com/scientific-python/spin") |
| 4470 | (synopsis "Developer tool for scientific Python libraries") |
| 4471 | (description "@code{spin} is a simple interface for common development |
| 4472 | tasks. It comes with a few common build commands out the box, but can |
| 4473 | easily be customized per project. |
| 4474 | |
| 4475 | The impetus behind developing the tool was the mass migration of scientific |
| 4476 | Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after |
| 4477 | distutils was deprecated. When many of the build and installation commands |
| 4478 | changed, it made sense to abstract away the nuisance of having to re-learn |
| 4479 | them.") |
| 4480 | (license license:bsd-3))) |
| 4481 | |
| 4482 | ;; XXX: Not maintained since 2019. The project was archived by the owner on |
| 4483 | ;; Nov 2, 2020. It is now read-only. |
| 4484 | (define-public python-fbpca |
| 4485 | (package |
| 4486 | (name "python-fbpca") |
| 4487 | (version "1.0") |
| 4488 | (source (origin |
| 4489 | (method url-fetch) |
| 4490 | (uri (pypi-uri "fbpca" version)) |
| 4491 | (sha256 |
| 4492 | (base32 |
| 4493 | "1lbjqhqsdmqk86lb86q3ywf7561zmdny1dfvgwqkyrkr4ij7f1hm")))) |
| 4494 | (build-system pyproject-build-system) |
| 4495 | (arguments |
| 4496 | (list |
| 4497 | #:test-flags |
| 4498 | ;; TypeError: 'dia_matrix' object is not subscriptable |
| 4499 | #~(list "--deselect=fbpca.py::TestPCA::test_sparse" |
| 4500 | "fbpca.py"))) |
| 4501 | (native-inputs (list python-pytest python-setuptools)) |
| 4502 | (propagated-inputs |
| 4503 | (list python-numpy python-scipy)) |
| 4504 | (home-page "https://fbpca.readthedocs.io/") |
| 4505 | (synopsis "Functions for principal component analysis and accuracy checks") |
| 4506 | (description |
| 4507 | "This package provides fast computations for @dfn{principal component |
| 4508 | analysis} (PCA), SVD, and eigendecompositions via randomized methods") |
| 4509 | (license license:bsd-3))) |
| 4510 | |
| 4511 | (define-public python-einops |
| 4512 | (package |
| 4513 | (name "python-einops") |
| 4514 | (version "0.8.1") |
| 4515 | (source |
| 4516 | (origin |
| 4517 | (method git-fetch) ;PyPI misses .ipynb files required for tests |
| 4518 | (uri (git-reference |
| 4519 | (url "https://github.com/arogozhnikov/einops") |
| 4520 | (commit (string-append "v" version)))) |
| 4521 | (file-name (git-file-name name version)) |
| 4522 | (sha256 |
| 4523 | (base32 "07xd5a4sya3mr003f17hxykcbq3zf3mnr51qagv7fy55qcnbkn97")))) |
| 4524 | (build-system pyproject-build-system) |
| 4525 | (arguments |
| 4526 | (list |
| 4527 | #:test-flags |
| 4528 | ;; Skip optional dependency on Jupyter during tests. |
| 4529 | #~(list "--ignore=scripts/test_notebooks.py") |
| 4530 | #:phases |
| 4531 | #~(modify-phases %standard-phases |
| 4532 | (add-after 'unpack 'set-backend |
| 4533 | (lambda _ |
| 4534 | ;; Einops supports different backends, but we test |
| 4535 | ;; only NumPy for availability and simplicity. |
| 4536 | (setenv "EINOPS_TEST_BACKENDS" "numpy")))))) |
| 4537 | (native-inputs |
| 4538 | (list python-hatchling |
| 4539 | python-nbconvert |
| 4540 | python-nbformat |
| 4541 | python-parameterized |
| 4542 | python-pytest)) |
| 4543 | (propagated-inputs |
| 4544 | (list python-numpy)) |
| 4545 | (home-page "https://einops.rocks/") |
| 4546 | (synopsis "Tensor operations for different backends") |
| 4547 | (description |
| 4548 | "Einops provides a set of tensor operations for NumPy and multiple deep |
| 4549 | learning frameworks.") |
| 4550 | (license license:expat))) |
| 4551 | |
| 4552 | (define-public python-uhi |
| 4553 | (package |
| 4554 | (name "python-uhi") |
| 4555 | (version "0.5.0") |
| 4556 | (source |
| 4557 | (origin |
| 4558 | (method url-fetch) |
| 4559 | (uri (pypi-uri "uhi" version)) |
| 4560 | (sha256 |
| 4561 | (base32 "0753b7yw0zi06g4azafnk3w8i3q6js9i6wwg3pya464gygrbnncm")))) |
| 4562 | (build-system pyproject-build-system) |
| 4563 | (propagated-inputs (list python-numpy)) |
| 4564 | (native-inputs (list python-boost-histogram |
| 4565 | python-fastjsonschema |
| 4566 | python-hatch-vcs |
| 4567 | python-hatchling |
| 4568 | python-pytest)) |
| 4569 | (home-page "https://github.com/scikit-hep/uhi") |
| 4570 | (synopsis "Universal Histogram Interface") |
| 4571 | (description "This is a package meant primarily for documenting histogram |
| 4572 | indexing and the PlottableHistogram Protocol and any future cross-library |
| 4573 | standards. It also contains the code for the PlottableHistogram Protocol, to |
| 4574 | be used in type checking libraries wanting to conform to the protocol. It is |
| 4575 | not usually a runtime dependency, but only a type checking, testing, and/or |
| 4576 | docs dependency in support of other libraries.") |
| 4577 | (license license:bsd-3))) |
| 4578 | |
| 4579 | (define-public python-unyt |
| 4580 | (package |
| 4581 | (name "python-unyt") |
| 4582 | (version "3.1.0") |
| 4583 | (source |
| 4584 | (origin |
| 4585 | (method url-fetch) |
| 4586 | (uri (pypi-uri "unyt" version)) |
| 4587 | (sha256 |
| 4588 | (base32 "07g5rasgikp8a4x0cylz8xxzgh3536djdjppcadiqlhygyl845bp")))) |
| 4589 | (build-system pyproject-build-system) |
| 4590 | ;; tests: 764 passed, 37 skipped, 2 xfailed |
| 4591 | (native-inputs |
| 4592 | (list python-flit-core |
| 4593 | python-pytest)) |
| 4594 | (propagated-inputs |
| 4595 | (list python-numpy |
| 4596 | python-packaging |
| 4597 | python-sympy)) |
| 4598 | (home-page "https://unyt.readthedocs.io") |
| 4599 | (synopsis "Library for working with data that has physical units") |
| 4600 | (description |
| 4601 | "@code{unyt} is a Python library working with data that has physical |
| 4602 | units. It defines the @code{unyt.array.unyt_array} and |
| 4603 | @code{unyt.array.unyt_quantity} classes (subclasses of NumPy’s ndarray class) |
| 4604 | for handling arrays and scalars with units,respectively") |
| 4605 | (license license:bsd-3))) |
| 4606 | |
| 4607 | (define-public python-uproot |
| 4608 | (package |
| 4609 | (name "python-uproot") |
| 4610 | (version "5.6.4") |
| 4611 | (source |
| 4612 | (origin |
| 4613 | (method url-fetch) |
| 4614 | (uri (pypi-uri "uproot" version)) |
| 4615 | (sha256 |
| 4616 | (base32 "024k5kjwcd2nw5hfxhpl0x9p5aq0qrg0nlh9v24vr39rcqadh52a")))) |
| 4617 | (build-system pyproject-build-system) |
| 4618 | (arguments |
| 4619 | (list |
| 4620 | #:test-flags |
| 4621 | #~(list |
| 4622 | ;; conftest.py is not required and it imports modules we do not use. |
| 4623 | "--noconftest" |
| 4624 | ;; There is no easy way to skip tests that require the network, so |
| 4625 | ;; just run a handful of tests that pass. |
| 4626 | "tests/test_0351_write_TList.py" |
| 4627 | "tests/test_0352_write_THashList.py" |
| 4628 | "tests/test_0439_check_awkward_before_numpy.py" |
| 4629 | "tests/test_0976_path_object_split.py" |
| 4630 | "tests/test_1198_coalesce.py" |
| 4631 | "tests/test_1264_write_NumPy_array_of_strings.py" |
| 4632 | "tests/test_1318_dont_compare_big_endian_in_awkward.py") |
| 4633 | #:phases |
| 4634 | #~(modify-phases %standard-phases |
| 4635 | (add-after 'unpack 'set-version |
| 4636 | (lambda _ |
| 4637 | ;; Version is determined dynamically from .git. |
| 4638 | (substitute* "pyproject.toml" |
| 4639 | (("\\[project\\]") |
| 4640 | (string-append "[project]" "\n" "version = \"" |
| 4641 | #$version "\"")) |
| 4642 | (("\"version\"") ""))))))) |
| 4643 | (native-inputs |
| 4644 | (list python-hatch-vcs |
| 4645 | python-pytest |
| 4646 | python-pytest-timeout |
| 4647 | python-setuptools)) |
| 4648 | (propagated-inputs |
| 4649 | (list python-awkward |
| 4650 | python-cramjam |
| 4651 | python-fsspec |
| 4652 | python-numpy |
| 4653 | python-packaging |
| 4654 | python-xxhash)) |
| 4655 | (home-page "https://uproot.readthedocs.io") |
| 4656 | (synopsis "ROOT I/O in Python using NumPy") |
| 4657 | (description |
| 4658 | "Uproot is a Python library for reading and writing ROOT files. It uses |
| 4659 | NumPy and does not depend on C++ ROOT.") |
| 4660 | (license license:bsd-3))) |
| 4661 | |
| 4662 | (define-public python-upsetplot |
| 4663 | (package |
| 4664 | (name "python-upsetplot") |
| 4665 | (version "0.9.0") |
| 4666 | (source |
| 4667 | (origin |
| 4668 | (method url-fetch) |
| 4669 | (uri (pypi-uri "UpSetPlot" version)) |
| 4670 | (sha256 |
| 4671 | (base32 |
| 4672 | "14l5gcj88cclkj1mf74bcy1pxq1hgsiy27fa3vxrsk32ik1nmdwm")))) |
| 4673 | (build-system pyproject-build-system) |
| 4674 | (propagated-inputs |
| 4675 | (list python-matplotlib python-pandas)) |
| 4676 | (native-inputs |
| 4677 | (list python-pytest-runner python-pytest-cov |
| 4678 | python-setuptools python-wheel)) |
| 4679 | (home-page "https://upsetplot.readthedocs.io") |
| 4680 | (synopsis "Draw UpSet plots with Pandas and Matplotlib") |
| 4681 | (description |
| 4682 | "This is a Python implementation of UpSet plots by Lex et al. |
| 4683 | UpSet plots are used to visualize set overlaps; like Venn diagrams but more |
| 4684 | readable.") |
| 4685 | (license license:bsd-3))) |
| 4686 | |
| 4687 | (define-public python-vaex-core |
| 4688 | (package |
| 4689 | (name "python-vaex-core") |
| 4690 | (version "4.19.0") |
| 4691 | (source |
| 4692 | (origin |
| 4693 | (method git-fetch) |
| 4694 | (uri (git-reference |
| 4695 | (url "https://www.github.com/maartenbreddels/vaex") |
| 4696 | (commit (string-append "core-v" version)))) |
| 4697 | (file-name (git-file-name name version)) |
| 4698 | (sha256 |
| 4699 | (base32 "1m6h6m0vm8vdx2nk26nvlbyfvlj0g9ph8cdh38258gn18fd2db0l")) |
| 4700 | (patches |
| 4701 | (search-patches "python-vaex-core-fix-tsl-use.patch")) |
| 4702 | (modules '((guix build utils) |
| 4703 | (ice-9 ftw))) |
| 4704 | (snippet |
| 4705 | #~(begin |
| 4706 | ;; Delete everything except for vaex-core itself: |
| 4707 | (define (delete-except exception) |
| 4708 | (lambda (file) |
| 4709 | (unless (member file `("." ".." ,exception)) |
| 4710 | (delete-file-recursively file)))) |
| 4711 | (for-each (delete-except "packages") (scandir ".")) |
| 4712 | (with-directory-excursion "packages" |
| 4713 | (for-each (delete-except "vaex-core") (scandir "."))) |
| 4714 | (for-each (lambda (file) |
| 4715 | (unless (member file '("." "..")) |
| 4716 | (rename-file |
| 4717 | (string-append "packages/vaex-core/" file) |
| 4718 | file))) |
| 4719 | (scandir "packages/vaex-core")) |
| 4720 | (delete-file-recursively "packages") |
| 4721 | (delete-file-recursively "vendor"))))) |
| 4722 | (build-system pyproject-build-system) |
| 4723 | (arguments |
| 4724 | (list |
| 4725 | ;; TODO: Require vaex.server and others, which require vaex-core; |
| 4726 | ;; implement bootsrapping. |
| 4727 | #:tests? #f |
| 4728 | #:phases |
| 4729 | #~(modify-phases %standard-phases |
| 4730 | (add-after 'unpack 'relax-requirements |
| 4731 | (lambda _ |
| 4732 | (substitute* "setup.py" |
| 4733 | ;; "dask!=2022.4.0,<2024.9"; there is a note "fingerprinting |
| 4734 | ;; in no longer deterministic as of 2024.9.0" which may be |
| 4735 | ;; resolved in 2024.12.1. |
| 4736 | ((",<2024.9") "")))) |
| 4737 | (add-before 'build 'patch-missing-include |
| 4738 | (lambda _ |
| 4739 | ;; See: <https://github.com/vaexio/vaex/issues/2382>. |
| 4740 | ;; TODO: Update to the latest version including the fix. |
| 4741 | (substitute* "src/string_utils.hpp" |
| 4742 | (("#include <nonstd/string_view.hpp>") |
| 4743 | "#include <cstdint>\n#include <nonstd/string_view.hpp>"))))))) |
| 4744 | (native-inputs |
| 4745 | (list pybind11-2 |
| 4746 | python-cython |
| 4747 | python-setuptools)) |
| 4748 | (inputs |
| 4749 | (list boost |
| 4750 | pcre |
| 4751 | string-view-lite |
| 4752 | tsl-hopscotch-map)) |
| 4753 | (propagated-inputs |
| 4754 | (list python-aplus |
| 4755 | python-blake3 |
| 4756 | python-cloudpickle |
| 4757 | python-dask |
| 4758 | python-filelock |
| 4759 | python-frozendict |
| 4760 | python-future |
| 4761 | python-nest-asyncio |
| 4762 | python-numpy |
| 4763 | python-pandas |
| 4764 | python-pyarrow |
| 4765 | python-pydantic |
| 4766 | python-pyyaml |
| 4767 | python-rich |
| 4768 | python-six ;hard dependency |
| 4769 | python-tabulate |
| 4770 | ;; [optional] |
| 4771 | python-diskcache |
| 4772 | python-fsspec |
| 4773 | ;; python-gcsfs ;not packaged yet in Guix |
| 4774 | python-graphviz |
| 4775 | python-h5py |
| 4776 | python-httpx |
| 4777 | ;; python-ipyvolume ;not packaged yet in Guix |
| 4778 | python-psutil |
| 4779 | python-s3fs)) |
| 4780 | (home-page "https://www.github.com/maartenbreddels/vaex") |
| 4781 | (synopsis "Core of Vaex library for exploring tabular datasets") |
| 4782 | (description "Vaex is a high performance Python library for lazy |
| 4783 | Out-of-Core DataFrames (similar to Pandas), to visualize and explore big |
| 4784 | tabular datasets. This package provides the core modules of Vaex.") |
| 4785 | (license license:expat))) |
| 4786 | |
| 4787 | (define-public python-vector |
| 4788 | (package |
| 4789 | (name "python-vector") |
| 4790 | (version "1.8.0") |
| 4791 | (source |
| 4792 | (origin |
| 4793 | (method url-fetch) |
| 4794 | (uri (pypi-uri "vector" version)) |
| 4795 | (sha256 |
| 4796 | (base32 "19jc889z6jxfyyqya5c6sx0hps6j5zgj0shp6k552f264jg5xyaq")))) |
| 4797 | (build-system pyproject-build-system) |
| 4798 | (arguments |
| 4799 | (list |
| 4800 | ;; tests: 813 passed, 3 skipped, 1 deselected |
| 4801 | #:test-flags |
| 4802 | ;; assert array([2.]) == array([-2.]) |
| 4803 | #~(list "--deselect=tests/test_issues.py::test_issue_443" ))) |
| 4804 | (native-inputs |
| 4805 | (list ;; python-dask-awkward ;not packaged yet in Guix |
| 4806 | python-hatch-vcs |
| 4807 | python-hatchling |
| 4808 | ;; python-jax ;not packaged yet in Guix |
| 4809 | python-notebook |
| 4810 | python-optree |
| 4811 | python-papermill |
| 4812 | python-pytest |
| 4813 | #;python-spark-parse)) ;not packaged yet in Guix |
| 4814 | (propagated-inputs |
| 4815 | (list python-numpy |
| 4816 | python-packaging |
| 4817 | ;; [optional] |
| 4818 | python-awkward |
| 4819 | python-numba |
| 4820 | python-sympy)) |
| 4821 | (home-page "https://github.com/scikit-hep/vector") |
| 4822 | (synopsis "Arrays of 2D, 3D, and Lorentz vectors") |
| 4823 | (description "Vector is a Python library for 2D and 3D spatial vectors, as |
| 4824 | well as 4D space-time vectors. It is especially intended for performing |
| 4825 | geometric calculations on arrays of vectors, rather than one vector at a time |
| 4826 | in a Python @code{for} loop.") |
| 4827 | (license license:bsd-3))) |
| 4828 | |
| 4829 | (define-public python-vedo |
| 4830 | (package |
| 4831 | (name "python-vedo") |
| 4832 | (version "2025.5.4") |
| 4833 | (source |
| 4834 | (origin |
| 4835 | (method git-fetch) |
| 4836 | (uri (git-reference |
| 4837 | (url "https://github.com/marcomusy/vedo") |
| 4838 | (commit (string-append "v" version)))) |
| 4839 | (file-name (git-file-name name version)) |
| 4840 | (sha256 |
| 4841 | (base32 "17lrx30pdag0d3d5a2cycfylsbhad4ywikza784h2fg95w77y1va")))) |
| 4842 | (build-system pyproject-build-system) |
| 4843 | (arguments |
| 4844 | (list |
| 4845 | ;; XXX: The whole test suite depends on the data from |
| 4846 | ;; <https://vedo.embl.es/examples> providing samples which need to be |
| 4847 | ;; downloaded during tests, find the way how to enable it. |
| 4848 | #:tests? #f |
| 4849 | #:phases |
| 4850 | #~(modify-phases %standard-phases |
| 4851 | (add-after 'unpack 'relax-requirements |
| 4852 | ;; vtk does not provide Python metadata. |
| 4853 | ;; |
| 4854 | ;; ...checking requirements: ERROR: vedo==2025.5.4 |
| 4855 | ;; DistributionNotFound(Requirement.parse('vtk'), {'vedo'}) |
| 4856 | (lambda _ |
| 4857 | (substitute* "pyproject.toml" |
| 4858 | (("\"vtk\",") ""))))))) |
| 4859 | (native-inputs |
| 4860 | (list pkg-config |
| 4861 | python-pkgconfig |
| 4862 | python-setuptools |
| 4863 | python-wheel)) |
| 4864 | (propagated-inputs |
| 4865 | (list python-deprecated |
| 4866 | python-matplotlib |
| 4867 | python-numpy |
| 4868 | python-pygments |
| 4869 | vtk)) |
| 4870 | (home-page "https://github.com/marcomusy/vedo") |
| 4871 | (synopsis |
| 4872 | "Analysis and visualization of 3D objects and point clouds") |
| 4873 | (description |
| 4874 | "@code{vedo} is a fast and lightweight python module for |
| 4875 | scientific analysis and visualization. The package provides a wide |
| 4876 | range of functionalities for working with three-dimensional meshes and |
| 4877 | point clouds. It can also be used to generate high quality |
| 4878 | two-dimensional renderings such as scatter plots and histograms. |
| 4879 | @code{vedo} is based on @code{vtk} and @code{numpy}.") |
| 4880 | ;; vedo is released under the Expat license. Included fonts are |
| 4881 | ;; covered by the OFL license and textures by the CC0 license. |
| 4882 | ;; The earth images are in the public domain. |
| 4883 | (license (list license:expat |
| 4884 | license:silofl1.1 |
| 4885 | license:cc0 |
| 4886 | license:public-domain)))) |
| 4887 | |
| 4888 | (define-public python-xarray |
| 4889 | (package |
| 4890 | (name "python-xarray") |
| 4891 | (version "2025.12.0") |
| 4892 | (source (origin |
| 4893 | (method url-fetch) |
| 4894 | (uri (pypi-uri "xarray" version)) |
| 4895 | (sha256 |
| 4896 | (base32 |
| 4897 | "1vczqm5daz79n7w3ycd0m1wf0bf78wd84w6xbgac8sfcvkxadxkk")))) |
| 4898 | (build-system pyproject-build-system) |
| 4899 | (arguments |
| 4900 | (list |
| 4901 | ;; tests: 6677 passed, 9632 skipped, 14 xfailed, 4 xpassed, 53 warnings |
| 4902 | #:phases |
| 4903 | #~(modify-phases %standard-phases |
| 4904 | (add-after 'unpack 'fix-pytest-config |
| 4905 | (lambda _ |
| 4906 | (substitute* "pyproject.toml" |
| 4907 | ((".*--mypy-.*") ""))))))) |
| 4908 | (native-inputs |
| 4909 | (list python-pytest |
| 4910 | python-pytest-asyncio |
| 4911 | python-setuptools |
| 4912 | python-setuptools-scm)) |
| 4913 | (propagated-inputs |
| 4914 | (list python-numpy |
| 4915 | python-packaging |
| 4916 | python-pandas)) |
| 4917 | (home-page "https://github.com/pydata/xarray") |
| 4918 | (synopsis "N-D labeled arrays and datasets") |
| 4919 | (description "Xarray (formerly xray) makes working with labelled |
| 4920 | multi-dimensional arrays simple, efficient, and fun! |
| 4921 | |
| 4922 | Xarray introduces labels in the form of dimensions, coordinates and attributes |
| 4923 | on top of raw NumPy-like arrays, which allows for a more intuitive, more |
| 4924 | concise, and less error-prone developer experience. The package includes a |
| 4925 | large and growing library of domain-agnostic functions for advanced analytics |
| 4926 | and visualization with these data structures.") |
| 4927 | (license license:asl2.0))) |
| 4928 | |
| 4929 | (define-public python-xarray-dataclass |
| 4930 | (package |
| 4931 | (name "python-xarray-dataclass") |
| 4932 | (version "3.0.0") |
| 4933 | (source |
| 4934 | (origin |
| 4935 | (method git-fetch) |
| 4936 | (uri (git-reference |
| 4937 | (url "https://github.com/xarray-contrib/xarray-dataclass/") |
| 4938 | (commit (string-append "v" version)))) |
| 4939 | (file-name (git-file-name name version)) |
| 4940 | (sha256 |
| 4941 | (base32 "1q3y9gbzrp1mh48y7gggqgggwnarxdn32h907mfax1hi9ap6ywil")))) |
| 4942 | (build-system pyproject-build-system) |
| 4943 | (native-inputs |
| 4944 | (list python-pytest |
| 4945 | python-hatchling)) |
| 4946 | (propagated-inputs |
| 4947 | (list python-numpy |
| 4948 | python-typing-extensions |
| 4949 | python-xarray)) |
| 4950 | (home-page "https://github.com/xarray-contrib/xarray-dataclass/") |
| 4951 | (synopsis "Xarray data creation by data classes") |
| 4952 | (description |
| 4953 | "xarray-dataclass is a Python package that makes it easy to create |
| 4954 | @url{https://xarray.pydata.org/en/stable/index.html, xarray}'s DataArray and |
| 4955 | Dataset objects that are \"typed\" (i.e. fixed dimensions, data type, |
| 4956 | coordinates, attributes, and name) using |
| 4957 | @url{https://docs.python.org/3/library/dataclasses.html, the Python's |
| 4958 | dataclass}. It's a successor of not maintained |
| 4959 | https://github.com/astropenguin/xarray-dataclasses.") |
| 4960 | (license license:expat))) |
| 4961 | |
| 4962 | (define-public python-xarray-dataclasses |
| 4963 | (package |
| 4964 | (name "python-xarray-dataclasses") |
| 4965 | (version "1.7.0") |
| 4966 | (source |
| 4967 | (origin |
| 4968 | (method git-fetch) |
| 4969 | (uri (git-reference |
| 4970 | (url "https://github.com/astropenguin/xarray-dataclasses/") |
| 4971 | (commit (string-append "v" version)))) |
| 4972 | (file-name (git-file-name name version)) |
| 4973 | (sha256 |
| 4974 | (base32 "043lc1hadr5y0y16g682viiafy0hfsa7q18lqmndpyvnmcgm893z")))) |
| 4975 | (build-system pyproject-build-system) |
| 4976 | (propagated-inputs (list python-numpy python-typing-extensions |
| 4977 | python-xarray)) |
| 4978 | (native-inputs (list python-pytest python-poetry-core)) |
| 4979 | (home-page "https://github.com/astropenguin/xarray-dataclasses/") |
| 4980 | (synopsis "Data creation made easy by dataclass") |
| 4981 | (description "@code{xarray-dataclasses} is a Python package that makes it |
| 4982 | easy to create @code{xarray}'s @code{DataArray} and @code{Datase} objects that |
| 4983 | are \"typed\" (i.e. fixed dimensions, data type, coordinates, attributes, and |
| 4984 | name) using the Python's @code{dataclass}.") |
| 4985 | (license license:expat))) |
| 4986 | |
| 4987 | (define-public python-xarray-einstats |
| 4988 | (package |
| 4989 | (name "python-xarray-einstats") |
| 4990 | (version "0.9.1") |
| 4991 | (source |
| 4992 | (origin |
| 4993 | (method git-fetch) |
| 4994 | (uri (git-reference |
| 4995 | (url "https://github.com/arviz-devs/xarray-einstats") |
| 4996 | (commit (string-append "v" version)))) |
| 4997 | (file-name (git-file-name name version)) |
| 4998 | (sha256 |
| 4999 | (base32 "11crz1l6swabwzmwbrxypfw8gbbp81higzgi5nsxzfigcrrqq30a")))) |
| 5000 | (build-system pyproject-build-system) |
| 5001 | ;; tests: 317 passed, 48 skipped |
| 5002 | (native-inputs |
| 5003 | (list python-flit-core |
| 5004 | python-pytest)) |
| 5005 | (propagated-inputs |
| 5006 | (list python-numpy |
| 5007 | python-scipy |
| 5008 | python-xarray |
| 5009 | ;; [optinoal] |
| 5010 | python-einops |
| 5011 | python-numba)) |
| 5012 | (home-page "https://einstats.python.arviz.org/en/latest/") |
| 5013 | (synopsis "Stats, linear algebra and einops for xarray") |
| 5014 | (description |
| 5015 | "@code{xarray_einstats} provides wrappers around some NumPy and SciPy |
| 5016 | functions and around einops with an API and features adapted to xarray.") |
| 5017 | (license license:asl2.0))) |
| 5018 | |
| 5019 | (define-public python-xarray-schema |
| 5020 | (package |
| 5021 | (name "python-xarray-schema") |
| 5022 | (version "0.0.3") |
| 5023 | (source |
| 5024 | (origin |
| 5025 | (method url-fetch) |
| 5026 | (uri (pypi-uri "xarray-schema" version)) |
| 5027 | (sha256 |
| 5028 | (base32 "08194629696z98dkc74i6c9zmy1jicvd2ajb75q0lsf0i427cv4w")))) |
| 5029 | (build-system pyproject-build-system) |
| 5030 | (propagated-inputs (list python-numpy python-xarray)) |
| 5031 | (native-inputs |
| 5032 | (list python-pytest |
| 5033 | python-setuptools |
| 5034 | python-setuptools-scm |
| 5035 | python-wheel)) |
| 5036 | (home-page "https://github.com/carbonplan/xarray-schema") |
| 5037 | (synopsis "Schema validation for Xarray objects") |
| 5038 | (description "This package implements schema validation for Xarray |
| 5039 | objects.") |
| 5040 | (license license:expat))) |
| 5041 | |
| 5042 | (define-public python-pytensor |
| 5043 | (package |
| 5044 | (name "python-pytensor") |
| 5045 | (version "2.36.3") |
| 5046 | (source (origin |
| 5047 | (method git-fetch) |
| 5048 | (uri (git-reference |
| 5049 | (url "https://github.com/pymc-devs/pytensor") |
| 5050 | (commit (string-append "rel-" version)))) |
| 5051 | (file-name (git-file-name name version)) |
| 5052 | (sha256 |
| 5053 | (base32 |
| 5054 | "0m9nmwnn0ixrk9ml0yc6qjdcw0vmw7swfcw8vahyfmp70pirhimn")))) |
| 5055 | (build-system pyproject-build-system) |
| 5056 | (arguments |
| 5057 | (list |
| 5058 | ;; tests: 1906 passed, 2581 skipped, 34 deselected, 12 xfailed, 274 warnings |
| 5059 | #:test-flags |
| 5060 | ;; XXX: Full test suite takes about 20-30min to complete in single |
| 5061 | ;; thread, attempt to run tests in parallel with pytest-xdist fails even |
| 5062 | ;; so upstream provides a support for that, try to figure out how to |
| 5063 | ;; improve it. |
| 5064 | ;; |
| 5065 | ;; Upstream implements a script, showing slow tests which may be used to |
| 5066 | ;; exclude even more hanging/slow ones, see: |
| 5067 | ;; <scripts/slowest_tests/extract-slow-tests.py>. |
| 5068 | ;; |
| 5069 | #~(list "--benchmark-disable" |
| 5070 | "--benchmark-skip" |
| 5071 | "--durations=50" |
| 5072 | ;; Skip computationally intensive tests. |
| 5073 | "--ignore=tests/scan/" |
| 5074 | "--ignore=tests/tensor/" |
| 5075 | "--ignore=tests/sandbox/" |
| 5076 | "--ignore=tests/sparse/sandbox/" |
| 5077 | ;; A mixture of assertions are not equal in these tests. |
| 5078 | "--deselect=tests/link/numba/test_nlinalg.py::test_Eigh[x0-L-None]" |
| 5079 | #$@(map (lambda (test) |
| 5080 | (string-append "--deselect=tests/graph/rewriting/" |
| 5081 | "test_basic.py::" |
| 5082 | test)) |
| 5083 | ;; Tests fail with similar errors: AssertionError: |
| 5084 | ;; assert 'FunctionGraph(Op1(Op2(x, y), z))' == |
| 5085 | ;; 'FunctionGraph(Op4(z, y))' |
| 5086 | (list "TestPatternNodeRewriter::test_replace_output" |
| 5087 | "TestPatternNodeRewriter::test_nested_out_pattern" |
| 5088 | "TestPatternNodeRewriter::test_unification_1" |
| 5089 | "TestPatternNodeRewriter::test_replace_subgraph" |
| 5090 | "TestPatternNodeRewriter::test_no_recurse" |
| 5091 | "TestPatternNodeRewriter::test_multiple" |
| 5092 | "TestPatternNodeRewriter::test_nested_even" |
| 5093 | "TestPatternNodeRewriter::test_nested_odd" |
| 5094 | "TestPatternNodeRewriter::test_expand" |
| 5095 | "TestPatternNodeRewriter::test_ambiguous" |
| 5096 | "TestPatternNodeRewriter::test_constant" |
| 5097 | "TestPatternNodeRewriter::test_constraints" |
| 5098 | "TestPatternNodeRewriter::test_match_same" |
| 5099 | "TestPatternNodeRewriter::test_eq" |
| 5100 | "TestEquilibrium::test_1" |
| 5101 | "TestEquilibrium::test_2" |
| 5102 | "TestEquilibrium::test_low_use_ratio" |
| 5103 | ;; A mixture of assertions are not equal: |
| 5104 | "TestPatternNodeRewriter::test_allow_multiple_clients" |
| 5105 | "TestPatternNodeRewriter::test_op_pattern" |
| 5106 | "test_patternsub_values_eq_approx[out_pattern0-True]" |
| 5107 | "test_patternsub_values_eq_approx[out_pattern0-False]" |
| 5108 | "test_patternsub_values_eq_approx[x-True]" |
| 5109 | "test_patternsub_values_eq_approx[x-False]" |
| 5110 | "test_patternsub_multi_output_nodes")) |
| 5111 | #$@(map (lambda (test) |
| 5112 | (string-append "--deselect=tests/graph/" test)) |
| 5113 | (list "rewriting/test_kanren.py::test_kanren_basic" |
| 5114 | "rewriting/test_kanren.py::test_KanrenRelationSub_filters" |
| 5115 | "rewriting/test_kanren.py::test_KanrenRelationSub_dot" |
| 5116 | "rewriting/test_unify.py::test_unify_Variable" |
| 5117 | "rewriting/test_unify.py::test_ConstrainedVar" |
| 5118 | "rewriting/test_unify.py::test_unify_OpPattern" |
| 5119 | "test_destroyhandler.py::test_misc"))) |
| 5120 | #:phases |
| 5121 | #~(modify-phases %standard-phases |
| 5122 | ;; Replace version manually because pytensor uses |
| 5123 | ;; versioneer, which requires git metadata. |
| 5124 | (add-after 'unpack 'versioneer |
| 5125 | (lambda _ |
| 5126 | (invoke "versioneer" "install") |
| 5127 | (substitute* "setup.py" |
| 5128 | (("version=versioneer.get_version\\(),") |
| 5129 | (format #f "version=~s," #$version))))) |
| 5130 | (add-before 'check 'pre-check |
| 5131 | (lambda _ |
| 5132 | ;; It is required for most tests. |
| 5133 | (setenv "HOME" "/tmp") |
| 5134 | ;; This would otherwise interfere with finding the installed |
| 5135 | ;; pytensor when running tests. |
| 5136 | (delete-file-recursively "pytensor")))))) |
| 5137 | (native-inputs (list python-cython |
| 5138 | python-pytest |
| 5139 | python-pytest-benchmark |
| 5140 | python-pytest-mock |
| 5141 | python-pytest-xdist |
| 5142 | python-versioneer |
| 5143 | python-setuptools)) |
| 5144 | (propagated-inputs (list python-cons |
| 5145 | python-etuples |
| 5146 | python-filelock |
| 5147 | python-logical-unification |
| 5148 | python-minikanren |
| 5149 | python-numba |
| 5150 | python-numpy |
| 5151 | python-scipy |
| 5152 | ;; [optinal] |
| 5153 | ;; python-jaxlib |
| 5154 | ;; python-jax |
| 5155 | #;python-llvmlite)) |
| 5156 | (home-page "https://pytensor.readthedocs.io/en/latest/") |
| 5157 | (synopsis |
| 5158 | "Library for mathematical expressions in multi-dimensional arrays") |
| 5159 | (description |
| 5160 | "PyTensor is a Python library that allows one to define, optimize, and |
| 5161 | efficiently evaluate mathematical expressions involving multi-dimensional |
| 5162 | arrays. It is a fork of the Aesara library.") |
| 5163 | (license license:bsd-3))) |
| 5164 | |
| 5165 | (define-public python-scs |
| 5166 | (package |
| 5167 | (name "python-scs") |
| 5168 | (version "3.2.10") |
| 5169 | (source |
| 5170 | (origin |
| 5171 | (method git-fetch) |
| 5172 | (uri (git-reference |
| 5173 | (url "https://github.com/bodono/scs-python") |
| 5174 | (commit version))) |
| 5175 | (file-name (git-file-name name version)) |
| 5176 | (sha256 |
| 5177 | (base32 "1wg1g6das5hs53z3sjn2m8646023d14q9shmwfb38n23baqi468g")))) |
| 5178 | (build-system pyproject-build-system) |
| 5179 | (arguments |
| 5180 | (list |
| 5181 | ;; tests: 26 passed |
| 5182 | #:phases |
| 5183 | #~(modify-phases %standard-phases |
| 5184 | (add-after 'ensure-no-mtimes-pre-1980 'substitute-git-submodules |
| 5185 | (lambda _ |
| 5186 | (rmdir "scs_source") |
| 5187 | (symlink #$(package-source |
| 5188 | (this-package-native-input "scs")) |
| 5189 | "scs_source") |
| 5190 | (rmdir "scs/pythoncapi-compat") |
| 5191 | (symlink #$(package-source |
| 5192 | (this-package-native-input "pythoncapi-compat")) |
| 5193 | "scs/pythoncapi-compat")))))) |
| 5194 | (native-inputs |
| 5195 | (list pkg-config |
| 5196 | python-meson |
| 5197 | python-pytest |
| 5198 | pythoncapi-compat |
| 5199 | scs)) |
| 5200 | (inputs |
| 5201 | (list lapack |
| 5202 | openblas)) |
| 5203 | (propagated-inputs |
| 5204 | (list python-numpy |
| 5205 | python-scipy)) |
| 5206 | (home-page "https://github.com/bodono/scs-python") |
| 5207 | (synopsis "Splitting conic solver") |
| 5208 | (description "This package provides a Python interface for the |
| 5209 | SCS (Splitting conic solver) library.") |
| 5210 | (license license:expat))) |
| 5211 | |
| 5212 | (define-public python-pandas-flavor |
| 5213 | (package |
| 5214 | (name "python-pandas-flavor") |
| 5215 | (version "0.8.1") |
| 5216 | (source |
| 5217 | (origin |
| 5218 | (method url-fetch) |
| 5219 | (uri (pypi-uri "pandas_flavor" version)) |
| 5220 | (sha256 |
| 5221 | (base32 |
| 5222 | "0rn3pnracv8013j3f737qal3isf1brbc3mpxqhr03vik322sapr5")))) |
| 5223 | (build-system pyproject-build-system) |
| 5224 | (arguments |
| 5225 | (list |
| 5226 | #:phases |
| 5227 | #~(modify-phases %standard-phases |
| 5228 | (add-after 'unpack 'fix-pytest-config |
| 5229 | (lambda _ |
| 5230 | (substitute* "pyproject.toml" |
| 5231 | (("addopts = .*") ""))))))) |
| 5232 | (native-inputs |
| 5233 | (list python-pytest |
| 5234 | python-setuptools |
| 5235 | python-setuptools-scm)) |
| 5236 | (propagated-inputs |
| 5237 | (list python-pandas |
| 5238 | python-xarray)) |
| 5239 | (home-page "https://github.com/pyjanitor-devs/pandas_flavor") |
| 5240 | (synopsis "Write your own flavor of Pandas") |
| 5241 | (description "Pandas 0.23 added a simple API for registering accessors |
| 5242 | with Pandas objects. Pandas-flavor extends Pandas' extension API by |
| 5243 | |
| 5244 | @itemize |
| 5245 | @item adding support for registering methods as well |
| 5246 | @item making each of these functions backwards compatible with older versions |
| 5247 | of Pandas |
| 5248 | @end itemize") |
| 5249 | (license license:expat))) |
| 5250 | |
| 5251 | (define-public python-pingouin |
| 5252 | (package |
| 5253 | (name "python-pingouin") |
| 5254 | (version "0.5.5") |
| 5255 | (source |
| 5256 | (origin |
| 5257 | (method git-fetch) |
| 5258 | (uri (git-reference |
| 5259 | (url "https://github.com/raphaelvallat/pingouin") |
| 5260 | (commit (string-append "v" version)))) |
| 5261 | (file-name (git-file-name name version)) |
| 5262 | (sha256 |
| 5263 | (base32 |
| 5264 | "0i3yzdlj08di3mzi69ci57jm5myl123hp8c5vn1g35k77m4zpgvd")))) |
| 5265 | (build-system pyproject-build-system) |
| 5266 | (arguments |
| 5267 | (list |
| 5268 | ;; tests: 85 passed, 3 deselected, 43 warnings |
| 5269 | #:test-flags |
| 5270 | ;; AssertionError: Arrays are not equal |
| 5271 | #~(list "--deselect=tests/test_pairwise.py::TestPairwise::test_pairwise_tests" |
| 5272 | ;; AssertionError: assert False |
| 5273 | "--deselect=tests/test_power.py::TestPower::test_power_ttest") |
| 5274 | #:phases |
| 5275 | #~(modify-phases %standard-phases |
| 5276 | (add-after 'unpack 'fix-pytest-config |
| 5277 | (lambda _ |
| 5278 | (substitute* "pyproject.toml" |
| 5279 | ((" --cov") ""))))))) |
| 5280 | (native-inputs |
| 5281 | (list python-pytest |
| 5282 | python-setuptools)) |
| 5283 | (propagated-inputs |
| 5284 | (list python-matplotlib |
| 5285 | python-mpmath |
| 5286 | python-numpy |
| 5287 | python-pandas |
| 5288 | python-pandas-flavor |
| 5289 | python-scikit-learn |
| 5290 | python-scipy |
| 5291 | python-seaborn |
| 5292 | python-statsmodels |
| 5293 | python-tabulate)) |
| 5294 | (home-page "https://pingouin-stats.org/") |
| 5295 | (synopsis "Statistical package for Python") |
| 5296 | (description "Pingouin is a statistical package written in Python 3 and |
| 5297 | based mostly on Pandas and NumPy. Its features include |
| 5298 | |
| 5299 | @itemize |
| 5300 | @item ANOVAs: N-ways, repeated measures, mixed, ancova |
| 5301 | @item Pairwise post-hocs tests (parametric and non-parametric) and pairwise |
| 5302 | correlations |
| 5303 | @item Robust, partial, distance and repeated measures correlations |
| 5304 | @item Linear/logistic regression and mediation analysis |
| 5305 | @item Bayes Factors |
| 5306 | @item Multivariate tests |
| 5307 | @item Reliability and consistency |
| 5308 | @item Effect sizes and power analysis |
| 5309 | @item Parametric/bootstrapped confidence intervals around an effect size or a |
| 5310 | correlation coefficient |
| 5311 | @item Circular statistics |
| 5312 | @item Chi-squared tests |
| 5313 | @item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation, |
| 5314 | and more |
| 5315 | @end itemize") |
| 5316 | (license license:gpl3))) |
| 5317 | |
| 5318 | (define-public python-plotly |
| 5319 | (package |
| 5320 | (name "python-plotly") |
| 5321 | (version "5.24.1") ;XXX: it's the last 5.X.X, released on <2024-09-12> |
| 5322 | (source |
| 5323 | (origin |
| 5324 | (method git-fetch) |
| 5325 | (uri (git-reference |
| 5326 | (url "https://github.com/plotly/plotly.py") |
| 5327 | (commit (string-append "v" version)))) |
| 5328 | (file-name (git-file-name name version)) |
| 5329 | (sha256 |
| 5330 | (base32 "0pnsj23bxj7c39hzdz49v72flwbc8knc7dy831lvc0hrbssm4j60")))) |
| 5331 | (build-system pyproject-build-system) |
| 5332 | (arguments |
| 5333 | (list |
| 5334 | ;; tests: 2715 passed, 18 skipped, 41 deselected, 606 warnings |
| 5335 | #:test-flags |
| 5336 | ;; XXX: Combination of missing packages and assertion errors. |
| 5337 | #~(list "--ignore=plotly/tests/test_optional/test_kaleido/test_kaleido.py" |
| 5338 | "-k" (string-join |
| 5339 | (list "not test_build_df_from_vaex_and_polars" |
| 5340 | "test_build_df_with_hover_data_from_vaex_and_polars" |
| 5341 | "test_bytesio" |
| 5342 | "test_colorscale_and_levels_same_length" |
| 5343 | "test_correct_order_param" |
| 5344 | "test_dependencies_not_imported" |
| 5345 | "test_ensure_orca_ping_and_proc" |
| 5346 | "test_external_server_url" |
| 5347 | "test_fips_values_same_length" |
| 5348 | "test_full_choropleth" |
| 5349 | "test_invalid_figure_json" |
| 5350 | "test_latex_fig_to_image[eps]" |
| 5351 | "test_lazy_imports" |
| 5352 | "test_legend_dots" |
| 5353 | "test_linestyle" |
| 5354 | "test_mimetype_combination" |
| 5355 | "test_orca_executable_path" |
| 5356 | "test_orca_version_number" |
| 5357 | "test_pdf_renderer_show_override" |
| 5358 | "test_png_renderer_mimetype" |
| 5359 | "test_problematic_environment_variables[eps]" |
| 5360 | "test_sanitize_json[auto]" |
| 5361 | "test_sanitize_json[json]" |
| 5362 | "test_sanitize_json[orjson]" |
| 5363 | "test_scope_is_not_list" |
| 5364 | "test_scraper" |
| 5365 | "test_server_timeout_shutdown" |
| 5366 | "test_simple_to_image[eps]" |
| 5367 | "test_svg_renderer_show" |
| 5368 | "test_to_image_default[eps]" |
| 5369 | "test_topojson_fig_to_image[eps]" |
| 5370 | "test_validate_orca" |
| 5371 | "test_write_image_string[eps]" |
| 5372 | "test_write_image_string_bad_extension_failure" |
| 5373 | "test_write_image_string_bad_extension_override" |
| 5374 | "test_write_image_string_format_inference[eps]" |
| 5375 | "test_write_image_writeable[eps]") |
| 5376 | " and not ")) |
| 5377 | #:phases |
| 5378 | #~(modify-phases %standard-phases |
| 5379 | (add-before 'build 'skip-npm |
| 5380 | ;; npm is not packaged so build without it |
| 5381 | (lambda _ |
| 5382 | (setenv "SKIP_NPM" "T"))) |
| 5383 | (add-after 'unpack 'fix-version |
| 5384 | ;; TODO: Versioneer in Guix gets its release version from the |
| 5385 | ;; parent directory, but the plotly package is located inside a |
| 5386 | ;; depth 3 subdirectory. Try to use versioneer if possible. |
| 5387 | (lambda _ |
| 5388 | (substitute* "packages/python/plotly/setup.py" |
| 5389 | (("version=versioneer.get_version\\(),") |
| 5390 | (format #f "version=~s," #$version))) |
| 5391 | (substitute* "packages/python/plotly/plotly/version.py" |
| 5392 | (("__version__ = get_versions\\(\\)\\[\"version\"\\]") |
| 5393 | (format #f "__version__ = ~s" #$version))))) |
| 5394 | (add-after 'fix-version 'chdir |
| 5395 | (lambda _ |
| 5396 | (chdir "packages/python/plotly")))))) |
| 5397 | ;; XXX: Plotly requires a long list of test only packages, do not |
| 5398 | ;; propagate them, see: <packages/python/plotly/test_requirements>. |
| 5399 | (native-inputs |
| 5400 | (list python-geopandas |
| 5401 | python-ipykernel |
| 5402 | python-ipython-minimal |
| 5403 | python-ipywidgets |
| 5404 | python-matplotlib |
| 5405 | python-nbformat |
| 5406 | python-numpy-1 |
| 5407 | python-orjson |
| 5408 | python-pandas |
| 5409 | python-pillow |
| 5410 | python-psutil |
| 5411 | python-pyshp |
| 5412 | python-pytest-8 |
| 5413 | python-pytz |
| 5414 | python-requests |
| 5415 | python-retrying |
| 5416 | python-scikit-image |
| 5417 | python-scipy |
| 5418 | python-setuptools |
| 5419 | python-shapely |
| 5420 | python-statsmodels |
| 5421 | python-tenacity |
| 5422 | python-vaex-core |
| 5423 | python-xarray)) |
| 5424 | (propagated-inputs |
| 5425 | (list python-packaging |
| 5426 | python-tenacity)) |
| 5427 | (home-page "https://plotly.com/python/") |
| 5428 | (synopsis "Interactive plotting library for Python") |
| 5429 | (description |
| 5430 | "Plotly's Python graphing library makes interactive,publication-quality |
| 5431 | graphs online. Examples of how to make line plots, scatter plots, area |
| 5432 | charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, |
| 5433 | multiple-axes, polar charts, and bubble charts.") |
| 5434 | (license license:expat))) |
| 5435 | |
| 5436 | (define-public python-plotnine |
| 5437 | (package |
| 5438 | (name "python-plotnine") |
| 5439 | (version "0.14.5") |
| 5440 | (source |
| 5441 | (origin |
| 5442 | (method git-fetch) |
| 5443 | (uri (git-reference |
| 5444 | (url "https://github.com/has2k1/plotnine") |
| 5445 | (commit (string-append "v" version)))) |
| 5446 | (file-name (git-file-name name version)) |
| 5447 | (sha256 |
| 5448 | (base32 "02ph0h312qn5a9ivh2qhv0x9sybccgbidzvb8im1hikwcqp8v2fw")))) |
| 5449 | (build-system pyproject-build-system) |
| 5450 | (arguments |
| 5451 | (list |
| 5452 | #:test-flags |
| 5453 | ;; XXX: Check for any new failing tests during next update cycle. |
| 5454 | ;; These all fail because the images are considered to be too different, |
| 5455 | ;; though they really do look fine. |
| 5456 | ;; See https://github.com/has2k1/plotnine/issues/627 |
| 5457 | `(list ,@(map (lambda (file) (string-append "--ignore=" file)) |
| 5458 | (list "tests/test_aes.py" |
| 5459 | "tests/test_annotation_logticks.py" |
| 5460 | "tests/test_coords.py" |
| 5461 | "tests/test_facet_labelling.py" |
| 5462 | "tests/test_facets.py" |
| 5463 | "tests/test_geom_bar_col_histogram.py" |
| 5464 | "tests/test_geom_bin_2d.py" |
| 5465 | "tests/test_geom_boxplot.py" |
| 5466 | "tests/test_geom_count.py" |
| 5467 | "tests/test_geom_density_2d.py" |
| 5468 | "tests/test_geom_density.py" |
| 5469 | "tests/test_geom_dotplot.py" |
| 5470 | "tests/test_geom_freqpoly.py" |
| 5471 | "tests/test_geom_map.py" |
| 5472 | "tests/test_geom_path_line_step.py" |
| 5473 | "tests/test_geom_point.py" |
| 5474 | "tests/test_geom_raster.py" |
| 5475 | "tests/test_geom_rect_tile.py" |
| 5476 | "tests/test_geom_ribbon_area.py" |
| 5477 | "tests/test_geom_sina.py" |
| 5478 | "tests/test_geom_smooth.py" |
| 5479 | "tests/test_geom_text_label.py" |
| 5480 | "tests/test_geom_violin.py" |
| 5481 | "tests/test_layout.py" |
| 5482 | "tests/test_position.py" |
| 5483 | "tests/test_qplot.py" |
| 5484 | "tests/test_scale_internals.py" |
| 5485 | "tests/test_scale_labelling.py" |
| 5486 | "tests/test_stat_ecdf.py" |
| 5487 | "tests/test_stat_function.py" |
| 5488 | "tests/test_stat_summary.py" |
| 5489 | "tests/test_theme.py")) |
| 5490 | "-k" |
| 5491 | (string-append "not " |
| 5492 | (string-join |
| 5493 | (list |
| 5494 | ;; This triggers an unexpected but harmless |
| 5495 | ;; warning. |
| 5496 | "test_save_method" |
| 5497 | ;; This test fails to set the locale. |
| 5498 | "test_no_after_scale_warning" |
| 5499 | ;; Missing optional modules |
| 5500 | "test_non_linear_smooth" |
| 5501 | "test_non_linear_smooth_no_ci") |
| 5502 | " and not " |
| 5503 | 'infix))) |
| 5504 | #:phases |
| 5505 | #~(modify-phases %standard-phases |
| 5506 | (add-before 'check 'pre-check |
| 5507 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 5508 | ;; The data files are referenced by the tests but they are not |
| 5509 | ;; installed. |
| 5510 | (copy-recursively "plotnine/data" |
| 5511 | (string-append (site-packages inputs |
| 5512 | outputs) |
| 5513 | "/plotnine/data")) |
| 5514 | (setenv "CI" "1") ;skip tests that are known to fail on CI. |
| 5515 | ;; Matplotlib needs to be able to write its configuration file |
| 5516 | ;; somewhere. |
| 5517 | (setenv "MPLCONFIGDIR" "/tmp") |
| 5518 | (setenv "TZ" "UTC") |
| 5519 | (setenv "TZDIR" |
| 5520 | (search-input-directory inputs "share/zoneinfo"))))))) |
| 5521 | (propagated-inputs (list python-adjusttext |
| 5522 | python-matplotlib |
| 5523 | python-mizani |
| 5524 | python-numpy |
| 5525 | python-patsy |
| 5526 | python-scipy |
| 5527 | python-statsmodels)) |
| 5528 | (native-inputs (list python-geopandas |
| 5529 | python-mock |
| 5530 | python-pandas |
| 5531 | python-pytest |
| 5532 | python-pytest-cov |
| 5533 | python-setuptools |
| 5534 | python-setuptools-scm |
| 5535 | python-wheel |
| 5536 | tzdata-for-tests)) |
| 5537 | (home-page "https://github.com/has2k1/plotnine") |
| 5538 | (synopsis "Grammar of Graphics for Python") |
| 5539 | (description |
| 5540 | "Plotnine is a Python implementation of the Grammar of Graphics. |
| 5541 | It is a powerful graphics concept for creating plots and visualizations in a |
| 5542 | structured and declarative manner. It is inspired by the R package ggplot2 |
| 5543 | and aims to provide a similar API and functionality in Python.") |
| 5544 | (license license:expat))) |
| 5545 | |
| 5546 | (define-public python-pytest-pyvista |
| 5547 | (package |
| 5548 | (name "python-pytest-pyvista") |
| 5549 | (version "0.3.2") |
| 5550 | (source |
| 5551 | (origin |
| 5552 | (method url-fetch) |
| 5553 | (uri (pypi-uri "pytest_pyvista" version)) |
| 5554 | (sha256 |
| 5555 | (base32 "0hgk3a5wwymk3k7ih4lsmkd44dfnsd842zv5859izqxkw74j2xpn")))) |
| 5556 | (build-system pyproject-build-system) |
| 5557 | (arguments |
| 5558 | (list |
| 5559 | ;; No tests included in the PyPI tarball. |
| 5560 | #:tests? #f)) |
| 5561 | (propagated-inputs (list python-numpy python-pillow python-pytest-8)) |
| 5562 | (native-inputs (list python-flit-core)) |
| 5563 | (home-page "https://github.com/pyvista/pytest-pyvista") |
| 5564 | (synopsis "Pytest plugin for comparing PyVista plot images") |
| 5565 | (description "This package provides a Pytest plugin that facilitates |
| 5566 | the comparison of images produced by PyVista, generating cached images from |
| 5567 | tests and comparing subsequent results against that cache.") |
| 5568 | (license license:expat))) |
| 5569 | |
| 5570 | (define-public python-pyvista |
| 5571 | (package |
| 5572 | (name "python-pyvista") |
| 5573 | (version "0.46.5") |
| 5574 | (source |
| 5575 | (origin |
| 5576 | (method git-fetch) |
| 5577 | (uri (git-reference |
| 5578 | (url "https://github.com/pyvista/pyvista") |
| 5579 | (commit (string-append "v" version)))) |
| 5580 | (file-name (git-file-name name version)) |
| 5581 | (sha256 |
| 5582 | (base32 "0553bp4fhbar9z0ybjv1mw1jhb5rhrr4v6q2bzmia0ww0dn8fc69")))) |
| 5583 | (build-system pyproject-build-system) |
| 5584 | (arguments |
| 5585 | (list |
| 5586 | ;; tests: 5891 passed, 623 skipped, 355 deselected, 3 xfailed, 167 warnings |
| 5587 | #:test-flags |
| 5588 | ;; TODO: Find out what's going on with skipped tests. |
| 5589 | #~(list "--ignore=tests/plotting/test_charts.py" |
| 5590 | "--ignore=tests/examples/test_download_files.py" |
| 5591 | "--ignore=tests/examples/test_downloads.py" |
| 5592 | "--ignore=tests/plotting/test_texture.py" |
| 5593 | ;; Tries to download data from GitHub at collection time. |
| 5594 | "--ignore=tests/core/test_dataobject_filters.py" |
| 5595 | ;; Tries to download data from GitHub at collection time. |
| 5596 | "--ignore=tests/core/test_dataset_filters.py" |
| 5597 | ;; Tries to download data from GitHub at collection time. |
| 5598 | "--ignore=tests/plotting/test_plotter.py" |
| 5599 | "-k" (string-join |
| 5600 | (list "not test_actor_texture" |
| 5601 | "test_add_multiple" |
| 5602 | "test_add_timer_event" |
| 5603 | "test_avsucd_reader" |
| 5604 | "test_binarymarchingcubesreader" |
| 5605 | "test_bmpreader" |
| 5606 | "test_box_axes" |
| 5607 | "test_byureader" |
| 5608 | "test_cast_to_numpy_raises" |
| 5609 | "test_compute_boundary_mesh_quality" |
| 5610 | "test_connectivity_" |
| 5611 | "test_dataset_loader_cubemap" |
| 5612 | "test_dataset_loader_dicom" |
| 5613 | "test_dataset_loader_from_nested_files_and_directory" |
| 5614 | "test_dataset_loader_from_nested_multiblock" |
| 5615 | "test_dataset_loader_one_file" |
| 5616 | "test_dataset_loader_two_files_both_loadable" |
| 5617 | "test_dataset_loader_two_files_one_loadable" |
| 5618 | "test_dcmreader" |
| 5619 | "test_demreader" |
| 5620 | "test_ensight_multi_block_io" |
| 5621 | "test_ensightreader_arrays" |
| 5622 | "test_ensightreader_time_sets" |
| 5623 | "test_ensightreader_timepoints" |
| 5624 | "test_facetreader" |
| 5625 | "test_fluentcffreader" |
| 5626 | "test_gambitreader" |
| 5627 | "test_gaussian_cubes_reader" |
| 5628 | "test_gesignareader" |
| 5629 | "test_gif_reader" |
| 5630 | "test_hdf_reader" |
| 5631 | "test_hdr_reader" |
| 5632 | "test_init_cmap" |
| 5633 | "test_interpolate" |
| 5634 | "test_jpegreader" |
| 5635 | "test_legend_" |
| 5636 | "test_load_dataset_no_reader" |
| 5637 | "test_load_theme" |
| 5638 | "test_meta_image_reader" |
| 5639 | "test_multiblockplot3dreader" |
| 5640 | "test_nifti_reader" |
| 5641 | "test_nrrd_reader" |
| 5642 | "test_objreader" |
| 5643 | "test_only_screenshots_flag" |
| 5644 | "test_openfoam_case_type" |
| 5645 | "test_openfoam_cell_to_point_default" |
| 5646 | "test_openfoam_patch_arrays" |
| 5647 | "test_openfoam_skip_zero_time" |
| 5648 | "test_openfoamreader_active_time" |
| 5649 | "test_openfoamreader_arrays_time" |
| 5650 | "test_openfoamreader_read_data_time_point" |
| 5651 | "test_openfoamreader_read_data_time_value" |
| 5652 | "test_particle_reader" |
| 5653 | "test_partition" |
| 5654 | "test_pdbreader" |
| 5655 | "test_plot3dmetareader" |
| 5656 | "test_plot_return_img_with_cpos" |
| 5657 | "test_plot_return_img_without_cpos" |
| 5658 | "test_png_reader" |
| 5659 | "test_pnm_reader" |
| 5660 | "test_prostar_reader" |
| 5661 | "test_protein_ribbon" |
| 5662 | "test_pvdreader" |
| 5663 | "test_pvdreader_no_part_group" |
| 5664 | "test_pvdreader_no_time_group" |
| 5665 | "test_read_cgns" |
| 5666 | "test_repr" |
| 5667 | "test_save_before_close_callback" |
| 5668 | "test_slc_reader" |
| 5669 | "test_stlreader" |
| 5670 | "test_tecplotreader" |
| 5671 | "test_tiff_reader" |
| 5672 | "test_timer" |
| 5673 | "test_translate_direction_collinear" |
| 5674 | "test_user_logo" |
| 5675 | "test_xdmf_reader" |
| 5676 | ;; XXX: incompatible with Numpy@2 |
| 5677 | ;; Drop when updating along with vtk. |
| 5678 | "test_check_subdtype_changes_type" |
| 5679 | ;; These tests try to download data from GitHub. |
| 5680 | "test_read_exodus" |
| 5681 | "test_nek5000_reader" |
| 5682 | "test_exodus_reader_ext" |
| 5683 | "test_exodus_reader_core" |
| 5684 | "test_exodus_blocks" |
| 5685 | "test_download_dataset_texture" |
| 5686 | "test_structured_grid_cast_to_explicit_structured_grid" |
| 5687 | "test_pad_image_multi_component_with_scalar" |
| 5688 | "test_pad_image_raises" |
| 5689 | "test_points_to_cells_and_cells_to_points_dimensions" |
| 5690 | ;; These tests download cow.vtp from GitHub. |
| 5691 | "test_meshio[cow_ugrid]" |
| 5692 | "test_meshio[points_only]" |
| 5693 | ;; Looks for pyproject.toml in installed package. |
| 5694 | "test_max_positional_args_matches_pyproject") |
| 5695 | " and not ")) |
| 5696 | #:phases |
| 5697 | #~(modify-phases %standard-phases |
| 5698 | ;; vtk check fails in sanity-check, comment out |
| 5699 | (add-after 'unpack 'patch-pyproject |
| 5700 | (lambda _ |
| 5701 | (substitute* "pyproject.toml" |
| 5702 | (("'vtk[^']*'," all) (string-append "#" all))))) |
| 5703 | (add-after 'unpack 'fix-failing-tests |
| 5704 | (lambda _ |
| 5705 | (substitute* "tests/plotting/test_plotting.py" |
| 5706 | (("\"\"\"Determine if using mesa.\"\"\"" all) |
| 5707 | (string-append all "\n return False"))) |
| 5708 | (substitute* "tests/test_meshio.py" |
| 5709 | (("cow = .*$" all) (string-append "#" all "\n")) |
| 5710 | ((", cow") "")))) |
| 5711 | ;; test phase writes files to $HOME |
| 5712 | (add-before 'check 'redirect-HOME |
| 5713 | (lambda _ |
| 5714 | (setenv "HOME" "/tmp")))))) |
| 5715 | (native-inputs |
| 5716 | (list nss-certs-for-test |
| 5717 | python-aiohttp |
| 5718 | python-ipython |
| 5719 | python-mypy |
| 5720 | python-pandas |
| 5721 | python-pytest-8 |
| 5722 | python-pytest-cases |
| 5723 | python-pytest-mock |
| 5724 | python-pytest-pyvista |
| 5725 | python-scipy |
| 5726 | python-tqdm |
| 5727 | python-trimesh |
| 5728 | which |
| 5729 | xorg-server-for-tests)) |
| 5730 | (propagated-inputs |
| 5731 | (list python-cmcrameri |
| 5732 | python-cmocean |
| 5733 | python-colorcet |
| 5734 | python-imageio |
| 5735 | python-matplotlib |
| 5736 | python-meshio |
| 5737 | python-numpy |
| 5738 | python-pillow |
| 5739 | python-pooch |
| 5740 | python-scooby |
| 5741 | vtk-9.5)) |
| 5742 | (home-page "https://docs.pyvista.org/") |
| 5743 | (synopsis "3D plotting and mesh analysis through VTK") |
| 5744 | (description |
| 5745 | "PyVista is... |
| 5746 | |
| 5747 | @itemize |
| 5748 | @item @emph{Pythonic VTK}: a high-level API to the Visualization |
| 5749 | Toolkit (VTK); |
| 5750 | @item mesh data structures and filtering methods for spatial datasets; |
| 5751 | @item 3D plotting made simple and built for large/complex data geometries. |
| 5752 | @end itemize |
| 5753 | |
| 5754 | This package provides a Pythonic, well-documented interface exposing VTK's |
| 5755 | powerful visualization backend to facilitate rapid prototyping, analysis, and |
| 5756 | visual integration of spatially referenced datasets.") |
| 5757 | (license license:expat))) |
| 5758 | |
| 5759 | (define-public python-pyvistaqt |
| 5760 | (package |
| 5761 | (name "python-pyvistaqt") |
| 5762 | (version "0.11.3") |
| 5763 | (source |
| 5764 | (origin |
| 5765 | (method git-fetch) |
| 5766 | (uri (git-reference |
| 5767 | (url "https://github.com/pyvista/pyvistaqt") |
| 5768 | (commit version))) |
| 5769 | (file-name (git-file-name name version)) |
| 5770 | (sha256 |
| 5771 | (base32 "04f9cd98k463pdrpi8jby411x9mc0ih62gl0nv0h9w3r7pwl61yl")))) |
| 5772 | (build-system pyproject-build-system) |
| 5773 | (arguments |
| 5774 | (list |
| 5775 | #:phases |
| 5776 | #~(modify-phases %standard-phases |
| 5777 | (add-after 'unpack 'fix-pytest |
| 5778 | (lambda _ |
| 5779 | (substitute* "tests/conftest.py" |
| 5780 | (("pytest.skip") |
| 5781 | "pytest.mark.skipif")))) |
| 5782 | (add-before 'check 'before-check |
| 5783 | (lambda _ |
| 5784 | ;; Testing requires write access. |
| 5785 | (setenv "HOME" "/tmp") |
| 5786 | ;; Testing requires a running xorg server. |
| 5787 | (system "Xvfb :99 -screen 0 1024x768x24 &") |
| 5788 | (setenv "DISPLAY" ":99.0")))))) |
| 5789 | (propagated-inputs (list python-pyvista python-qtpy)) |
| 5790 | (native-inputs (list python-ipython |
| 5791 | python-matplotlib |
| 5792 | python-numpy |
| 5793 | python-pyqt-6 |
| 5794 | python-pytest |
| 5795 | python-pytest-cov |
| 5796 | python-pytest-qt |
| 5797 | python-setuptools |
| 5798 | python-sphinx-gallery |
| 5799 | xorg-server)) |
| 5800 | (home-page "https://github.com/pyvista/pyvistaqt") |
| 5801 | (synopsis "Qt support for PyVista") |
| 5802 | (description |
| 5803 | "@code{pyvistaqt} is a helper module for @code{pyvista} to enable you to |
| 5804 | plot using Qt by placing a vtk-widget into a background renderer. This can be |
| 5805 | quite useful when you desire to update your plot in real-time.") |
| 5806 | (license license:expat))) |
| 5807 | |
| 5808 | (define-public python-simplespectral |
| 5809 | (package |
| 5810 | (name "python-simplespectral") |
| 5811 | (version "1.0.0") |
| 5812 | (source |
| 5813 | (origin |
| 5814 | (method url-fetch) |
| 5815 | (uri (pypi-uri "SimpleSpectral" version)) |
| 5816 | (sha256 |
| 5817 | (base32 "0qh3xwdv9cwcqdamvglrhm586p4yaq1hd291py1fvykhk2a2d4w6")))) |
| 5818 | (build-system pyproject-build-system) |
| 5819 | (arguments |
| 5820 | (list #:tests? #f)) ;No tests, also not in git repository. |
| 5821 | (native-inputs |
| 5822 | (list python-setuptools)) |
| 5823 | (propagated-inputs |
| 5824 | (list python-numpy python-scipy)) |
| 5825 | (home-page "https://github.com/xmikos/simplespectral") |
| 5826 | (synopsis "FFT module for Python") |
| 5827 | (description |
| 5828 | "This package provides a simplified @code{scipy.signal.spectral} module |
| 5829 | to do spectral analysis in Python.") |
| 5830 | (license license:expat))) |
| 5831 | |
| 5832 | (define-public python-pods |
| 5833 | (package |
| 5834 | (name "python-pods") |
| 5835 | (version "0.1.17") |
| 5836 | (source |
| 5837 | (origin |
| 5838 | (method url-fetch) |
| 5839 | (uri (pypi-uri "pods" version)) |
| 5840 | (sha256 |
| 5841 | (base32 "1z57jdwml2jzr2dq20p7pzx3ayhajgfd2d0xqjvgzx576hp2z1ac")))) |
| 5842 | (build-system pyproject-build-system) |
| 5843 | ;; Tests depend on Nose framework and try to download test data from |
| 5844 | ;; <https://github.com/SheffieldML/GPmat>. |
| 5845 | (arguments (list #:tests? #f)) |
| 5846 | (native-inputs |
| 5847 | (list python-poetry-core)) |
| 5848 | (propagated-inputs |
| 5849 | (list python-pandas |
| 5850 | python-pyyaml |
| 5851 | python-scipy |
| 5852 | python-tables)) |
| 5853 | (home-page "https://github.com/lawrennd/ods") |
| 5854 | (synopsis "Python software for Open Data Science") |
| 5855 | (description "This package provides utilities and tools for open data |
| 5856 | science including tools for accessing data sets in Python.") |
| 5857 | (license license:bsd-3))) |
| 5858 | |
| 5859 | (define-public python-polars-runtime-32 |
| 5860 | (package |
| 5861 | (name "python-polars-runtime-32") |
| 5862 | (version "1.38.1") |
| 5863 | (source |
| 5864 | (origin |
| 5865 | (method url-fetch) |
| 5866 | (uri (pypi-uri "polars_runtime_32" version)) |
| 5867 | (sha256 |
| 5868 | (base32 "1v72zkyhcziiizpymjlh2d5rwnkmvhlp18ln8brp31y5yp8hxwh4")))) |
| 5869 | (build-system pyproject-build-system) |
| 5870 | (arguments |
| 5871 | (list |
| 5872 | #:imported-modules `(,@%cargo-build-system-modules |
| 5873 | ,@%pyproject-build-system-modules) |
| 5874 | #:modules '(((guix build cargo-build-system) #:prefix cargo:) |
| 5875 | (guix build pyproject-build-system) |
| 5876 | (guix build utils)) |
| 5877 | #:phases |
| 5878 | #~(modify-phases %standard-phases |
| 5879 | (add-after 'unpack 'build-without-rust-nightly |
| 5880 | (lambda _ |
| 5881 | ;; Add cargo flags that allow compilation without Rust nightly. |
| 5882 | (substitute* "pyproject.toml" |
| 5883 | ((".*tool.maturin.*" all) |
| 5884 | (string-append all "no-default-features = true\n" |
| 5885 | "features = [\"full\"]\n"))))) |
| 5886 | (add-after 'unpack 'fix-tikv-jemallocator |
| 5887 | (lambda _ |
| 5888 | ;; removes a patch.crates-io option that is packaged in |
| 5889 | ;; gnu/packages/rust-sources: rust-tikv-jemallocator-for-polars |
| 5890 | (substitute* "Cargo.toml" |
| 5891 | (("^tikv-jemallocator.*") "")))) |
| 5892 | ;; jemalloc needs unbundling for tikv-jemallocator-sys |
| 5893 | (add-before 'build 'override-jemalloc |
| 5894 | (lambda* (#:key inputs #:allow-other-keys) |
| 5895 | (let ((jemalloc (assoc-ref inputs "jemalloc"))) |
| 5896 | ;; This flag is needed when not using the bundled jemalloc. |
| 5897 | ;; https://github.com/tikv/jemallocator/issues/19 |
| 5898 | (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1") |
| 5899 | (setenv "JEMALLOC_OVERRIDE" |
| 5900 | (string-append jemalloc "/lib/libjemalloc_pic.a"))))) |
| 5901 | (add-after 'unpack 'prepare-cargo-build-system |
| 5902 | (lambda args |
| 5903 | (for-each |
| 5904 | (lambda (phase) |
| 5905 | (format #t "Running cargo phase: ~a~%" phase) |
| 5906 | (apply (assoc-ref cargo:%standard-phases phase) |
| 5907 | #:cargo-target #$(cargo-triplet) |
| 5908 | args)) |
| 5909 | '(unpack-rust-crates |
| 5910 | configure |
| 5911 | check-for-pregenerated-files |
| 5912 | patch-cargo-checksums))))))) |
| 5913 | (inputs |
| 5914 | (cons* jemalloc |
| 5915 | lz4 |
| 5916 | (list zstd "lib") |
| 5917 | (cargo-inputs 'python-polars-runtime-32))) |
| 5918 | (native-inputs |
| 5919 | (append |
| 5920 | (list maturin |
| 5921 | pkg-config |
| 5922 | rust |
| 5923 | `(,rust "cargo")) |
| 5924 | (or (and=> (%current-target-system) |
| 5925 | (compose list make-rust-sysroot)) |
| 5926 | '()))) |
| 5927 | (home-page "https://pola.rs/") |
| 5928 | (synopsis "Blazingly fast DataFrame library") |
| 5929 | (description "Polars is an analytical query engine written for DataFrames. |
| 5930 | It is designed to be fast, easy to use and expressive.") |
| 5931 | (properties '(("upstream-name" . "polars-runtime-32") |
| 5932 | (tunable? . #true))) |
| 5933 | (license license:expat))) |
| 5934 | |
| 5935 | (define-public python-polars |
| 5936 | (package |
| 5937 | (name "python-polars") |
| 5938 | (version "1.38.1") |
| 5939 | (source |
| 5940 | (origin |
| 5941 | (method url-fetch) |
| 5942 | (uri (pypi-uri "polars" version)) |
| 5943 | (sha256 |
| 5944 | (base32 "0fc2fx2p72g01nhhhfs1fzbwz58rcj7zppascanq1y2f6kjjnfl0")))) |
| 5945 | (build-system pyproject-build-system) |
| 5946 | (propagated-inputs (list python-polars-runtime-32)) |
| 5947 | (native-inputs (list python-setuptools)) |
| 5948 | (home-page "https://pola.rs/") |
| 5949 | (synopsis "Blazingly fast DataFrame library") |
| 5950 | (description |
| 5951 | "Polars is a DataFrame library for manipulating structured data.") |
| 5952 | (license license:expat))) |
| 5953 | |
| 5954 | (define-public python-pyfma |
| 5955 | (package |
| 5956 | (name "python-pyfma") |
| 5957 | (version "0.1.6") |
| 5958 | (source (origin |
| 5959 | (method git-fetch) |
| 5960 | (uri (git-reference |
| 5961 | (url "https://github.com/nschloe/pyfma") |
| 5962 | (commit version))) |
| 5963 | (file-name (git-file-name name version)) |
| 5964 | (sha256 |
| 5965 | (base32 |
| 5966 | "12i68jj9n1qj9phjnj6f0kmfhlsd3fqjlk9p6d4gs008azw5m8yn")))) |
| 5967 | (build-system pyproject-build-system) |
| 5968 | (propagated-inputs (list python-numpy-1)) |
| 5969 | (native-inputs (list pybind11-2 python-pytest python-setuptools)) |
| 5970 | (home-page "https://github.com/nschloe/pyfma") |
| 5971 | (synopsis "Fused multiply-add for Python") |
| 5972 | (description "@code{pyfma} provides an implementation of fused |
| 5973 | multiply-add which computes @code{(x*y) + z} with a single rounding. |
| 5974 | This is useful for dot products, matrix multiplications, polynomial |
| 5975 | evaluations (e.g., with Horner's rule), Newton's method for evaluating |
| 5976 | functions, convolutions, artificial neural networks etc.") |
| 5977 | (license license:expat))) |
| 5978 | |
| 5979 | (define-public python-pydicom |
| 5980 | (package |
| 5981 | (name "python-pydicom") |
| 5982 | (version "2.4.4") |
| 5983 | (source (origin |
| 5984 | (method git-fetch) |
| 5985 | (uri (git-reference |
| 5986 | (url "https://github.com/pydicom/pydicom") |
| 5987 | (commit (string-append "v" version)))) |
| 5988 | (file-name (git-file-name name version)) |
| 5989 | (sha256 |
| 5990 | (base32 |
| 5991 | "0ksyyc1hbhyqy289a2frn84ss29fb7czirx3dkxx56f4ia33b4c8")))) |
| 5992 | (build-system pyproject-build-system) |
| 5993 | (arguments |
| 5994 | (list |
| 5995 | #:test-flags |
| 5996 | ;; Skip tests that require networking. |
| 5997 | #~(list "-k" (string-append |
| 5998 | "not test_jpeg_ls_pixel_data.py" |
| 5999 | " and not test_gdcm_pixel_data.py" |
| 6000 | " and not test_pillow_pixel_data.py" |
| 6001 | " and not test_rle_pixel_data.py" |
| 6002 | " and not Test_JPEG_LS_Lossless_transfer_syntax" |
| 6003 | " and not test_numpy_pixel_data.py" |
| 6004 | " and not test_data_manager.py" |
| 6005 | " and not test_handler_util.py" |
| 6006 | " and not test_overlay_np.py" |
| 6007 | " and not test_encoders_pydicom.py" |
| 6008 | " and not test_encaps.py" |
| 6009 | " and not test_reading_ds_with_known_tags_with_UN_VR" |
| 6010 | " and not TestDatasetOverlayArray" |
| 6011 | " and not TestReader" |
| 6012 | " and not test_filewriter.py")))) |
| 6013 | (native-inputs (list python-pytest python-flit-core)) |
| 6014 | (inputs (list gdcm libjpeg-turbo)) |
| 6015 | (propagated-inputs (list python-numpy python-pillow)) |
| 6016 | (home-page "https://github.com/pydicom/pydicom") |
| 6017 | (synopsis "Python library for reading and writing DICOM data") |
| 6018 | (description "@code{python-pydicom} is a Python library for reading and |
| 6019 | writing DICOM medical imaging data. It can read, modify and write DICOM |
| 6020 | data.") |
| 6021 | (license license:expat))) |
| 6022 | |
| 6023 | (define-public python-supersmoother |
| 6024 | ;; 0.4 was release in 2017, there a lot of changes on master branch |
| 6025 | ;; providing tests fixtures. |
| 6026 | (let ((commit "0a81544ac6bb33bdb08deeba69e97a4ceebcebcf") |
| 6027 | (revision "0")) |
| 6028 | (package |
| 6029 | (name "python-supersmoother") |
| 6030 | (version (git-version "0.4" revision commit)) |
| 6031 | (source |
| 6032 | (origin |
| 6033 | (method git-fetch) ; no package in PyPI |
| 6034 | (uri (git-reference |
| 6035 | (url "https://github.com/jakevdp/supersmoother") |
| 6036 | (commit commit))) |
| 6037 | (file-name (git-file-name name version)) |
| 6038 | (sha256 |
| 6039 | (base32 "1r79nssw4a44zizvqg8y685nv3asdfj440s227phfww6kz33s3la")))) |
| 6040 | (build-system pyproject-build-system) |
| 6041 | (native-inputs |
| 6042 | (list python-pytest |
| 6043 | python-scipy |
| 6044 | python-setuptools)) |
| 6045 | (propagated-inputs |
| 6046 | (list python-numpy)) |
| 6047 | (home-page "http://github.com/jakevdp/supersmoother") |
| 6048 | (synopsis "Python implementation of Friedman's Supersmoother") |
| 6049 | (description |
| 6050 | "This package provides an efficient implementation of |
| 6051 | @url{https://www.slac.stanford.edu/pubs/slacpubs/3250/slac-pub-3477.pdf, |
| 6052 | Friedman's SuperSmoother} based in Python. It makes use of numpy for fast |
| 6053 | numerical computation.") |
| 6054 | (license license:bsd-2)))) |
| 6055 | |
| 6056 | (define-public python-pylems |
| 6057 | (package |
| 6058 | (name "python-pylems") |
| 6059 | (version "0.6.9") |
| 6060 | (source |
| 6061 | (origin |
| 6062 | (method git-fetch) |
| 6063 | (uri (git-reference |
| 6064 | (url "https://github.com/LEMS/pylems") |
| 6065 | (commit (string-append "v" version)))) |
| 6066 | (file-name (git-file-name name version)) |
| 6067 | (sha256 |
| 6068 | (base32 "0gimdx89cdla1b6zzkdrmj979nn2zy2475qvpwxxas0iv27ql0vj")))) |
| 6069 | (build-system pyproject-build-system) |
| 6070 | (arguments |
| 6071 | ;; Disable tests that require networking |
| 6072 | (list #:test-flags #~(list "./lems/test" "-k" "not test_load_write_xml"))) |
| 6073 | (native-inputs (list python-setuptools python-pytest)) |
| 6074 | (propagated-inputs (list python-lxml python-matplotlib)) |
| 6075 | (home-page "https://github.com/LEMS/pylems") |
| 6076 | (synopsis |
| 6077 | "Python support for the Low Entropy Model Specification language (LEMS)") |
| 6078 | (description "A @acronym{LEMS, Low Entropy Model Specification} simulator |
| 6079 | written in Python which can be used to run NeuroML2 models.") |
| 6080 | (license license:lgpl3))) |
| 6081 | |
| 6082 | (define-public python-pynrrd |
| 6083 | (package |
| 6084 | (name "python-pynrrd") |
| 6085 | (version "1.1.3") |
| 6086 | (source (origin |
| 6087 | (method git-fetch) |
| 6088 | (uri (git-reference |
| 6089 | (url "https://github.com/mhe/pynrrd") |
| 6090 | (commit (string-append "v" version)))) |
| 6091 | (file-name (git-file-name name version)) |
| 6092 | (sha256 |
| 6093 | (base32 |
| 6094 | "1l0hjbqzf5i1bmpxpblpyyqkhci3mb5n07x6hqf2a91hggfyrvda")))) |
| 6095 | (build-system pyproject-build-system) |
| 6096 | (native-inputs |
| 6097 | (list python-pytest python-setuptools)) |
| 6098 | (propagated-inputs |
| 6099 | (list python-numpy)) |
| 6100 | (home-page "https://github.com/mhe/pynrrd") |
| 6101 | (synopsis "Python module for reading and writing NRRD files") |
| 6102 | (description |
| 6103 | "@code{pynrrd} is a Python module for reading and writing @acronym{NRRD, |
| 6104 | Nearly Raw Raster Data} files (format designed to support scientific |
| 6105 | visualization and image processing involving N-dimensional raster data) into |
| 6106 | and from numpy arrays.") |
| 6107 | (license license:expat))) |
| 6108 | |
| 6109 | (define-public python-pynsee |
| 6110 | (package |
| 6111 | (name "python-pynsee") |
| 6112 | (version "0.1.8") |
| 6113 | (source |
| 6114 | (origin |
| 6115 | (method url-fetch) |
| 6116 | (uri (pypi-uri "pynsee" version)) |
| 6117 | (sha256 |
| 6118 | (base32 "1w084ynwdd9f4wpcnakqc0nxcbj9gr8vppv4rd258i3dp1qq4sw5")))) |
| 6119 | (build-system pyproject-build-system) |
| 6120 | (arguments (list #:tests? #f)) ; XXX: Tests require network access. |
| 6121 | (native-inputs |
| 6122 | (list python-setuptools |
| 6123 | python-wheel)) |
| 6124 | (propagated-inputs |
| 6125 | (list python-appdirs |
| 6126 | python-openpyxl |
| 6127 | python-pandas |
| 6128 | python-platformdirs |
| 6129 | python-pyarrow |
| 6130 | python-requests |
| 6131 | python-shapely |
| 6132 | python-tqdm |
| 6133 | python-unidecode |
| 6134 | python-urllib3 |
| 6135 | python-xlrd)) |
| 6136 | (home-page "https://pynsee.readthedocs.io") |
| 6137 | (synopsis |
| 6138 | "Tools to Easily Search and Download French Data From INSEE and IGN APIs") |
| 6139 | (description |
| 6140 | "This package provides tools to easily search and download French data |
| 6141 | from INSEE and IGN APIs. This data includes more than 150 000 macroeconomic |
| 6142 | series, a dozen datasets of local french data, numerous sources available on |
| 6143 | @url{insee.fr}, geographical limits of administrative areas taken from IGN as |
| 6144 | well as key metadata and SIRENE database containing data on all French |
| 6145 | compagnies.") |
| 6146 | (license license:expat))) |
| 6147 | |
| 6148 | (define-public python-dvc-objects |
| 6149 | (package |
| 6150 | (name "python-dvc-objects") |
| 6151 | (version "5.1.1") |
| 6152 | (home-page "https://github.com/iterative/dvc-objects") |
| 6153 | (source |
| 6154 | (origin |
| 6155 | (method url-fetch) |
| 6156 | (uri (pypi-uri "dvc_objects" version)) |
| 6157 | (sha256 |
| 6158 | (base32 "1amx5z8k2v2hbsajg0dcd5dxmmlv9bnbchpas95s8sj86cm8yc4y")))) |
| 6159 | (build-system pyproject-build-system) |
| 6160 | (propagated-inputs (list python-fsspec |
| 6161 | python-funcy-1.14)) |
| 6162 | (native-inputs |
| 6163 | (list python-mypy |
| 6164 | python-pytest |
| 6165 | python-pytest-asyncio |
| 6166 | python-pytest-benchmark |
| 6167 | python-pytest-cov |
| 6168 | python-pytest-mock |
| 6169 | python-pytest-sugar |
| 6170 | python-reflink |
| 6171 | python-setuptools |
| 6172 | python-setuptools-scm |
| 6173 | python-wheel)) |
| 6174 | (synopsis "Filesystem and object-db level abstractions for DVC") |
| 6175 | (description "Dvc objects provides a filesystem and object-db level |
| 6176 | abstractions to use in dvc and dvc-data.") |
| 6177 | (license license:asl2.0))) |
| 6178 | |
| 6179 | (define-public python-dvc-data |
| 6180 | (package |
| 6181 | (name "python-dvc-data") |
| 6182 | (version "3.16.12") |
| 6183 | (home-page "https://github.com/iterative/dvc-data") |
| 6184 | (source (origin |
| 6185 | (method url-fetch) |
| 6186 | (uri (pypi-uri "dvc_data" version)) |
| 6187 | (sha256 |
| 6188 | (base32 |
| 6189 | "156iwdn7v5jhwbpwz92n28qiasgcbmcqv9vxg8xbvdfxzlzw0b7r")))) |
| 6190 | (build-system pyproject-build-system) |
| 6191 | (propagated-inputs |
| 6192 | (list python-attrs |
| 6193 | python-dictdiffer |
| 6194 | python-diskcache |
| 6195 | python-dvc-objects |
| 6196 | python-fsspec |
| 6197 | python-funcy-1.14 |
| 6198 | python-orjson |
| 6199 | python-pygtrie |
| 6200 | python-sqltrie |
| 6201 | python-tqdm)) |
| 6202 | (native-inputs |
| 6203 | (list python-click |
| 6204 | python-pytest |
| 6205 | python-pytest-benchmark |
| 6206 | python-pytest-cov |
| 6207 | python-pytest-mock |
| 6208 | ;; python-pytest-servers is not packaged in Guix yet |
| 6209 | python-setuptools |
| 6210 | python-setuptools-scm |
| 6211 | python-typer |
| 6212 | python-wheel)) |
| 6213 | (arguments |
| 6214 | (list |
| 6215 | #:test-flags |
| 6216 | ;; TODO: package python-pytest-server with its transitive dependencies |
| 6217 | #~(list "--ignore=tests/hashfile/test_db.py" |
| 6218 | "--ignore=tests/hashfile/test_db_index.py" |
| 6219 | "--ignore=tests/hashfile/test_obj.py" |
| 6220 | "--ignore=tests/index/test_build.py" |
| 6221 | "--ignore=tests/index/test_checkout.py" |
| 6222 | "--ignore=tests/index/test_fs.py" |
| 6223 | "--ignore=tests/index/test_index.py" |
| 6224 | "--ignore=tests/index/test_storage.py") |
| 6225 | #:phases |
| 6226 | #~(modify-phases %standard-phases |
| 6227 | (add-after 'unpack 'patch-pyproject |
| 6228 | (lambda _ |
| 6229 | ;; setuptools cannot handle both license and license-files |
| 6230 | (substitute* "pyproject.toml" |
| 6231 | (("^license = .*") "license = {text = \"Apache-2.0\"}\n") |
| 6232 | (("^license-files = .*") ""))))))) |
| 6233 | (synopsis "DVC's data management subsystem") |
| 6234 | (description "Dvc data is DVC's data management subsystem.") |
| 6235 | (license license:asl2.0))) |
| 6236 | |
| 6237 | (define-public python-pyqtgraph |
| 6238 | (package |
| 6239 | (name "python-pyqtgraph") |
| 6240 | (version "0.13.7") |
| 6241 | (source |
| 6242 | (origin |
| 6243 | (method url-fetch) |
| 6244 | (uri (pypi-uri "pyqtgraph" version)) |
| 6245 | (sha256 |
| 6246 | (base32 "1qyr461hcvhgy02slfkgrbip2xwa8zz6dvmi1476v6f66lclzy34")))) |
| 6247 | (build-system pyproject-build-system) |
| 6248 | (arguments |
| 6249 | ;; tests: 949 passed, 1356 skipped, 2 deselected, 8 xfailed, 130 warnings |
| 6250 | (list #:test-flags |
| 6251 | ;; Failed: CALL ERROR: Exceptions caught in Qt event loop. |
| 6252 | #~(list "--deselect=tests/exporters/test_svg.py::test_plotscene" |
| 6253 | ;; The test_reload test fails. It suggests to disable |
| 6254 | ;; assert rewriting in Pytest, but it still doesn't pass. |
| 6255 | "-k" "not test_reload" |
| 6256 | ;; Run unit tets only. |
| 6257 | "tests") |
| 6258 | #:phases |
| 6259 | #~(modify-phases %standard-phases |
| 6260 | (add-before 'check 'set-qpa |
| 6261 | (lambda _ |
| 6262 | (setenv "QT_QPA_PLATFORM" "offscreen")))))) |
| 6263 | (native-inputs |
| 6264 | (list python-pytest |
| 6265 | ;; Do not propagate Qt5/Qt6 let the user of the package to select |
| 6266 | ;; any supported one, see |
| 6267 | ;; <https://pyqtgraph.readthedocs.io/en/pyqtgraph-0.13.7> |
| 6268 | ;; </getting_started/how_to_use.html#pyqt-and-pyside>. |
| 6269 | python-pyqt-6 |
| 6270 | python-pytest-qt |
| 6271 | python-setuptools)) |
| 6272 | (propagated-inputs |
| 6273 | (list python-h5py |
| 6274 | python-numpy |
| 6275 | python-pyopengl |
| 6276 | python-scipy)) |
| 6277 | (home-page "https://www.pyqtgraph.org") |
| 6278 | (synopsis "Scientific graphics and GUI library for Python") |
| 6279 | (description |
| 6280 | "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2 |
| 6281 | and PySide6. It is intended for use in mathematics, scientific or engineering |
| 6282 | applications.") |
| 6283 | (license license:expat))) |
| 6284 | |
| 6285 | (define-public pyzo |
| 6286 | (package |
| 6287 | (name "pyzo") |
| 6288 | (version "4.20.0") |
| 6289 | (source |
| 6290 | (origin |
| 6291 | (method git-fetch) |
| 6292 | (uri (git-reference |
| 6293 | (url "https://github.com/pyzo/pyzo") |
| 6294 | (commit (string-append "v" version)))) |
| 6295 | (file-name (git-file-name name version)) |
| 6296 | (sha256 |
| 6297 | (base32 "1a82k7hjmv20lrwiwsdrvczrm21wq16m4snwsirwhj0jh5k1x9iw")))) |
| 6298 | (build-system pyproject-build-system) |
| 6299 | (arguments |
| 6300 | (list |
| 6301 | #:test-flags |
| 6302 | #~(list "--ignore-glob=pyzo/yoton/tests/*" ; XXX: yoton is outdated. |
| 6303 | "--ignore=pyzo/codeeditor/_test.py"))) ; XXX: cannot import qt. |
| 6304 | (native-inputs |
| 6305 | (list python-flit-core |
| 6306 | python-pytest |
| 6307 | python-setuptools)) |
| 6308 | (inputs (list python-pyside-6)) |
| 6309 | (home-page "https://pyzo.org") |
| 6310 | (synopsis "Python IDE for scientific computing") |
| 6311 | (description |
| 6312 | "Pyzo is a Python IDE focused on interactivity and introspection,which |
| 6313 | makes it very suitable for scientific computing. Its practical design is |
| 6314 | aimed at simplicity and efficiency. |
| 6315 | |
| 6316 | It consists of two main components, the editor and the shell, and uses a set |
| 6317 | of pluggable tools to help the programmer in various ways. Some example tools |
| 6318 | are source structure, project manager, interactive help, workspace...") |
| 6319 | (license license:bsd-2))) |
| 6320 | |
| 6321 | (define-public snakemake |
| 6322 | (package |
| 6323 | (name "snakemake") |
| 6324 | (version "8.30.0") |
| 6325 | (source |
| 6326 | (origin |
| 6327 | (method url-fetch) |
| 6328 | (uri (pypi-uri "snakemake" version)) |
| 6329 | (sha256 |
| 6330 | (base32 "08k6qk886a6f79higkd0pjjrq9sn6w5gk0gdgx88rhr1aln1qk7x")))) |
| 6331 | (build-system pyproject-build-system) |
| 6332 | (arguments |
| 6333 | (list |
| 6334 | #:test-flags |
| 6335 | #~(list |
| 6336 | ;; XXX: Unclear why these tests fail. |
| 6337 | "--ignore=tests/test_report_href/test_script.py" |
| 6338 | "--ignore=tests/test_script_py/scripts/test_explicit_import.py" |
| 6339 | "--ignore=tests/test_output_index.py" |
| 6340 | ;; We don't care about testing old [email protected] on Guix. |
| 6341 | "--ignore=tests/test_conda_python_3_7_script/test_script_python_3_7.py" |
| 6342 | ;; Those require additional snakemake plugins. |
| 6343 | "--ignore=tests/test_api.py" |
| 6344 | "--ignore=tests/test_executor_test_suite.py" |
| 6345 | ;; We don't care about lints. |
| 6346 | "--ignore=tests/test_linting.py" |
| 6347 | ;; These tests attempt to change S3 buckets on AWS and fail |
| 6348 | ;; because there are no AWS credentials. |
| 6349 | "--ignore=tests/test_tibanna" |
| 6350 | ;; It's a similar story with this test, which requires access |
| 6351 | ;; to the Google Storage service. |
| 6352 | "--ignore=tests/test_google_lifesciences") |
| 6353 | #:phases |
| 6354 | #~(modify-phases %standard-phases |
| 6355 | (add-after 'unpack 'avoid-assets-download |
| 6356 | (lambda _ |
| 6357 | (substitute* "setup.py" |
| 6358 | (("^from assets import Assets") "") |
| 6359 | (("^Assets\\.deploy\\(\\)") "")))) |
| 6360 | ;; For cluster execution Snakemake will call Python. Since there is |
| 6361 | ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We |
| 6362 | ;; fix this by calling the snakemake wrapper instead. |
| 6363 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake |
| 6364 | (lambda _ |
| 6365 | (substitute* "snakemake/executors/__init__.py" |
| 6366 | (("self\\.get_python_executable\\(\\),") |
| 6367 | "") |
| 6368 | (("\"-m snakemake\"") |
| 6369 | (string-append "\"" #$output |
| 6370 | "/bin/snakemake" "\"")) |
| 6371 | ;; The snakemake command produced by format_job_exec contains |
| 6372 | ;; references to /gnu/store. Prior to patching above that's |
| 6373 | ;; just a reference to Python; after patching it's a reference |
| 6374 | ;; to the snakemake executable. |
| 6375 | ;; |
| 6376 | ;; In Tibanna execution mode Snakemake arranges for a certain |
| 6377 | ;; Docker image to be deployed to AWS. It then passes its own |
| 6378 | ;; command line to Tibanna. This is misguided because it only |
| 6379 | ;; ever works if the local Snakemake command was run inside |
| 6380 | ;; the same Docker image. In the case of using Guix this is |
| 6381 | ;; never correct, so we need to replace the store reference. |
| 6382 | (("tibanna_args.command = command") |
| 6383 | (string-append |
| 6384 | "tibanna_args.command = command.replace('" |
| 6385 | #$output "/bin/snakemake', 'python3 -m snakemake')"))))) |
| 6386 | (add-after 'unpack 'patch-version |
| 6387 | (lambda _ |
| 6388 | (substitute* "setup.py" |
| 6389 | (("version=versioneer.get_version\\(\\)") |
| 6390 | (format #f "version=~s" #$version))) |
| 6391 | (substitute* '("snakemake/_version.py" |
| 6392 | "versioneer.py") |
| 6393 | (("0\\+unknown") #$version)))) |
| 6394 | (add-before 'check 'pre-check |
| 6395 | (lambda* (#:key tests? #:allow-other-keys) |
| 6396 | (when tests? |
| 6397 | (setenv "HOME" "/tmp"))))))) |
| 6398 | (propagated-inputs |
| 6399 | (list python-appdirs |
| 6400 | python-conda-inject |
| 6401 | python-configargparse |
| 6402 | python-connection-pool |
| 6403 | python-dpath |
| 6404 | python-gitpython |
| 6405 | python-humanfriendly |
| 6406 | python-immutables |
| 6407 | python-jinja2 |
| 6408 | python-jsonschema |
| 6409 | python-nbformat |
| 6410 | python-packaging |
| 6411 | python-psutil |
| 6412 | python-pulp |
| 6413 | python-pyyaml |
| 6414 | python-requests |
| 6415 | python-reretry |
| 6416 | python-smart-open |
| 6417 | python-snakemake-interface-common |
| 6418 | python-snakemake-interface-executor-plugins |
| 6419 | python-snakemake-interface-report-plugins |
| 6420 | python-snakemake-interface-storage-plugins |
| 6421 | python-tabulate |
| 6422 | python-throttler |
| 6423 | python-wrapt |
| 6424 | python-yte)) |
| 6425 | (native-inputs |
| 6426 | (list python-docutils |
| 6427 | python-numpy |
| 6428 | python-pandas |
| 6429 | python-setuptools |
| 6430 | python-tomli)) |
| 6431 | (home-page "https://snakemake.readthedocs.io") |
| 6432 | (synopsis "Python-based execution environment for make-like workflows") |
| 6433 | (description |
| 6434 | "Snakemake aims to reduce the complexity of creating workflows by |
| 6435 | providing a clean and modern domain specific specification language (DSL) in |
| 6436 | Python style, together with a fast and comfortable execution environment.") |
| 6437 | (license license:expat))) |
| 6438 | |
| 6439 | (define-public snakemake-5 |
| 6440 | (package |
| 6441 | (name "snakemake") |
| 6442 | (version "5.32.2") |
| 6443 | (source |
| 6444 | (origin |
| 6445 | (method git-fetch) |
| 6446 | (uri (git-reference |
| 6447 | (url "https://github.com/snakemake/snakemake") |
| 6448 | (commit (string-append "v" version)))) |
| 6449 | (file-name (git-file-name name version)) |
| 6450 | (sha256 |
| 6451 | (base32 "0nxp4z81vykv07kv2b6zrwk7ns8s10zqsb7vcignp8695yq3nlcm")))) |
| 6452 | (build-system pyproject-build-system) |
| 6453 | (arguments |
| 6454 | (list |
| 6455 | #:test-flags |
| 6456 | '(list |
| 6457 | ;; We have no TES support. |
| 6458 | "--ignore=tests/test_tes.py" |
| 6459 | ;; This test attempts to change S3 buckets on AWS and fails |
| 6460 | ;; because there are no AWS credentials. |
| 6461 | "--ignore=tests/test_tibanna.py" |
| 6462 | ;; It's a similar story with this test, which requires access |
| 6463 | ;; to the Google Storage service. |
| 6464 | "--ignore=tests/test_google_lifesciences.py" |
| 6465 | ;; Unclear failure. |
| 6466 | "-k" "not test_lint[long_run-positive]") |
| 6467 | #:phases |
| 6468 | #~(modify-phases %standard-phases |
| 6469 | (add-after 'unpack 'tabulate-compatibility |
| 6470 | (lambda _ |
| 6471 | (substitute* "snakemake/dag.py" |
| 6472 | (("\"job\": rule,") |
| 6473 | "\"job\": rule.name,")))) |
| 6474 | (add-after 'unpack 'patch-version |
| 6475 | (lambda _ |
| 6476 | (substitute* "setup.py" |
| 6477 | (("version=versioneer.get_version\\(\\)") |
| 6478 | (format #f "version=~s" #$version))) |
| 6479 | (substitute* '("snakemake/_version.py" |
| 6480 | "versioneer.py") |
| 6481 | (("0\\+unknown") #$version)))) |
| 6482 | ;; For cluster execution Snakemake will call Python. Since there is |
| 6483 | ;; no suitable PYTHONPATH set, cluster execution will fail. We fix |
| 6484 | ;; this by calling the snakemake wrapper instead. |
| 6485 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake |
| 6486 | (lambda _ |
| 6487 | (substitute* "snakemake/executors/__init__.py" |
| 6488 | (("\\{sys.executable\\} -m snakemake") |
| 6489 | (string-append #$output "/bin/snakemake"))))) |
| 6490 | (add-before 'check 'pre-check |
| 6491 | (lambda _ (setenv "HOME" "/tmp")))))) |
| 6492 | (propagated-inputs |
| 6493 | (list python-appdirs |
| 6494 | python-configargparse |
| 6495 | python-datrie |
| 6496 | python-docutils |
| 6497 | python-gitpython |
| 6498 | python-jinja2 |
| 6499 | python-jsonschema |
| 6500 | python-nbformat |
| 6501 | python-networkx |
| 6502 | python-psutil |
| 6503 | python-pulp |
| 6504 | python-pyyaml |
| 6505 | python-ratelimiter |
| 6506 | python-requests |
| 6507 | python-toposort |
| 6508 | python-wrapt)) |
| 6509 | (native-inputs |
| 6510 | (list git-minimal |
| 6511 | python-wrapper |
| 6512 | python-pytest |
| 6513 | python-pandas |
| 6514 | python-requests-mock |
| 6515 | python-setuptools |
| 6516 | python-wheel)) |
| 6517 | (home-page "https://snakemake.readthedocs.io") |
| 6518 | (synopsis "Python-based execution environment for make-like workflows") |
| 6519 | (description |
| 6520 | "Snakemake aims to reduce the complexity of creating workflows by |
| 6521 | providing a clean and modern domain specific specification language (DSL) in |
| 6522 | Python style, together with a fast and comfortable execution environment.") |
| 6523 | (license license:expat))) |
| 6524 | |
| 6525 | (define-public snakemake-6 |
| 6526 | (package |
| 6527 | (inherit snakemake-5) |
| 6528 | (name "snakemake") |
| 6529 | (version "6.15.5") |
| 6530 | (source |
| 6531 | (origin |
| 6532 | (method git-fetch) |
| 6533 | (uri (git-reference |
| 6534 | (url "https://github.com/snakemake/snakemake") |
| 6535 | (commit (string-append "v" version)))) |
| 6536 | (file-name (git-file-name name version)) |
| 6537 | (sha256 |
| 6538 | (base32 "09yrpi9f86r9yvcm2dfjs5zy87c4j31bxama77kfd6y8yfrrjlai")))) |
| 6539 | (build-system pyproject-build-system) |
| 6540 | (arguments |
| 6541 | (list |
| 6542 | #:test-flags |
| 6543 | '(list |
| 6544 | ;; This test attempts to change S3 buckets on AWS and fails |
| 6545 | ;; because there are no AWS credentials. |
| 6546 | "--ignore=tests/test_tibanna.py" |
| 6547 | ;; E ModuleNotFoundError: No module named 'google' |
| 6548 | "--ignore=tests/test_google_lifesciences.py" |
| 6549 | ;; Unclear failure. |
| 6550 | "-k" "not test_lint[long_run-positive]") |
| 6551 | #:phases |
| 6552 | #~(modify-phases %standard-phases |
| 6553 | ;; For cluster execution Snakemake will call Python. Since there is |
| 6554 | ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We |
| 6555 | ;; fix this by calling the snakemake wrapper instead. |
| 6556 | |
| 6557 | ;; XXX: There is another instance of sys.executable on line 692, but |
| 6558 | ;; it is not clear how to patch it. |
| 6559 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake |
| 6560 | (lambda* (#:key outputs #:allow-other-keys) |
| 6561 | (substitute* "snakemake/executors/__init__.py" |
| 6562 | (("\\{sys.executable\\} -m snakemake") |
| 6563 | (string-append #$output "/bin/snakemake"))))) |
| 6564 | (add-after 'unpack 'tabulate-compatibility |
| 6565 | (lambda _ |
| 6566 | (substitute* "snakemake/dag.py" |
| 6567 | (("\"job\": rule,") |
| 6568 | "\"job\": rule.name,")))) |
| 6569 | (add-after 'unpack 'patch-version |
| 6570 | (lambda _ |
| 6571 | (substitute* "setup.py" |
| 6572 | (("version=versioneer.get_version\\(\\)") |
| 6573 | (format #f "version=~s" #$version))) |
| 6574 | (substitute* '("snakemake/_version.py" |
| 6575 | "versioneer.py") |
| 6576 | (("0\\+unknown") #$version)))) |
| 6577 | (add-before 'check 'pre-check |
| 6578 | (lambda _ (setenv "HOME" "/tmp")))))) |
| 6579 | (propagated-inputs |
| 6580 | (list python-appdirs |
| 6581 | python-configargparse |
| 6582 | python-connection-pool |
| 6583 | python-datrie |
| 6584 | python-docutils |
| 6585 | python-filelock |
| 6586 | python-gitpython |
| 6587 | python-jinja2 |
| 6588 | python-jsonschema |
| 6589 | python-nbformat |
| 6590 | python-networkx |
| 6591 | python-psutil |
| 6592 | python-pulp |
| 6593 | python-pyyaml |
| 6594 | python-py-tes |
| 6595 | python-ratelimiter |
| 6596 | python-requests |
| 6597 | python-smart-open |
| 6598 | python-stopit |
| 6599 | python-tabulate |
| 6600 | python-toposort |
| 6601 | python-wrapt)) |
| 6602 | (native-inputs |
| 6603 | (list git-minimal |
| 6604 | python-wrapper |
| 6605 | python-pytest |
| 6606 | python-pandas |
| 6607 | python-requests-mock |
| 6608 | python-setuptools |
| 6609 | python-wheel)))) |
| 6610 | |
| 6611 | (define-public snakemake-7 |
| 6612 | (package |
| 6613 | (inherit snakemake-6) |
| 6614 | (name "snakemake") |
| 6615 | (version "7.32.4") |
| 6616 | (source |
| 6617 | (origin |
| 6618 | (method git-fetch) |
| 6619 | (uri (git-reference |
| 6620 | (url "https://github.com/snakemake/snakemake") |
| 6621 | (commit (string-append "v" version)))) |
| 6622 | (file-name (git-file-name name version)) |
| 6623 | (sha256 |
| 6624 | (base32 "1d5hizai89k1glfqfkvf1ghj0l7wm8il6gl5pfwk2gkza87yka6d")))) |
| 6625 | (build-system pyproject-build-system) |
| 6626 | (arguments |
| 6627 | (list |
| 6628 | #:test-flags |
| 6629 | ;; This test attempts to change S3 buckets on AWS and fails |
| 6630 | ;; because there are no AWS credentials. |
| 6631 | '(list "--ignore=tests/test_tibanna.py" |
| 6632 | ;; It's a similar story with this test, which requires access to |
| 6633 | ;; the Google Storage service. |
| 6634 | "--ignore=tests/test_google_lifesciences.py" |
| 6635 | "--ignore-glob=tests/test_conda_python_3_7_script/*" |
| 6636 | ;; We don't have a slurm installation in the build environment |
| 6637 | "--ignore=tests/test_slurm.py") |
| 6638 | #:phases |
| 6639 | #~(modify-phases %standard-phases |
| 6640 | ;; For cluster execution Snakemake will call Python. Since there is |
| 6641 | ;; no suitable GUIX_PYTHONPATH set, cluster execution will fail. We |
| 6642 | ;; fix this by calling the snakemake wrapper instead. |
| 6643 | (add-after 'unpack 'call-wrapper-not-wrapped-snakemake |
| 6644 | (lambda* (#:key outputs #:allow-other-keys) |
| 6645 | (substitute* "snakemake/executors/__init__.py" |
| 6646 | (("self\\.get_python_executable\\(\\),") |
| 6647 | "") |
| 6648 | (("\"-m snakemake\"") |
| 6649 | (string-append "\"" #$output |
| 6650 | "/bin/snakemake" "\"")) |
| 6651 | ;; The snakemake command produced by format_job_exec contains |
| 6652 | ;; references to /gnu/store. Prior to patching above that's |
| 6653 | ;; just a reference to Python; after patching it's a reference |
| 6654 | ;; to the snakemake executable. |
| 6655 | ;; |
| 6656 | ;; In Tibanna execution mode Snakemake arranges for a certain |
| 6657 | ;; Docker image to be deployed to AWS. It then passes its own |
| 6658 | ;; command line to Tibanna. This is misguided because it only |
| 6659 | ;; ever works if the local Snakemake command was run inside |
| 6660 | ;; the same Docker image. In the case of using Guix this is |
| 6661 | ;; never correct, so we need to replace the store reference. |
| 6662 | (("tibanna_args.command = command") |
| 6663 | (string-append |
| 6664 | "tibanna_args.command = command.replace('" |
| 6665 | #$output "/bin/snakemake', 'python3 -m snakemake')"))))) |
| 6666 | (add-after 'unpack 'patch-version |
| 6667 | (lambda _ |
| 6668 | (substitute* "setup.py" |
| 6669 | (("version=versioneer.get_version\\(\\)") |
| 6670 | (format #f "version=~s" #$version))) |
| 6671 | (substitute* '("snakemake/_version.py" |
| 6672 | "versioneer.py") |
| 6673 | (("0\\+unknown") #$version)))) |
| 6674 | (add-before 'check 'pre-check |
| 6675 | (lambda _ (setenv "HOME" "/tmp")))))) |
| 6676 | (propagated-inputs |
| 6677 | (list python-appdirs |
| 6678 | python-configargparse |
| 6679 | python-connection-pool |
| 6680 | python-datrie |
| 6681 | python-docutils |
| 6682 | python-filelock |
| 6683 | python-gitpython |
| 6684 | python-humanfriendly |
| 6685 | python-jinja2 |
| 6686 | python-jsonschema |
| 6687 | python-nbformat |
| 6688 | python-networkx |
| 6689 | python-psutil |
| 6690 | python-pulp |
| 6691 | python-pyyaml |
| 6692 | python-py-tes |
| 6693 | python-requests |
| 6694 | python-retry |
| 6695 | python-reretry |
| 6696 | python-smart-open |
| 6697 | python-stopit |
| 6698 | python-tabulate |
| 6699 | python-throttler |
| 6700 | python-toposort |
| 6701 | python-wrapt |
| 6702 | python-yte)) |
| 6703 | (native-inputs |
| 6704 | (list git-minimal |
| 6705 | python-wrapper |
| 6706 | python-pytest |
| 6707 | python-pandas |
| 6708 | python-requests-mock |
| 6709 | python-setuptools |
| 6710 | python-wheel)))) |
| 6711 | |
| 6712 | (define-public python-orsopy |
| 6713 | (package |
| 6714 | (name "python-orsopy") |
| 6715 | (version "1.2.1") |
| 6716 | (source |
| 6717 | (origin |
| 6718 | (method url-fetch) |
| 6719 | (uri (pypi-uri "orsopy" version)) |
| 6720 | (sha256 |
| 6721 | (base32 "1fpp9h93p55sa4cfsix71ibj74fdrgh2kzmw2rg06ya8q0c4ndik")))) |
| 6722 | (build-system python-build-system) |
| 6723 | (arguments |
| 6724 | (list |
| 6725 | #:phases |
| 6726 | #~(modify-phases %standard-phases |
| 6727 | (replace 'check |
| 6728 | (lambda* (#:key tests? #:allow-other-keys) |
| 6729 | (when tests? |
| 6730 | (invoke "pytest" "-vv" |
| 6731 | ;; These tests require network access. |
| 6732 | "--ignore=orsopy/slddb/tests/test_webapi.py" |
| 6733 | "--deselect=orsopy/fileio/tests/test_model_language.py::TestSubStack::test_resolve_layers" |
| 6734 | "--deselect=orsopy/fileio/tests/test_model_language.py::TestMaterial::test_density_lookup_elements" |
| 6735 | "--deselect=orsopy/fileio/tests/test_model_language.py::TestSampleModel::test_resolve_to_layers"))))))) |
| 6736 | (propagated-inputs |
| 6737 | (list python-numpy python-pyyaml python-jsonschema python-h5py)) |
| 6738 | (native-inputs |
| 6739 | (list python-pytest python-pint)) |
| 6740 | (home-page "https://github.com/reflectivity/orsopy") |
| 6741 | (synopsis "Open Reflectometry Standards Organization Python tools") |
| 6742 | (description |
| 6743 | "This package provides Python tools for the Open Reflectometry Standards |
| 6744 | Organization (ORSO). It includes utilities for working with reflectometry |
| 6745 | data files and the ORSO file format.") |
| 6746 | (license license:expat))) |
| 6747 | |
| 6748 | ;;; |
| 6749 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 6750 | ;;; of a merge conflict, place them above by existing packages with similar |
| 6751 | ;;; functionality or similar names. |
| 6752 | ;;; |