From accd091fffcfd7a1d9353311a455783f09519428 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 6 Jan 2024 11:32:56 +0100 Subject: gnu: python-scipy: Update to 1.11.4. * gnu/packages/python-science.scm (python-scipy): Update to 1.11.4. [arguments]: Use mesonpy backend. [inputs]: Replace pybind11 with pybind11-2.10. [native-inputs]: Add python-click, python-doit, python-pooch, and python-pydevtool; replace python-cython with python-cython-0.29.35. Change-Id: I4b26e1b6382899bba24f84461f154e97765e08f5 --- gnu/packages/python-science.scm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 8065de0e999..4a99002b2b7 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -84,21 +84,16 @@ (define-public python-scipy (package (name "python-scipy") - (version "1.10.1") + (version "1.11.4") (source (origin (method url-fetch) (uri (pypi-uri "scipy" version)) (sha256 - (base32 "19gk88nvrxl050nasz25qpmmqvbdk247bkj09jx8jibv1awdzy9c")))) + (base32 "1amfxpnni0cagwjpb0i1kdgnh4sh484ryn4gfkgbjcspgy7bg8lh")))) (build-system pyproject-build-system) (arguments (list - ;; FIXME: The default 'mesonpy' build system doesn't seem to work with - ;; our pyproject-build-system, errors with: AttributeError: 'list' - ;; object has no attribute 'items' (see: - ;; https://issues.guix.gnu.org/62781). - #:build-backend "setuptools.build_meta" #:phases #~(modify-phases %standard-phases (replace 'check @@ -141,7 +136,7 @@ (format #t "sphinx-build not found, skipping~%")))))))) (propagated-inputs (list python-numpy python-matplotlib python-pyparsing python-pythran)) - (inputs (list openblas pybind11)) + (inputs (list openblas pybind11-2.10)) (native-inputs (list gfortran ;; XXX: Adding gfortran shadows GCC headers, causing a compilation @@ -149,7 +144,11 @@ gcc meson-python pkg-config - python-cython + python-click + python-cython-0.29.35 + python-doit + python-pooch + python-pydevtool python-pytest python-pytest-xdist python-threadpoolctl)) -- cgit v1.3 From e2c76bdd8376d3ef26ce74ab42ea1cebee669f1b Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 8 Jan 2024 08:26:51 +0100 Subject: gnu: python-scikit-image: Update to 0.22.0. * gnu/packages/python-science.scm (python-scikit-image): Update to 0.22.0. [source]: Fetch from git repository. [build-system]: Use pyproject-build-system. [arguments]: Use G-expression; remove custom 'build phase; simplify 'check phase; enable all tests. [propagated-inputs]: Add python-lazy-loader. [native-inputs]: Add meson-python, python-numpydoc, python-packaging, and python-wheel. Change-Id: I00ede026a7941eae36157106f753a21fb64099c3 --- gnu/packages/python-science.scm | 51 ++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 4a99002b2b7..e305a727c66 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -263,31 +263,31 @@ logic, also known as grey logic.") (define-public python-scikit-image (package (name "python-scikit-image") - (version "0.19.3") + (version "0.22.0") (source (origin - (method url-fetch) - (uri (pypi-uri "scikit-image" version)) + (method git-fetch) + (uri (git-reference + (url "https://github.com/scikit-image/scikit-image") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) (sha256 - (base32 "0l645smf7w1kail70z8d9r3xmvz7qh6g7n3d2bpacbbnw5ykdd94")))) - (build-system python-build-system) + (base32 "10fzyq2w1ldvfkmj374l375yrx33xrlw39xc9kmk8fxfi77jpykd")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-before 'build 'change-home-dir - (lambda _ - ;; Change from /homeless-shelter to /tmp for write permission. - (setenv "HOME" "/tmp") - #t)) - (replace 'build - (lambda _ - (invoke "make"))) - (replace 'check - (lambda _ - ;; The following tests require online data. - (invoke "python" "-m" "pytest" "skimage" "--doctest-modules" "-k" - (string-append "not test_ndim" - " and not test_skin"))))))) + (list + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'change-home-dir + (lambda _ + ;; Change from /homeless-shelter to /tmp for write permission. + (setenv "HOME" "/tmp"))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (with-directory-excursion "/tmp" + (apply invoke "pytest" "-v" "--doctest-modules" + (append test-flags (list #$output)))))))))) ;; See requirements/ for the list of build and run time requirements. ;; NOTE: scikit-image has an optional dependency on python-pooch, however ;; propagating it would enable many more tests that require online data. @@ -295,6 +295,7 @@ logic, also known as grey logic.") (list python-cloudpickle python-dask python-imageio + python-lazy-loader python-matplotlib python-networkx python-numpy @@ -304,9 +305,13 @@ logic, also known as grey logic.") python-scipy python-tifffile)) (native-inputs - (list python-cython + (list meson-python + python-cython + python-numpydoc + python-packaging python-pytest - python-pytest-localserver)) + python-pytest-localserver + python-wheel)) (home-page "https://scikit-image.org/") (synopsis "Image processing in Python") (description -- cgit v1.3 From 998df6e047478c00773a452989bb8a5cec12306d Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 10 Jan 2024 11:22:58 +0100 Subject: gnu: python-scikit-optimize: Make compatible with latest sklearn. * gnu/packages/python-science.scm (python-scikit-optimize)[source]: Add snippet to fix outdated use of "max_features" option. Change-Id: I4272ffc82b4951315b74b4adee27527e8d513fca --- gnu/packages/python-science.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index e305a727c66..c2388f9eb65 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -335,7 +335,15 @@ logic, also known as grey logic.") ;; These are for compatibility with more recent versions of ;; numpy and scikit-learn. (search-patches "python-scikit-optimize-1148.patch" - "python-scikit-optimize-1150.patch")))) + "python-scikit-optimize-1150.patch")) + (modules '((guix build utils))) + (snippet + ;; Since scikit-learn 1.3 max_features no longer supports + ;; 'auto', which is identical to 'sqrt' + '(substitute* '("skopt/learning/forest.py" + "skopt/learning/tests/test_forest.py") + (("max_features=['\"]auto['\"]") + "max_features='sqrt'"))))) (build-system pyproject-build-system) (propagated-inputs (list python-joblib -- cgit v1.3 From a8c1d812a030f07dbc22afa12f82539c3152a9e2 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 11 Jan 2024 10:13:17 +0100 Subject: gnu: python-pandas: Update to 1.5.3. * gnu/packages/python-science.scm (python-pandas): Update to 1.5.3. [build-system]: Use pyproject-build-system. [arguments]: Use G-expression; move test flags to #:test-flags; add phase 'patch-build-system; fix substitution of "which" executable; remove 'enable-parallel-build; remove custom 'check phase; add 'pre-check phase. [propagated-inputs]: Add python-matplotlib. [native-inputs]: Replace python-cython with python-cython-0.29.35. Change-Id: I9d09971f707b925f469e29be67fe040c181314ff --- gnu/packages/python-science.scm | 114 ++++++++++++++++++++-------------------- 1 file changed, 58 insertions(+), 56 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index c2388f9eb65..e5c424584c3 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -480,71 +480,73 @@ tissue-specificity metrics for gene expression.") (define-public python-pandas (package (name "python-pandas") - (version "1.4.4") + (version "1.5.3") (source (origin (method url-fetch) (uri (pypi-uri "pandas" version)) (sha256 - (base32 "0ryv66s9cvd27q6a985vv556k2qlnlrdna2z7qc7bdhphrrhsv5b")))) - (build-system python-build-system) + (base32 "1cdhngylzh352wx5s3sjyznn7a6kmjqcfg97hgqm5h3yb9zgv8vl")))) + (build-system pyproject-build-system) (arguments - `(#:modules ((guix build utils) - (guix build python-build-system) - (ice-9 ftw) - (srfi srfi-1) - (srfi srfi-26)) - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'enable-parallel-build - (lambda _ - (substitute* "setup.py" - (("\"-j\", type=int, default=1") - (format #f "\"-j\", type=int, default=~a" - (parallel-job-count)))))) - (add-after 'unpack 'patch-which - (lambda* (#:key inputs #:allow-other-keys) - (let ((which (assoc-ref inputs "which"))) - (substitute* "pandas/io/clipboard/__init__.py" - (("^WHICH_CMD = .*") - (string-append "WHICH_CMD = \"" which "\"\n")))))) - (add-before 'check 'prepare-x - (lambda _ - (system "Xvfb &") - (setenv "DISPLAY" ":0") - ;; xsel needs to write a log file. - (setenv "HOME" "/tmp"))) - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (let ((build-directory - (string-append - (getcwd) "/build/" - (first (scandir "build" - (cut string-prefix? "lib." <>)))))) + (list + #:test-flags + '(list "--pyargs" "pandas" + "-n" (number->string (parallel-job-count)) + "-m" "not slow and not network and not db" + "-k" + (string-append + ;; TODO: Missing input + "not TestS3" + " and not s3" + ;; No module named 'pandas.io.sas._sas' + " and not test_read_expands_user_home_dir" + " and not test_read_non_existent" + ;; Unknown failures + " and not test_switch_options" + ;; Crashes + " and not test_bytes_exceed_2gb" + ;; get_subplotspec() returns None; possibly related to + ;; https://github.com/pandas-dev/pandas/issues/54577 + " and not test_plain_axes" + ;; This test fails when run with pytest-xdist + ;; (see https://github.com/pandas-dev/pandas/issues/39096). + " and not test_memory_usage")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'patch-build-system + (lambda _ (substitute* "pyproject.toml" ;; Not all data files are distributed with the tarball. - (("--strict-data-files ") "")) - (with-directory-excursion build-directory - (when tests? - (invoke "pytest" "-vv" "pandas" "--skip-slow" - "--skip-network" - "-n" (number->string (parallel-job-count)) - "-k" - (string-append - ;; These test access the internet (see: - ;; https://github.com/pandas-dev/pandas/issues/45085).: - ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[lxml] - ;; pandas/tests/io/xml/test_xml.py::test_wrong_url[etree] - "not test_wrong_url" - ;; TODO: Missing input - " and not TestS3" - " and not s3" - ;; This test fails when run with pytest-xdist - ;; (see: - ;; https://github.com/pandas-dev/pandas/issues/39096). - " and not test_memory_usage")))))))))) + (("--strict-data-files ") "") + ;; Unknown property "asyncio_mode" + (("asyncio_mode = \"strict\"") "")))) + (add-after 'unpack 'patch-which + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "pandas/io/clipboard/__init__.py" + (("^WHICH_CMD = .*") + (string-append "WHICH_CMD = \"" + (search-input-file inputs "/bin/which") + "\"\n"))))) + (add-before 'check 'prepare-x + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0") + ;; xsel needs to write a log file. + (setenv "HOME" "/tmp"))) + ;; The compiled libraries are only in the output at this point, + ;; but they are needed to run tests. + ;; FIXME: This should be handled by the pyargs pytest argument, + ;; but is not for some reason. + (add-before 'check 'pre-check + (lambda* (#:key inputs outputs #:allow-other-keys) + (copy-recursively + (string-append (site-packages inputs outputs) + "/pandas/_libs") + "pandas/_libs")))))) (propagated-inputs (list python-jinja2 + python-matplotlib python-numpy python-openpyxl python-pytz @@ -554,7 +556,7 @@ tissue-specificity metrics for gene expression.") (inputs (list which xclip xsel)) (native-inputs - (list python-cython + (list python-cython-0.29.35 python-beautifulsoup4 python-lxml python-html5lib -- cgit v1.3 From e31e5928ae92652be96f062a3dd785fe32d159a6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Thu, 11 Jan 2024 15:17:27 +0100 Subject: gnu: python-xarray: Update to 2023.12.0. * gnu/packages/python-science.scm (python-xarray): Update to 2023.12.0. [arguments]: Ignore one test file. [propagated-inputs]: Add python-packaging. Change-Id: I6b70f59670f7bc8b56787fe3436579db8ac113bb --- gnu/packages/python-science.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index e5c424584c3..5fa50436c4c 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -831,18 +831,21 @@ multiple deep learning frameworks.") (define-public python-xarray (package (name "python-xarray") - (version "2023.6.0") + (version "2023.12.0") (source (origin (method url-fetch) (uri (pypi-uri "xarray" version)) (sha256 (base32 - "1339fz5gxkizq02h6vn19546x9p4c3nd9ipzpcg39h7gwhg26yi6")))) + "0cyldwchcrmbm1y7l1ry70kk8zdh7frxci3c6iwf4iyyj34dnra5")))) (build-system pyproject-build-system) + (arguments + ;; This needs a more recent version of python-hypothesis + (list #:test-flags '(list "--ignore=xarray/tests/test_strategies.py"))) (native-inputs (list python-setuptools-scm python-pytest)) (propagated-inputs - (list python-numpy python-pandas)) + (list python-numpy python-packaging python-pandas)) (home-page "https://github.com/pydata/xarray") (synopsis "N-D labeled arrays and datasets") (description "Xarray (formerly xray) makes working with labelled -- cgit v1.3 From d79fd9adc3a8a4d3fcbb1e26fae99e923bf83227 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 16 Jan 2024 21:12:09 +0000 Subject: gnu: python-deepdish: Fix build. * gnu/packages/python-science.scm (python-deepdish): Fix build. [build-system]: Swap to pyproject-build-system. [arguments]<#:test-flags>: Silent failing tests. Change-Id: I4c4df66fc80434aaf5b95a7a62b83e0c1c02a4c6 --- gnu/packages/python-science.scm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 5fa50436c4c..f5baea60b53 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1998,7 +1998,20 @@ DICOM data in a pythonic way.") (base32 "1wqzwh3y0mjdyba5kfbvlamn561d3afz50zi712c7klkysz3mzva")))) (arguments - (list #:phases #~(modify-phases %standard-phases + ;; XXX: The project may no longer be compatible with the version of + ;; numpy packed in Guix. + ;; See: https://github.com/uchicago-cs/deepdish/issues/50. + ;; + ;; However, there is a maintained fork that appears to be a good + ;; replacement: https://github.com/portugueslab/flammkuchen. + ;; + ;; Disable few failing tests to pass the build. + (list #:test-flags + #~(list "-k" (string-append "not test_pad" + " and not test_pad_repeat_border" + " and not test_pad_repeat_border_corner" + " and not test_pad_to_size")) + #:phases #~(modify-phases %standard-phases (add-after 'unpack 'dont-vendor-six (lambda _ (delete-file "deepdish/six.py") @@ -2009,7 +2022,7 @@ DICOM data in a pythonic way.") "from deepdish import io, __version__ import six "))))))) - (build-system python-build-system) + (build-system pyproject-build-system) (native-inputs (list python-pandas)) (propagated-inputs (list python-numpy python-scipy python-six python-tables)) -- cgit v1.3 From 23cb6187f6ed6605c84753fd0e0783f812b69fc7 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Thu, 11 Jan 2024 21:58:28 +0100 Subject: gnu: Add python-pandas-stubs. * gnu/packages/python-science.scm (python-pandas-stubs): New variable. --- gnu/packages/python-science.scm | 59 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index f5baea60b53..8e492bbaa5c 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -575,6 +575,65 @@ and intuitive. It aims to be the fundamental high-level building block for doing practical, real world data analysis in Python.") (license license:bsd-3))) +(define-public python-pandas-stubs + (package + (name "python-pandas-stubs") + ;; The versioning follows that of Pandas and uses the date of the + ;; python-pandas-stubs release. This is the latest version of + ;; python-pandas-stubs for python-pandas 1.4.4. + (version "1.4.4.220919") + (source + (origin + ;; No tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/pandas-dev/pandas-stubs") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "14fhj1y71akwl41ws7cpazsbq5b8wf4rwaydqq2h39q7gylpcp99")))) + (build-system pyproject-build-system) + (arguments + '(#:phases (modify-phases %standard-phases + (add-before 'check 'prepare-x + (lambda _ + (system "Xvfb &") + (setenv "DISPLAY" ":0") + ;; xsel needs to write a log file. + (setenv "HOME" + (getcwd))))))) + (propagated-inputs (list python-types-pytz)) + ;; Add python-fastparquet to native inputs once it has been packaged. Its + ;; tests will be skipped for now. + (native-inputs (list python-lxml + python-matplotlib + python-pandas + python-poetry-core + python-pyarrow + python-pyreadstat + python-pytest + python-scipy + python-sqlalchemy + python-tables + python-tabulate + python-xarray + ;; Needed to test clipboard support. + which + xclip + xorg-server-for-tests + xsel)) + (home-page "https://pandas.pydata.org") + (synopsis "Type annotations for pandas") + (description + "This package contains public type stubs for @code{python-pandas}, +following the convention of providing stubs in a separate package, as +specified in @acronym{PEP, Python Enhancement Proposal} 561. The stubs cover +the most typical use cases of @code{python-pandas}. In general, these stubs +are narrower than what is possibly allowed by @code{python-pandas}, but follow +a convention of suggesting best recommended practices for using +@code{python-pandas}.") + (license license:bsd-3))) + (define-public python-pythran (package (name "python-pythran") -- cgit v1.3 From dac977ea4ea208a14e3b4615c386e9b8d0f4ed6f Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Thu, 11 Jan 2024 22:17:50 +0100 Subject: gnu: Add python-pandera. * gnu/packages/python-science.scm (python-pandera): New variable. --- gnu/packages/python-science.scm | 75 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 8e492bbaa5c..c57fd1f23c3 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -634,6 +634,81 @@ a convention of suggesting best recommended practices for using @code{python-pandas}.") (license license:bsd-3))) +(define-public python-pandera + (package + (name "python-pandera") + (version "0.17.2") + (source + (origin + ;; No tests in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/unionai-oss/pandera") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1mnqk583z90k1n0z3lfa4rd0ng40v7hqfk7phz5gjmxlzfjbxa1x")) + (modules '((guix build utils))) + ;; These tests require PySpark. We need to remove the entire directory, + ;; since the conftest.py in this directory contains a PySpark import. + ;; (See: https://github.com/pytest-dev/pytest/issues/7452) + (snippet '(delete-file-recursively "tests/pyspark")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags '(list "-k" + (string-append + ;; Needs python-pandas >= 1.5 + "not test_python_std_list_dict_generics" + " and not test_python_std_list_dict_empty_and_none" + " and not test_pandas_modules_importable")))) + ;; Pandera comes with a lot of extras. We test as many as possible, but do + ;; not include all of them in the propagated-inputs. Currently, we have to + ;; skip the pyspark and io tests due to missing packages python-pyspark + ;; and python-frictionless. + (propagated-inputs (list python-hypothesis ;strategies extra + python-multimethod + python-numpy + python-packaging + python-pandas + python-pandas-stubs ;mypy extra + python-pydantic + python-scipy ;hypotheses extra + python-typeguard-4 + python-typing-inspect + python-wrapt)) + (native-inputs (list python-dask ;dask extra + python-fastapi ;fastapi extra + python-geopandas ;geopandas extra + python-modin ;modin extra + python-pyarrow ;needed to run fastapi tests + python-pytest + python-pytest-asyncio + python-sphinx + python-uvicorn)) ;needed to run fastapi tests + (home-page "https://github.com/unionai-oss/pandera") + (synopsis "Perform data validation on dataframe-like objects") + (description + "@code{python-pandera} provides a flexible and expressive API for +performing data validation on dataframe-like objects to make data processing +pipelines more readable and robust. Dataframes contain information that +@code{python-pandera} explicitly validates at runtime. This is useful in +production-critical data pipelines or reproducible research settings. With +@code{python-pandera}, you can: + +@itemize +@item Define a schema once and use it to validate different dataframe types. +@item Check the types and properties of columns. +@item Perform more complex statistical validation like hypothesis testing. +@item Seamlessly integrate with existing data pipelines via function decorators. +@item Define dataframe models with the class-based API with pydantic-style syntax. +@item Synthesize data from schema objects for property-based testing. +@item Lazily validate dataframes so that all validation rules are executed. +@item Integrate with a rich ecosystem of tools like @code{python-pydantic}, +@code{python-fastapi} and @code{python-mypy}. +@end itemize") + (license license:expat))) + (define-public python-pythran (package (name "python-pythran") -- cgit v1.3 From 662ae5eac2753d8a0a662738c3b7b64d77597c08 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Thu, 18 Jan 2024 10:43:42 +0100 Subject: gnu: python-plotnine: Fix build. * gnu/packages/python-science.scm (python-plotnine): Fix build. [arguments]<#:test-flags>: Add test_custom_shape to ignored tests. Co-authored-by: Sharlatan Hellseher Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index c57fd1f23c3..b13d2ca0b2a 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1741,8 +1741,6 @@ aggregated sum and more.") (define-public python-plotnine (package (name "python-plotnine") - ;; XXX Version 0.12.x exists, but we can't build it because we're still at - ;; matplotlib 3.5. We'd need at least 3.6. (version "0.10.1") (source (origin (method git-fetch) @@ -1757,6 +1755,7 @@ aggregated sum and more.") (arguments (list #:test-flags + ;; XXX: Check for any new failing tests during next update cycle. ;; These all fail because the images are considered to be too different, ;; though they really do look fine. '(list "-k" (string-append @@ -1774,6 +1773,7 @@ aggregated sum and more.") "test_continuous_x_fullrange" "test_coord_trans_backtransforms" "test_coord_trans_se_false" + "test_custom_shape" "test_datetime_scale_limits" "test_dir_v_ncol" "test_discrete_x" -- cgit v1.3 From 0118fe6f85cd4ecef26c82847cb2723efb5de985 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Thu, 18 Jan 2024 10:54:58 +0100 Subject: gnu: python-plotnine: Reformat with guix style. * gnu/packages/python-science.scm (python-plotnine): Reformat with guix style. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 153 ++++++++++++++++++++-------------------- 1 file changed, 76 insertions(+), 77 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index b13d2ca0b2a..3c131fe730a 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1742,15 +1742,15 @@ aggregated sum and more.") (package (name "python-plotnine") (version "0.10.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/has2k1/plotnine") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0lg53wcm00lj8zbb4q9yj4a0n0fqaqq7c7vj18bda0k56gg0fpwl")))) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/has2k1/plotnine") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0lg53wcm00lj8zbb4q9yj4a0n0fqaqq7c7vj18bda0k56gg0fpwl")))) (build-system pyproject-build-system) (arguments (list @@ -1758,74 +1758,73 @@ aggregated sum and more.") ;; XXX: Check for any new failing tests during next update cycle. ;; These all fail because the images are considered to be too different, ;; though they really do look fine. - '(list "-k" (string-append - "not TestThemes" - (string-join - (list - ;; Image tests - "test_adjust_text" - "test_annotation_logticks_coord_flip_discrete" - "test_annotation_logticks_faceting" - "test_arrow" - "test_aslabeller_dict_0tag" - "test_caption_simple" - "test_continuous_x" - "test_continuous_x_fullrange" - "test_coord_trans_backtransforms" - "test_coord_trans_se_false" - "test_custom_shape" - "test_datetime_scale_limits" - "test_dir_v_ncol" - "test_discrete_x" - "test_discrete_x_fullrange" - "test_facet_grid_drop_false" - "test_facet_grid_expression" - "test_facet_grid_space_ratios" - "test_facet_wrap" - "test_facet_wrap_expression" - "test_facet_wrap_label_both" - "test_label_context_wrap2vars" - "test_labeller_cols_both_grid" - "test_labeller_cols_both_wrap" - "test_labeller_towords" - "test_missing_data_discrete_scale" - "test_ribbon_facetting" - "test_stack_non_linear_scale" - "test_uneven_num_of_lines" - - ;; Missing optional modules - "test_non_linear_smooth" - "test_non_linear_smooth_no_ci") - " and not " 'prefix))) - #:phases - '(modify-phases %standard-phases - (add-before 'check 'pre-check - (lambda* (#:key inputs outputs #:allow-other-keys) - ;; The data files are referenced by the tests but they are not - ;; installed. - (copy-recursively "plotnine/data" - (string-append (site-packages inputs outputs) - "/plotnine/data")) - ;; Matplotlib needs to be able to write its configuration file - ;; somewhere. - (setenv "MPLCONFIGDIR" "/tmp") - (setenv "TZ" "UTC") - (setenv "TZDIR" - (search-input-directory inputs "share/zoneinfo"))))))) - (propagated-inputs - (list python-adjusttext - python-matplotlib - python-mizani - python-numpy - python-patsy - python-scipy - python-statsmodels)) - (native-inputs - (list python-geopandas - python-mock - python-pandas - python-pytest python-pytest-cov - tzdata-for-tests)) + '(list "-k" + (string-append "not TestThemes" + (string-join (list + ;; Image tests + "test_adjust_text" + "test_annotation_logticks_coord_flip_discrete" + "test_annotation_logticks_faceting" + "test_arrow" + "test_aslabeller_dict_0tag" + "test_caption_simple" + "test_continuous_x" + "test_continuous_x_fullrange" + "test_coord_trans_backtransforms" + "test_coord_trans_se_false" + "test_custom_shape" + "test_datetime_scale_limits" + "test_dir_v_ncol" + "test_discrete_x" + "test_discrete_x_fullrange" + "test_facet_grid_drop_false" + "test_facet_grid_expression" + "test_facet_grid_space_ratios" + "test_facet_wrap" + "test_facet_wrap_expression" + "test_facet_wrap_label_both" + "test_label_context_wrap2vars" + "test_labeller_cols_both_grid" + "test_labeller_cols_both_wrap" + "test_labeller_towords" + "test_missing_data_discrete_scale" + "test_ribbon_facetting" + "test_stack_non_linear_scale" + "test_uneven_num_of_lines" + + ;; Missing optional modules + "test_non_linear_smooth" + "test_non_linear_smooth_no_ci") + " and not " + 'prefix))) + #:phases '(modify-phases %standard-phases + (add-before 'check 'pre-check + (lambda* (#:key inputs outputs #:allow-other-keys) + ;; The data files are referenced by the tests but they are not + ;; installed. + (copy-recursively "plotnine/data" + (string-append (site-packages inputs + outputs) + "/plotnine/data")) + ;; Matplotlib needs to be able to write its configuration file + ;; somewhere. + (setenv "MPLCONFIGDIR" "/tmp") + (setenv "TZ" "UTC") + (setenv "TZDIR" + (search-input-directory inputs "share/zoneinfo"))))))) + (propagated-inputs (list python-adjusttext + python-matplotlib + python-mizani + python-numpy + python-patsy + python-scipy + python-statsmodels)) + (native-inputs (list python-geopandas + python-mock + python-pandas + python-pytest + python-pytest-cov + tzdata-for-tests)) (home-page "https://github.com/has2k1/plotnine") (synopsis "Grammar of Graphics for Python") (description -- cgit v1.3 From 7c540ed1065bf998ed41b515042fa1b3f30f80fe Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 20 Jan 2024 14:10:40 +0100 Subject: gnu: python-pandas-stubs: Update to 1.5.3.230321. * gnu/packages/python-science.scm (python-pandas-stubs): Update to 1.5.3.230321. [arguments]<#:test-flags>: Ignore tests that require a version of python-pyarrow with ORC integration. [native-inputs]: Add python-odfpy. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 3c131fe730a..4eb01958895 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -580,8 +580,8 @@ doing practical, real world data analysis in Python.") (name "python-pandas-stubs") ;; The versioning follows that of Pandas and uses the date of the ;; python-pandas-stubs release. This is the latest version of - ;; python-pandas-stubs for python-pandas 1.4.4. - (version "1.4.4.220919") + ;; python-pandas-stubs for python-pandas 1.5.3. + (version "1.5.3.230321") (source (origin ;; No tests in the PyPI tarball. @@ -591,10 +591,21 @@ doing practical, real world data analysis in Python.") (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 "14fhj1y71akwl41ws7cpazsbq5b8wf4rwaydqq2h39q7gylpcp99")))) + (base32 "1blwlq5053pxnmx721zdd6v8njiybz4azribx2ygq33jcpmknda6")))) (build-system pyproject-build-system) (arguments - '(#:phases (modify-phases %standard-phases + (list + #:test-flags #~(list "-k" + (string-append + ;; The python-pyarrow package in Guix is not built + ;; with ORC integration, causing these tests to + ;; fail. + "not test_orc" + " and not test_orc_path" + " and not test_orc_buffer" + " and not test_orc_columns" + " and not test_orc_bytes")) + #:phases '(modify-phases %standard-phases (add-before 'check 'prepare-x (lambda _ (system "Xvfb &") @@ -607,6 +618,7 @@ doing practical, real world data analysis in Python.") ;; tests will be skipped for now. (native-inputs (list python-lxml python-matplotlib + python-odfpy python-pandas python-poetry-core python-pyarrow -- cgit v1.3 From e1d3be4113c854d6efdfda6a8c3e5757753425ad Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Sat, 20 Jan 2024 14:55:28 +0100 Subject: gnu: python-pandera: Fix build. * gnu/packages/python-science.scm (python-pandera): Fix build. [source]: Delete tests/modin directory. [native-inputs]: Remove python-modin. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 4eb01958895..3422302a877 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -661,16 +661,20 @@ a convention of suggesting best recommended practices for using (sha256 (base32 "1mnqk583z90k1n0z3lfa4rd0ng40v7hqfk7phz5gjmxlzfjbxa1x")) (modules '((guix build utils))) - ;; These tests require PySpark. We need to remove the entire directory, - ;; since the conftest.py in this directory contains a PySpark import. - ;; (See: https://github.com/pytest-dev/pytest/issues/7452) - (snippet '(delete-file-recursively "tests/pyspark")))) + ;; These tests require PySpark and Modin. We need to remove the entire + ;; directory, since the conftest.py in these directories contain + ;; imports. (See: https://github.com/pytest-dev/pytest/issues/7452) + (snippet '(begin + (delete-file-recursively "tests/pyspark") + (delete-file-recursively "tests/modin"))))) (build-system pyproject-build-system) (arguments (list #:test-flags '(list "-k" (string-append - ;; Needs python-pandas >= 1.5 + ;; Mypy functionality is experimental and relying + ;; on pandas-stubs can lead to false + ;; positives. These tests currently fail. "not test_python_std_list_dict_generics" " and not test_python_std_list_dict_empty_and_none" " and not test_pandas_modules_importable")))) @@ -692,7 +696,6 @@ a convention of suggesting best recommended practices for using (native-inputs (list python-dask ;dask extra python-fastapi ;fastapi extra python-geopandas ;geopandas extra - python-modin ;modin extra python-pyarrow ;needed to run fastapi tests python-pytest python-pytest-asyncio -- cgit v1.3 From 5f93aa182a32e4baecc6238c21d2538af0b18ad3 Mon Sep 17 00:00:00 2001 From: Felix Gruber Date: Sat, 4 Nov 2023 15:05:56 +0000 Subject: gnu: Add python-pyamg. * gnu/packages/python-science.scm (python-pyamg): New variable. Change-Id: Ibf39fecd14d4e6fd72078b217737e5e5cbbf2321 Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 3422302a877..ed3a19f1b3b 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -457,6 +457,41 @@ volume computations for simple domains like regular polygons, disks, spheres, cubes, etc.") (license license:gpl3+))) +(define-public python-pyamg + (package + (name "python-pyamg") + (version "5.0.1") + (source (origin + (method url-fetch) + (uri (pypi-uri "pyamg" version)) + (sha256 + (base32 + "0l3dliwynxyjvbgpmi2k8jqvkkw6fc00c8w69h6swhrkfh0ql12z")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags + ;; Test installed package in order to find C++ modules. + #~(list "--pyargs" "pyamg.tests"))) + (native-inputs (list pybind11 python-pytest python-setuptools-scm)) + (propagated-inputs (list python-numpy python-scipy)) + (home-page "https://github.com/pyamg/pyamg") + (synopsis "Algebraic Multigrid Solvers in Python") + (description "PyAMG is a Python library of Algebraic Multigrid +(AMG) solvers. + +PyAMG features implementations of: +@itemize +@item Ruge-Stuben (RS) or Classical AMG +@item AMG based on Smoothed Aggregation (SA) +@item Adaptive Smoothed Aggregation (αSA) +@item Compatible Relaxation (CR) +@item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc. +@end itemize +PyAMG is primarily written in Python with supporting C++ code for +performance critical operations.") + (license license:expat))) + (define-public python-tspex (package (name "python-tspex") -- cgit v1.3 From b9e74d092df2948dd94f6f550a3d8dd0dea7ad45 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 21 Jan 2024 17:39:35 +0000 Subject: gnu: python-scikit-fem: Update to 9.0.1. * gnu/packages/python-science.scm (python-scikit-fem): Update to 9.0.1. [arguments]<#:test-flags>: Drop it to activate all tests. [native-inputs]: Add python-autograd, python-pyamg, and python-shapely. Change-Id: Ic4706196026bd5756b4db8230b15efacdca7d463 --- gnu/packages/python-science.scm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index ed3a19f1b3b..c1be6cde234 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -213,7 +213,7 @@ genetic variation data.") (define-public python-scikit-fem (package (name "python-scikit-fem") - (version "8.1.0") + (version "9.0.1") (source (origin (method git-fetch) ; no tests in PyPI (uri (git-reference @@ -222,13 +222,14 @@ genetic variation data.") (file-name (git-file-name name version)) (sha256 (base32 - "1zpn0wpsvls5nkrav5a43z77yg9nc09dpyy9ri0dpmpm2ndh2mhs")))) + "1r1c88rbaa7vjfnljbzx8paf36yzpy33bragl99ykn6i2srmjrd4")))) (build-system pyproject-build-system) - (arguments - ;; Examples below require python-autograd and python-pyamg. - (list #:test-flags #~(list "-k" "not TestEx32 and not TestEx45"))) (propagated-inputs (list python-meshio python-numpy python-scipy)) - (native-inputs (list python-pytest)) + (native-inputs + (list python-autograd + python-pyamg + python-pytest + python-shapely)) (home-page "https://scikit-fem.readthedocs.io/en/latest/") (synopsis "Library for performing finite element assembly") (description -- cgit v1.3 From 6f6cfb8365e3ef44de5b9f022331c31d84778dea Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Wed, 17 Jan 2024 19:49:46 +0100 Subject: gnu: python-tdda: Remove relax-requirements phase. * gnu/packages/python-science.scm (python-tdda)[arguments]<#:phases>: Remove relax-requirements phase. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index c1be6cde234..ef65ed537ab 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -22,7 +22,7 @@ ;;; Copyright © 2022 Eric Bavier ;;; Copyright © 2022 Antero Mejr ;;; Copyright © 2022 jgart -;;; Copyright © 2023 Troy Figiel +;;; Copyright © 2023, 2024 Troy Figiel ;;; ;;; This file is part of GNU Guix. ;;; @@ -376,11 +376,6 @@ implements several methods for sequential model-based optimization. (build-system pyproject-build-system) (arguments '(#:phases (modify-phases %standard-phases - (add-after 'unpack 'relax-requirements - (lambda _ - (substitute* "setup.py" - (("pandas>=1.5.2") - "pandas")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? -- cgit v1.3 From 994817bfdccc715dccfa96366fc286a80171a7e6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 23 Jan 2024 11:13:40 +0100 Subject: gnu: python-scipy: Update to 1.12.0. * gnu/packages/python-science.scm (python-scipy): Update to 1.12.0. [propagated-inputs]: Add python-jupytext, python-mpmath, python-mypy, python-numpydoc, python-pydata-sphinx-theme, python-pydevtool, python-rich-click, python-sphinx, python-threadpoolctl, and python-typing-extensions; remove python-pyparsing. [native-inputs]: Add python-hypothesis, python-pycodestyle, python-pytest-cov, and python-pytest-xdist; remove python-threadpoolctl. Change-Id: I81a4831e3d94c58416f7d35ec47de90370b88210 --- gnu/packages/python-science.scm | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index ef65ed537ab..1f00ad880b5 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -84,13 +84,13 @@ (define-public python-scipy (package (name "python-scipy") - (version "1.11.4") + (version "1.12.0") (source (origin (method url-fetch) (uri (pypi-uri "scipy" version)) (sha256 - (base32 "1amfxpnni0cagwjpb0i1kdgnh4sh484ryn4gfkgbjcspgy7bg8lh")))) + (base32 "18rn15wg3lp58z204fbjjhy0h79c53yg3c4qqs9h3liniamspxab")))) (build-system pyproject-build-system) (arguments (list @@ -135,7 +135,19 @@ (copy-recursively "build/html" html))) (format #t "sphinx-build not found, skipping~%")))))))) (propagated-inputs - (list python-numpy python-matplotlib python-pyparsing python-pythran)) + (list python-jupytext + python-matplotlib + python-mpmath + python-mypy + python-numpy + python-numpydoc + python-pydata-sphinx-theme + python-pydevtool + python-pythran + python-rich-click + python-sphinx + python-threadpoolctl + python-typing-extensions)) (inputs (list openblas pybind11-2.10)) (native-inputs (list gfortran @@ -147,11 +159,14 @@ python-click python-cython-0.29.35 python-doit + python-hypothesis python-pooch + python-pycodestyle python-pydevtool python-pytest - python-pytest-xdist - python-threadpoolctl)) + python-pytest-cov + python-pytest-timeout + python-pytest-xdist)) (home-page "https://scipy.org/") (synopsis "The Scipy library provides efficient numerical routines") (description "The SciPy library is one of the core packages that make up -- cgit v1.3 From e71abbc6438f2b25f0d41221fadf695dfe094689 Mon Sep 17 00:00:00 2001 From: Antero Mejr Date: Sat, 3 Dec 2022 05:03:57 +0000 Subject: gnu: Add python-pynetdicom. * gnu/packages/python-science.scm (python-pynetdicom): New variable. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 1f00ad880b5..44d01576658 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -2390,6 +2390,47 @@ fractional factorial methods.") NeuroML2 models.") (license license:lgpl3))) +(define-public python-pynetdicom + (package + (name "python-pynetdicom") + (version "2.0.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "pynetdicom" version)) + (sha256 + (base32 + "0farmgviaarb3f4xn751card3v0lza57vwgl5azxxq65p7li44i3")))) + (build-system python-build-system) + (arguments + (list #:phases #~(modify-phases %standard-phases + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "pytest" "-vv" "-k" + ;; network tests, 2977/3283 pass + (string-append + " not TestFindSCP" + " and not TestQRGetServiceClass" + " and not TestQRMoveServiceClass" + " and not TestStoreSCP" + " and not test_ae.py" + " and not test_echoscp.py" + " and not test_qrscp_echo.py" + " and not test_storescp.py" + " and not test_pr_level_patient" + " and not test_pr_level_series" + " and not test_scp_cancelled")))))))) + (native-inputs (list python-pyfakefs python-pytest)) + (propagated-inputs (list python-pydicom python-sqlalchemy)) + (home-page "https://github.com/pydicom/pynetdicom") + (synopsis "Python implementation of the DICOM networking protocol") + (description + "@code{pynetdicom} is a Python package that implements the DICOM +networking protocol. Working with @code{pydicom}, it allows the easy creation +of DICOM @acronym{SCUs,Service Class Users} and +@acronym{SCPs,Service Class Providers}.") + (license license:expat))) + (define-public python-libneuroml (package (name "python-libneuroml") -- cgit v1.3 From 5a616cc14b25d173680aa2f4787b996b68f899e0 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 23 Jan 2024 23:40:45 +0000 Subject: gnu: python-pynetdicom: Simplify package style. * gnu/package/python-science.scm (python-pynetdicom)[build-system]: Swap to pyproject-build-system. [description]: Simplify wording, indent. Change-Id: If4e80d06edb0080685d0695f30abc2f9db669f45 --- gnu/packages/python-science.scm | 42 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 22 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 44d01576658..a49562643b3 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -2400,35 +2400,33 @@ NeuroML2 models.") (sha256 (base32 "0farmgviaarb3f4xn751card3v0lza57vwgl5azxxq65p7li44i3")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments - (list #:phases #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-vv" "-k" - ;; network tests, 2977/3283 pass - (string-append - " not TestFindSCP" - " and not TestQRGetServiceClass" - " and not TestQRMoveServiceClass" - " and not TestStoreSCP" - " and not test_ae.py" - " and not test_echoscp.py" - " and not test_qrscp_echo.py" - " and not test_storescp.py" - " and not test_pr_level_patient" - " and not test_pr_level_series" - " and not test_scp_cancelled")))))))) + (list + #:test-flags + ;; Tests takes about 10-15min to complete. + ;; Skip tests that require networking. + #~(list "-k" (string-append + " not TestFindSCP" + " and not TestQRGetServiceClass" + " and not TestQRMoveServiceClass" + " and not TestStoreSCP" + " and not test_ae.py" + " and not test_echoscp.py" + " and not test_qrscp_echo.py" + " and not test_storescp.py" + " and not test_pr_level_patient" + " and not test_pr_level_series" + " and not test_scp_cancelled")))) (native-inputs (list python-pyfakefs python-pytest)) (propagated-inputs (list python-pydicom python-sqlalchemy)) (home-page "https://github.com/pydicom/pynetdicom") (synopsis "Python implementation of the DICOM networking protocol") (description "@code{pynetdicom} is a Python package that implements the DICOM -networking protocol. Working with @code{pydicom}, it allows the easy creation -of DICOM @acronym{SCUs,Service Class Users} and -@acronym{SCPs,Service Class Providers}.") +networking protocol. It allows the easy creation of DICOM +@acronym{SCUs,Service Class Users} and @acronym{SCPs,Service Class +Providers}.") (license license:expat))) (define-public python-libneuroml -- cgit v1.3 From b537437af714eabbec88d7b19d3b008fdfd6b1b3 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 23 Jan 2024 23:54:44 +0000 Subject: gnu: python-pydicom: Simplify package style. * gnu/packages/python-science.scm (python-pydicom)[build-system]: Swap to pyproject-build-system. [description]: Simplify wording, indent. Change-Id: I7ef413ea2da6cbb83eb33424c559f7ac5ed549cb --- gnu/packages/python-science.scm | 47 ++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 26 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index a49562643b3..466f99b756d 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -2145,40 +2145,35 @@ functions, convolutions, artificial neural networks etc.") (sha256 (base32 "18l26s53yf5j9yh2zwq83n74qq4f2iq0cfblamsw4y9k35l1c108")))) - (build-system python-build-system) + (build-system pyproject-build-system) (arguments (list - #:phases - #~(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (chdir "pydicom/tests") - (invoke "python3" "-m" "pytest" "-k" ;skip tests using web data - (string-append - "not test_jpeg_ls_pixel_data.py" - " and not test_gdcm_pixel_data.py" - " and not test_pillow_pixel_data.py" - " and not test_rle_pixel_data.py" - " and not Test_JPEG_LS_Lossless_transfer_syntax" - " and not test_numpy_pixel_data.py" - " and not test_data_manager.py" - " and not test_handler_util.py" - " and not test_overlay_np.py" - " and not test_encoders_pydicom.py" - " and not test_encaps.py" - " and not test_reading_ds_with_known_tags_with_UN_VR" - " and not TestDatasetOverlayArray" - " and not TestReader" - " and not test_filewriter.py")))))))) + #:test-flags + ;; Skip tests that require networking. + #~(list "-k" (string-append + "not test_jpeg_ls_pixel_data.py" + " and not test_gdcm_pixel_data.py" + " and not test_pillow_pixel_data.py" + " and not test_rle_pixel_data.py" + " and not Test_JPEG_LS_Lossless_transfer_syntax" + " and not test_numpy_pixel_data.py" + " and not test_data_manager.py" + " and not test_handler_util.py" + " and not test_overlay_np.py" + " and not test_encoders_pydicom.py" + " and not test_encaps.py" + " and not test_reading_ds_with_known_tags_with_UN_VR" + " and not TestDatasetOverlayArray" + " and not TestReader" + " and not test_filewriter.py")))) (native-inputs (list python-pytest)) (inputs (list gdcm libjpeg-turbo)) (propagated-inputs (list python-numpy python-pillow)) (home-page "https://github.com/pydicom/pydicom") (synopsis "Python library for reading and writing DICOM data") (description "@code{python-pydicom} is a Python library for reading and -writing DICOM medical imaging data. It lets developers read, modify and write -DICOM data in a pythonic way.") +writing DICOM medical imaging data. It can read, modify and write DICOM +data.") (license license:expat))) (define-public python-deepdish -- cgit v1.3 From 3419c216b485532dd3c3ed7959553d7900eb1fea Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 23 Jan 2024 23:57:32 +0000 Subject: gnu: python-pydicom: Update to 2.4.4. * gnu/packages/python-science.scm (python-pydicom): Update to 2.4.4. Change-Id: I996115fb3bdf0bd61d2b2dcdb2500b31ce104597 --- gnu/packages/python-science.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 466f99b756d..88cced9633f 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -2135,7 +2135,7 @@ functions, convolutions, artificial neural networks etc.") (define-public python-pydicom (package (name "python-pydicom") - (version "2.3.0") + (version "2.4.4") (source (origin (method git-fetch) (uri (git-reference @@ -2144,7 +2144,7 @@ functions, convolutions, artificial neural networks etc.") (file-name (git-file-name name version)) (sha256 (base32 - "18l26s53yf5j9yh2zwq83n74qq4f2iq0cfblamsw4y9k35l1c108")))) + "0ksyyc1hbhyqy289a2frn84ss29fb7czirx3dkxx56f4ia33b4c8")))) (build-system pyproject-build-system) (arguments (list -- cgit v1.3 From afd0fe50b0b2fda09a12d5a09dfb8927084b1a16 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 24 Jan 2024 11:32:43 +0100 Subject: gnu: python-pyts: Update to 0.13.0. * gnu/packages/python-science.scm (python-pyts): Update to 0.13.0. [build-system]: Use pyproject-build-system. [arguments]: Remove custom 'check phase; enable all tests. [propagated-inputs]: Remove python-matplotlib. Change-Id: Iafcc047d8bb14e1eef514fd92aa53f8fda38eab0 --- gnu/packages/python-science.scm | 26 ++++---------------------- 1 file changed, 4 insertions(+), 22 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 88cced9633f..c207dc26017 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -830,34 +830,16 @@ Python module with the same interface, but (hopefully) faster.") (define-public python-pyts (package (name "python-pyts") - (version "0.12.0") + (version "0.13.0") (source (origin (method url-fetch) (uri (pypi-uri "pyts" version)) (sha256 (base32 - "1cb5jwp8g52a3hxay6mxbfzk16ly6yj6rphq8cwbwk1k2jdf11dg")))) - (build-system python-build-system) - (arguments - (list - #:phases - '(modify-phases %standard-phases - (replace 'check - (lambda* (#:key tests? #:allow-other-keys) - (when tests? - (invoke "pytest" "-v" - ;; XXX: This test fails for unknown reasons - ;; Expected: - ;; (40, 9086) - ;; Got: - ;; (40, 9088) - "-k" - "not pyts.multivariate.transformation.weasel_muse.WEASELMUSE"))))))) + "00pdzfkl0b4vhfdm8zas7b904jm2hhivdwv3wcmpik7l2p1yr85c")))) + (build-system pyproject-build-system) (propagated-inputs - (list python-joblib - python-matplotlib - python-numba - python-numpy + (list python-joblib python-numba python-numpy python-scikit-learn python-scipy)) (native-inputs -- cgit v1.3 From a4c9766108b247d761196d930c1f762858822872 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Wed, 24 Jan 2024 12:20:32 -0300 Subject: gnu: python-xarray-einstats: Update to 0.7.0. * gnu/packages/python-science.scm (python-xarray-einstats): Update to 0.7.0. Change-Id: Iddd1fca8c37f05a928d20b90f9f95814f31435b2 --- gnu/packages/python-science.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index c207dc26017..9d72608de41 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -9,7 +9,7 @@ ;;; Copyright © 2019, 2021, 2022, 2023 Maxim Cournoyer ;;; Copyright © 2019 Giacomo Leidi ;;; Copyright © 2020 Pierre Langlois -;;; Copyright © 2020, 2021, 2022, 2023 Vinicius Monego +;;; Copyright © 2020, 2021, 2022, 2023, 2024 Vinicius Monego ;;; Copyright © 2021 Greg Hogan ;;; Copyright © 2021 Roel Janssen ;;; Copyright © 2021 Paul Garlick @@ -1038,7 +1038,7 @@ and visualization with these data structures.") (define-public python-xarray-einstats (package (name "python-xarray-einstats") - (version "0.5.1") + (version "0.7.0") (source (origin (method git-fetch) ; no tests in PyPI (uri (git-reference @@ -1047,7 +1047,7 @@ and visualization with these data structures.") (file-name (git-file-name name version)) (sha256 (base32 - "1gg7p2lq7zxic64nbr6a8ynizs8rjzb29fnqib7hw3lmp13wsfm0")))) + "14c424swpdginaz4pm3nmkizxy34x19q6xq3d4spx9s9031f6n3a")))) (build-system pyproject-build-system) (native-inputs (list python-einops python-flit-core python-numba python-pytest)) -- cgit v1.3 From a01afbd30095f2285d8829dab006afdaba1d4103 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 23 Jan 2024 10:41:41 +0000 Subject: gnu: python-trimesh: Update to 4.0.10. * gnu/packages/python-science.scm (python-trimesh): Update to 4.0.10. [build-system]: Swap to pyproject-build-system. Change-Id: I757b4c27db9969d42021434883a057debbbc83fd --- gnu/packages/python-science.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 9d72608de41..41f4c6245a7 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -408,14 +408,14 @@ of regular expressions from text data and automatic test generation.") (define-public python-trimesh (package (name "python-trimesh") - (version "3.23.5") + (version "4.0.10") (source (origin (method url-fetch) (uri (pypi-uri "trimesh" version)) (sha256 - (base32 "08967axlnmfv98n05dhrkynyrmcc814hl8184gzzmcy4rjg6dzdx")))) - (build-system python-build-system) + (base32 "1p3cnkajh2zmp6zwn23q3c73jcjlkq61h3r53ys0bmg58l8kpqrn")))) + (build-system pyproject-build-system) (propagated-inputs (list python-numpy)) (native-inputs -- cgit v1.3 From 42c7b50e230af7717ea843e1b264c6a212880d53 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Tue, 23 Jan 2024 11:31:04 +0000 Subject: gnu: python-trimesh: Enable tests. * gnu/packages/python-science.scm (python-trimesh): Enable tests and apply new package style. [source]: Use git checkout which has working test suit. [arguments] <#:test-flags>: Disable tests requiring optional Python modules. [propagated-inputs]: Add python-chardet, python-colorlog python-httpx python-jsonschema python-lxml python-networkx python-pillow python-requests python-rtree python-scipy python-setuptools python-shapely python-sympy and python-xxhash. Change-Id: I1aa363053c2d736bc44b8f9071c637256cc2d952 --- gnu/packages/python-science.scm | 68 ++++++++++++++++++++++++++++++++--------- 1 file changed, 53 insertions(+), 15 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 41f4c6245a7..87d75159f28 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -50,6 +50,7 @@ #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages databases) + #:use-module (gnu packages digest) #:use-module (gnu packages gcc) #:use-module (gnu packages geo) #:use-module (gnu packages image) @@ -411,28 +412,65 @@ of regular expressions from text data and automatic test generation.") (version "4.0.10") (source (origin - (method url-fetch) - (uri (pypi-uri "trimesh" version)) + (method git-fetch) ; no tests in PyPI + (uri (git-reference + (url "https://github.com/mikedh/trimesh") + (commit version))) + (file-name (git-file-name name version)) (sha256 - (base32 "1p3cnkajh2zmp6zwn23q3c73jcjlkq61h3r53ys0bmg58l8kpqrn")))) + (base32 "0ry04qaw0pb3hkxv4gmna87jwk97aqangd21wbr2dr4xshmkbyyb")))) (build-system pyproject-build-system) - (propagated-inputs - (list python-numpy)) + (arguments + (list + #:test-flags + #~(list "-k" (string-append + ;; XXX: When more optional modules are available review + ;; disabled tests once again. + ;; + ;; Disable tests requiring optional, not packed modules. + "not test_material_round" + " and not test_bezier_example" + " and not test_discrete" + " and not test_dxf" + " and not test_layer" + " and not test_multi_nodupe" + " and not test_obj_roundtrip" + " and not test_roundtrip" + " and not test_scene" + " and not test_slice_onplane" + " and not test_svg" + " and not test_svg")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-build + (lambda _ + (substitute* "trimesh/resources/templates/blender_boolean.py.tmpl" + (("\\$MESH_PRE") + "'$MESH_PRE'"))))))) (native-inputs (list python-coveralls python-pyinstrument python-pytest python-pytest-cov)) - (arguments - `(;; TODO: Get tests to work. - #:tests? #f - #:phases - (modify-phases %standard-phases - (add-after 'unpack 'fix-build - (lambda _ - (substitute* "trimesh/resources/templates/blender_boolean.py.tmpl" - (("\\$MESH_PRE") - "'$MESH_PRE'"))))))) + (propagated-inputs + (list python-chardet + python-colorlog + python-httpx + python-jsonschema + python-lxml + python-networkx + python-numpy + python-pillow + ;; python-pycollada ; not packed yet, optional + ;; python-pyglet ; not packed yet, optional + python-requests + python-rtree + python-scipy + python-setuptools + python-shapely + ;; python-svg-path ; not packed yet, optional + python-sympy + python-xxhash)) (home-page "https://github.com/mikedh/trimesh") (synopsis "Python library for loading and using triangular meshes") (description -- cgit v1.3 From 77a07a968fbeac49bffa5cb10d5eb7e004cc316b Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Sun, 21 Jan 2024 22:40:10 +0000 Subject: gnu: python-pyamg: Regenerate bundled files. * gnu/packages/python-science.scm (python-pyamg) [source]: Delete auto-generated files. [arguments] <#:phases>: Add 'amg-core-bind-them phase to re-generate *_bind.cpp files deleted in snippet. [native-inputs]: Add python-cppheaderparser and python-pyyaml. [description]: Improve style, omit implementation details. Change-Id: I6f68914cd912e6f4592e51c21b129847e73be847 --- gnu/packages/python-science.scm | 50 +++++++++++++++++++++++++++++++++-------- 1 file changed, 41 insertions(+), 9 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 87d75159f28..f775d463497 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -513,32 +513,64 @@ spheres, cubes, etc.") (source (origin (method url-fetch) (uri (pypi-uri "pyamg" version)) + (modules '((guix build utils))) + (snippet + ;; Delete autogenerated files, regenerate in a phase. + #~(begin + (for-each + (lambda (file) + (delete-file (string-append "pyamg/amg_core/" file))) + '("air_bind.cpp" + "evolution_strength_bind.cpp" + "graph_bind.cpp" + "krylov_bind.cpp" + "linalg_bind.cpp" + "relaxation_bind.cpp" + "ruge_stuben_bind.cpp" + "smoothed_aggregation_bind.cpp" + "tests/bind_examples_bind.cpp")))) (sha256 (base32 "0l3dliwynxyjvbgpmi2k8jqvkkw6fc00c8w69h6swhrkfh0ql12z")))) - (build-system pyproject-build-system) (arguments (list #:test-flags ;; Test installed package in order to find C++ modules. - #~(list "--pyargs" "pyamg.tests"))) - (native-inputs (list pybind11 python-pytest python-setuptools-scm)) + #~(list "--pyargs" "pyamg.tests") + #:phases + #~(modify-phases %standard-phases + ;; Regenerate the autogenerated files. + (add-after 'unpack 'amg-core-bind-them + (lambda _ + ;; bindthem.py heavily depends on location to produce *_bind.cpp + ;; file, make it available in tests as well. + (copy-file "pyamg/amg_core/bindthem.py" + "pyamg/amg_core/tests/bindthem.py") + (with-directory-excursion "pyamg/amg_core" + (substitute* "bindthem.py" + (("/usr/bin/env python3") (which "python3"))) + (invoke "sh" "generate.sh")) + (with-directory-excursion "pyamg/amg_core/tests" + (invoke "python" "bindthem.py" "bind_examples.h"))))))) + (build-system pyproject-build-system) + (native-inputs + (list pybind11 + python-cppheaderparser + python-pytest + python-pyyaml + python-setuptools-scm)) (propagated-inputs (list python-numpy python-scipy)) (home-page "https://github.com/pyamg/pyamg") (synopsis "Algebraic Multigrid Solvers in Python") (description "PyAMG is a Python library of Algebraic Multigrid -(AMG) solvers. - -PyAMG features implementations of: +(AMG) solvers. It features implementations of: @itemize @item Ruge-Stuben (RS) or Classical AMG @item AMG based on Smoothed Aggregation (SA) @item Adaptive Smoothed Aggregation (αSA) @item Compatible Relaxation (CR) @item Krylov methods such as CG, GMRES, FGMRES, BiCGStab, MINRES, etc. -@end itemize -PyAMG is primarily written in Python with supporting C++ code for -performance critical operations.") +@end itemize") (license license:expat))) (define-public python-tspex -- cgit v1.3 From 343f4f1d70ea01bc3f6382546e1db5c907c6af01 Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Mon, 29 Jan 2024 19:16:54 +0100 Subject: gnu: Add python-unyt. * gnu/packages/python-science.scm (python-unyt): New variable. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index f775d463497..d29f583a32d 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -1287,6 +1287,34 @@ automated with the minimum of fuss and the least effort.") annotations on an existing boxplots and barplots generated by seaborn.") (license license:expat))) +(define-public python-unyt + (package + (name "python-unyt") + (version "3.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "unyt" version)) + (sha256 + (base32 "00900bw24rxgcgwgxp9xlx0l5im96r1n5hn0r3mxvbdgc3lyyq48")))) + (build-system pyproject-build-system) + ;; Astropy is an optional import, but we do not include it as it creates a + ;; module cycle: astronomy->python-science->astronomy. + (propagated-inputs (list python-h5py ; optional import + python-matplotlib ; optional import + python-numpy + python-sympy)) + ;; Pint is optional, but we do not propagate it due to its size. + (native-inputs (list python-pint python-pytest)) + (home-page "https://unyt.readthedocs.io") + (synopsis "Library for working with data that has physical units") + (description + "@code{unyt} is a Python library working with data that has physical +units. It defines the @code{unyt.array.unyt_array} and +@code{unyt.array.unyt_quantity} classess (subclasses of NumPy’s ndarray class) +for handling arrays and scalars with units,respectively") + (license license:bsd-3))) + (define-public python-upsetplot (package (name "python-upsetplot") -- cgit v1.3 From cde0adaacdcfb401ff249a715c0fbfd20d64bbfd Mon Sep 17 00:00:00 2001 From: Troy Figiel Date: Mon, 29 Jan 2024 19:17:14 +0100 Subject: gnu: Add python-pyjanitor. * gnu/packages/python-science.scm (python-pyjanitor): New variable. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index d29f583a32d..2affbd3fa56 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -47,6 +47,7 @@ #:use-module (gnu packages boost) #:use-module (gnu packages build-tools) #:use-module (gnu packages check) + #:use-module (gnu packages chemistry) #:use-module (gnu packages cpp) #:use-module (gnu packages crypto) #:use-module (gnu packages databases) @@ -840,6 +841,62 @@ production-critical data pipelines or reproducible research settings. With @end itemize") (license license:expat))) +(define-public python-pyjanitor + (package + (name "python-pyjanitor") + (version "0.26.0") + (source + (origin + ;; The build requires the mkdocs directory for the description in + ;; setup.py. This is not included in the PyPI tarball. + (method git-fetch) + (uri (git-reference + (url "https://github.com/pyjanitor-devs/pyjanitor") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1f8xbl1k9l2z56bapp7v6bd3016zrk48igcaz6hb553r6yfl7vfx")))) + (build-system pyproject-build-system) + ;; Pyjanitor has an extensive test suite. For quick debugging, the tests + ;; marked turtle can be skipped using "-m" "not turtle". + (arguments + (list + #:test-flags '(list + "-n" (number->string (parallel-job-count)) + ;; Tries to connect to the internet. + "-k" "not test_is_connected" + ;; PySpark has not been packaged yet. + "--ignore=tests/spark/functions/test_clean_names_spark.py" + "--ignore=tests/spark/functions/test_update_where_spark.py") + #:phases #~(modify-phases %standard-phases + (add-before 'check 'set-env-ci + (lambda _ + ;; Some tests are skipped if the JANITOR_CI_MACHINE + ;; variable is not set. + (setenv "JANITOR_CI_MACHINE" "1")))))) + (propagated-inputs (list python-multipledispatch + python-natsort + python-pandas-flavor + python-scipy + ;; Optional imports. + python-biopython ;biology submodule + python-unyt)) ;engineering submodule + (native-inputs (list python-pytest + python-pytest-xdist + ;; Optional imports. We do not propagate them due to + ;; their size. + python-numba ;speedup of joins + rdkit)) ;chemistry submodule + (home-page "https://github.com/pyjanitor-devs/pyjanitor") + (synopsis "Tools for cleaning and transforming pandas DataFrames") + (description + "@code{pyjanitor} provides a set of data cleaning routines for +@code{pandas} DataFrames. These routines extend the method chaining API +defined by @code{pandas} for a subset of its methods. Originally, this +package was a port of the R package by the same name and it is inspired by the +ease-of-use and expressiveness of the @code{dplyr} package.") + (license license:expat))) + (define-public python-pythran (package (name "python-pythran") -- cgit v1.3 From 9f1ab898c3d4dace221b62bcdeca4f940c7abee7 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Tue, 30 Jan 2024 13:43:32 +0200 Subject: gnu: python-scipy: Enable building on more architectures. * gnu/packages/python-science.scm (python-scipy)[propagated-inputs]: Only include python-jupytext on systems where it is supported. Change-Id: Ic085094e4e3977e4c0698e8c03de09ee8e70f144 --- gnu/packages/python-science.scm | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 2affbd3fa56..a0123dac21b 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Hartmut Goebel -;;; Copyright © 2016, 2022, 2023 Efraim Flashner +;;; Copyright © 2016, 2022-2024 Efraim Flashner ;;; Copyright © 2016-2020, 2022 Marius Bakke ;;; Copyright © 2019 Tobias Geerinckx-Rice ;;; Copyright © 2019, 2021, 2022, 2023 Maxim Cournoyer @@ -137,19 +137,22 @@ (copy-recursively "build/html" html))) (format #t "sphinx-build not found, skipping~%")))))))) (propagated-inputs - (list python-jupytext - python-matplotlib - python-mpmath - python-mypy - python-numpy - python-numpydoc - python-pydata-sphinx-theme - python-pydevtool - python-pythran - python-rich-click - python-sphinx - python-threadpoolctl - python-typing-extensions)) + (append + (if (supported-package? python-jupytext) ; Depends on pandoc. + (list python-jupytext) + '()) + (list python-matplotlib + python-mpmath + python-mypy + python-numpy + python-numpydoc + python-pydata-sphinx-theme + python-pydevtool + python-pythran + python-rich-click + python-sphinx + python-threadpoolctl + python-typing-extensions))) (inputs (list openblas pybind11-2.10)) (native-inputs (list gfortran -- cgit v1.3 From a879dd8b360adcf8f7d69c317dec8cae0f48270c Mon Sep 17 00:00:00 2001 From: Wiktor Żelazny Date: Wed, 8 Jun 2022 18:52:57 +0200 Subject: gnu: Add python-pandarallel. * gnu/packages/python-science.scm (python-pandarallel): New variable. Signed-off-by: Sharlatan Hellseher --- gnu/packages/python-science.scm | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'gnu/packages/python-science.scm') diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index a0123dac21b..2b4e74f9be3 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -766,6 +766,42 @@ a convention of suggesting best recommended practices for using @code{python-pandas}.") (license license:bsd-3))) +(define-public python-pandarallel + (package + (name "python-pandarallel") + (version "1.6.5") + (source + (origin + (method git-fetch) ; no tests in PyPI + (uri (git-reference + (url "https://github.com/nalepae/pandarallel/") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0r2wlxlwp4wia0vm15k4cp421mwa20k4k5g2ml01inprj8bl1p0p")))) + (build-system pyproject-build-system) + (arguments + (list + #:test-flags #~(list "-n" (number->string (parallel-job-count))))) + (propagated-inputs + (list python-dill + python-pandas + python-psutil)) + (native-inputs + (list python-mkdocs-material + python-numpy + python-pytest + python-pytest-cov + python-pytest-xdist)) + (home-page "https://nalepae.github.io/pandarallel/") + (synopsis "Tool to parallelize Pandas operations across CPUs") + (description + "@code{pandarallel} allows any Pandas user to take advantage of their +multi-core computer, while Pandas uses only one core. @code{pandarallel} also +offers nice progress bars (available on Notebook and terminal) to get an rough +idea of the remaining amount of computation to be done.") + (license license:bsd-3))) + (define-public python-pandera (package (name "python-pandera") -- cgit v1.3