diff options
author | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-01 22:21:09 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-08-01 22:21:09 +0200 |
commit | 8de4131b2ddd11faa3394cf497484563068c9e7a (patch) | |
tree | ed4ed9e586c7236f09c109afdd416dac18ba8cc3 /gnu/packages/python-science.scm | |
parent | 15406013fe63f2ab238eec2d7a8adbc586806ac8 (diff) | |
parent | 45b7a8bfda5bde2e2daee4bec0ca092cd719d726 (diff) |
Merge branch 'master' into emacs-team
Diffstat (limited to 'gnu/packages/python-science.scm')
-rw-r--r-- | gnu/packages/python-science.scm | 129 |
1 files changed, 127 insertions, 2 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 938deaec6a..86ba4209fd 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm @@ -50,6 +50,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages gcc) + #:use-module (gnu packages geo) #:use-module (gnu packages image) #:use-module (gnu packages image-processing) #:use-module (gnu packages machine-learning) @@ -209,6 +210,33 @@ routines such as routines for numerical integration and optimization.") genetic variation data.") (license license:expat))) +(define-public python-scikit-fem + (package + (name "python-scikit-fem") + (version "8.1.0") + (source (origin + (method git-fetch) ; no tests in PyPI + (uri (git-reference + (url "https://github.com/kinnala/scikit-fem") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1zpn0wpsvls5nkrav5a43z77yg9nc09dpyy9ri0dpmpm2ndh2mhs")))) + (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)) + (home-page "https://scikit-fem.readthedocs.io/en/latest/") + (synopsis "Library for performing finite element assembly") + (description + "@code{scikit-fem} is a library for performing finite element assembly. +Its main purpose is the transformation of bilinear forms into sparse matrices +and linear forms into vectors.") + (license license:bsd-3))) + (define-public python-scikit-fuzzy (package (name "python-scikit-fuzzy") @@ -1149,7 +1177,7 @@ Mathematics (GLM) library to Python.") (define-public python-distributed (package (name "python-distributed") - (version "2023.4.1") + (version "2023.7.0") (source (origin ;; The test files are not included in the archive on pypi @@ -1160,7 +1188,7 @@ Mathematics (GLM) library to Python.") (file-name (git-file-name name version)) (sha256 (base32 - "164xp2dxac95nngmgdhlk0vwnnvbmajqliz994bdvw72xnv1ya18")))) + "0b93fpwz7kw31pkzfyihpkw8mzbqshzd6rw5vcwld7n3z2aaaxxb")))) (build-system pyproject-build-system) (arguments (list @@ -1470,6 +1498,103 @@ pandas code.") aggregated sum and more.") (license license:bsd-3))) +(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) + (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 + #:test-flags + ;; 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_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 + "Plotnine is a Python implementation of the Grammar of Graphics. +It is a powerful graphics concept for creating plots and visualizations in a +structured and declarative manner. It is inspired by the R package ggplot2 +and aims to provide a similar API and functionality in Python.") + (license license:expat))) + (define-public python-pyvista (package (name "python-pyvista") |