diff options
| author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-08-14 11:41:22 +0100 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2026-08-14 11:41:22 +0100 |
| commit | d2bd37e9ed40e7c48de70a149ab2f2fb2c0023ee (patch) | |
| tree | deea7bdf0c34c922af27417751f3c9862c73cff1 | |
| parent | f7dd904babb73225d6b19d9ed98ff74c92ba6c6c (diff) | |
gnu: packages/python-science: Sort variables.
* gnu/packages/python-science.scm: Sort all variables in alphabetical order.
Adjust module footer comment.
| -rw-r--r-- | gnu/packages/python-science.scm | 3793 |
1 files changed, 1896 insertions, 1897 deletions
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm index 0a3c0871dbb..be3b66714ea 100644 --- a/gnu/packages/python-science.scm +++ b/gnu/packages/python-science.scm | |||
| @@ -1867,6 +1867,56 @@ MIGRAD algorithm and Numba accelerated functions.") | |||
| 1867 | functions with arbitrary round-off error and error propagation.") | 1867 | functions with arbitrary round-off error and error propagation.") |
| 1868 | (license license:expat))) | 1868 | (license license:expat))) |
| 1869 | 1869 | ||
| 1870 | (define-public python-janitor-rs | ||
| 1871 | (package | ||
| 1872 | (name "python-janitor-rs") | ||
| 1873 | (version "0.6.1") | ||
| 1874 | (source | ||
| 1875 | (origin | ||
| 1876 | ;; The upstream git source has no tags. | ||
| 1877 | (method url-fetch) | ||
| 1878 | (uri (pypi-uri "janitor_rs" version)) | ||
| 1879 | (sha256 | ||
| 1880 | (base32 "0xicxplz8vngbj4s6c7d08gpivns5bda85020yf1wjs8788g9m2l")))) | ||
| 1881 | (build-system pyproject-build-system) | ||
| 1882 | (arguments | ||
| 1883 | (list | ||
| 1884 | #:tests? #f ; No tests. | ||
| 1885 | #:imported-modules `(,@%cargo-build-system-modules | ||
| 1886 | ,@%pyproject-build-system-modules) | ||
| 1887 | #:modules '(((guix build cargo-build-system) #:prefix cargo:) | ||
| 1888 | (guix build pyproject-build-system) | ||
| 1889 | (guix build utils)) | ||
| 1890 | #:phases | ||
| 1891 | #~(modify-phases %standard-phases | ||
| 1892 | (add-after 'unpack 'prepare-cargo-build-system | ||
| 1893 | (lambda args | ||
| 1894 | (for-each | ||
| 1895 | (lambda (phase) | ||
| 1896 | (format #t "Running cargo phase: ~a~%" phase) | ||
| 1897 | (apply (assoc-ref cargo:%standard-phases phase) | ||
| 1898 | #:vendor-dir ".cargo/vendor" | ||
| 1899 | #:cargo-target #$(cargo-triplet) | ||
| 1900 | args)) | ||
| 1901 | '(unpack-rust-crates | ||
| 1902 | configure | ||
| 1903 | check-for-pregenerated-files | ||
| 1904 | patch-cargo-checksums))))))) | ||
| 1905 | (native-inputs (append | ||
| 1906 | (list maturin | ||
| 1907 | rust | ||
| 1908 | `(,rust "cargo")) | ||
| 1909 | (or (and=> (%current-target-system) | ||
| 1910 | (compose list make-rust-sysroot)) | ||
| 1911 | '()))) | ||
| 1912 | (inputs (cargo-inputs 'janitor-rs)) | ||
| 1913 | (home-page "https://github.com/pyjanitor-devs/janitor-rs") | ||
| 1914 | (synopsis "Rust library for faster pyjanitor") | ||
| 1915 | (description | ||
| 1916 | "This package provides a Rust library to improve the performance of | ||
| 1917 | @code{python-pyjanitor}.") | ||
| 1918 | (license license:expat))) | ||
| 1919 | |||
| 1870 | (define-public python-legendkit | 1920 | (define-public python-legendkit |
| 1871 | (package | 1921 | (package |
| 1872 | (name "python-legendkit") | 1922 | (name "python-legendkit") |
| @@ -2748,6 +2798,43 @@ well as potentially any library which conforms to a standard API. See the | |||
| 2748 | documentation for more information.") | 2798 | documentation for more information.") |
| 2749 | (license license:expat))) | 2799 | (license license:expat))) |
| 2750 | 2800 | ||
| 2801 | (define-public python-orsopy | ||
| 2802 | (package | ||
| 2803 | (name "python-orsopy") | ||
| 2804 | (version "1.2.1") | ||
| 2805 | (source | ||
| 2806 | (origin | ||
| 2807 | (method git-fetch) | ||
| 2808 | (uri (git-reference | ||
| 2809 | (url "https://github.com/reflectivity/orsopy") | ||
| 2810 | (commit (string-append "v" version)))) | ||
| 2811 | (file-name (git-file-name name version)) | ||
| 2812 | (sha256 | ||
| 2813 | (base32 "15av7b38h9x0f09dzxb111r2kxm6an461l9ajb01r8r7mv7m5bw9")))) | ||
| 2814 | (build-system pyproject-build-system) | ||
| 2815 | (arguments | ||
| 2816 | (list | ||
| 2817 | #:test-flags | ||
| 2818 | ;; These tests require network access. | ||
| 2819 | #~(cons* "--ignore=orsopy/slddb/tests/test_webapi.py" | ||
| 2820 | (map (lambda (test) | ||
| 2821 | (string-append "--deselect=orsopy/fileio/tests/" | ||
| 2822 | "test_model_language.py::" test)) | ||
| 2823 | (list "TestSubStack::test_resolve_layers" | ||
| 2824 | "TestMaterial::test_density_lookup_elements" | ||
| 2825 | "TestSampleModel::test_resolve_to_layers"))))) | ||
| 2826 | (propagated-inputs | ||
| 2827 | (list python-numpy python-pyyaml python-jsonschema python-h5py)) | ||
| 2828 | (native-inputs | ||
| 2829 | (list python-pint python-pytest python-setuptools)) | ||
| 2830 | (home-page "https://github.com/reflectivity/orsopy") | ||
| 2831 | (synopsis "Open Reflectometry Standards Organization Python tools") | ||
| 2832 | (description | ||
| 2833 | "This package provides Python tools for the Open Reflectometry Standards | ||
| 2834 | Organization (ORSO). It includes utilities for working with reflectometry | ||
| 2835 | data files and the ORSO file format.") | ||
| 2836 | (license license:expat))) | ||
| 2837 | |||
| 2751 | (define-public python-osfclient | 2838 | (define-public python-osfclient |
| 2752 | (package | 2839 | (package |
| 2753 | (name "python-osfclient") | 2840 | (name "python-osfclient") |
| @@ -2862,6 +2949,463 @@ web, by sharing data and other research outputs.") | |||
| 2862 | numerical optimization package.") | 2949 | numerical optimization package.") |
| 2863 | (license license:asl2.0))) | 2950 | (license license:asl2.0))) |
| 2864 | 2951 | ||
| 2952 | (define-public python-pandarallel | ||
| 2953 | (package | ||
| 2954 | (name "python-pandarallel") | ||
| 2955 | (version "1.6.5") | ||
| 2956 | (source | ||
| 2957 | (origin | ||
| 2958 | (method git-fetch) ; no tests in PyPI | ||
| 2959 | (uri (git-reference | ||
| 2960 | (url "https://github.com/nalepae/pandarallel/") | ||
| 2961 | (commit (string-append "v" version)))) | ||
| 2962 | (file-name (git-file-name name version)) | ||
| 2963 | (sha256 | ||
| 2964 | (base32 "0r2wlxlwp4wia0vm15k4cp421mwa20k4k5g2ml01inprj8bl1p0p")) | ||
| 2965 | (patches | ||
| 2966 | (search-patches "python-pandarallel-fix-df-applymap.patch" | ||
| 2967 | "python-pandarallel-fix-parallel_apply.patch")))) | ||
| 2968 | (build-system pyproject-build-system) | ||
| 2969 | (arguments | ||
| 2970 | (list | ||
| 2971 | #:test-flags #~(list "-n" (number->string (parallel-job-count))))) | ||
| 2972 | (propagated-inputs | ||
| 2973 | (list python-dill | ||
| 2974 | python-pandas | ||
| 2975 | python-psutil)) | ||
| 2976 | (native-inputs | ||
| 2977 | (list python-mkdocs-material | ||
| 2978 | python-numpy | ||
| 2979 | python-pytest | ||
| 2980 | python-pytest-xdist | ||
| 2981 | python-setuptools | ||
| 2982 | python-wheel)) | ||
| 2983 | (home-page "https://nalepae.github.io/pandarallel/") | ||
| 2984 | (synopsis "Tool to parallelize Pandas operations across CPUs") | ||
| 2985 | (description | ||
| 2986 | "@code{pandarallel} allows any Pandas user to take advantage of their | ||
| 2987 | multi-core computer, while Pandas uses only one core. @code{pandarallel} also | ||
| 2988 | offers nice progress bars (available on Notebook and terminal) to get an rough | ||
| 2989 | idea of the remaining amount of computation to be done.") | ||
| 2990 | (license license:bsd-3))) | ||
| 2991 | |||
| 2992 | (define-public python-pandas | ||
| 2993 | (package | ||
| 2994 | (name "python-pandas") | ||
| 2995 | (version "3.0.3") | ||
| 2996 | (source | ||
| 2997 | (origin | ||
| 2998 | (method git-fetch) | ||
| 2999 | (uri (git-reference | ||
| 3000 | (url "https://github.com/pandas-dev/pandas") | ||
| 3001 | (commit (string-append "v" version)))) | ||
| 3002 | (file-name (git-file-name name version)) | ||
| 3003 | (sha256 | ||
| 3004 | (base32 "1qagfjf4rrpx4xdw0bwg3q9g4k5vjplvifnx6k2frm8z2ws9hgds")))) | ||
| 3005 | (build-system pyproject-build-system) | ||
| 3006 | (arguments | ||
| 3007 | (list | ||
| 3008 | ;; tests: 185854 passed, 12827 skipped, 776 xfailed, 86 xpassed | ||
| 3009 | #:test-flags | ||
| 3010 | #~(list "-m" (string-join | ||
| 3011 | (list "not db" "network" "single_cpu" "slow" "slow_arm") | ||
| 3012 | " and not ") | ||
| 3013 | "-vv" | ||
| 3014 | ;; See: <https://github.com/pandas-dev/pandas/issues/54907>. | ||
| 3015 | "--no-strict-data-files" | ||
| 3016 | "--numprocesses" (number->string (min 4 (parallel-job-count))) | ||
| 3017 | "-k" (string-join | ||
| 3018 | (list "not test_git_version" | ||
| 3019 | "test_show_versions_console" | ||
| 3020 | ;; DeprecationWarning: Bitwise inversion '~' on bool | ||
| 3021 | ;; is deprecated and will be removed in Python 3.16. | ||
| 3022 | "test_scalar_unary[numexpr-pandas]" | ||
| 3023 | ;; AssertionError: Series are different. | ||
| 3024 | #$@(if (target-64bit?) | ||
| 3025 | '() | ||
| 3026 | '("test_rolling_var_numerical_issues"))) | ||
| 3027 | " and not ")) | ||
| 3028 | #:phases | ||
| 3029 | #~(modify-phases %standard-phases | ||
| 3030 | (add-after 'unpack 'patch-generate-version | ||
| 3031 | (lambda _ | ||
| 3032 | ;; See: <https://github.com/pandas-dev/pandas/issues/59459>. | ||
| 3033 | (substitute* "generate_version.py" | ||
| 3034 | (("version =.*") | ||
| 3035 | (format #f "version = ~s~%" #$version)) | ||
| 3036 | (("git_version =.*") | ||
| 3037 | (format #f "git_version = ~s~%" #$version))))) | ||
| 3038 | (replace 'check | ||
| 3039 | (lambda* (#:key test-flags tests? #:allow-other-keys) | ||
| 3040 | (when tests? | ||
| 3041 | ;; Tests don't work with "--pyargs pandas" or changing | ||
| 3042 | ;; directory to output, script is taken from pyproject.toml | ||
| 3043 | ;; file. | ||
| 3044 | (setenv "HOME" "/tmp") | ||
| 3045 | (delete-file-recursively "pandas") | ||
| 3046 | (invoke "python" "-c" (format #f "~a; ~a=[~{'~a', ~}]);" | ||
| 3047 | "import pandas as pd" | ||
| 3048 | "pd.test(extra_args" | ||
| 3049 | test-flags)))))))) | ||
| 3050 | (propagated-inputs | ||
| 3051 | (list python-numpy | ||
| 3052 | python-dateutil | ||
| 3053 | ;; XXX: Pandas lists a lot of optional dependencies which are not | ||
| 3054 | ;; hard requirements, leave them listed here and commented out for | ||
| 3055 | ;; the reference purpose. Try to keep closure as bare minimal as | ||
| 3056 | ;; possible. | ||
| 3057 | ;; | ||
| 3058 | ;; [optional] | ||
| 3059 | ;; python-adbc-driver-postgresql | ||
| 3060 | ;; python-adbc-driver-sqlite | ||
| 3061 | ;; python-beautifulsoup4 | ||
| 3062 | python-bottleneck | ||
| 3063 | ;; python-fastparquet | ||
| 3064 | ;; python-fsspec | ||
| 3065 | ;; python-gcsfs | ||
| 3066 | ;; python-html5lib | ||
| 3067 | ;; python-hypothesis | ||
| 3068 | ;; python-jinja2 | ||
| 3069 | python-lxml | ||
| 3070 | ;; python-matplotlib | ||
| 3071 | python-numba | ||
| 3072 | python-numexpr | ||
| 3073 | ;; python-odfpy | ||
| 3074 | ;; python-openpyxl | ||
| 3075 | ;; python-psycopg2 | ||
| 3076 | ;; python-pyarrow | ||
| 3077 | ;; python-pyiceberg | ||
| 3078 | ;; python-pymysql | ||
| 3079 | ;; python-pyqt5 | ||
| 3080 | ;; python-pyreadstat | ||
| 3081 | ;; python-python-calamine | ||
| 3082 | ;; python-pyxlsb | ||
| 3083 | ;; python-qtpy | ||
| 3084 | ;; python-s3fs | ||
| 3085 | ;; python-scipy | ||
| 3086 | ;; python-sqlalchemy | ||
| 3087 | ;; python-tables | ||
| 3088 | ;; python-tabulate | ||
| 3089 | ;; python-xarray | ||
| 3090 | ;; python-xlrd | ||
| 3091 | ;; python-xlsxwriter | ||
| 3092 | #;python-zstandard)) | ||
| 3093 | (inputs | ||
| 3094 | (list xclip xsel)) | ||
| 3095 | (native-inputs | ||
| 3096 | (list python-hypothesis | ||
| 3097 | python-meson | ||
| 3098 | python-pytest | ||
| 3099 | python-pytest-localserver | ||
| 3100 | python-pytest-xdist | ||
| 3101 | python-pytz | ||
| 3102 | python-versioneer | ||
| 3103 | tzdata-for-tests)) | ||
| 3104 | (home-page "https://pandas.pydata.org") | ||
| 3105 | (synopsis "Data structures for data analysis, time series, and statistics") | ||
| 3106 | (description | ||
| 3107 | "Pandas is a Python package providing fast, flexible, and expressive data | ||
| 3108 | structures designed to make working with structured (tabular, | ||
| 3109 | multidimensional, potentially heterogeneous) and time series data both easy | ||
| 3110 | and intuitive. It aims to be the fundamental high-level building block for | ||
| 3111 | doing practical, real world data analysis in Python.") | ||
| 3112 | (license license:bsd-3))) | ||
| 3113 | |||
| 3114 | (define-public python-pandas-2 | ||
| 3115 | (package | ||
| 3116 | (inherit python-pandas) | ||
| 3117 | (name "python-pandas") | ||
| 3118 | (version "2.3.3") | ||
| 3119 | (source | ||
| 3120 | (origin | ||
| 3121 | (method git-fetch) | ||
| 3122 | (uri (git-reference | ||
| 3123 | (url "https://github.com/pandas-dev/pandas") | ||
| 3124 | (commit (string-append "v" version)))) | ||
| 3125 | (file-name (git-file-name name version)) | ||
| 3126 | (sha256 | ||
| 3127 | (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg")) | ||
| 3128 | (patches (search-patches "python-pandas-2-no-pytz_datetime.patch")))) | ||
| 3129 | (build-system pyproject-build-system) | ||
| 3130 | (arguments | ||
| 3131 | (list | ||
| 3132 | ;; tests: 173093 passed, 24265 skipped, 990 xfailed, 77 xpassed, 110 warnings | ||
| 3133 | #:test-flags | ||
| 3134 | #~(list "-m" (string-join | ||
| 3135 | (list "not db" "network" "single_cpu" "slow" "slow_arm") | ||
| 3136 | " and not ") | ||
| 3137 | "--numprocesses" (number->string (min 4 (parallel-job-count))) | ||
| 3138 | "-k" (string-join | ||
| 3139 | (list "not test_git_version" | ||
| 3140 | "test_parsing_tzlocal_deprecated" | ||
| 3141 | "test_show_versions_console" | ||
| 3142 | ;; XXX: Introduced by NumPy 2.4.6 and Cython 3.2.5: | ||
| 3143 | ;; NotImplementedError | ||
| 3144 | ;; See: | ||
| 3145 | ;; <https://github.com/pandas-dev/pandas/issues/62820>, | ||
| 3146 | ;; <https://github.com/pandas-dev/pandas/issues/63078>. | ||
| 3147 | "test_categorical_block_pickle" | ||
| 3148 | "test_pickle" | ||
| 3149 | "test_pickle_freq" | ||
| 3150 | "test_pickle_preserves_block_ndim" | ||
| 3151 | "test_pickle_preserves_name" | ||
| 3152 | "test_pickle_round_trip" | ||
| 3153 | "test_pickle_roundtrip" | ||
| 3154 | "test_pickle_roundtrip_containers" | ||
| 3155 | "test_round_trip_current" | ||
| 3156 | ;; AssertionError: Series are different. | ||
| 3157 | #$@(if (target-64bit?) | ||
| 3158 | '() | ||
| 3159 | '("test_rolling_var_numerical_issues"))) | ||
| 3160 | " and not ")) | ||
| 3161 | #:phases | ||
| 3162 | #~(modify-phases %standard-phases | ||
| 3163 | (add-after 'unpack 'patch-generate-version | ||
| 3164 | (lambda _ | ||
| 3165 | ;; See: <https://github.com/pandas-dev/pandas/issues/59459>. | ||
| 3166 | (substitute* "generate_version.py" | ||
| 3167 | (("version =.*") | ||
| 3168 | (format #f "version = ~s~%" #$version)) | ||
| 3169 | (("git_version =.*") | ||
| 3170 | (format #f "git_version = ~s~%" #$version))))) | ||
| 3171 | (replace 'check | ||
| 3172 | (lambda* (#:key inputs outputs test-flags tests? #:allow-other-keys) | ||
| 3173 | (when tests? | ||
| 3174 | (setenv "HOME" "/tmp") | ||
| 3175 | (with-directory-excursion | ||
| 3176 | (string-append (string-append (site-packages inputs outputs) | ||
| 3177 | "/pandas")) | ||
| 3178 | (apply invoke "pytest" "-vv" test-flags)))))))) | ||
| 3179 | (propagated-inputs | ||
| 3180 | (list python-numpy | ||
| 3181 | python-dateutil | ||
| 3182 | python-pytz | ||
| 3183 | python-tzdata)) | ||
| 3184 | (inputs | ||
| 3185 | (list xclip xsel)) | ||
| 3186 | (native-inputs | ||
| 3187 | (list python-meson | ||
| 3188 | python-lxml | ||
| 3189 | python-pytest | ||
| 3190 | python-pytest-asyncio | ||
| 3191 | python-pytest-xdist | ||
| 3192 | python-versioneer | ||
| 3193 | tzdata-for-tests)))) | ||
| 3194 | |||
| 3195 | (define-public python-pandas-flavor | ||
| 3196 | (package | ||
| 3197 | (name "python-pandas-flavor") | ||
| 3198 | (version "0.8.1") | ||
| 3199 | (source | ||
| 3200 | (origin | ||
| 3201 | (method url-fetch) | ||
| 3202 | (uri (pypi-uri "pandas_flavor" version)) | ||
| 3203 | (sha256 | ||
| 3204 | (base32 | ||
| 3205 | "0rn3pnracv8013j3f737qal3isf1brbc3mpxqhr03vik322sapr5")))) | ||
| 3206 | (build-system pyproject-build-system) | ||
| 3207 | (native-inputs | ||
| 3208 | (list python-pytest | ||
| 3209 | python-setuptools | ||
| 3210 | python-setuptools-scm)) | ||
| 3211 | (propagated-inputs | ||
| 3212 | (list python-pandas | ||
| 3213 | python-xarray)) | ||
| 3214 | (home-page "https://github.com/pyjanitor-devs/pandas_flavor") | ||
| 3215 | (synopsis "Write your own flavor of Pandas") | ||
| 3216 | (description "Pandas 0.23 added a simple API for registering accessors | ||
| 3217 | with Pandas objects. Pandas-flavor extends Pandas' extension API by | ||
| 3218 | |||
| 3219 | @itemize | ||
| 3220 | @item adding support for registering methods as well | ||
| 3221 | @item making each of these functions backwards compatible with older versions | ||
| 3222 | of Pandas | ||
| 3223 | @end itemize") | ||
| 3224 | (license license:expat))) | ||
| 3225 | |||
| 3226 | ;; A bare minimal package, mainly to use in tests and reduce closure size. | ||
| 3227 | ;; Tests are left out in the main package to slim down native-inputs and | ||
| 3228 | ;; propagated-inputs. | ||
| 3229 | (define-public python-pandas-minimal | ||
| 3230 | (package/inherit python-pandas | ||
| 3231 | (name "python-pandas-minimal") | ||
| 3232 | (arguments | ||
| 3233 | (substitute-keyword-arguments arguments | ||
| 3234 | ((#:tests? _ #t) #f))) | ||
| 3235 | (native-inputs | ||
| 3236 | (list python-meson | ||
| 3237 | python-versioneer)) | ||
| 3238 | (propagated-inputs | ||
| 3239 | (list python-numpy | ||
| 3240 | python-dateutil | ||
| 3241 | python-pytz)))) | ||
| 3242 | |||
| 3243 | (define-public python-pandas-stubs | ||
| 3244 | (package | ||
| 3245 | (name "python-pandas-stubs") | ||
| 3246 | ;; The versioning follows that of Pandas and uses the date of the | ||
| 3247 | ;; python-pandas-stubs release. | ||
| 3248 | (version "2.3.3.251219") | ||
| 3249 | (source | ||
| 3250 | (origin | ||
| 3251 | (method git-fetch) | ||
| 3252 | (uri (git-reference | ||
| 3253 | (url "https://github.com/pandas-dev/pandas-stubs") | ||
| 3254 | (commit (string-append "v" version)))) | ||
| 3255 | (file-name (git-file-name name version)) | ||
| 3256 | (sha256 | ||
| 3257 | (base32 "1xh753wv5dbc59qp7fas323181mlblvhqmd9a4g7zzhaa2mxmzqs")))) | ||
| 3258 | (build-system pyproject-build-system) | ||
| 3259 | (arguments | ||
| 3260 | (list | ||
| 3261 | ;; tests: 1619 passed, 12 skipped, 7 deselected | ||
| 3262 | #:test-flags | ||
| 3263 | #~(list | ||
| 3264 | ;; ImportError: Missing optional dependency 'python-calamine'. | ||
| 3265 | "--deselect=tests/test_io.py::test_read_excel" | ||
| 3266 | "--deselect=tests/test_io.py::test_excel_reader"))) | ||
| 3267 | (native-inputs | ||
| 3268 | (list python-beautifulsoup4 | ||
| 3269 | python-fsspec | ||
| 3270 | python-html5lib | ||
| 3271 | python-jinja2 | ||
| 3272 | python-loguru | ||
| 3273 | python-lxml | ||
| 3274 | python-matplotlib | ||
| 3275 | python-mypy | ||
| 3276 | python-numexpr | ||
| 3277 | python-odfpy | ||
| 3278 | python-openpyxl | ||
| 3279 | python-pandas | ||
| 3280 | python-poetry-core | ||
| 3281 | python-pyarrow | ||
| 3282 | python-pyreadstat | ||
| 3283 | python-pytest | ||
| 3284 | python-scipy | ||
| 3285 | python-sqlalchemy-2 | ||
| 3286 | python-tabulate | ||
| 3287 | python-typing-extensions | ||
| 3288 | python-xarray | ||
| 3289 | python-xlrd | ||
| 3290 | python-xlsxwriter | ||
| 3291 | ;; Not packaged yet | ||
| 3292 | ;; | ||
| 3293 | ;; python-calamine | ||
| 3294 | ;; python-poethepoet | ||
| 3295 | ;; python-pyarrow-stubs | ||
| 3296 | ;; python-pyrefly | ||
| 3297 | ;; python-python-calamine | ||
| 3298 | ;; python-pyxlsb | ||
| 3299 | ;; python-scipy-stubs | ||
| 3300 | ;; python-ty | ||
| 3301 | ;; python-types-python-dateutil | ||
| 3302 | tzdata-for-tests)) | ||
| 3303 | (propagated-inputs | ||
| 3304 | (list python-numpy | ||
| 3305 | python-types-pytz)) | ||
| 3306 | (home-page "https://pandas.pydata.org") | ||
| 3307 | (synopsis "Type annotations for pandas") | ||
| 3308 | (description | ||
| 3309 | "This package contains public type stubs for @code{python-pandas}, following | ||
| 3310 | the convention of providing stubs in a separate package, as specified in | ||
| 3311 | @acronym{PEP, Python Enhancement Proposal} 561. The stubs cover the most | ||
| 3312 | typical use cases of @code{python-pandas}. In general, these stubs are | ||
| 3313 | narrower than what is possibly allowed by @code{python-pandas}, but follow a | ||
| 3314 | convention of suggesting best recommended practices for using | ||
| 3315 | @code{python-pandas}.") | ||
| 3316 | (license license:bsd-3))) | ||
| 3317 | |||
| 3318 | (define-public python-pandera | ||
| 3319 | (package | ||
| 3320 | (name "python-pandera") | ||
| 3321 | (version "0.31.1") | ||
| 3322 | (source | ||
| 3323 | (origin | ||
| 3324 | ;; XXX: Sanity-check fails to load when switched to git-fetch. | ||
| 3325 | (method url-fetch) | ||
| 3326 | (uri (pypi-uri "pandera" version)) | ||
| 3327 | (sha256 | ||
| 3328 | (base32 "04qgmcfvw78ccfnmidhy3zw1i99nyjkz3b0klsd4ypgiia3a6nn7")))) | ||
| 3329 | (build-system pyproject-build-system) | ||
| 3330 | (arguments | ||
| 3331 | (list | ||
| 3332 | ;; tests: 3810 passed, 22 skipped, 21 xfailed, 5923 warnings | ||
| 3333 | #:test-flags | ||
| 3334 | ;; With higher threads count tests randomly fail during collection. | ||
| 3335 | #~(list "--numprocesses" (number->string (min 2 (parallel-job-count))) | ||
| 3336 | ;; TODO: Ignore tests for not packaged python-ibis-framework, | ||
| 3337 | ;; and python-pyspark. | ||
| 3338 | "--ignore=tests/ibis" | ||
| 3339 | "--ignore=tests/pyspark" | ||
| 3340 | ;; Not compatible with Pandas 3 yet. | ||
| 3341 | "--ignore=tests/modin" | ||
| 3342 | ;; Tests fail to connect to 127.0.0.1:52245, connection refused. | ||
| 3343 | "--deselect=tests/fastapi/test_app.py::test_items_endpoint" | ||
| 3344 | "--deselect=tests/fastapi/test_app.py::test_transactions_endpoint" | ||
| 3345 | "--deselect=tests/fastapi/test_app.py::test_upload_file_endpoint" | ||
| 3346 | ;; frictionless is not packaged yet. | ||
| 3347 | "-k" "not test_frictionless_schema_"))) | ||
| 3348 | (native-inputs | ||
| 3349 | (list python-joblib | ||
| 3350 | python-black ;some tets depent on it | ||
| 3351 | python-mypy-for-tests | ||
| 3352 | python-pytest | ||
| 3353 | python-pytest-asyncio | ||
| 3354 | python-pytest-xdist | ||
| 3355 | python-pytz | ||
| 3356 | python-setuptools | ||
| 3357 | python-setuptools-scm | ||
| 3358 | python-sphinx ;some tets depent on it | ||
| 3359 | python-uvicorn | ||
| 3360 | tzdata-for-tests)) | ||
| 3361 | (inputs | ||
| 3362 | ;; [optional] | ||
| 3363 | ;; Pandera comes with a lot of extras. We test as many as possible, but do | ||
| 3364 | ;; not include all of them in the propagated-inputs. Currently, we have to | ||
| 3365 | ;; skip the pyspark and io tests due to missing packages python-pyspark | ||
| 3366 | ;; and python-frictionless. | ||
| 3367 | (list python-dask | ||
| 3368 | python-distributed | ||
| 3369 | python-geopandas | ||
| 3370 | python-hypothesis | ||
| 3371 | ;; python-ibis-framework ;missing from Guix | ||
| 3372 | ;; python-modin ;blocked by guix/guix#9336 | ||
| 3373 | python-numpy | ||
| 3374 | python-pandas | ||
| 3375 | python-polars | ||
| 3376 | ;; python-pyspark ;missing from Guix | ||
| 3377 | ;; python-ray ;missing from Guix | ||
| 3378 | python-scipy | ||
| 3379 | python-shapely)) | ||
| 3380 | (propagated-inputs | ||
| 3381 | (list python-packaging | ||
| 3382 | python-pydantic | ||
| 3383 | python-typeguard | ||
| 3384 | python-typing-extensions | ||
| 3385 | python-typing-inspect)) | ||
| 3386 | (home-page "https://github.com/unionai-oss/pandera") | ||
| 3387 | (synopsis "Perform data validation on dataframe-like objects") | ||
| 3388 | (description | ||
| 3389 | "@code{python-pandera} provides a flexible and expressive API for | ||
| 3390 | performing data validation on dataframe-like objects to make data processing | ||
| 3391 | pipelines more readable and robust. Dataframes contain information that | ||
| 3392 | @code{python-pandera} explicitly validates at runtime. This is useful in | ||
| 3393 | production-critical data pipelines or reproducible research settings. With | ||
| 3394 | @code{python-pandera}, you can: | ||
| 3395 | |||
| 3396 | @itemize | ||
| 3397 | @item Define a schema once and use it to validate different dataframe types. | ||
| 3398 | @item Check the types and properties of columns. | ||
| 3399 | @item Perform more complex statistical validation like hypothesis testing. | ||
| 3400 | @item Seamlessly integrate with existing data pipelines via function decorators. | ||
| 3401 | @item Define dataframe models with the class-based API with pydantic-style syntax. | ||
| 3402 | @item Synthesize data from schema objects for property-based testing. | ||
| 3403 | @item Lazily validate dataframes so that all validation rules are executed. | ||
| 3404 | @item Integrate with a rich ecosystem of tools like @code{python-pydantic}, | ||
| 3405 | @code{python-fastapi} and @code{python-mypy}. | ||
| 3406 | @end itemize") | ||
| 3407 | (license license:expat))) | ||
| 3408 | |||
| 2865 | (define-public python-particle | 3409 | (define-public python-particle |
| 2866 | (package | 3410 | (package |
| 2867 | (name "python-particle") | 3411 | (name "python-particle") |
| @@ -2889,6 +3433,67 @@ numerical optimization package.") | |||
| 2889 | particle information and extra goodies.") | 3433 | particle information and extra goodies.") |
| 2890 | (license license:bsd-3))) | 3434 | (license license:bsd-3))) |
| 2891 | 3435 | ||
| 3436 | (define-public python-pingouin | ||
| 3437 | (package | ||
| 3438 | (name "python-pingouin") | ||
| 3439 | (version "0.6.1") | ||
| 3440 | (source | ||
| 3441 | (origin | ||
| 3442 | (method git-fetch) | ||
| 3443 | (uri (git-reference | ||
| 3444 | (url "https://github.com/raphaelvallat/pingouin") | ||
| 3445 | (commit (string-append "v" version)))) | ||
| 3446 | (file-name (git-file-name name version)) | ||
| 3447 | (sha256 | ||
| 3448 | (base32 "14hxs2w51qgg67kqkxpy02kd4q8gb7vayj85kcp8qvda1q1xasfv")))) | ||
| 3449 | (build-system pyproject-build-system) | ||
| 3450 | (arguments | ||
| 3451 | (list | ||
| 3452 | ;; tests: 85 passed, 3 deselected, 43 warnings | ||
| 3453 | #:test-flags | ||
| 3454 | #~(list | ||
| 3455 | ;; These tests failed with the python-pandas update. | ||
| 3456 | "--deselect=tests/test_parametric.py::TestParametric::test_ancova" | ||
| 3457 | "--deselect=tests/test_parametric.py::TestParametric::test_anova" | ||
| 3458 | "--deselect=tests/test_pandas.py::TestParametric::test_pandas"))) | ||
| 3459 | (native-inputs | ||
| 3460 | (list python-pytest | ||
| 3461 | python-setuptools)) | ||
| 3462 | (propagated-inputs | ||
| 3463 | (list python-matplotlib | ||
| 3464 | python-mpmath | ||
| 3465 | python-numpy | ||
| 3466 | python-pandas | ||
| 3467 | python-pandas-flavor | ||
| 3468 | python-scikit-learn | ||
| 3469 | python-scipy | ||
| 3470 | python-seaborn | ||
| 3471 | python-statsmodels | ||
| 3472 | python-tabulate)) | ||
| 3473 | (home-page "https://pingouin-stats.org/") | ||
| 3474 | (synopsis "Statistical package for Python") | ||
| 3475 | (description "Pingouin is a statistical package written in Python 3 and | ||
| 3476 | based mostly on Pandas and NumPy. Its features include | ||
| 3477 | |||
| 3478 | @itemize | ||
| 3479 | @item ANOVAs: N-ways, repeated measures, mixed, ancova | ||
| 3480 | @item Pairwise post-hocs tests (parametric and non-parametric) and pairwise | ||
| 3481 | correlations | ||
| 3482 | @item Robust, partial, distance and repeated measures correlations | ||
| 3483 | @item Linear/logistic regression and mediation analysis | ||
| 3484 | @item Bayes Factors | ||
| 3485 | @item Multivariate tests | ||
| 3486 | @item Reliability and consistency | ||
| 3487 | @item Effect sizes and power analysis | ||
| 3488 | @item Parametric/bootstrapped confidence intervals around an effect size or a | ||
| 3489 | correlation coefficient | ||
| 3490 | @item Circular statistics | ||
| 3491 | @item Chi-squared tests | ||
| 3492 | @item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation, | ||
| 3493 | and more | ||
| 3494 | @end itemize") | ||
| 3495 | (license license:gpl3))) | ||
| 3496 | |||
| 2892 | (define-public python-pint | 3497 | (define-public python-pint |
| 2893 | (package | 3498 | (package |
| 2894 | (name "python-pint") | 3499 | (name "python-pint") |
| @@ -2935,6 +3540,322 @@ allows arithmetic operations between them and conversions from and to | |||
| 2935 | different units.") | 3540 | different units.") |
| 2936 | (license license:bsd-3))) | 3541 | (license license:bsd-3))) |
| 2937 | 3542 | ||
| 3543 | (define-public python-plotly | ||
| 3544 | (package | ||
| 3545 | (name "python-plotly") | ||
| 3546 | (version "6.8.0") | ||
| 3547 | (source | ||
| 3548 | (origin | ||
| 3549 | (method git-fetch) | ||
| 3550 | (uri (git-reference | ||
| 3551 | (url "https://github.com/plotly/plotly.py") | ||
| 3552 | (commit (string-append "v" version)))) | ||
| 3553 | (file-name (git-file-name name version)) | ||
| 3554 | (sha256 | ||
| 3555 | (base32 "147vgm22zrg4wcjc427mxszbb8v6vhs7hgchcm8678cy304hawvd")))) | ||
| 3556 | (build-system pyproject-build-system) | ||
| 3557 | (arguments | ||
| 3558 | (list | ||
| 3559 | ;; tests: 3039 passed, 24 skipped, 292 deselected, 4 xfailed, 556 warnings | ||
| 3560 | #:test-flags | ||
| 3561 | ;; Missing dependencies. | ||
| 3562 | #~(list "--ignore=plotly/matplotlylib/mplexporter/tests/test_basic.py" | ||
| 3563 | "--ignore=plotly/matplotlylib/mplexporter/tests/test_utils.py" | ||
| 3564 | "--ignore=plotly/matplotlylib/tests/test_renderer.py" | ||
| 3565 | "--ignore=tests/test_io/test_renderers.py" | ||
| 3566 | "--ignore=tests/test_optional/test_kaleido/test_kaleido.py" | ||
| 3567 | ;; XXX: Combination of missing packages and assertion errors. | ||
| 3568 | "-k" (string-join | ||
| 3569 | (list "not test_acceptance_named" | ||
| 3570 | "test_colorscale_and_levels_same_length" | ||
| 3571 | "test_correct_order_param" | ||
| 3572 | "test_date_in_hover" | ||
| 3573 | "test_dependencies_not_imported" | ||
| 3574 | "test_fips_values_same_length" | ||
| 3575 | "test_from_json_output_type" | ||
| 3576 | "test_get_module_exists_submodule" | ||
| 3577 | "test_iplot_mpl_works" | ||
| 3578 | "test_iplot_works_after_you_call_init_notebook_mode" | ||
| 3579 | "test_iplot_works_without_init_notebook_mode" | ||
| 3580 | "test_lazy_imports" | ||
| 3581 | "test_ols_trendline_slopes" | ||
| 3582 | "test_overall_trendline" | ||
| 3583 | "test_read_json_from_file_string" | ||
| 3584 | "test_read_json_from_filelike" | ||
| 3585 | "test_read_json_from_pathlib" | ||
| 3586 | "test_render_mode" | ||
| 3587 | "test_scope_is_not_list" | ||
| 3588 | "test_trendline_enough_values" | ||
| 3589 | "test_trendline_nan_values" | ||
| 3590 | "test_trendline_on_timeseries" | ||
| 3591 | "test_trendline_results_passthrough") | ||
| 3592 | " and not ")) | ||
| 3593 | #:phases | ||
| 3594 | #~(modify-phases %standard-phases | ||
| 3595 | (add-before 'build 'skip-npm | ||
| 3596 | ;; npm is not packaged so build without it | ||
| 3597 | (lambda _ | ||
| 3598 | (setenv "SKIP_NPM" "T")))))) | ||
| 3599 | ;; XXX: Plotly requires a long list of test only packages, do not | ||
| 3600 | ;; propagate them, see: | ||
| 3601 | ;; <https://github.com/plotly/plotly.py/blob/v6.8.0/pyproject.toml#L56>. | ||
| 3602 | (native-inputs | ||
| 3603 | (list ;; python-anywidget ;not packaged yet in Guix | ||
| 3604 | python-colorcet | ||
| 3605 | python-geopandas | ||
| 3606 | python-hatchling | ||
| 3607 | python-inflect | ||
| 3608 | ;; python-kaleido ;not packaged yet in Guix | ||
| 3609 | python-numpy | ||
| 3610 | python-orjson | ||
| 3611 | python-pandas-minimal | ||
| 3612 | ;; python-pdfrw ;not packaged yet in Guix | ||
| 3613 | python-pillow | ||
| 3614 | ;; python-plotly-geo ;not packaged yet in Guix | ||
| 3615 | python-polars | ||
| 3616 | python-pyarrow | ||
| 3617 | python-pyshp | ||
| 3618 | python-pytest | ||
| 3619 | python-pytz | ||
| 3620 | python-scikit-image | ||
| 3621 | python-scipy-minimal | ||
| 3622 | python-shapely | ||
| 3623 | python-statsmodels | ||
| 3624 | python-xarray | ||
| 3625 | tzdata-for-tests)) | ||
| 3626 | (propagated-inputs | ||
| 3627 | (list python-narwhals | ||
| 3628 | python-packaging)) | ||
| 3629 | (home-page "https://plotly.com/python/") | ||
| 3630 | (synopsis "Interactive plotting library for Python") | ||
| 3631 | (description | ||
| 3632 | "Plotly's Python graphing library makes interactive,publication-quality | ||
| 3633 | graphs online. Examples of how to make line plots, scatter plots, area | ||
| 3634 | charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, | ||
| 3635 | multiple-axes, polar charts, and bubble charts.") | ||
| 3636 | (license license:expat))) | ||
| 3637 | |||
| 3638 | (define-public python-plotnine | ||
| 3639 | (package | ||
| 3640 | (name "python-plotnine") | ||
| 3641 | (version "0.15.7") | ||
| 3642 | (source | ||
| 3643 | (origin | ||
| 3644 | (method git-fetch) | ||
| 3645 | (uri (git-reference | ||
| 3646 | (url "https://github.com/has2k1/plotnine") | ||
| 3647 | (commit (string-append "v" version)))) | ||
| 3648 | (file-name (git-file-name name version)) | ||
| 3649 | (sha256 | ||
| 3650 | (base32 "0cf8bv9cjjdd0qa77kq6kpspwmbg8px6s5s5zplrns9awlskn8zg")))) | ||
| 3651 | (build-system pyproject-build-system) | ||
| 3652 | (arguments | ||
| 3653 | (list | ||
| 3654 | #:test-flags | ||
| 3655 | ;; XXX: Check for any new failing tests during next update cycle. | ||
| 3656 | ;; These all fail because the images are considered to be too different, | ||
| 3657 | ;; though they really do look fine. | ||
| 3658 | ;; See https://github.com/has2k1/plotnine/issues/627 | ||
| 3659 | `(list ,@(map (lambda (file) (string-append "--ignore=" file)) | ||
| 3660 | (list "tests/test_aes.py" | ||
| 3661 | "tests/test_annotation_logticks.py" | ||
| 3662 | "tests/test_coords.py" | ||
| 3663 | "tests/test_facet_labelling.py" | ||
| 3664 | "tests/test_facets.py" | ||
| 3665 | "tests/test_layout.py" | ||
| 3666 | "tests/test_position.py" | ||
| 3667 | "tests/test_qplot.py" | ||
| 3668 | "tests/test_plot_composition.py" | ||
| 3669 | "tests/test_scale_internals.py" | ||
| 3670 | "tests/test_scale_labelling.py" | ||
| 3671 | "tests/test_theme.py")) | ||
| 3672 | "--ignore-glob=tests/test_geom*.py" | ||
| 3673 | "--ignore-glob=tests/test_stat*.py" | ||
| 3674 | "-k" ; Other failures | ||
| 3675 | (string-append "not " | ||
| 3676 | (string-join | ||
| 3677 | (list | ||
| 3678 | ;; This triggers an unexpected but harmless | ||
| 3679 | ;; warning. | ||
| 3680 | "test_save_method" | ||
| 3681 | ;; This test fails to set the locale. | ||
| 3682 | "test_no_after_scale_warning" | ||
| 3683 | ;; Missing optional modules | ||
| 3684 | "test_non_linear_smooth" | ||
| 3685 | "test_non_linear_smooth_no_ci") | ||
| 3686 | " and not " | ||
| 3687 | 'infix))) | ||
| 3688 | #:phases | ||
| 3689 | #~(modify-phases %standard-phases | ||
| 3690 | (add-before 'check 'pre-check | ||
| 3691 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 3692 | ;; The data files are referenced by the tests but they are not | ||
| 3693 | ;; installed. | ||
| 3694 | (copy-recursively "plotnine/data" | ||
| 3695 | (string-append (site-packages inputs | ||
| 3696 | outputs) | ||
| 3697 | "/plotnine/data")) | ||
| 3698 | (setenv "CI" "1") ;skip tests that are known to fail on CI. | ||
| 3699 | ;; Matplotlib needs to be able to write its configuration file | ||
| 3700 | ;; somewhere. | ||
| 3701 | (setenv "MPLCONFIGDIR" "/tmp") | ||
| 3702 | (setenv "TZ" "UTC") | ||
| 3703 | (setenv "TZDIR" | ||
| 3704 | (search-input-directory inputs "share/zoneinfo"))))))) | ||
| 3705 | (propagated-inputs (list python-adjusttext | ||
| 3706 | python-matplotlib | ||
| 3707 | python-mizani | ||
| 3708 | python-numpy | ||
| 3709 | python-patsy | ||
| 3710 | python-scipy | ||
| 3711 | python-statsmodels)) | ||
| 3712 | (native-inputs (list python-geopandas | ||
| 3713 | python-mock | ||
| 3714 | python-pandas | ||
| 3715 | python-pytest | ||
| 3716 | python-setuptools | ||
| 3717 | python-setuptools-scm | ||
| 3718 | python-wheel | ||
| 3719 | tzdata-for-tests)) | ||
| 3720 | (home-page "https://github.com/has2k1/plotnine") | ||
| 3721 | (synopsis "Grammar of Graphics for Python") | ||
| 3722 | (description | ||
| 3723 | "Plotnine is a Python implementation of the Grammar of Graphics. | ||
| 3724 | It is a powerful graphics concept for creating plots and visualizations in a | ||
| 3725 | structured and declarative manner. It is inspired by the R package ggplot2 | ||
| 3726 | and aims to provide a similar API and functionality in Python.") | ||
| 3727 | (license license:expat))) | ||
| 3728 | |||
| 3729 | (define-public python-pods | ||
| 3730 | (package | ||
| 3731 | (name "python-pods") | ||
| 3732 | (version "0.1.17") | ||
| 3733 | (source | ||
| 3734 | (origin | ||
| 3735 | (method url-fetch) | ||
| 3736 | (uri (pypi-uri "pods" version)) | ||
| 3737 | (sha256 | ||
| 3738 | (base32 "1z57jdwml2jzr2dq20p7pzx3ayhajgfd2d0xqjvgzx576hp2z1ac")))) | ||
| 3739 | (build-system pyproject-build-system) | ||
| 3740 | ;; Tests depend on Nose framework and try to download test data from | ||
| 3741 | ;; <https://github.com/SheffieldML/GPmat>. | ||
| 3742 | (arguments (list #:tests? #f)) | ||
| 3743 | (native-inputs | ||
| 3744 | (list python-poetry-core)) | ||
| 3745 | (propagated-inputs | ||
| 3746 | (list python-pandas | ||
| 3747 | python-pyyaml | ||
| 3748 | python-scipy | ||
| 3749 | python-tables)) | ||
| 3750 | (home-page "https://github.com/lawrennd/ods") | ||
| 3751 | (synopsis "Python software for Open Data Science") | ||
| 3752 | (description "This package provides utilities and tools for open data | ||
| 3753 | science including tools for accessing data sets in Python.") | ||
| 3754 | (license license:bsd-3))) | ||
| 3755 | |||
| 3756 | (define-public python-polars | ||
| 3757 | (package | ||
| 3758 | (name "python-polars") | ||
| 3759 | (version "1.38.1") | ||
| 3760 | (source | ||
| 3761 | (origin | ||
| 3762 | (method url-fetch) | ||
| 3763 | (uri (pypi-uri "polars" version)) | ||
| 3764 | (sha256 | ||
| 3765 | (base32 "0fc2fx2p72g01nhhhfs1fzbwz58rcj7zppascanq1y2f6kjjnfl0")))) | ||
| 3766 | (build-system pyproject-build-system) | ||
| 3767 | ;; The wheel doesn't have tests. | ||
| 3768 | ;; TODO On the next update, hopefully if delete-all-but has made it | ||
| 3769 | ;; into guix, switch to a git-source and keep src/polars and tests | ||
| 3770 | ;; subdirectories. | ||
| 3771 | (arguments (list #:tests? #f)) | ||
| 3772 | (propagated-inputs (list python-polars-runtime-32)) | ||
| 3773 | (native-inputs (list python-setuptools)) | ||
| 3774 | (home-page "https://pola.rs/") | ||
| 3775 | (synopsis "Blazingly fast DataFrame library") | ||
| 3776 | (description | ||
| 3777 | "Polars is a DataFrame library for manipulating structured data.") | ||
| 3778 | (license license:expat))) | ||
| 3779 | |||
| 3780 | (define-public python-polars-runtime-32 | ||
| 3781 | (package | ||
| 3782 | (name "python-polars-runtime-32") | ||
| 3783 | (version "1.38.1") | ||
| 3784 | (source | ||
| 3785 | (origin | ||
| 3786 | (method url-fetch) | ||
| 3787 | (uri (pypi-uri "polars_runtime_32" version)) | ||
| 3788 | (sha256 | ||
| 3789 | (base32 "1v72zkyhcziiizpymjlh2d5rwnkmvhlp18ln8brp31y5yp8hxwh4")))) | ||
| 3790 | (build-system pyproject-build-system) | ||
| 3791 | (arguments | ||
| 3792 | (list | ||
| 3793 | #:imported-modules `(,@%cargo-build-system-modules | ||
| 3794 | ,@%pyproject-build-system-modules) | ||
| 3795 | #:modules '(((guix build cargo-build-system) #:prefix cargo:) | ||
| 3796 | (guix build pyproject-build-system) | ||
| 3797 | (guix build utils)) | ||
| 3798 | ;; There are rust tests which would be costly to run, but no python ones. | ||
| 3799 | #:tests? #f | ||
| 3800 | #:phases | ||
| 3801 | #~(modify-phases %standard-phases | ||
| 3802 | (add-after 'unpack 'build-without-rust-nightly | ||
| 3803 | (lambda _ | ||
| 3804 | ;; Add cargo flags that allow compilation without Rust nightly. | ||
| 3805 | (substitute* "pyproject.toml" | ||
| 3806 | ((".*tool.maturin.*" all) | ||
| 3807 | (string-append all "no-default-features = true\n" | ||
| 3808 | "features = [\"full\"]\n"))))) | ||
| 3809 | (add-after 'unpack 'fix-tikv-jemallocator | ||
| 3810 | (lambda _ | ||
| 3811 | ;; removes a patch.crates-io option that is packaged in | ||
| 3812 | ;; gnu/packages/rust-sources: rust-tikv-jemallocator-for-polars | ||
| 3813 | (substitute* "Cargo.toml" | ||
| 3814 | (("^tikv-jemallocator.*") "")))) | ||
| 3815 | ;; jemalloc needs unbundling for tikv-jemallocator-sys | ||
| 3816 | (add-before 'build 'override-jemalloc | ||
| 3817 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 3818 | (let ((jemalloc (assoc-ref inputs "jemalloc"))) | ||
| 3819 | ;; This flag is needed when not using the bundled jemalloc. | ||
| 3820 | ;; https://github.com/tikv/jemallocator/issues/19 | ||
| 3821 | (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1") | ||
| 3822 | (setenv "JEMALLOC_OVERRIDE" | ||
| 3823 | (string-append jemalloc "/lib/libjemalloc_pic.a"))))) | ||
| 3824 | (add-after 'unpack 'prepare-cargo-build-system | ||
| 3825 | (lambda args | ||
| 3826 | (for-each | ||
| 3827 | (lambda (phase) | ||
| 3828 | (format #t "Running cargo phase: ~a~%" phase) | ||
| 3829 | (apply (assoc-ref cargo:%standard-phases phase) | ||
| 3830 | #:cargo-target #$(cargo-triplet) | ||
| 3831 | args)) | ||
| 3832 | '(prepare-rust-crates | ||
| 3833 | unpack-rust-crates | ||
| 3834 | configure | ||
| 3835 | check-for-pregenerated-files | ||
| 3836 | patch-cargo-checksums))))))) | ||
| 3837 | (inputs | ||
| 3838 | (cons* jemalloc | ||
| 3839 | lz4 | ||
| 3840 | (list zstd "lib") | ||
| 3841 | (cargo-inputs 'python-polars-runtime-32))) | ||
| 3842 | (native-inputs | ||
| 3843 | (append | ||
| 3844 | (list maturin | ||
| 3845 | pkg-config | ||
| 3846 | rust | ||
| 3847 | `(,rust "cargo")) | ||
| 3848 | (or (and=> (%current-target-system) | ||
| 3849 | (compose list make-rust-sysroot)) | ||
| 3850 | '()))) | ||
| 3851 | (home-page "https://pola.rs/") | ||
| 3852 | (synopsis "Blazingly fast DataFrame library") | ||
| 3853 | (description "Polars is an analytical query engine written for DataFrames. | ||
| 3854 | It is designed to be fast, easy to use and expressive.") | ||
| 3855 | (properties '(("upstream-name" . "polars-runtime-32") | ||
| 3856 | (tunable? . #true))) | ||
| 3857 | (license license:expat))) | ||
| 3858 | |||
| 2938 | (define-public python-pyamg | 3859 | (define-public python-pyamg |
| 2939 | (package | 3860 | (package |
| 2940 | (name "python-pyamg") | 3861 | (name "python-pyamg") |
| @@ -3007,6 +3928,50 @@ different units.") | |||
| 3007 | @end itemize") | 3928 | @end itemize") |
| 3008 | (license license:expat))) | 3929 | (license license:expat))) |
| 3009 | 3930 | ||
| 3931 | (define-public python-pydicom | ||
| 3932 | (package | ||
| 3933 | (name "python-pydicom") | ||
| 3934 | (version "2.4.4") | ||
| 3935 | (source (origin | ||
| 3936 | (method git-fetch) | ||
| 3937 | (uri (git-reference | ||
| 3938 | (url "https://github.com/pydicom/pydicom") | ||
| 3939 | (commit (string-append "v" version)))) | ||
| 3940 | (file-name (git-file-name name version)) | ||
| 3941 | (sha256 | ||
| 3942 | (base32 | ||
| 3943 | "0ksyyc1hbhyqy289a2frn84ss29fb7czirx3dkxx56f4ia33b4c8")))) | ||
| 3944 | (build-system pyproject-build-system) | ||
| 3945 | (arguments | ||
| 3946 | (list | ||
| 3947 | #:test-flags | ||
| 3948 | ;; Skip tests that require networking. | ||
| 3949 | #~(list "-k" (string-append | ||
| 3950 | "not test_jpeg_ls_pixel_data.py" | ||
| 3951 | " and not test_gdcm_pixel_data.py" | ||
| 3952 | " and not test_pillow_pixel_data.py" | ||
| 3953 | " and not test_rle_pixel_data.py" | ||
| 3954 | " and not Test_JPEG_LS_Lossless_transfer_syntax" | ||
| 3955 | " and not test_numpy_pixel_data.py" | ||
| 3956 | " and not test_data_manager.py" | ||
| 3957 | " and not test_handler_util.py" | ||
| 3958 | " and not test_overlay_np.py" | ||
| 3959 | " and not test_encoders_pydicom.py" | ||
| 3960 | " and not test_encaps.py" | ||
| 3961 | " and not test_reading_ds_with_known_tags_with_UN_VR" | ||
| 3962 | " and not TestDatasetOverlayArray" | ||
| 3963 | " and not TestReader" | ||
| 3964 | " and not test_filewriter.py")))) | ||
| 3965 | (native-inputs (list python-pytest python-flit-core)) | ||
| 3966 | (inputs (list gdcm libjpeg-turbo)) | ||
| 3967 | (propagated-inputs (list python-numpy python-pillow)) | ||
| 3968 | (home-page "https://github.com/pydicom/pydicom") | ||
| 3969 | (synopsis "Python library for reading and writing DICOM data") | ||
| 3970 | (description "@code{python-pydicom} is a Python library for reading and | ||
| 3971 | writing DICOM medical imaging data. It can read, modify and write DICOM | ||
| 3972 | data.") | ||
| 3973 | (license license:expat))) | ||
| 3974 | |||
| 3010 | (define-public python-pyet | 3975 | (define-public python-pyet |
| 3011 | (package | 3976 | (package |
| 3012 | (name "python-pyet") | 3977 | (name "python-pyet") |
| @@ -3033,6 +3998,85 @@ different units.") | |||
| 3033 | Evapotranspiration using various standard methods.") | 3998 | Evapotranspiration using various standard methods.") |
| 3034 | (license license:expat))) | 3999 | (license license:expat))) |
| 3035 | 4000 | ||
| 4001 | (define-public python-pyjanitor | ||
| 4002 | (package | ||
| 4003 | (name "python-pyjanitor") | ||
| 4004 | (version "0.32.23") | ||
| 4005 | (source | ||
| 4006 | (origin | ||
| 4007 | (method git-fetch) | ||
| 4008 | (uri (git-reference | ||
| 4009 | (url "https://github.com/pyjanitor-devs/pyjanitor") | ||
| 4010 | (commit (string-append "v" version)))) | ||
| 4011 | (file-name (git-file-name name version)) | ||
| 4012 | (sha256 | ||
| 4013 | (base32 "1mvgabsn5jl2aidh2mcqdmh60p2g514nb5sxwskhz1q57pk4m0w9")))) | ||
| 4014 | (build-system pyproject-build-system) | ||
| 4015 | ;; Pyjanitor has an extensive test suite. For quick debugging, the tests | ||
| 4016 | ;; marked turtle can be skipped using "-m" "not turtle". | ||
| 4017 | (arguments | ||
| 4018 | (list | ||
| 4019 | ;; tests: 1030 passed, 2 skipped, 42 xfailed, 6 xpassed, 594 warnings | ||
| 4020 | #:test-flags | ||
| 4021 | ;; The tests take quite long, so consider adding the "-n" line and | ||
| 4022 | ;; adding python-pytest-xdist to the native-inputs when testing. | ||
| 4023 | ;; However, the tests are not deterministic, enen they are enabled in | ||
| 4024 | ;; project's CI (.github/workflows/tests.yml), when ran with "-n, | ||
| 4025 | ;; --numprocesses" , so disable again before committing. | ||
| 4026 | #~(list ;; "--numprocesses" (number->string (min 8 (parallel-job-count))) | ||
| 4027 | ;; Test files are not included. | ||
| 4028 | "--ignore=tests/io/test_read_csvs.py" | ||
| 4029 | ;; Polars has not been packaged yet. | ||
| 4030 | "--ignore=tests/polars/" | ||
| 4031 | ;; PySpark has not been packaged yet. | ||
| 4032 | "--ignore=tests/spark/" | ||
| 4033 | ;; Flaky test (fails for performance reasons) | ||
| 4034 | "--deselect=tests/math/test_ecdf.py::test_ecdf_string" | ||
| 4035 | ;; Tries to connect to the internet. | ||
| 4036 | "-k" (string-append "not test_is_connected" | ||
| 4037 | ;; Test files are not included. | ||
| 4038 | " and not test_read_commandline_bad_cmd" | ||
| 4039 | ;; XXX: Fatal Python error: Segmentation fault | ||
| 4040 | " and not test_maccs_keys_fingerprint" | ||
| 4041 | " and not test_morgan_fingerprint_counts" | ||
| 4042 | " and not test_morgan_fingerprint_bits" | ||
| 4043 | ;; AssertionError: DataFrame.iloc[:, 1] | ||
| 4044 | ;; (column name="cities") are different | ||
| 4045 | " and not test_various_sorted")) | ||
| 4046 | #:phases | ||
| 4047 | #~(modify-phases %standard-phases | ||
| 4048 | (add-before 'check 'set-env-ci | ||
| 4049 | (lambda _ | ||
| 4050 | ;; Some tests are skipped if the JANITOR_CI_MACHINE | ||
| 4051 | ;; variable is not set. | ||
| 4052 | (setenv "JANITOR_CI_MACHINE" "1")))))) | ||
| 4053 | (propagated-inputs (list python-janitor-rs | ||
| 4054 | python-multipledispatch | ||
| 4055 | python-natsort | ||
| 4056 | python-pandas-flavor | ||
| 4057 | python-scipy | ||
| 4058 | ;; [optional] | ||
| 4059 | python-biopython | ||
| 4060 | python-unyt)) | ||
| 4061 | (native-inputs (list python-numba | ||
| 4062 | python-openpyxl | ||
| 4063 | python-pytest | ||
| 4064 | ;;python-pytest-xdist ;only for -n when testing | ||
| 4065 | ;; TODO: Remove python-requests and inject its target | ||
| 4066 | ;; data to make the package behaviour reproducible. | ||
| 4067 | python-requests | ||
| 4068 | python-setuptools | ||
| 4069 | rdkit)) | ||
| 4070 | (home-page "https://github.com/pyjanitor-devs/pyjanitor") | ||
| 4071 | (synopsis "Tools for cleaning and transforming Pandas DataFrames") | ||
| 4072 | (description | ||
| 4073 | "@code{pyjanitor} provides a set of data cleaning routines for | ||
| 4074 | @code{pandas} DataFrames. These routines extend the method chaining API | ||
| 4075 | defined by @code{pandas} for a subset of its methods. Originally, this | ||
| 4076 | package was a port of the R package by the same name and it is inspired by the | ||
| 4077 | ease-of-use and expressiveness of the @code{dplyr} package.") | ||
| 4078 | (license license:expat))) | ||
| 4079 | |||
| 3036 | (define-public python-pykdtree | 4080 | (define-public python-pykdtree |
| 3037 | (package | 4081 | (package |
| 3038 | (name "python-pykdtree") | 4082 | (name "python-pykdtree") |
| @@ -3066,6 +4110,74 @@ Evapotranspiration using various standard methods.") | |||
| 3066 | search in Python.") | 4110 | search in Python.") |
| 3067 | (license license:lgpl3+))) | 4111 | (license license:lgpl3+))) |
| 3068 | 4112 | ||
| 4113 | (define-public python-pylems | ||
| 4114 | (package | ||
| 4115 | (name "python-pylems") | ||
| 4116 | (version "0.6.9") | ||
| 4117 | (source | ||
| 4118 | (origin | ||
| 4119 | (method git-fetch) | ||
| 4120 | (uri (git-reference | ||
| 4121 | (url "https://github.com/LEMS/pylems") | ||
| 4122 | (commit (string-append "v" version)))) | ||
| 4123 | (file-name (git-file-name name version)) | ||
| 4124 | (sha256 | ||
| 4125 | (base32 "0gimdx89cdla1b6zzkdrmj979nn2zy2475qvpwxxas0iv27ql0vj")))) | ||
| 4126 | (build-system pyproject-build-system) | ||
| 4127 | (arguments | ||
| 4128 | ;; Disable tests that require networking | ||
| 4129 | (list #:test-flags #~(list "./lems/test" "-k" "not test_load_write_xml"))) | ||
| 4130 | (native-inputs (list python-setuptools python-pytest)) | ||
| 4131 | (propagated-inputs (list python-lxml python-matplotlib)) | ||
| 4132 | (home-page "https://github.com/LEMS/pylems") | ||
| 4133 | (synopsis | ||
| 4134 | "Python support for the Low Entropy Model Specification language (LEMS)") | ||
| 4135 | (description "A @acronym{LEMS, Low Entropy Model Specification} simulator | ||
| 4136 | written in Python which can be used to run NeuroML2 models.") | ||
| 4137 | (license license:lgpl3))) | ||
| 4138 | |||
| 4139 | (define-public python-pymcubes | ||
| 4140 | (package | ||
| 4141 | (name "python-pymcubes") | ||
| 4142 | (version "0.1.6") | ||
| 4143 | (source | ||
| 4144 | (origin | ||
| 4145 | (method git-fetch) ; no tests in PyPI | ||
| 4146 | (uri (git-reference | ||
| 4147 | (url "https://github.com/pmneila/PyMCubes") | ||
| 4148 | (commit (string-append "v" version)))) | ||
| 4149 | (file-name (git-file-name name version)) | ||
| 4150 | (sha256 | ||
| 4151 | (base32 "1v2qhc4pwanx6a8k843mbh45yk77n3w63sy5lzk5c3q4pkvfj1b9")))) | ||
| 4152 | (build-system pyproject-build-system) | ||
| 4153 | (arguments | ||
| 4154 | (list | ||
| 4155 | #:phases | ||
| 4156 | #~(modify-phases %standard-phases | ||
| 4157 | (add-before 'check 'prepare-test-environment | ||
| 4158 | (lambda _ | ||
| 4159 | ;; FileNotFoundError: [Errno 2] No such file or directory: | ||
| 4160 | ;; 'output/test.obj' | ||
| 4161 | (mkdir "output") | ||
| 4162 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) | ||
| 4163 | (native-inputs | ||
| 4164 | (list python-cython | ||
| 4165 | python-pytest | ||
| 4166 | python-setuptools | ||
| 4167 | python-wheel)) | ||
| 4168 | (propagated-inputs | ||
| 4169 | (list python-pycollada | ||
| 4170 | python-numpy | ||
| 4171 | python-scipy)) | ||
| 4172 | (home-page "https://github.com/pmneila/PyMCubes") | ||
| 4173 | (synopsis "Marching cubes for Python") | ||
| 4174 | (description | ||
| 4175 | "@code{PyMCubes} is an implementation of the marching cubes algorithm to | ||
| 4176 | extract iso-surfaces from volumetric data. The volumetric data can be given | ||
| 4177 | as a three-dimensional @code{NumPy} array or as a Python function @code{f(x, | ||
| 4178 | y, z)}.") | ||
| 4179 | (license license:bsd-3))) | ||
| 4180 | |||
| 3069 | (define-public python-pynetdicom | 4181 | (define-public python-pynetdicom |
| 3070 | (package | 4182 | (package |
| 3071 | (name "python-pynetdicom") | 4183 | (name "python-pynetdicom") |
| @@ -3109,6 +4221,599 @@ networking protocol. It allows the easy creation of DICOM | |||
| 3109 | Providers}.") | 4221 | Providers}.") |
| 3110 | (license license:expat))) | 4222 | (license license:expat))) |
| 3111 | 4223 | ||
| 4224 | (define-public python-pynrrd | ||
| 4225 | (package | ||
| 4226 | (name "python-pynrrd") | ||
| 4227 | (version "1.1.3") | ||
| 4228 | (source (origin | ||
| 4229 | (method git-fetch) | ||
| 4230 | (uri (git-reference | ||
| 4231 | (url "https://github.com/mhe/pynrrd") | ||
| 4232 | (commit (string-append "v" version)))) | ||
| 4233 | (file-name (git-file-name name version)) | ||
| 4234 | (sha256 | ||
| 4235 | (base32 | ||
| 4236 | "1l0hjbqzf5i1bmpxpblpyyqkhci3mb5n07x6hqf2a91hggfyrvda")))) | ||
| 4237 | (build-system pyproject-build-system) | ||
| 4238 | (native-inputs | ||
| 4239 | (list python-pytest python-setuptools)) | ||
| 4240 | (propagated-inputs | ||
| 4241 | (list python-numpy)) | ||
| 4242 | (home-page "https://github.com/mhe/pynrrd") | ||
| 4243 | (synopsis "Python module for reading and writing NRRD files") | ||
| 4244 | (description | ||
| 4245 | "@code{pynrrd} is a Python module for reading and writing @acronym{NRRD, | ||
| 4246 | Nearly Raw Raster Data} files (format designed to support scientific | ||
| 4247 | visualization and image processing involving N-dimensional raster data) into | ||
| 4248 | and from numpy arrays.") | ||
| 4249 | (license license:expat))) | ||
| 4250 | |||
| 4251 | (define-public python-pynsee | ||
| 4252 | (package | ||
| 4253 | (name "python-pynsee") | ||
| 4254 | (version "0.1.8") | ||
| 4255 | (source | ||
| 4256 | (origin | ||
| 4257 | (method url-fetch) | ||
| 4258 | (uri (pypi-uri "pynsee" version)) | ||
| 4259 | (sha256 | ||
| 4260 | (base32 "1w084ynwdd9f4wpcnakqc0nxcbj9gr8vppv4rd258i3dp1qq4sw5")))) | ||
| 4261 | (build-system pyproject-build-system) | ||
| 4262 | (arguments (list #:tests? #f)) ; XXX: Tests require network access. | ||
| 4263 | (native-inputs | ||
| 4264 | (list python-setuptools | ||
| 4265 | python-wheel)) | ||
| 4266 | (propagated-inputs | ||
| 4267 | (list python-appdirs | ||
| 4268 | python-openpyxl | ||
| 4269 | python-pandas | ||
| 4270 | python-platformdirs | ||
| 4271 | python-pyarrow | ||
| 4272 | python-requests | ||
| 4273 | python-shapely | ||
| 4274 | python-tqdm | ||
| 4275 | python-unidecode | ||
| 4276 | python-urllib3 | ||
| 4277 | python-xlrd)) | ||
| 4278 | (home-page "https://pynsee.readthedocs.io") | ||
| 4279 | (synopsis | ||
| 4280 | "Tools to Easily Search and Download French Data From INSEE and IGN APIs") | ||
| 4281 | (description | ||
| 4282 | "This package provides tools to easily search and download French data | ||
| 4283 | from INSEE and IGN APIs. This data includes more than 150 000 macroeconomic | ||
| 4284 | series, a dozen datasets of local french data, numerous sources available on | ||
| 4285 | @url{insee.fr}, geographical limits of administrative areas taken from IGN as | ||
| 4286 | well as key metadata and SIRENE database containing data on all French | ||
| 4287 | compagnies.") | ||
| 4288 | (license license:expat))) | ||
| 4289 | |||
| 4290 | (define-public python-pyqtgraph | ||
| 4291 | (package | ||
| 4292 | (name "python-pyqtgraph") | ||
| 4293 | (version "0.13.7") | ||
| 4294 | (source | ||
| 4295 | (origin | ||
| 4296 | (method url-fetch) | ||
| 4297 | (uri (pypi-uri "pyqtgraph" version)) | ||
| 4298 | (sha256 | ||
| 4299 | (base32 "1qyr461hcvhgy02slfkgrbip2xwa8zz6dvmi1476v6f66lclzy34")))) | ||
| 4300 | (build-system pyproject-build-system) | ||
| 4301 | (arguments | ||
| 4302 | ;; tests: 949 passed, 1356 skipped, 2 deselected, 8 xfailed, 130 warnings | ||
| 4303 | (list #:test-flags | ||
| 4304 | ;; Failed: CALL ERROR: Exceptions caught in Qt event loop. | ||
| 4305 | #~(list "--deselect=tests/exporters/test_svg.py::test_plotscene" | ||
| 4306 | ;; The test_reload test fails. It suggests to disable | ||
| 4307 | ;; assert rewriting in Pytest, but it still doesn't pass. | ||
| 4308 | "-k" "not test_reload" | ||
| 4309 | ;; Run unit tets only. | ||
| 4310 | "tests") | ||
| 4311 | #:phases | ||
| 4312 | #~(modify-phases %standard-phases | ||
| 4313 | (add-before 'check 'set-qpa | ||
| 4314 | (lambda _ | ||
| 4315 | (setenv "QT_QPA_PLATFORM" "offscreen")))))) | ||
| 4316 | (native-inputs | ||
| 4317 | (list python-pytest | ||
| 4318 | ;; Do not propagate Qt5/Qt6 let the user of the package to select | ||
| 4319 | ;; any supported one, see | ||
| 4320 | ;; <https://pyqtgraph.readthedocs.io/en/pyqtgraph-0.13.7> | ||
| 4321 | ;; </getting_started/how_to_use.html#pyqt-and-pyside>. | ||
| 4322 | python-pyqt-6 | ||
| 4323 | python-pytest-qt | ||
| 4324 | python-setuptools)) | ||
| 4325 | (propagated-inputs | ||
| 4326 | (list python-h5py | ||
| 4327 | python-numpy | ||
| 4328 | python-pyopengl | ||
| 4329 | python-scipy)) | ||
| 4330 | (home-page "https://www.pyqtgraph.org") | ||
| 4331 | (synopsis "Scientific graphics and GUI library for Python") | ||
| 4332 | (description | ||
| 4333 | "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2 | ||
| 4334 | and PySide6. It is intended for use in mathematics, scientific or engineering | ||
| 4335 | applications.") | ||
| 4336 | (license license:expat))) | ||
| 4337 | |||
| 4338 | (define-public python-pytensor | ||
| 4339 | (package | ||
| 4340 | (name "python-pytensor") | ||
| 4341 | (version "3.2.4") | ||
| 4342 | (source (origin | ||
| 4343 | (method git-fetch) | ||
| 4344 | (uri (git-reference | ||
| 4345 | (url "https://github.com/pymc-devs/pytensor") | ||
| 4346 | (commit (string-append "rel-" version)))) | ||
| 4347 | (file-name (git-file-name name version)) | ||
| 4348 | (sha256 | ||
| 4349 | (base32 | ||
| 4350 | "0wqklzah9rysxnmf34zrj4njc1k79r9n9kbi1cnm6qj2dds6bm3d")))) | ||
| 4351 | (build-system pyproject-build-system) | ||
| 4352 | (arguments | ||
| 4353 | (list | ||
| 4354 | ;; tests: 1906 passed, 2581 skipped, 34 deselected, 12 xfailed, 274 warnings | ||
| 4355 | #:test-flags | ||
| 4356 | ;; XXX: Full test suite takes about 20-30min to complete in single | ||
| 4357 | ;; thread, attempt to run tests in parallel with pytest-xdist fails even | ||
| 4358 | ;; so upstream provides a support for that, try to figure out how to | ||
| 4359 | ;; improve it. | ||
| 4360 | ;; | ||
| 4361 | ;; Upstream implements a script, showing slow tests which may be used to | ||
| 4362 | ;; exclude even more hanging/slow ones, see: | ||
| 4363 | ;; <scripts/slowest_tests/extract-slow-tests.py>. | ||
| 4364 | ;; | ||
| 4365 | #~(list "--benchmark-disable" | ||
| 4366 | "--benchmark-skip" | ||
| 4367 | "--durations=50" | ||
| 4368 | ;; Skip computationally intensive tests. | ||
| 4369 | "--ignore=tests/scan/" | ||
| 4370 | "--ignore=tests/tensor/" | ||
| 4371 | "--ignore=tests/sandbox/" | ||
| 4372 | "--ignore=tests/sparse/sandbox/" | ||
| 4373 | ;; A mixture of assertions are not equal in these tests. | ||
| 4374 | "--deselect=tests/link/numba/test_nlinalg.py::test_Eigh[x0-L-None]" | ||
| 4375 | #$@(map (lambda (test) | ||
| 4376 | (string-append "--deselect=tests/graph/rewriting/" | ||
| 4377 | "test_basic.py::" | ||
| 4378 | test)) | ||
| 4379 | ;; Tests fail with similar errors: AssertionError: | ||
| 4380 | ;; assert 'FunctionGraph(Op1(Op2(x, y), z))' == | ||
| 4381 | ;; 'FunctionGraph(Op4(z, y))' | ||
| 4382 | (list "TestPatternNodeRewriter::test_replace_output" | ||
| 4383 | "TestPatternNodeRewriter::test_nested_out_pattern" | ||
| 4384 | "TestPatternNodeRewriter::test_unification_1" | ||
| 4385 | "TestPatternNodeRewriter::test_replace_subgraph" | ||
| 4386 | "TestPatternNodeRewriter::test_no_recurse" | ||
| 4387 | "TestPatternNodeRewriter::test_multiple" | ||
| 4388 | "TestPatternNodeRewriter::test_nested_even" | ||
| 4389 | "TestPatternNodeRewriter::test_nested_odd" | ||
| 4390 | "TestPatternNodeRewriter::test_expand" | ||
| 4391 | "TestPatternNodeRewriter::test_ambiguous" | ||
| 4392 | "TestPatternNodeRewriter::test_constant" | ||
| 4393 | "TestPatternNodeRewriter::test_constraints" | ||
| 4394 | "TestPatternNodeRewriter::test_match_same" | ||
| 4395 | "TestPatternNodeRewriter::test_eq" | ||
| 4396 | "TestEquilibrium::test_1" | ||
| 4397 | "TestEquilibrium::test_2" | ||
| 4398 | "TestEquilibrium::test_low_use_ratio" | ||
| 4399 | ;; A mixture of assertions are not equal: | ||
| 4400 | "TestPatternNodeRewriter::test_allow_multiple_clients" | ||
| 4401 | "TestPatternNodeRewriter::test_op_pattern" | ||
| 4402 | "test_patternsub_values_eq_approx[out_pattern0-True]" | ||
| 4403 | "test_patternsub_values_eq_approx[out_pattern0-False]" | ||
| 4404 | "test_patternsub_values_eq_approx[x-True]" | ||
| 4405 | "test_patternsub_values_eq_approx[x-False]" | ||
| 4406 | "test_patternsub_multi_output_nodes")) | ||
| 4407 | #$@(map (lambda (test) | ||
| 4408 | (string-append "--deselect=tests/graph/" test)) | ||
| 4409 | (list "rewriting/test_kanren.py::test_kanren_basic" | ||
| 4410 | "rewriting/test_kanren.py::test_KanrenRelationSub_filters" | ||
| 4411 | "rewriting/test_kanren.py::test_KanrenRelationSub_dot" | ||
| 4412 | "rewriting/test_unify.py::test_unify_Variable" | ||
| 4413 | "rewriting/test_unify.py::test_ConstrainedVar" | ||
| 4414 | "rewriting/test_unify.py::test_unify_OpPattern" | ||
| 4415 | "test_destroyhandler.py::test_misc"))) | ||
| 4416 | #:phases | ||
| 4417 | #~(modify-phases %standard-phases | ||
| 4418 | (add-before 'check 'pre-check | ||
| 4419 | (lambda _ | ||
| 4420 | ;; It is required for most tests. | ||
| 4421 | (setenv "HOME" "/tmp") | ||
| 4422 | ;; This would otherwise interfere with finding the installed | ||
| 4423 | ;; pytensor when running tests. | ||
| 4424 | (delete-file-recursively "pytensor")))))) | ||
| 4425 | (native-inputs (list python-cython | ||
| 4426 | python-pytest | ||
| 4427 | python-pytest-benchmark | ||
| 4428 | python-pytest-mock | ||
| 4429 | python-pytest-xdist | ||
| 4430 | python-versioneer | ||
| 4431 | python-setuptools)) | ||
| 4432 | (propagated-inputs (list python-cons | ||
| 4433 | python-etuples | ||
| 4434 | python-filelock | ||
| 4435 | python-logical-unification | ||
| 4436 | python-minikanren | ||
| 4437 | python-numba | ||
| 4438 | python-numpy | ||
| 4439 | python-scipy | ||
| 4440 | ;; [optional] | ||
| 4441 | ;; python-jaxlib | ||
| 4442 | ;; python-jax | ||
| 4443 | #;python-llvmlite)) | ||
| 4444 | (home-page "https://pytensor.readthedocs.io/en/latest/") | ||
| 4445 | (synopsis | ||
| 4446 | "Library for mathematical expressions in multi-dimensional arrays") | ||
| 4447 | (description | ||
| 4448 | "PyTensor is a Python library that allows one to define, optimize, and | ||
| 4449 | efficiently evaluate mathematical expressions involving multi-dimensional | ||
| 4450 | arrays. It is a fork of the Aesara library.") | ||
| 4451 | (license license:bsd-3))) | ||
| 4452 | |||
| 4453 | (define-public python-pytest-pyvista | ||
| 4454 | (package | ||
| 4455 | (name "python-pytest-pyvista") | ||
| 4456 | (version "0.3.2") | ||
| 4457 | (source | ||
| 4458 | (origin | ||
| 4459 | (method url-fetch) | ||
| 4460 | (uri (pypi-uri "pytest_pyvista" version)) | ||
| 4461 | (sha256 | ||
| 4462 | (base32 "0hgk3a5wwymk3k7ih4lsmkd44dfnsd842zv5859izqxkw74j2xpn")))) | ||
| 4463 | (build-system pyproject-build-system) | ||
| 4464 | (arguments | ||
| 4465 | (list | ||
| 4466 | ;; No tests included in the PyPI tarball. | ||
| 4467 | #:tests? #f)) | ||
| 4468 | (propagated-inputs (list python-numpy python-pillow python-pytest-8)) | ||
| 4469 | (native-inputs (list python-flit-core)) | ||
| 4470 | (home-page "https://github.com/pyvista/pytest-pyvista") | ||
| 4471 | (synopsis "Pytest plugin for comparing PyVista plot images") | ||
| 4472 | (description "This package provides a Pytest plugin that facilitates | ||
| 4473 | the comparison of images produced by PyVista, generating cached images from | ||
| 4474 | tests and comparing subsequent results against that cache.") | ||
| 4475 | (license license:expat))) | ||
| 4476 | |||
| 4477 | (define-public python-pythran | ||
| 4478 | (package | ||
| 4479 | (name "python-pythran") | ||
| 4480 | ;; 0.18.1 (2025-11-15), released version does not support gast 0.7.0 and | ||
| 4481 | ;; beniget 0.5.0. | ||
| 4482 | (properties '((commit . "1159b80a09ece110a369729507ba5d0bc8e895b2") | ||
| 4483 | (revision . "0"))) | ||
| 4484 | (version (git-version "0.18.1" | ||
| 4485 | (assoc-ref properties 'revision) | ||
| 4486 | (assoc-ref properties 'commit))) | ||
| 4487 | (source | ||
| 4488 | (origin | ||
| 4489 | (method git-fetch) | ||
| 4490 | (uri (git-reference | ||
| 4491 | (url "https://github.com/serge-sans-paille/pythran") | ||
| 4492 | (commit (assoc-ref properties 'commit)))) | ||
| 4493 | (file-name (git-file-name name version)) | ||
| 4494 | (sha256 | ||
| 4495 | (base32 "0w9vbfqsazrl7zv4b7mh8alib4kihk9gn6xmxp2w39jg5wpk2bdi")))) | ||
| 4496 | (build-system pyproject-build-system) | ||
| 4497 | (arguments | ||
| 4498 | (list | ||
| 4499 | ;; FIXME: find more reliable tests file(s), all tests from | ||
| 4500 | ;; test_typing.py fail with error: ModuleNotFoundError: No module named | ||
| 4501 | ;; 'distutils.msvccompiler'. | ||
| 4502 | #:tests? #f | ||
| 4503 | #:phases | ||
| 4504 | #~(modify-phases %standard-phases | ||
| 4505 | (add-before 'build 'unvendor-xsimd | ||
| 4506 | (lambda _ | ||
| 4507 | (delete-file-recursively "pythran/xsimd") | ||
| 4508 | (symlink #$(package-source | ||
| 4509 | (this-package-input "xsimd")) | ||
| 4510 | "pythran/xsimd")))))) | ||
| 4511 | (native-inputs | ||
| 4512 | (list python-setuptools)) | ||
| 4513 | (propagated-inputs | ||
| 4514 | (list boost ;headers need to be available | ||
| 4515 | xsimd | ||
| 4516 | python-beniget | ||
| 4517 | python-gast | ||
| 4518 | python-numpy | ||
| 4519 | python-ply)) | ||
| 4520 | (home-page "https://github.com/serge-sans-paille/pythran") | ||
| 4521 | (synopsis "Ahead of Time compiler for numeric kernels") | ||
| 4522 | (description | ||
| 4523 | "Pythran is an ahead of time compiler for a subset of the Python | ||
| 4524 | language, with a focus on scientific computing. It takes a Python module | ||
| 4525 | annotated with a few interface descriptions and turns it into a native | ||
| 4526 | Python module with the same interface, but (hopefully) faster.") | ||
| 4527 | (license license:bsd-3))) | ||
| 4528 | |||
| 4529 | (define-public python-pyts | ||
| 4530 | (let ((commit "4f3d97bcb1016d33dbfaef68c0931756a4552410") | ||
| 4531 | (revision "0")) | ||
| 4532 | (package | ||
| 4533 | (name "python-pyts") | ||
| 4534 | (version (git-version "0.13.0" revision commit)) | ||
| 4535 | (source | ||
| 4536 | (origin | ||
| 4537 | (method git-fetch) | ||
| 4538 | (uri (git-reference | ||
| 4539 | (url "https://github.com/johannfaouzi/pyts") | ||
| 4540 | (commit commit))) | ||
| 4541 | (file-name (git-file-name name version)) | ||
| 4542 | (sha256 | ||
| 4543 | (base32 "16hlxwajdz44qs8vi7bhiania2b3201fv3pqiwsx79rb554bvl66")))) | ||
| 4544 | (build-system pyproject-build-system) | ||
| 4545 | (arguments | ||
| 4546 | (list | ||
| 4547 | #:test-flags | ||
| 4548 | #~(list "--pyargs" "pyts" | ||
| 4549 | ;; Most likely a flaky test. | ||
| 4550 | "--deselect=preprocessing/transformer.py::\ | ||
| 4551 | pyts.preprocessing.transformer.QuantileTransformer") | ||
| 4552 | #:phases | ||
| 4553 | #~(modify-phases %standard-phases | ||
| 4554 | ;; See https://github.com/johannfaouzi/pyts/issues/168 | ||
| 4555 | (add-after 'unpack 'fix-scikit-learn-compat | ||
| 4556 | (lambda _ | ||
| 4557 | (substitute* (list "pyts/metrics/dtw.py" | ||
| 4558 | "pyts/preprocessing/imputer.py" | ||
| 4559 | "pyts/preprocessing/transformer.py") | ||
| 4560 | (("force_all_finite=") | ||
| 4561 | "ensure_all_finite="))))))) | ||
| 4562 | (propagated-inputs | ||
| 4563 | (list python-joblib | ||
| 4564 | python-numba | ||
| 4565 | python-numpy | ||
| 4566 | python-scikit-learn | ||
| 4567 | python-scipy)) | ||
| 4568 | (native-inputs | ||
| 4569 | (list python-pytest python-setuptools)) | ||
| 4570 | (home-page "https://github.com/johannfaouzi/pyts") | ||
| 4571 | (synopsis "Python package for time series classification") | ||
| 4572 | (description | ||
| 4573 | "pyts is a Python package for time series classification. It aims to | ||
| 4574 | make time series classification easily accessible by providing preprocessing | ||
| 4575 | and utility tools, and implementations of state-of-the-art algorithms. Most | ||
| 4576 | of these algorithms transform time series, thus pyts provides several tools to | ||
| 4577 | perform these transformations.") | ||
| 4578 | (license license:bsd-3)))) | ||
| 4579 | |||
| 4580 | (define-public python-pyvista | ||
| 4581 | (package | ||
| 4582 | (name "python-pyvista") | ||
| 4583 | (version "0.46.5") | ||
| 4584 | (source | ||
| 4585 | (origin | ||
| 4586 | (method git-fetch) | ||
| 4587 | (uri (git-reference | ||
| 4588 | (url "https://github.com/pyvista/pyvista") | ||
| 4589 | (commit (string-append "v" version)))) | ||
| 4590 | (file-name (git-file-name name version)) | ||
| 4591 | (sha256 | ||
| 4592 | (base32 "0553bp4fhbar9z0ybjv1mw1jhb5rhrr4v6q2bzmia0ww0dn8fc69")))) | ||
| 4593 | (build-system pyproject-build-system) | ||
| 4594 | (arguments | ||
| 4595 | (list | ||
| 4596 | ;; tests: 5891 passed, 623 skipped, 355 deselected, 3 xfailed, 167 warnings | ||
| 4597 | #:test-flags | ||
| 4598 | ;; TODO: Find out what's going on with skipped tests. | ||
| 4599 | #~(list "--ignore=tests/plotting/test_charts.py" | ||
| 4600 | "--ignore=tests/examples/test_download_files.py" | ||
| 4601 | "--ignore=tests/examples/test_downloads.py" | ||
| 4602 | "--ignore=tests/plotting/test_texture.py" | ||
| 4603 | ;; Tries to download data from GitHub at collection time. | ||
| 4604 | "--ignore=tests/core/test_dataobject_filters.py" | ||
| 4605 | ;; Tries to download data from GitHub at collection time. | ||
| 4606 | "--ignore=tests/core/test_dataset_filters.py" | ||
| 4607 | ;; Tries to download data from GitHub at collection time. | ||
| 4608 | "--ignore=tests/plotting/test_plotter.py" | ||
| 4609 | "-k" (string-join | ||
| 4610 | (list "not test_actor_texture" | ||
| 4611 | "test_add_multiple" | ||
| 4612 | "test_add_timer_event" | ||
| 4613 | "test_avsucd_reader" | ||
| 4614 | "test_binarymarchingcubesreader" | ||
| 4615 | "test_bmpreader" | ||
| 4616 | "test_box_axes" | ||
| 4617 | "test_byureader" | ||
| 4618 | "test_cast_to_numpy_raises" | ||
| 4619 | "test_compute_boundary_mesh_quality" | ||
| 4620 | "test_connectivity_" | ||
| 4621 | "test_dataset_loader_cubemap" | ||
| 4622 | "test_dataset_loader_dicom" | ||
| 4623 | "test_dataset_loader_from_nested_files_and_directory" | ||
| 4624 | "test_dataset_loader_from_nested_multiblock" | ||
| 4625 | "test_dataset_loader_one_file" | ||
| 4626 | "test_dataset_loader_two_files_both_loadable" | ||
| 4627 | "test_dataset_loader_two_files_one_loadable" | ||
| 4628 | "test_dcmreader" | ||
| 4629 | "test_demreader" | ||
| 4630 | "test_ensight_multi_block_io" | ||
| 4631 | "test_ensightreader_arrays" | ||
| 4632 | "test_ensightreader_time_sets" | ||
| 4633 | "test_ensightreader_timepoints" | ||
| 4634 | "test_facetreader" | ||
| 4635 | "test_fluentcffreader" | ||
| 4636 | "test_gambitreader" | ||
| 4637 | "test_gaussian_cubes_reader" | ||
| 4638 | "test_gesignareader" | ||
| 4639 | "test_gif_reader" | ||
| 4640 | "test_hdf_reader" | ||
| 4641 | "test_hdr_reader" | ||
| 4642 | "test_init_cmap" | ||
| 4643 | "test_interpolate" | ||
| 4644 | "test_jpegreader" | ||
| 4645 | "test_legend_" | ||
| 4646 | "test_load_dataset_no_reader" | ||
| 4647 | "test_load_theme" | ||
| 4648 | "test_meta_image_reader" | ||
| 4649 | "test_multiblockplot3dreader" | ||
| 4650 | "test_nifti_reader" | ||
| 4651 | "test_nrrd_reader" | ||
| 4652 | "test_objreader" | ||
| 4653 | "test_only_screenshots_flag" | ||
| 4654 | "test_openfoam_case_type" | ||
| 4655 | "test_openfoam_cell_to_point_default" | ||
| 4656 | "test_openfoam_patch_arrays" | ||
| 4657 | "test_openfoam_skip_zero_time" | ||
| 4658 | "test_openfoamreader_active_time" | ||
| 4659 | "test_openfoamreader_arrays_time" | ||
| 4660 | "test_openfoamreader_read_data_time_point" | ||
| 4661 | "test_openfoamreader_read_data_time_value" | ||
| 4662 | "test_particle_reader" | ||
| 4663 | "test_partition" | ||
| 4664 | "test_pdbreader" | ||
| 4665 | "test_plot3dmetareader" | ||
| 4666 | "test_plot_return_img_with_cpos" | ||
| 4667 | "test_plot_return_img_without_cpos" | ||
| 4668 | "test_png_reader" | ||
| 4669 | "test_pnm_reader" | ||
| 4670 | "test_prostar_reader" | ||
| 4671 | "test_protein_ribbon" | ||
| 4672 | "test_pvdreader" | ||
| 4673 | "test_pvdreader_no_part_group" | ||
| 4674 | "test_pvdreader_no_time_group" | ||
| 4675 | "test_read_cgns" | ||
| 4676 | "test_repr" | ||
| 4677 | "test_save_before_close_callback" | ||
| 4678 | "test_slc_reader" | ||
| 4679 | "test_stlreader" | ||
| 4680 | "test_tecplotreader" | ||
| 4681 | "test_tiff_reader" | ||
| 4682 | "test_timer" | ||
| 4683 | "test_translate_direction_collinear" | ||
| 4684 | "test_user_logo" | ||
| 4685 | "test_xdmf_reader" | ||
| 4686 | ;; XXX: incompatible with Numpy@2 | ||
| 4687 | ;; Drop when updating along with vtk. | ||
| 4688 | "test_check_subdtype_changes_type" | ||
| 4689 | ;; These tests try to download data from GitHub. | ||
| 4690 | "test_read_exodus" | ||
| 4691 | "test_nek5000_reader" | ||
| 4692 | "test_exodus_reader_ext" | ||
| 4693 | "test_exodus_reader_core" | ||
| 4694 | "test_exodus_blocks" | ||
| 4695 | "test_download_dataset_texture" | ||
| 4696 | "test_structured_grid_cast_to_explicit_structured_grid" | ||
| 4697 | "test_pad_image_multi_component_with_scalar" | ||
| 4698 | "test_pad_image_raises" | ||
| 4699 | "test_points_to_cells_and_cells_to_points_dimensions" | ||
| 4700 | ;; These tests download cow.vtp from GitHub. | ||
| 4701 | "test_meshio[cow_ugrid]" | ||
| 4702 | "test_meshio[points_only]" | ||
| 4703 | ;; Looks for pyproject.toml in installed package. | ||
| 4704 | "test_max_positional_args_matches_pyproject") | ||
| 4705 | " and not ")) | ||
| 4706 | #:phases | ||
| 4707 | #~(modify-phases %standard-phases | ||
| 4708 | ;; vtk check fails in sanity-check, comment out | ||
| 4709 | (add-after 'unpack 'patch-pyproject | ||
| 4710 | (lambda _ | ||
| 4711 | (substitute* "pyproject.toml" | ||
| 4712 | (("'vtk[^']*'," all) (string-append "#" all))))) | ||
| 4713 | (add-after 'unpack 'fix-failing-tests | ||
| 4714 | (lambda _ | ||
| 4715 | (substitute* "tests/plotting/test_plotting.py" | ||
| 4716 | (("\"\"\"Determine if using mesa.\"\"\"" all) | ||
| 4717 | (string-append all "\n return False"))) | ||
| 4718 | (substitute* "tests/test_meshio.py" | ||
| 4719 | (("cow = .*$" all) (string-append "#" all "\n")) | ||
| 4720 | ((", cow") "")))) | ||
| 4721 | ;; test phase writes files to $HOME | ||
| 4722 | (add-before 'check 'redirect-HOME | ||
| 4723 | (lambda _ | ||
| 4724 | (setenv "HOME" "/tmp")))))) | ||
| 4725 | (native-inputs | ||
| 4726 | (list nss-certs-for-test | ||
| 4727 | python-aiohttp | ||
| 4728 | python-ipython | ||
| 4729 | python-mypy | ||
| 4730 | python-pandas | ||
| 4731 | python-pytest-8 | ||
| 4732 | python-pytest-cases | ||
| 4733 | python-pytest-mock | ||
| 4734 | python-pytest-pyvista | ||
| 4735 | python-scipy | ||
| 4736 | python-tqdm | ||
| 4737 | python-trimesh | ||
| 4738 | which | ||
| 4739 | xorg-server-for-tests)) | ||
| 4740 | (propagated-inputs | ||
| 4741 | (list python-cmcrameri | ||
| 4742 | python-cmocean | ||
| 4743 | python-colorcet | ||
| 4744 | python-imageio | ||
| 4745 | python-matplotlib | ||
| 4746 | python-meshio | ||
| 4747 | python-numpy | ||
| 4748 | python-pillow | ||
| 4749 | python-pooch | ||
| 4750 | python-scooby | ||
| 4751 | vtk-9.5)) | ||
| 4752 | (home-page "https://docs.pyvista.org/") | ||
| 4753 | (synopsis "3D plotting and mesh analysis through VTK") | ||
| 4754 | (description | ||
| 4755 | "PyVista is... | ||
| 4756 | |||
| 4757 | @itemize | ||
| 4758 | @item @emph{Pythonic VTK}: a high-level API to the Visualization | ||
| 4759 | Toolkit (VTK); | ||
| 4760 | @item mesh data structures and filtering methods for spatial datasets; | ||
| 4761 | @item 3D plotting made simple and built for large/complex data geometries. | ||
| 4762 | @end itemize | ||
| 4763 | |||
| 4764 | This package provides a Pythonic, well-documented interface exposing VTK's | ||
| 4765 | powerful visualization backend to facilitate rapid prototyping, analysis, and | ||
| 4766 | visual integration of spatially referenced datasets.") | ||
| 4767 | (license license:expat))) | ||
| 4768 | |||
| 4769 | (define-public python-pyvistaqt | ||
| 4770 | (package | ||
| 4771 | (name "python-pyvistaqt") | ||
| 4772 | (version "0.11.3") | ||
| 4773 | (source | ||
| 4774 | (origin | ||
| 4775 | (method git-fetch) | ||
| 4776 | (uri (git-reference | ||
| 4777 | (url "https://github.com/pyvista/pyvistaqt") | ||
| 4778 | (commit version))) | ||
| 4779 | (file-name (git-file-name name version)) | ||
| 4780 | (sha256 | ||
| 4781 | (base32 "04f9cd98k463pdrpi8jby411x9mc0ih62gl0nv0h9w3r7pwl61yl")))) | ||
| 4782 | (build-system pyproject-build-system) | ||
| 4783 | (arguments | ||
| 4784 | (list | ||
| 4785 | #:phases | ||
| 4786 | #~(modify-phases %standard-phases | ||
| 4787 | (add-after 'unpack 'fix-pytest | ||
| 4788 | (lambda _ | ||
| 4789 | (substitute* "tests/conftest.py" | ||
| 4790 | (("pytest.skip") | ||
| 4791 | "pytest.mark.skipif")))) | ||
| 4792 | (add-before 'check 'before-check | ||
| 4793 | (lambda _ | ||
| 4794 | ;; Testing requires write access. | ||
| 4795 | (setenv "HOME" "/tmp") | ||
| 4796 | ;; Testing requires a running xorg server. | ||
| 4797 | (system "Xvfb :99 -screen 0 1024x768x24 &") | ||
| 4798 | (setenv "DISPLAY" ":99.0")))))) | ||
| 4799 | (propagated-inputs (list python-pyvista python-qtpy)) | ||
| 4800 | (native-inputs (list python-ipython | ||
| 4801 | python-matplotlib | ||
| 4802 | python-numpy | ||
| 4803 | python-pyqt-6 | ||
| 4804 | python-pytest | ||
| 4805 | python-pytest-qt | ||
| 4806 | python-setuptools | ||
| 4807 | python-sphinx-gallery | ||
| 4808 | xorg-server)) | ||
| 4809 | (home-page "https://github.com/pyvista/pyvistaqt") | ||
| 4810 | (synopsis "Qt support for PyVista") | ||
| 4811 | (description | ||
| 4812 | "@code{pyvistaqt} is a helper module for @code{pyvista} to enable you to | ||
| 4813 | plot using Qt by placing a vtk-widget into a background renderer. This can be | ||
| 4814 | quite useful when you desire to update your plot in real-time.") | ||
| 4815 | (license license:expat))) | ||
| 4816 | |||
| 3112 | (define-public python-pyzx | 4817 | (define-public python-pyzx |
| 3113 | (package | 4818 | (package |
| 3114 | (name "python-pyzx") | 4819 | (name "python-pyzx") |
| @@ -3895,6 +5600,53 @@ routines such as routines for numerical integration and optimization.") | |||
| 3895 | python-meson | 5600 | python-meson |
| 3896 | python-pythran)))) | 5601 | python-pythran)))) |
| 3897 | 5602 | ||
| 5603 | (define-public python-scs | ||
| 5604 | (package | ||
| 5605 | (name "python-scs") | ||
| 5606 | (version "3.2.10") | ||
| 5607 | (source | ||
| 5608 | (origin | ||
| 5609 | (method git-fetch) | ||
| 5610 | (uri (git-reference | ||
| 5611 | (url "https://github.com/bodono/scs-python") | ||
| 5612 | (commit version))) | ||
| 5613 | (file-name (git-file-name name version)) | ||
| 5614 | (sha256 | ||
| 5615 | (base32 "1wg1g6das5hs53z3sjn2m8646023d14q9shmwfb38n23baqi468g")))) | ||
| 5616 | (build-system pyproject-build-system) | ||
| 5617 | (arguments | ||
| 5618 | (list | ||
| 5619 | ;; tests: 26 passed | ||
| 5620 | #:phases | ||
| 5621 | #~(modify-phases %standard-phases | ||
| 5622 | (add-after 'ensure-no-mtimes-pre-1980 'substitute-git-submodules | ||
| 5623 | (lambda _ | ||
| 5624 | (rmdir "scs_source") | ||
| 5625 | (symlink #$(package-source | ||
| 5626 | (this-package-native-input "scs")) | ||
| 5627 | "scs_source") | ||
| 5628 | (rmdir "scs/pythoncapi-compat") | ||
| 5629 | (symlink #$(package-source | ||
| 5630 | (this-package-native-input "pythoncapi-compat")) | ||
| 5631 | "scs/pythoncapi-compat")))))) | ||
| 5632 | (native-inputs | ||
| 5633 | (list pkg-config | ||
| 5634 | python-meson | ||
| 5635 | python-pytest | ||
| 5636 | pythoncapi-compat | ||
| 5637 | scs)) | ||
| 5638 | (inputs | ||
| 5639 | (list lapack | ||
| 5640 | openblas)) | ||
| 5641 | (propagated-inputs | ||
| 5642 | (list python-numpy | ||
| 5643 | python-scipy)) | ||
| 5644 | (home-page "https://github.com/bodono/scs-python") | ||
| 5645 | (synopsis "Splitting conic solver") | ||
| 5646 | (description "This package provides a Python interface for the | ||
| 5647 | SCS (Splitting conic solver) library.") | ||
| 5648 | (license license:expat))) | ||
| 5649 | |||
| 3898 | (define-public python-simple-pid | 5650 | (define-public python-simple-pid |
| 3899 | (package | 5651 | (package |
| 3900 | (name "python-simple-pid") | 5652 | (name "python-simple-pid") |
| @@ -3914,6 +5666,90 @@ routines such as routines for numerical integration and optimization.") | |||
| 3914 | proportional-integral-derivative} controller.") | 5666 | proportional-integral-derivative} controller.") |
| 3915 | (license license:expat))) | 5667 | (license license:expat))) |
| 3916 | 5668 | ||
| 5669 | (define-public python-simplespectral | ||
| 5670 | (package | ||
| 5671 | (name "python-simplespectral") | ||
| 5672 | (version "1.0.0") | ||
| 5673 | (source | ||
| 5674 | (origin | ||
| 5675 | (method url-fetch) | ||
| 5676 | (uri (pypi-uri "SimpleSpectral" version)) | ||
| 5677 | (sha256 | ||
| 5678 | (base32 "0qh3xwdv9cwcqdamvglrhm586p4yaq1hd291py1fvykhk2a2d4w6")))) | ||
| 5679 | (build-system pyproject-build-system) | ||
| 5680 | (arguments | ||
| 5681 | (list #:tests? #f)) ;No tests, also not in git repository. | ||
| 5682 | (native-inputs | ||
| 5683 | (list python-setuptools)) | ||
| 5684 | (propagated-inputs | ||
| 5685 | (list python-numpy python-scipy)) | ||
| 5686 | (home-page "https://github.com/xmikos/simplespectral") | ||
| 5687 | (synopsis "FFT module for Python") | ||
| 5688 | (description | ||
| 5689 | "This package provides a simplified @code{scipy.signal.spectral} module | ||
| 5690 | to do spectral analysis in Python.") | ||
| 5691 | (license license:expat))) | ||
| 5692 | |||
| 5693 | (define-public python-snakemake-executor-plugin-slurm | ||
| 5694 | (package | ||
| 5695 | (name "python-snakemake-executor-plugin-slurm") | ||
| 5696 | (version "1.7.0") | ||
| 5697 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm/") | ||
| 5698 | (source | ||
| 5699 | (origin | ||
| 5700 | (method git-fetch) | ||
| 5701 | (uri (git-reference | ||
| 5702 | (url home-page) | ||
| 5703 | (commit (string-append "v" version)))) | ||
| 5704 | (file-name (git-file-name name version)) | ||
| 5705 | (sha256 | ||
| 5706 | (base32 "0x7ghrkvmxqbcjl69hxp5axa1av3s0mdc0i9xjg8qjnd3hgd82r3")))) | ||
| 5707 | (build-system pyproject-build-system) | ||
| 5708 | (arguments | ||
| 5709 | (list #:phases | ||
| 5710 | #~(modify-phases %standard-phases | ||
| 5711 | (replace 'check | ||
| 5712 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 5713 | (when tests? | ||
| 5714 | (invoke "python3" "tests/tests.py"))))))) | ||
| 5715 | (native-inputs (list python-pandas | ||
| 5716 | python-poetry-core | ||
| 5717 | python-pytest | ||
| 5718 | python-snakemake-executor-plugin-slurm-jobstep | ||
| 5719 | snakemake)) | ||
| 5720 | (synopsis "Snakemake executor plugin: slurm") | ||
| 5721 | (description "A Snakemake executor plugin for running SLURM jobs.") | ||
| 5722 | (license license:expat))) | ||
| 5723 | |||
| 5724 | (define-public python-snakemake-executor-plugin-slurm-jobstep | ||
| 5725 | (package | ||
| 5726 | (name "python-snakemake-executor-plugin-slurm-jobstep") | ||
| 5727 | (version "0.3.0") | ||
| 5728 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep") | ||
| 5729 | (source | ||
| 5730 | (origin | ||
| 5731 | (method git-fetch) | ||
| 5732 | (uri (git-reference | ||
| 5733 | (url home-page) | ||
| 5734 | (commit (string-append "v" version)))) | ||
| 5735 | (file-name (git-file-name name version)) | ||
| 5736 | (sha256 | ||
| 5737 | (base32 "0ly15ywmbfcm5z7jy7dxiidpw3immsdd2k80vrm4pza721irxcar")))) | ||
| 5738 | (build-system pyproject-build-system) | ||
| 5739 | (arguments | ||
| 5740 | (list #:phases | ||
| 5741 | #~(modify-phases %standard-phases | ||
| 5742 | (replace 'check | ||
| 5743 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 5744 | (when tests? | ||
| 5745 | (invoke "python3" "tests/tests.py"))))))) | ||
| 5746 | (native-inputs (list python-poetry-core | ||
| 5747 | snakemake)) | ||
| 5748 | (synopsis "Snakemake executor plugin: slurm-jobstep") | ||
| 5749 | (description "A Snakemake executor plugin for running srun jobs inside of | ||
| 5750 | SLURM jobs (meant for internal use by python-snakemake-executor-plugin-slurm).") | ||
| 5751 | (license license:expat))) | ||
| 5752 | |||
| 3917 | (define-public python-snakemake-interface-common | 5753 | (define-public python-snakemake-interface-common |
| 3918 | (package | 5754 | (package |
| 3919 | (name "python-snakemake-interface-common") | 5755 | (name "python-snakemake-interface-common") |
| @@ -4085,66 +5921,6 @@ its software deployment plugins.") | |||
| 4085 | Snakemake and its storage plugins.") | 5921 | Snakemake and its storage plugins.") |
| 4086 | (license license:expat))) | 5922 | (license license:expat))) |
| 4087 | 5923 | ||
| 4088 | (define-public python-snakemake-executor-plugin-slurm-jobstep | ||
| 4089 | (package | ||
| 4090 | (name "python-snakemake-executor-plugin-slurm-jobstep") | ||
| 4091 | (version "0.3.0") | ||
| 4092 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm-jobstep") | ||
| 4093 | (source | ||
| 4094 | (origin | ||
| 4095 | (method git-fetch) | ||
| 4096 | (uri (git-reference | ||
| 4097 | (url home-page) | ||
| 4098 | (commit (string-append "v" version)))) | ||
| 4099 | (file-name (git-file-name name version)) | ||
| 4100 | (sha256 | ||
| 4101 | (base32 "0ly15ywmbfcm5z7jy7dxiidpw3immsdd2k80vrm4pza721irxcar")))) | ||
| 4102 | (build-system pyproject-build-system) | ||
| 4103 | (arguments | ||
| 4104 | (list #:phases | ||
| 4105 | #~(modify-phases %standard-phases | ||
| 4106 | (replace 'check | ||
| 4107 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 4108 | (when tests? | ||
| 4109 | (invoke "python3" "tests/tests.py"))))))) | ||
| 4110 | (native-inputs (list python-poetry-core | ||
| 4111 | snakemake)) | ||
| 4112 | (synopsis "Snakemake executor plugin: slurm-jobstep") | ||
| 4113 | (description "A Snakemake executor plugin for running srun jobs inside of | ||
| 4114 | SLURM jobs (meant for internal use by python-snakemake-executor-plugin-slurm).") | ||
| 4115 | (license license:expat))) | ||
| 4116 | |||
| 4117 | (define-public python-snakemake-executor-plugin-slurm | ||
| 4118 | (package | ||
| 4119 | (name "python-snakemake-executor-plugin-slurm") | ||
| 4120 | (version "1.7.0") | ||
| 4121 | (home-page "https://github.com/snakemake/snakemake-executor-plugin-slurm/") | ||
| 4122 | (source | ||
| 4123 | (origin | ||
| 4124 | (method git-fetch) | ||
| 4125 | (uri (git-reference | ||
| 4126 | (url home-page) | ||
| 4127 | (commit (string-append "v" version)))) | ||
| 4128 | (file-name (git-file-name name version)) | ||
| 4129 | (sha256 | ||
| 4130 | (base32 "0x7ghrkvmxqbcjl69hxp5axa1av3s0mdc0i9xjg8qjnd3hgd82r3")))) | ||
| 4131 | (build-system pyproject-build-system) | ||
| 4132 | (arguments | ||
| 4133 | (list #:phases | ||
| 4134 | #~(modify-phases %standard-phases | ||
| 4135 | (replace 'check | ||
| 4136 | (lambda* (#:key tests? #:allow-other-keys) | ||
| 4137 | (when tests? | ||
| 4138 | (invoke "python3" "tests/tests.py"))))))) | ||
| 4139 | (native-inputs (list python-pandas | ||
| 4140 | python-poetry-core | ||
| 4141 | python-pytest | ||
| 4142 | python-snakemake-executor-plugin-slurm-jobstep | ||
| 4143 | snakemake)) | ||
| 4144 | (synopsis "Snakemake executor plugin: slurm") | ||
| 4145 | (description "A Snakemake executor plugin for running SLURM jobs.") | ||
| 4146 | (license license:expat))) | ||
| 4147 | |||
| 4148 | (define-public python-sparse | 5924 | (define-public python-sparse |
| 4149 | (package | 5925 | (package |
| 4150 | (name "python-sparse") | 5926 | (name "python-sparse") |
| @@ -4181,6 +5957,65 @@ easily generalized like @dfn{compressed sparse row/column}(CSR/CSC) and | |||
| 4181 | depends on @code{scipy.sparse} for some computations.") | 5957 | depends on @code{scipy.sparse} for some computations.") |
| 4182 | (license license:bsd-3))) | 5958 | (license license:bsd-3))) |
| 4183 | 5959 | ||
| 5960 | (define-public python-spin | ||
| 5961 | (package | ||
| 5962 | (name "python-spin") | ||
| 5963 | (version "0.8") | ||
| 5964 | (source | ||
| 5965 | (origin | ||
| 5966 | (method url-fetch) | ||
| 5967 | (uri (pypi-uri "spin" version)) | ||
| 5968 | (sha256 | ||
| 5969 | (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7")))) | ||
| 5970 | (build-system pyproject-build-system) | ||
| 5971 | (propagated-inputs (list python-click python-colorama python-tomli)) | ||
| 5972 | (native-inputs (list python-pytest python-setuptools python-wheel)) | ||
| 5973 | (home-page "https://github.com/scientific-python/spin") | ||
| 5974 | (synopsis "Developer tool for scientific Python libraries") | ||
| 5975 | (description "@code{spin} is a simple interface for common development | ||
| 5976 | tasks. It comes with a few common build commands out the box, but can | ||
| 5977 | easily be customized per project. | ||
| 5978 | |||
| 5979 | The impetus behind developing the tool was the mass migration of scientific | ||
| 5980 | Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after | ||
| 5981 | distutils was deprecated. When many of the build and installation commands | ||
| 5982 | changed, it made sense to abstract away the nuisance of having to re-learn | ||
| 5983 | them.") | ||
| 5984 | (license license:bsd-3))) | ||
| 5985 | |||
| 5986 | (define-public python-supersmoother | ||
| 5987 | ;; 0.4 was release in 2017, there a lot of changes on master branch | ||
| 5988 | ;; providing tests fixtures. | ||
| 5989 | (let ((commit "0a81544ac6bb33bdb08deeba69e97a4ceebcebcf") | ||
| 5990 | (revision "0")) | ||
| 5991 | (package | ||
| 5992 | (name "python-supersmoother") | ||
| 5993 | (version (git-version "0.4" revision commit)) | ||
| 5994 | (source | ||
| 5995 | (origin | ||
| 5996 | (method git-fetch) ; no package in PyPI | ||
| 5997 | (uri (git-reference | ||
| 5998 | (url "https://github.com/jakevdp/supersmoother") | ||
| 5999 | (commit commit))) | ||
| 6000 | (file-name (git-file-name name version)) | ||
| 6001 | (sha256 | ||
| 6002 | (base32 "1r79nssw4a44zizvqg8y685nv3asdfj440s227phfww6kz33s3la")))) | ||
| 6003 | (build-system pyproject-build-system) | ||
| 6004 | (native-inputs | ||
| 6005 | (list python-pytest | ||
| 6006 | python-scipy | ||
| 6007 | python-setuptools)) | ||
| 6008 | (propagated-inputs | ||
| 6009 | (list python-numpy)) | ||
| 6010 | (home-page "http://github.com/jakevdp/supersmoother") | ||
| 6011 | (synopsis "Python implementation of Friedman's Supersmoother") | ||
| 6012 | (description | ||
| 6013 | "This package provides an efficient implementation of | ||
| 6014 | @url{https://www.slac.stanford.edu/pubs/slacpubs/3250/slac-pub-3477.pdf, | ||
| 6015 | Friedman's SuperSmoother} based in Python. It makes use of numpy for fast | ||
| 6016 | numerical computation.") | ||
| 6017 | (license license:bsd-2)))) | ||
| 6018 | |||
| 4184 | (define-public python-tdda | 6019 | (define-public python-tdda |
| 4185 | (package | 6020 | (package |
| 4186 | (name "python-tdda") | 6021 | (name "python-tdda") |
| @@ -4406,732 +6241,6 @@ library.") | |||
| 4406 | tissue-specificity metrics for gene expression.") | 6241 | tissue-specificity metrics for gene expression.") |
| 4407 | (license license:gpl3+))) | 6242 | (license license:gpl3+))) |
| 4408 | 6243 | ||
| 4409 | (define-public python-pandas | ||
| 4410 | (package | ||
| 4411 | (name "python-pandas") | ||
| 4412 | (version "3.0.3") | ||
| 4413 | (source | ||
| 4414 | (origin | ||
| 4415 | (method git-fetch) | ||
| 4416 | (uri (git-reference | ||
| 4417 | (url "https://github.com/pandas-dev/pandas") | ||
| 4418 | (commit (string-append "v" version)))) | ||
| 4419 | (file-name (git-file-name name version)) | ||
| 4420 | (sha256 | ||
| 4421 | (base32 "1qagfjf4rrpx4xdw0bwg3q9g4k5vjplvifnx6k2frm8z2ws9hgds")))) | ||
| 4422 | (build-system pyproject-build-system) | ||
| 4423 | (arguments | ||
| 4424 | (list | ||
| 4425 | ;; tests: 185854 passed, 12827 skipped, 776 xfailed, 86 xpassed | ||
| 4426 | #:test-flags | ||
| 4427 | #~(list "-m" (string-join | ||
| 4428 | (list "not db" "network" "single_cpu" "slow" "slow_arm") | ||
| 4429 | " and not ") | ||
| 4430 | "-vv" | ||
| 4431 | ;; See: <https://github.com/pandas-dev/pandas/issues/54907>. | ||
| 4432 | "--no-strict-data-files" | ||
| 4433 | "--numprocesses" (number->string (min 4 (parallel-job-count))) | ||
| 4434 | "-k" (string-join | ||
| 4435 | (list "not test_git_version" | ||
| 4436 | "test_show_versions_console" | ||
| 4437 | ;; DeprecationWarning: Bitwise inversion '~' on bool | ||
| 4438 | ;; is deprecated and will be removed in Python 3.16. | ||
| 4439 | "test_scalar_unary[numexpr-pandas]" | ||
| 4440 | ;; AssertionError: Series are different. | ||
| 4441 | #$@(if (target-64bit?) | ||
| 4442 | '() | ||
| 4443 | '("test_rolling_var_numerical_issues"))) | ||
| 4444 | " and not ")) | ||
| 4445 | #:phases | ||
| 4446 | #~(modify-phases %standard-phases | ||
| 4447 | (add-after 'unpack 'patch-generate-version | ||
| 4448 | (lambda _ | ||
| 4449 | ;; See: <https://github.com/pandas-dev/pandas/issues/59459>. | ||
| 4450 | (substitute* "generate_version.py" | ||
| 4451 | (("version =.*") | ||
| 4452 | (format #f "version = ~s~%" #$version)) | ||
| 4453 | (("git_version =.*") | ||
| 4454 | (format #f "git_version = ~s~%" #$version))))) | ||
| 4455 | (replace 'check | ||
| 4456 | (lambda* (#:key test-flags tests? #:allow-other-keys) | ||
| 4457 | (when tests? | ||
| 4458 | ;; Tests don't work with "--pyargs pandas" or changing | ||
| 4459 | ;; directory to output, script is taken from pyproject.toml | ||
| 4460 | ;; file. | ||
| 4461 | (setenv "HOME" "/tmp") | ||
| 4462 | (delete-file-recursively "pandas") | ||
| 4463 | (invoke "python" "-c" (format #f "~a; ~a=[~{'~a', ~}]);" | ||
| 4464 | "import pandas as pd" | ||
| 4465 | "pd.test(extra_args" | ||
| 4466 | test-flags)))))))) | ||
| 4467 | (propagated-inputs | ||
| 4468 | (list python-numpy | ||
| 4469 | python-dateutil | ||
| 4470 | ;; XXX: Pandas lists a lot of optional dependencies which are not | ||
| 4471 | ;; hard requirements, leave them listed here and commented out for | ||
| 4472 | ;; the reference purpose. Try to keep closure as bare minimal as | ||
| 4473 | ;; possible. | ||
| 4474 | ;; | ||
| 4475 | ;; [optional] | ||
| 4476 | ;; python-adbc-driver-postgresql | ||
| 4477 | ;; python-adbc-driver-sqlite | ||
| 4478 | ;; python-beautifulsoup4 | ||
| 4479 | python-bottleneck | ||
| 4480 | ;; python-fastparquet | ||
| 4481 | ;; python-fsspec | ||
| 4482 | ;; python-gcsfs | ||
| 4483 | ;; python-html5lib | ||
| 4484 | ;; python-hypothesis | ||
| 4485 | ;; python-jinja2 | ||
| 4486 | python-lxml | ||
| 4487 | ;; python-matplotlib | ||
| 4488 | python-numba | ||
| 4489 | python-numexpr | ||
| 4490 | ;; python-odfpy | ||
| 4491 | ;; python-openpyxl | ||
| 4492 | ;; python-psycopg2 | ||
| 4493 | ;; python-pyarrow | ||
| 4494 | ;; python-pyiceberg | ||
| 4495 | ;; python-pymysql | ||
| 4496 | ;; python-pyqt5 | ||
| 4497 | ;; python-pyreadstat | ||
| 4498 | ;; python-python-calamine | ||
| 4499 | ;; python-pyxlsb | ||
| 4500 | ;; python-qtpy | ||
| 4501 | ;; python-s3fs | ||
| 4502 | ;; python-scipy | ||
| 4503 | ;; python-sqlalchemy | ||
| 4504 | ;; python-tables | ||
| 4505 | ;; python-tabulate | ||
| 4506 | ;; python-xarray | ||
| 4507 | ;; python-xlrd | ||
| 4508 | ;; python-xlsxwriter | ||
| 4509 | #;python-zstandard)) | ||
| 4510 | (inputs | ||
| 4511 | (list xclip xsel)) | ||
| 4512 | (native-inputs | ||
| 4513 | (list python-hypothesis | ||
| 4514 | python-meson | ||
| 4515 | python-pytest | ||
| 4516 | python-pytest-localserver | ||
| 4517 | python-pytest-xdist | ||
| 4518 | python-pytz | ||
| 4519 | python-versioneer | ||
| 4520 | tzdata-for-tests)) | ||
| 4521 | (home-page "https://pandas.pydata.org") | ||
| 4522 | (synopsis "Data structures for data analysis, time series, and statistics") | ||
| 4523 | (description | ||
| 4524 | "Pandas is a Python package providing fast, flexible, and expressive data | ||
| 4525 | structures designed to make working with structured (tabular, | ||
| 4526 | multidimensional, potentially heterogeneous) and time series data both easy | ||
| 4527 | and intuitive. It aims to be the fundamental high-level building block for | ||
| 4528 | doing practical, real world data analysis in Python.") | ||
| 4529 | (license license:bsd-3))) | ||
| 4530 | |||
| 4531 | (define-public python-pandas-2 | ||
| 4532 | (package | ||
| 4533 | (inherit python-pandas) | ||
| 4534 | (name "python-pandas") | ||
| 4535 | (version "2.3.3") | ||
| 4536 | (source | ||
| 4537 | (origin | ||
| 4538 | (method git-fetch) | ||
| 4539 | (uri (git-reference | ||
| 4540 | (url "https://github.com/pandas-dev/pandas") | ||
| 4541 | (commit (string-append "v" version)))) | ||
| 4542 | (file-name (git-file-name name version)) | ||
| 4543 | (sha256 | ||
| 4544 | (base32 "0qf4frgj31kd9i544n8v03a0bv9mgml3f7n9n1rik187q3r8ygfg")) | ||
| 4545 | (patches (search-patches "python-pandas-2-no-pytz_datetime.patch")))) | ||
| 4546 | (build-system pyproject-build-system) | ||
| 4547 | (arguments | ||
| 4548 | (list | ||
| 4549 | ;; tests: 173093 passed, 24265 skipped, 990 xfailed, 77 xpassed, 110 warnings | ||
| 4550 | #:test-flags | ||
| 4551 | #~(list "-m" (string-join | ||
| 4552 | (list "not db" "network" "single_cpu" "slow" "slow_arm") | ||
| 4553 | " and not ") | ||
| 4554 | "--numprocesses" (number->string (min 4 (parallel-job-count))) | ||
| 4555 | "-k" (string-join | ||
| 4556 | (list "not test_git_version" | ||
| 4557 | "test_parsing_tzlocal_deprecated" | ||
| 4558 | "test_show_versions_console" | ||
| 4559 | ;; XXX: Introduced by NumPy 2.4.6 and Cython 3.2.5: | ||
| 4560 | ;; NotImplementedError | ||
| 4561 | ;; See: | ||
| 4562 | ;; <https://github.com/pandas-dev/pandas/issues/62820>, | ||
| 4563 | ;; <https://github.com/pandas-dev/pandas/issues/63078>. | ||
| 4564 | "test_categorical_block_pickle" | ||
| 4565 | "test_pickle" | ||
| 4566 | "test_pickle_freq" | ||
| 4567 | "test_pickle_preserves_block_ndim" | ||
| 4568 | "test_pickle_preserves_name" | ||
| 4569 | "test_pickle_round_trip" | ||
| 4570 | "test_pickle_roundtrip" | ||
| 4571 | "test_pickle_roundtrip_containers" | ||
| 4572 | "test_round_trip_current" | ||
| 4573 | ;; AssertionError: Series are different. | ||
| 4574 | #$@(if (target-64bit?) | ||
| 4575 | '() | ||
| 4576 | '("test_rolling_var_numerical_issues"))) | ||
| 4577 | " and not ")) | ||
| 4578 | #:phases | ||
| 4579 | #~(modify-phases %standard-phases | ||
| 4580 | (add-after 'unpack 'patch-generate-version | ||
| 4581 | (lambda _ | ||
| 4582 | ;; See: <https://github.com/pandas-dev/pandas/issues/59459>. | ||
| 4583 | (substitute* "generate_version.py" | ||
| 4584 | (("version =.*") | ||
| 4585 | (format #f "version = ~s~%" #$version)) | ||
| 4586 | (("git_version =.*") | ||
| 4587 | (format #f "git_version = ~s~%" #$version))))) | ||
| 4588 | (replace 'check | ||
| 4589 | (lambda* (#:key inputs outputs test-flags tests? #:allow-other-keys) | ||
| 4590 | (when tests? | ||
| 4591 | (setenv "HOME" "/tmp") | ||
| 4592 | (with-directory-excursion | ||
| 4593 | (string-append (string-append (site-packages inputs outputs) | ||
| 4594 | "/pandas")) | ||
| 4595 | (apply invoke "pytest" "-vv" test-flags)))))))) | ||
| 4596 | (propagated-inputs | ||
| 4597 | (list python-numpy | ||
| 4598 | python-dateutil | ||
| 4599 | python-pytz | ||
| 4600 | python-tzdata)) | ||
| 4601 | (inputs | ||
| 4602 | (list xclip xsel)) | ||
| 4603 | (native-inputs | ||
| 4604 | (list python-meson | ||
| 4605 | python-lxml | ||
| 4606 | python-pytest | ||
| 4607 | python-pytest-asyncio | ||
| 4608 | python-pytest-xdist | ||
| 4609 | python-versioneer | ||
| 4610 | tzdata-for-tests)))) | ||
| 4611 | |||
| 4612 | ;; A bare minimal package, mainly to use in tests and reduce closure size. | ||
| 4613 | ;; Tests are left out in the main package to slim down native-inputs and | ||
| 4614 | ;; propagated-inputs. | ||
| 4615 | (define-public python-pandas-minimal | ||
| 4616 | (package/inherit python-pandas | ||
| 4617 | (name "python-pandas-minimal") | ||
| 4618 | (arguments | ||
| 4619 | (substitute-keyword-arguments arguments | ||
| 4620 | ((#:tests? _ #t) #f))) | ||
| 4621 | (native-inputs | ||
| 4622 | (list python-meson | ||
| 4623 | python-versioneer)) | ||
| 4624 | (propagated-inputs | ||
| 4625 | (list python-numpy | ||
| 4626 | python-dateutil | ||
| 4627 | python-pytz)))) | ||
| 4628 | |||
| 4629 | (define-public python-pandas-stubs | ||
| 4630 | (package | ||
| 4631 | (name "python-pandas-stubs") | ||
| 4632 | ;; The versioning follows that of Pandas and uses the date of the | ||
| 4633 | ;; python-pandas-stubs release. | ||
| 4634 | (version "2.3.3.251219") | ||
| 4635 | (source | ||
| 4636 | (origin | ||
| 4637 | (method git-fetch) | ||
| 4638 | (uri (git-reference | ||
| 4639 | (url "https://github.com/pandas-dev/pandas-stubs") | ||
| 4640 | (commit (string-append "v" version)))) | ||
| 4641 | (file-name (git-file-name name version)) | ||
| 4642 | (sha256 | ||
| 4643 | (base32 "1xh753wv5dbc59qp7fas323181mlblvhqmd9a4g7zzhaa2mxmzqs")))) | ||
| 4644 | (build-system pyproject-build-system) | ||
| 4645 | (arguments | ||
| 4646 | (list | ||
| 4647 | ;; tests: 1619 passed, 12 skipped, 7 deselected | ||
| 4648 | #:test-flags | ||
| 4649 | #~(list | ||
| 4650 | ;; ImportError: Missing optional dependency 'python-calamine'. | ||
| 4651 | "--deselect=tests/test_io.py::test_read_excel" | ||
| 4652 | "--deselect=tests/test_io.py::test_excel_reader"))) | ||
| 4653 | (native-inputs | ||
| 4654 | (list python-beautifulsoup4 | ||
| 4655 | python-fsspec | ||
| 4656 | python-html5lib | ||
| 4657 | python-jinja2 | ||
| 4658 | python-loguru | ||
| 4659 | python-lxml | ||
| 4660 | python-matplotlib | ||
| 4661 | python-mypy | ||
| 4662 | python-numexpr | ||
| 4663 | python-odfpy | ||
| 4664 | python-openpyxl | ||
| 4665 | python-pandas | ||
| 4666 | python-poetry-core | ||
| 4667 | python-pyarrow | ||
| 4668 | python-pyreadstat | ||
| 4669 | python-pytest | ||
| 4670 | python-scipy | ||
| 4671 | python-sqlalchemy-2 | ||
| 4672 | python-tabulate | ||
| 4673 | python-typing-extensions | ||
| 4674 | python-xarray | ||
| 4675 | python-xlrd | ||
| 4676 | python-xlsxwriter | ||
| 4677 | ;; Not packaged yet | ||
| 4678 | ;; | ||
| 4679 | ;; python-calamine | ||
| 4680 | ;; python-poethepoet | ||
| 4681 | ;; python-pyarrow-stubs | ||
| 4682 | ;; python-pyrefly | ||
| 4683 | ;; python-python-calamine | ||
| 4684 | ;; python-pyxlsb | ||
| 4685 | ;; python-scipy-stubs | ||
| 4686 | ;; python-ty | ||
| 4687 | ;; python-types-python-dateutil | ||
| 4688 | tzdata-for-tests)) | ||
| 4689 | (propagated-inputs | ||
| 4690 | (list python-numpy | ||
| 4691 | python-types-pytz)) | ||
| 4692 | (home-page "https://pandas.pydata.org") | ||
| 4693 | (synopsis "Type annotations for pandas") | ||
| 4694 | (description | ||
| 4695 | "This package contains public type stubs for @code{python-pandas}, following | ||
| 4696 | the convention of providing stubs in a separate package, as specified in | ||
| 4697 | @acronym{PEP, Python Enhancement Proposal} 561. The stubs cover the most | ||
| 4698 | typical use cases of @code{python-pandas}. In general, these stubs are | ||
| 4699 | narrower than what is possibly allowed by @code{python-pandas}, but follow a | ||
| 4700 | convention of suggesting best recommended practices for using | ||
| 4701 | @code{python-pandas}.") | ||
| 4702 | (license license:bsd-3))) | ||
| 4703 | |||
| 4704 | (define-public python-pandarallel | ||
| 4705 | (package | ||
| 4706 | (name "python-pandarallel") | ||
| 4707 | (version "1.6.5") | ||
| 4708 | (source | ||
| 4709 | (origin | ||
| 4710 | (method git-fetch) ; no tests in PyPI | ||
| 4711 | (uri (git-reference | ||
| 4712 | (url "https://github.com/nalepae/pandarallel/") | ||
| 4713 | (commit (string-append "v" version)))) | ||
| 4714 | (file-name (git-file-name name version)) | ||
| 4715 | (sha256 | ||
| 4716 | (base32 "0r2wlxlwp4wia0vm15k4cp421mwa20k4k5g2ml01inprj8bl1p0p")) | ||
| 4717 | (patches | ||
| 4718 | (search-patches "python-pandarallel-fix-df-applymap.patch" | ||
| 4719 | "python-pandarallel-fix-parallel_apply.patch")))) | ||
| 4720 | (build-system pyproject-build-system) | ||
| 4721 | (arguments | ||
| 4722 | (list | ||
| 4723 | #:test-flags #~(list "-n" (number->string (parallel-job-count))))) | ||
| 4724 | (propagated-inputs | ||
| 4725 | (list python-dill | ||
| 4726 | python-pandas | ||
| 4727 | python-psutil)) | ||
| 4728 | (native-inputs | ||
| 4729 | (list python-mkdocs-material | ||
| 4730 | python-numpy | ||
| 4731 | python-pytest | ||
| 4732 | python-pytest-xdist | ||
| 4733 | python-setuptools | ||
| 4734 | python-wheel)) | ||
| 4735 | (home-page "https://nalepae.github.io/pandarallel/") | ||
| 4736 | (synopsis "Tool to parallelize Pandas operations across CPUs") | ||
| 4737 | (description | ||
| 4738 | "@code{pandarallel} allows any Pandas user to take advantage of their | ||
| 4739 | multi-core computer, while Pandas uses only one core. @code{pandarallel} also | ||
| 4740 | offers nice progress bars (available on Notebook and terminal) to get an rough | ||
| 4741 | idea of the remaining amount of computation to be done.") | ||
| 4742 | (license license:bsd-3))) | ||
| 4743 | |||
| 4744 | (define-public python-pandera | ||
| 4745 | (package | ||
| 4746 | (name "python-pandera") | ||
| 4747 | (version "0.31.1") | ||
| 4748 | (source | ||
| 4749 | (origin | ||
| 4750 | ;; XXX: Sanity-check fails to load when switched to git-fetch. | ||
| 4751 | (method url-fetch) | ||
| 4752 | (uri (pypi-uri "pandera" version)) | ||
| 4753 | (sha256 | ||
| 4754 | (base32 "04qgmcfvw78ccfnmidhy3zw1i99nyjkz3b0klsd4ypgiia3a6nn7")))) | ||
| 4755 | (build-system pyproject-build-system) | ||
| 4756 | (arguments | ||
| 4757 | (list | ||
| 4758 | ;; tests: 3810 passed, 22 skipped, 21 xfailed, 5923 warnings | ||
| 4759 | #:test-flags | ||
| 4760 | ;; With higher threads count tests randomly fail during collection. | ||
| 4761 | #~(list "--numprocesses" (number->string (min 2 (parallel-job-count))) | ||
| 4762 | ;; TODO: Ignore tests for not packaged python-ibis-framework, | ||
| 4763 | ;; and python-pyspark. | ||
| 4764 | "--ignore=tests/ibis" | ||
| 4765 | "--ignore=tests/pyspark" | ||
| 4766 | ;; Not compatible with Pandas 3 yet. | ||
| 4767 | "--ignore=tests/modin" | ||
| 4768 | ;; Tests fail to connect to 127.0.0.1:52245, connection refused. | ||
| 4769 | "--deselect=tests/fastapi/test_app.py::test_items_endpoint" | ||
| 4770 | "--deselect=tests/fastapi/test_app.py::test_transactions_endpoint" | ||
| 4771 | "--deselect=tests/fastapi/test_app.py::test_upload_file_endpoint" | ||
| 4772 | ;; frictionless is not packaged yet. | ||
| 4773 | "-k" "not test_frictionless_schema_"))) | ||
| 4774 | (native-inputs | ||
| 4775 | (list python-joblib | ||
| 4776 | python-black ;some tets depent on it | ||
| 4777 | python-mypy-for-tests | ||
| 4778 | python-pytest | ||
| 4779 | python-pytest-asyncio | ||
| 4780 | python-pytest-xdist | ||
| 4781 | python-pytz | ||
| 4782 | python-setuptools | ||
| 4783 | python-setuptools-scm | ||
| 4784 | python-sphinx ;some tets depent on it | ||
| 4785 | python-uvicorn | ||
| 4786 | tzdata-for-tests)) | ||
| 4787 | (inputs | ||
| 4788 | ;; [optional] | ||
| 4789 | ;; Pandera comes with a lot of extras. We test as many as possible, but do | ||
| 4790 | ;; not include all of them in the propagated-inputs. Currently, we have to | ||
| 4791 | ;; skip the pyspark and io tests due to missing packages python-pyspark | ||
| 4792 | ;; and python-frictionless. | ||
| 4793 | (list python-dask | ||
| 4794 | python-distributed | ||
| 4795 | python-geopandas | ||
| 4796 | python-hypothesis | ||
| 4797 | ;; python-ibis-framework ;missing from Guix | ||
| 4798 | ;; python-modin ;blocked by guix/guix#9336 | ||
| 4799 | python-numpy | ||
| 4800 | python-pandas | ||
| 4801 | python-polars | ||
| 4802 | ;; python-pyspark ;missing from Guix | ||
| 4803 | ;; python-ray ;missing from Guix | ||
| 4804 | python-scipy | ||
| 4805 | python-shapely)) | ||
| 4806 | (propagated-inputs | ||
| 4807 | (list python-packaging | ||
| 4808 | python-pydantic | ||
| 4809 | python-typeguard | ||
| 4810 | python-typing-extensions | ||
| 4811 | python-typing-inspect)) | ||
| 4812 | (home-page "https://github.com/unionai-oss/pandera") | ||
| 4813 | (synopsis "Perform data validation on dataframe-like objects") | ||
| 4814 | (description | ||
| 4815 | "@code{python-pandera} provides a flexible and expressive API for | ||
| 4816 | performing data validation on dataframe-like objects to make data processing | ||
| 4817 | pipelines more readable and robust. Dataframes contain information that | ||
| 4818 | @code{python-pandera} explicitly validates at runtime. This is useful in | ||
| 4819 | production-critical data pipelines or reproducible research settings. With | ||
| 4820 | @code{python-pandera}, you can: | ||
| 4821 | |||
| 4822 | @itemize | ||
| 4823 | @item Define a schema once and use it to validate different dataframe types. | ||
| 4824 | @item Check the types and properties of columns. | ||
| 4825 | @item Perform more complex statistical validation like hypothesis testing. | ||
| 4826 | @item Seamlessly integrate with existing data pipelines via function decorators. | ||
| 4827 | @item Define dataframe models with the class-based API with pydantic-style syntax. | ||
| 4828 | @item Synthesize data from schema objects for property-based testing. | ||
| 4829 | @item Lazily validate dataframes so that all validation rules are executed. | ||
| 4830 | @item Integrate with a rich ecosystem of tools like @code{python-pydantic}, | ||
| 4831 | @code{python-fastapi} and @code{python-mypy}. | ||
| 4832 | @end itemize") | ||
| 4833 | (license license:expat))) | ||
| 4834 | |||
| 4835 | (define-public python-janitor-rs | ||
| 4836 | (package | ||
| 4837 | (name "python-janitor-rs") | ||
| 4838 | (version "0.6.1") | ||
| 4839 | (source | ||
| 4840 | (origin | ||
| 4841 | ;; The upstream git source has no tags. | ||
| 4842 | (method url-fetch) | ||
| 4843 | (uri (pypi-uri "janitor_rs" version)) | ||
| 4844 | (sha256 | ||
| 4845 | (base32 "0xicxplz8vngbj4s6c7d08gpivns5bda85020yf1wjs8788g9m2l")))) | ||
| 4846 | (build-system pyproject-build-system) | ||
| 4847 | (arguments | ||
| 4848 | (list | ||
| 4849 | #:tests? #f ; No tests. | ||
| 4850 | #:imported-modules `(,@%cargo-build-system-modules | ||
| 4851 | ,@%pyproject-build-system-modules) | ||
| 4852 | #:modules '(((guix build cargo-build-system) #:prefix cargo:) | ||
| 4853 | (guix build pyproject-build-system) | ||
| 4854 | (guix build utils)) | ||
| 4855 | #:phases | ||
| 4856 | #~(modify-phases %standard-phases | ||
| 4857 | (add-after 'unpack 'prepare-cargo-build-system | ||
| 4858 | (lambda args | ||
| 4859 | (for-each | ||
| 4860 | (lambda (phase) | ||
| 4861 | (format #t "Running cargo phase: ~a~%" phase) | ||
| 4862 | (apply (assoc-ref cargo:%standard-phases phase) | ||
| 4863 | #:vendor-dir ".cargo/vendor" | ||
| 4864 | #:cargo-target #$(cargo-triplet) | ||
| 4865 | args)) | ||
| 4866 | '(unpack-rust-crates | ||
| 4867 | configure | ||
| 4868 | check-for-pregenerated-files | ||
| 4869 | patch-cargo-checksums))))))) | ||
| 4870 | (native-inputs (append | ||
| 4871 | (list maturin | ||
| 4872 | rust | ||
| 4873 | `(,rust "cargo")) | ||
| 4874 | (or (and=> (%current-target-system) | ||
| 4875 | (compose list make-rust-sysroot)) | ||
| 4876 | '()))) | ||
| 4877 | (inputs (cargo-inputs 'janitor-rs)) | ||
| 4878 | (home-page "https://github.com/pyjanitor-devs/janitor-rs") | ||
| 4879 | (synopsis "Rust library for faster pyjanitor") | ||
| 4880 | (description | ||
| 4881 | "This package provides a Rust library to improve the performance of | ||
| 4882 | @code{python-pyjanitor}.") | ||
| 4883 | (license license:expat))) | ||
| 4884 | |||
| 4885 | (define-public python-pyjanitor | ||
| 4886 | (package | ||
| 4887 | (name "python-pyjanitor") | ||
| 4888 | (version "0.32.23") | ||
| 4889 | (source | ||
| 4890 | (origin | ||
| 4891 | (method git-fetch) | ||
| 4892 | (uri (git-reference | ||
| 4893 | (url "https://github.com/pyjanitor-devs/pyjanitor") | ||
| 4894 | (commit (string-append "v" version)))) | ||
| 4895 | (file-name (git-file-name name version)) | ||
| 4896 | (sha256 | ||
| 4897 | (base32 "1mvgabsn5jl2aidh2mcqdmh60p2g514nb5sxwskhz1q57pk4m0w9")))) | ||
| 4898 | (build-system pyproject-build-system) | ||
| 4899 | ;; Pyjanitor has an extensive test suite. For quick debugging, the tests | ||
| 4900 | ;; marked turtle can be skipped using "-m" "not turtle". | ||
| 4901 | (arguments | ||
| 4902 | (list | ||
| 4903 | ;; tests: 1030 passed, 2 skipped, 42 xfailed, 6 xpassed, 594 warnings | ||
| 4904 | #:test-flags | ||
| 4905 | ;; The tests take quite long, so consider adding the "-n" line and | ||
| 4906 | ;; adding python-pytest-xdist to the native-inputs when testing. | ||
| 4907 | ;; However, the tests are not deterministic, enen they are enabled in | ||
| 4908 | ;; project's CI (.github/workflows/tests.yml), when ran with "-n, | ||
| 4909 | ;; --numprocesses" , so disable again before committing. | ||
| 4910 | #~(list ;; "--numprocesses" (number->string (min 8 (parallel-job-count))) | ||
| 4911 | ;; Test files are not included. | ||
| 4912 | "--ignore=tests/io/test_read_csvs.py" | ||
| 4913 | ;; Polars has not been packaged yet. | ||
| 4914 | "--ignore=tests/polars/" | ||
| 4915 | ;; PySpark has not been packaged yet. | ||
| 4916 | "--ignore=tests/spark/" | ||
| 4917 | ;; Flaky test (fails for performance reasons) | ||
| 4918 | "--deselect=tests/math/test_ecdf.py::test_ecdf_string" | ||
| 4919 | ;; Tries to connect to the internet. | ||
| 4920 | "-k" (string-append "not test_is_connected" | ||
| 4921 | ;; Test files are not included. | ||
| 4922 | " and not test_read_commandline_bad_cmd" | ||
| 4923 | ;; XXX: Fatal Python error: Segmentation fault | ||
| 4924 | " and not test_maccs_keys_fingerprint" | ||
| 4925 | " and not test_morgan_fingerprint_counts" | ||
| 4926 | " and not test_morgan_fingerprint_bits" | ||
| 4927 | ;; AssertionError: DataFrame.iloc[:, 1] | ||
| 4928 | ;; (column name="cities") are different | ||
| 4929 | " and not test_various_sorted")) | ||
| 4930 | #:phases | ||
| 4931 | #~(modify-phases %standard-phases | ||
| 4932 | (add-before 'check 'set-env-ci | ||
| 4933 | (lambda _ | ||
| 4934 | ;; Some tests are skipped if the JANITOR_CI_MACHINE | ||
| 4935 | ;; variable is not set. | ||
| 4936 | (setenv "JANITOR_CI_MACHINE" "1")))))) | ||
| 4937 | (propagated-inputs (list python-janitor-rs | ||
| 4938 | python-multipledispatch | ||
| 4939 | python-natsort | ||
| 4940 | python-pandas-flavor | ||
| 4941 | python-scipy | ||
| 4942 | ;; [optional] | ||
| 4943 | python-biopython | ||
| 4944 | python-unyt)) | ||
| 4945 | (native-inputs (list python-numba | ||
| 4946 | python-openpyxl | ||
| 4947 | python-pytest | ||
| 4948 | ;;python-pytest-xdist ;only for -n when testing | ||
| 4949 | ;; TODO: Remove python-requests and inject its target | ||
| 4950 | ;; data to make the package behaviour reproducible. | ||
| 4951 | python-requests | ||
| 4952 | python-setuptools | ||
| 4953 | rdkit)) | ||
| 4954 | (home-page "https://github.com/pyjanitor-devs/pyjanitor") | ||
| 4955 | (synopsis "Tools for cleaning and transforming Pandas DataFrames") | ||
| 4956 | (description | ||
| 4957 | "@code{pyjanitor} provides a set of data cleaning routines for | ||
| 4958 | @code{pandas} DataFrames. These routines extend the method chaining API | ||
| 4959 | defined by @code{pandas} for a subset of its methods. Originally, this | ||
| 4960 | package was a port of the R package by the same name and it is inspired by the | ||
| 4961 | ease-of-use and expressiveness of the @code{dplyr} package.") | ||
| 4962 | (license license:expat))) | ||
| 4963 | |||
| 4964 | (define-public python-pymcubes | ||
| 4965 | (package | ||
| 4966 | (name "python-pymcubes") | ||
| 4967 | (version "0.1.6") | ||
| 4968 | (source | ||
| 4969 | (origin | ||
| 4970 | (method git-fetch) ; no tests in PyPI | ||
| 4971 | (uri (git-reference | ||
| 4972 | (url "https://github.com/pmneila/PyMCubes") | ||
| 4973 | (commit (string-append "v" version)))) | ||
| 4974 | (file-name (git-file-name name version)) | ||
| 4975 | (sha256 | ||
| 4976 | (base32 "1v2qhc4pwanx6a8k843mbh45yk77n3w63sy5lzk5c3q4pkvfj1b9")))) | ||
| 4977 | (build-system pyproject-build-system) | ||
| 4978 | (arguments | ||
| 4979 | (list | ||
| 4980 | #:phases | ||
| 4981 | #~(modify-phases %standard-phases | ||
| 4982 | (add-before 'check 'prepare-test-environment | ||
| 4983 | (lambda _ | ||
| 4984 | ;; FileNotFoundError: [Errno 2] No such file or directory: | ||
| 4985 | ;; 'output/test.obj' | ||
| 4986 | (mkdir "output") | ||
| 4987 | (invoke "python" "setup.py" "build_ext" "--inplace")))))) | ||
| 4988 | (native-inputs | ||
| 4989 | (list python-cython | ||
| 4990 | python-pytest | ||
| 4991 | python-setuptools | ||
| 4992 | python-wheel)) | ||
| 4993 | (propagated-inputs | ||
| 4994 | (list python-pycollada | ||
| 4995 | python-numpy | ||
| 4996 | python-scipy)) | ||
| 4997 | (home-page "https://github.com/pmneila/PyMCubes") | ||
| 4998 | (synopsis "Marching cubes for Python") | ||
| 4999 | (description | ||
| 5000 | "@code{PyMCubes} is an implementation of the marching cubes algorithm to | ||
| 5001 | extract iso-surfaces from volumetric data. The volumetric data can be given | ||
| 5002 | as a three-dimensional @code{NumPy} array or as a Python function @code{f(x, | ||
| 5003 | y, z)}.") | ||
| 5004 | (license license:bsd-3))) | ||
| 5005 | |||
| 5006 | (define-public python-pythran | ||
| 5007 | (package | ||
| 5008 | (name "python-pythran") | ||
| 5009 | ;; 0.18.1 (2025-11-15), released version does not support gast 0.7.0 and | ||
| 5010 | ;; beniget 0.5.0. | ||
| 5011 | (properties '((commit . "1159b80a09ece110a369729507ba5d0bc8e895b2") | ||
| 5012 | (revision . "0"))) | ||
| 5013 | (version (git-version "0.18.1" | ||
| 5014 | (assoc-ref properties 'revision) | ||
| 5015 | (assoc-ref properties 'commit))) | ||
| 5016 | (source | ||
| 5017 | (origin | ||
| 5018 | (method git-fetch) | ||
| 5019 | (uri (git-reference | ||
| 5020 | (url "https://github.com/serge-sans-paille/pythran") | ||
| 5021 | (commit (assoc-ref properties 'commit)))) | ||
| 5022 | (file-name (git-file-name name version)) | ||
| 5023 | (sha256 | ||
| 5024 | (base32 "0w9vbfqsazrl7zv4b7mh8alib4kihk9gn6xmxp2w39jg5wpk2bdi")))) | ||
| 5025 | (build-system pyproject-build-system) | ||
| 5026 | (arguments | ||
| 5027 | (list | ||
| 5028 | ;; FIXME: find more reliable tests file(s), all tests from | ||
| 5029 | ;; test_typing.py fail with error: ModuleNotFoundError: No module named | ||
| 5030 | ;; 'distutils.msvccompiler'. | ||
| 5031 | #:tests? #f | ||
| 5032 | #:phases | ||
| 5033 | #~(modify-phases %standard-phases | ||
| 5034 | (add-before 'build 'unvendor-xsimd | ||
| 5035 | (lambda _ | ||
| 5036 | (delete-file-recursively "pythran/xsimd") | ||
| 5037 | (symlink #$(package-source | ||
| 5038 | (this-package-input "xsimd")) | ||
| 5039 | "pythran/xsimd")))))) | ||
| 5040 | (native-inputs | ||
| 5041 | (list python-setuptools)) | ||
| 5042 | (propagated-inputs | ||
| 5043 | (list boost ;headers need to be available | ||
| 5044 | xsimd | ||
| 5045 | python-beniget | ||
| 5046 | python-gast | ||
| 5047 | python-numpy | ||
| 5048 | python-ply)) | ||
| 5049 | (home-page "https://github.com/serge-sans-paille/pythran") | ||
| 5050 | (synopsis "Ahead of Time compiler for numeric kernels") | ||
| 5051 | (description | ||
| 5052 | "Pythran is an ahead of time compiler for a subset of the Python | ||
| 5053 | language, with a focus on scientific computing. It takes a Python module | ||
| 5054 | annotated with a few interface descriptions and turns it into a native | ||
| 5055 | Python module with the same interface, but (hopefully) faster.") | ||
| 5056 | (license license:bsd-3))) | ||
| 5057 | |||
| 5058 | (define-public python-pyts | ||
| 5059 | (let ((commit "4f3d97bcb1016d33dbfaef68c0931756a4552410") | ||
| 5060 | (revision "0")) | ||
| 5061 | (package | ||
| 5062 | (name "python-pyts") | ||
| 5063 | (version (git-version "0.13.0" revision commit)) | ||
| 5064 | (source | ||
| 5065 | (origin | ||
| 5066 | (method git-fetch) | ||
| 5067 | (uri (git-reference | ||
| 5068 | (url "https://github.com/johannfaouzi/pyts") | ||
| 5069 | (commit commit))) | ||
| 5070 | (file-name (git-file-name name version)) | ||
| 5071 | (sha256 | ||
| 5072 | (base32 "16hlxwajdz44qs8vi7bhiania2b3201fv3pqiwsx79rb554bvl66")))) | ||
| 5073 | (build-system pyproject-build-system) | ||
| 5074 | (arguments | ||
| 5075 | (list | ||
| 5076 | #:test-flags | ||
| 5077 | #~(list "--pyargs" "pyts" | ||
| 5078 | ;; Most likely a flaky test. | ||
| 5079 | "--deselect=preprocessing/transformer.py::\ | ||
| 5080 | pyts.preprocessing.transformer.QuantileTransformer") | ||
| 5081 | #:phases | ||
| 5082 | #~(modify-phases %standard-phases | ||
| 5083 | ;; See https://github.com/johannfaouzi/pyts/issues/168 | ||
| 5084 | (add-after 'unpack 'fix-scikit-learn-compat | ||
| 5085 | (lambda _ | ||
| 5086 | (substitute* (list "pyts/metrics/dtw.py" | ||
| 5087 | "pyts/preprocessing/imputer.py" | ||
| 5088 | "pyts/preprocessing/transformer.py") | ||
| 5089 | (("force_all_finite=") | ||
| 5090 | "ensure_all_finite="))))))) | ||
| 5091 | (propagated-inputs | ||
| 5092 | (list python-joblib | ||
| 5093 | python-numba | ||
| 5094 | python-numpy | ||
| 5095 | python-scikit-learn | ||
| 5096 | python-scipy)) | ||
| 5097 | (native-inputs | ||
| 5098 | (list python-pytest python-setuptools)) | ||
| 5099 | (home-page "https://github.com/johannfaouzi/pyts") | ||
| 5100 | (synopsis "Python package for time series classification") | ||
| 5101 | (description | ||
| 5102 | "pyts is a Python package for time series classification. It aims to | ||
| 5103 | make time series classification easily accessible by providing preprocessing | ||
| 5104 | and utility tools, and implementations of state-of-the-art algorithms. Most | ||
| 5105 | of these algorithms transform time series, thus pyts provides several tools to | ||
| 5106 | perform these transformations.") | ||
| 5107 | (license license:bsd-3)))) | ||
| 5108 | |||
| 5109 | (define-public python-spin | ||
| 5110 | (package | ||
| 5111 | (name "python-spin") | ||
| 5112 | (version "0.8") | ||
| 5113 | (source | ||
| 5114 | (origin | ||
| 5115 | (method url-fetch) | ||
| 5116 | (uri (pypi-uri "spin" version)) | ||
| 5117 | (sha256 | ||
| 5118 | (base32 "0ff48nagfaai3j26g1db4zq2bwdv6kj5l7xhcs2l9kzg7qzrmhr7")))) | ||
| 5119 | (build-system pyproject-build-system) | ||
| 5120 | (propagated-inputs (list python-click python-colorama python-tomli)) | ||
| 5121 | (native-inputs (list python-pytest python-setuptools python-wheel)) | ||
| 5122 | (home-page "https://github.com/scientific-python/spin") | ||
| 5123 | (synopsis "Developer tool for scientific Python libraries") | ||
| 5124 | (description "@code{spin} is a simple interface for common development | ||
| 5125 | tasks. It comes with a few common build commands out the box, but can | ||
| 5126 | easily be customized per project. | ||
| 5127 | |||
| 5128 | The impetus behind developing the tool was the mass migration of scientific | ||
| 5129 | Python libraries (SciPy, scikit-image, and NumPy, etc.) to Meson, after | ||
| 5130 | distutils was deprecated. When many of the build and installation commands | ||
| 5131 | changed, it made sense to abstract away the nuisance of having to re-learn | ||
| 5132 | them.") | ||
| 5133 | (license license:bsd-3))) | ||
| 5134 | |||
| 5135 | (define-public python-uhi | 6244 | (define-public python-uhi |
| 5136 | (package | 6245 | (package |
| 5137 | (name "python-uhi") | 6246 | (name "python-uhi") |
| @@ -5669,1078 +6778,6 @@ functions and around einops with an API and features adapted to xarray.") | |||
| 5669 | objects.") | 6778 | objects.") |
| 5670 | (license license:expat))) | 6779 | (license license:expat))) |
| 5671 | 6780 | ||
| 5672 | (define-public python-pytensor | ||
| 5673 | (package | ||
| 5674 | (name "python-pytensor") | ||
| 5675 | (version "3.2.4") | ||
| 5676 | (source (origin | ||
| 5677 | (method git-fetch) | ||
| 5678 | (uri (git-reference | ||
| 5679 | (url "https://github.com/pymc-devs/pytensor") | ||
| 5680 | (commit (string-append "rel-" version)))) | ||
| 5681 | (file-name (git-file-name name version)) | ||
| 5682 | (sha256 | ||
| 5683 | (base32 | ||
| 5684 | "0wqklzah9rysxnmf34zrj4njc1k79r9n9kbi1cnm6qj2dds6bm3d")))) | ||
| 5685 | (build-system pyproject-build-system) | ||
| 5686 | (arguments | ||
| 5687 | (list | ||
| 5688 | ;; tests: 1906 passed, 2581 skipped, 34 deselected, 12 xfailed, 274 warnings | ||
| 5689 | #:test-flags | ||
| 5690 | ;; XXX: Full test suite takes about 20-30min to complete in single | ||
| 5691 | ;; thread, attempt to run tests in parallel with pytest-xdist fails even | ||
| 5692 | ;; so upstream provides a support for that, try to figure out how to | ||
| 5693 | ;; improve it. | ||
| 5694 | ;; | ||
| 5695 | ;; Upstream implements a script, showing slow tests which may be used to | ||
| 5696 | ;; exclude even more hanging/slow ones, see: | ||
| 5697 | ;; <scripts/slowest_tests/extract-slow-tests.py>. | ||
| 5698 | ;; | ||
| 5699 | #~(list "--benchmark-disable" | ||
| 5700 | "--benchmark-skip" | ||
| 5701 | "--durations=50" | ||
| 5702 | ;; Skip computationally intensive tests. | ||
| 5703 | "--ignore=tests/scan/" | ||
| 5704 | "--ignore=tests/tensor/" | ||
| 5705 | "--ignore=tests/sandbox/" | ||
| 5706 | "--ignore=tests/sparse/sandbox/" | ||
| 5707 | ;; A mixture of assertions are not equal in these tests. | ||
| 5708 | "--deselect=tests/link/numba/test_nlinalg.py::test_Eigh[x0-L-None]" | ||
| 5709 | #$@(map (lambda (test) | ||
| 5710 | (string-append "--deselect=tests/graph/rewriting/" | ||
| 5711 | "test_basic.py::" | ||
| 5712 | test)) | ||
| 5713 | ;; Tests fail with similar errors: AssertionError: | ||
| 5714 | ;; assert 'FunctionGraph(Op1(Op2(x, y), z))' == | ||
| 5715 | ;; 'FunctionGraph(Op4(z, y))' | ||
| 5716 | (list "TestPatternNodeRewriter::test_replace_output" | ||
| 5717 | "TestPatternNodeRewriter::test_nested_out_pattern" | ||
| 5718 | "TestPatternNodeRewriter::test_unification_1" | ||
| 5719 | "TestPatternNodeRewriter::test_replace_subgraph" | ||
| 5720 | "TestPatternNodeRewriter::test_no_recurse" | ||
| 5721 | "TestPatternNodeRewriter::test_multiple" | ||
| 5722 | "TestPatternNodeRewriter::test_nested_even" | ||
| 5723 | "TestPatternNodeRewriter::test_nested_odd" | ||
| 5724 | "TestPatternNodeRewriter::test_expand" | ||
| 5725 | "TestPatternNodeRewriter::test_ambiguous" | ||
| 5726 | "TestPatternNodeRewriter::test_constant" | ||
| 5727 | "TestPatternNodeRewriter::test_constraints" | ||
| 5728 | "TestPatternNodeRewriter::test_match_same" | ||
| 5729 | "TestPatternNodeRewriter::test_eq" | ||
| 5730 | "TestEquilibrium::test_1" | ||
| 5731 | "TestEquilibrium::test_2" | ||
| 5732 | "TestEquilibrium::test_low_use_ratio" | ||
| 5733 | ;; A mixture of assertions are not equal: | ||
| 5734 | "TestPatternNodeRewriter::test_allow_multiple_clients" | ||
| 5735 | "TestPatternNodeRewriter::test_op_pattern" | ||
| 5736 | "test_patternsub_values_eq_approx[out_pattern0-True]" | ||
| 5737 | "test_patternsub_values_eq_approx[out_pattern0-False]" | ||
| 5738 | "test_patternsub_values_eq_approx[x-True]" | ||
| 5739 | "test_patternsub_values_eq_approx[x-False]" | ||
| 5740 | "test_patternsub_multi_output_nodes")) | ||
| 5741 | #$@(map (lambda (test) | ||
| 5742 | (string-append "--deselect=tests/graph/" test)) | ||
| 5743 | (list "rewriting/test_kanren.py::test_kanren_basic" | ||
| 5744 | "rewriting/test_kanren.py::test_KanrenRelationSub_filters" | ||
| 5745 | "rewriting/test_kanren.py::test_KanrenRelationSub_dot" | ||
| 5746 | "rewriting/test_unify.py::test_unify_Variable" | ||
| 5747 | "rewriting/test_unify.py::test_ConstrainedVar" | ||
| 5748 | "rewriting/test_unify.py::test_unify_OpPattern" | ||
| 5749 | "test_destroyhandler.py::test_misc"))) | ||
| 5750 | #:phases | ||
| 5751 | #~(modify-phases %standard-phases | ||
| 5752 | (add-before 'check 'pre-check | ||
| 5753 | (lambda _ | ||
| 5754 | ;; It is required for most tests. | ||
| 5755 | (setenv "HOME" "/tmp") | ||
| 5756 | ;; This would otherwise interfere with finding the installed | ||
| 5757 | ;; pytensor when running tests. | ||
| 5758 | (delete-file-recursively "pytensor")))))) | ||
| 5759 | (native-inputs (list python-cython | ||
| 5760 | python-pytest | ||
| 5761 | python-pytest-benchmark | ||
| 5762 | python-pytest-mock | ||
| 5763 | python-pytest-xdist | ||
| 5764 | python-versioneer | ||
| 5765 | python-setuptools)) | ||
| 5766 | (propagated-inputs (list python-cons | ||
| 5767 | python-etuples | ||
| 5768 | python-filelock | ||
| 5769 | python-logical-unification | ||
| 5770 | python-minikanren | ||
| 5771 | python-numba | ||
| 5772 | python-numpy | ||
| 5773 | python-scipy | ||
| 5774 | ;; [optional] | ||
| 5775 | ;; python-jaxlib | ||
| 5776 | ;; python-jax | ||
| 5777 | #;python-llvmlite)) | ||
| 5778 | (home-page "https://pytensor.readthedocs.io/en/latest/") | ||
| 5779 | (synopsis | ||
| 5780 | "Library for mathematical expressions in multi-dimensional arrays") | ||
| 5781 | (description | ||
| 5782 | "PyTensor is a Python library that allows one to define, optimize, and | ||
| 5783 | efficiently evaluate mathematical expressions involving multi-dimensional | ||
| 5784 | arrays. It is a fork of the Aesara library.") | ||
| 5785 | (license license:bsd-3))) | ||
| 5786 | |||
| 5787 | (define-public python-scs | ||
| 5788 | (package | ||
| 5789 | (name "python-scs") | ||
| 5790 | (version "3.2.10") | ||
| 5791 | (source | ||
| 5792 | (origin | ||
| 5793 | (method git-fetch) | ||
| 5794 | (uri (git-reference | ||
| 5795 | (url "https://github.com/bodono/scs-python") | ||
| 5796 | (commit version))) | ||
| 5797 | (file-name (git-file-name name version)) | ||
| 5798 | (sha256 | ||
| 5799 | (base32 "1wg1g6das5hs53z3sjn2m8646023d14q9shmwfb38n23baqi468g")))) | ||
| 5800 | (build-system pyproject-build-system) | ||
| 5801 | (arguments | ||
| 5802 | (list | ||
| 5803 | ;; tests: 26 passed | ||
| 5804 | #:phases | ||
| 5805 | #~(modify-phases %standard-phases | ||
| 5806 | (add-after 'ensure-no-mtimes-pre-1980 'substitute-git-submodules | ||
| 5807 | (lambda _ | ||
| 5808 | (rmdir "scs_source") | ||
| 5809 | (symlink #$(package-source | ||
| 5810 | (this-package-native-input "scs")) | ||
| 5811 | "scs_source") | ||
| 5812 | (rmdir "scs/pythoncapi-compat") | ||
| 5813 | (symlink #$(package-source | ||
| 5814 | (this-package-native-input "pythoncapi-compat")) | ||
| 5815 | "scs/pythoncapi-compat")))))) | ||
| 5816 | (native-inputs | ||
| 5817 | (list pkg-config | ||
| 5818 | python-meson | ||
| 5819 | python-pytest | ||
| 5820 | pythoncapi-compat | ||
| 5821 | scs)) | ||
| 5822 | (inputs | ||
| 5823 | (list lapack | ||
| 5824 | openblas)) | ||
| 5825 | (propagated-inputs | ||
| 5826 | (list python-numpy | ||
| 5827 | python-scipy)) | ||
| 5828 | (home-page "https://github.com/bodono/scs-python") | ||
| 5829 | (synopsis "Splitting conic solver") | ||
| 5830 | (description "This package provides a Python interface for the | ||
| 5831 | SCS (Splitting conic solver) library.") | ||
| 5832 | (license license:expat))) | ||
| 5833 | |||
| 5834 | (define-public python-pandas-flavor | ||
| 5835 | (package | ||
| 5836 | (name "python-pandas-flavor") | ||
| 5837 | (version "0.8.1") | ||
| 5838 | (source | ||
| 5839 | (origin | ||
| 5840 | (method url-fetch) | ||
| 5841 | (uri (pypi-uri "pandas_flavor" version)) | ||
| 5842 | (sha256 | ||
| 5843 | (base32 | ||
| 5844 | "0rn3pnracv8013j3f737qal3isf1brbc3mpxqhr03vik322sapr5")))) | ||
| 5845 | (build-system pyproject-build-system) | ||
| 5846 | (native-inputs | ||
| 5847 | (list python-pytest | ||
| 5848 | python-setuptools | ||
| 5849 | python-setuptools-scm)) | ||
| 5850 | (propagated-inputs | ||
| 5851 | (list python-pandas | ||
| 5852 | python-xarray)) | ||
| 5853 | (home-page "https://github.com/pyjanitor-devs/pandas_flavor") | ||
| 5854 | (synopsis "Write your own flavor of Pandas") | ||
| 5855 | (description "Pandas 0.23 added a simple API for registering accessors | ||
| 5856 | with Pandas objects. Pandas-flavor extends Pandas' extension API by | ||
| 5857 | |||
| 5858 | @itemize | ||
| 5859 | @item adding support for registering methods as well | ||
| 5860 | @item making each of these functions backwards compatible with older versions | ||
| 5861 | of Pandas | ||
| 5862 | @end itemize") | ||
| 5863 | (license license:expat))) | ||
| 5864 | |||
| 5865 | (define-public python-pingouin | ||
| 5866 | (package | ||
| 5867 | (name "python-pingouin") | ||
| 5868 | (version "0.6.1") | ||
| 5869 | (source | ||
| 5870 | (origin | ||
| 5871 | (method git-fetch) | ||
| 5872 | (uri (git-reference | ||
| 5873 | (url "https://github.com/raphaelvallat/pingouin") | ||
| 5874 | (commit (string-append "v" version)))) | ||
| 5875 | (file-name (git-file-name name version)) | ||
| 5876 | (sha256 | ||
| 5877 | (base32 "14hxs2w51qgg67kqkxpy02kd4q8gb7vayj85kcp8qvda1q1xasfv")))) | ||
| 5878 | (build-system pyproject-build-system) | ||
| 5879 | (arguments | ||
| 5880 | (list | ||
| 5881 | ;; tests: 85 passed, 3 deselected, 43 warnings | ||
| 5882 | #:test-flags | ||
| 5883 | #~(list | ||
| 5884 | ;; These tests failed with the python-pandas update. | ||
| 5885 | "--deselect=tests/test_parametric.py::TestParametric::test_ancova" | ||
| 5886 | "--deselect=tests/test_parametric.py::TestParametric::test_anova" | ||
| 5887 | "--deselect=tests/test_pandas.py::TestParametric::test_pandas"))) | ||
| 5888 | (native-inputs | ||
| 5889 | (list python-pytest | ||
| 5890 | python-setuptools)) | ||
| 5891 | (propagated-inputs | ||
| 5892 | (list python-matplotlib | ||
| 5893 | python-mpmath | ||
| 5894 | python-numpy | ||
| 5895 | python-pandas | ||
| 5896 | python-pandas-flavor | ||
| 5897 | python-scikit-learn | ||
| 5898 | python-scipy | ||
| 5899 | python-seaborn | ||
| 5900 | python-statsmodels | ||
| 5901 | python-tabulate)) | ||
| 5902 | (home-page "https://pingouin-stats.org/") | ||
| 5903 | (synopsis "Statistical package for Python") | ||
| 5904 | (description "Pingouin is a statistical package written in Python 3 and | ||
| 5905 | based mostly on Pandas and NumPy. Its features include | ||
| 5906 | |||
| 5907 | @itemize | ||
| 5908 | @item ANOVAs: N-ways, repeated measures, mixed, ancova | ||
| 5909 | @item Pairwise post-hocs tests (parametric and non-parametric) and pairwise | ||
| 5910 | correlations | ||
| 5911 | @item Robust, partial, distance and repeated measures correlations | ||
| 5912 | @item Linear/logistic regression and mediation analysis | ||
| 5913 | @item Bayes Factors | ||
| 5914 | @item Multivariate tests | ||
| 5915 | @item Reliability and consistency | ||
| 5916 | @item Effect sizes and power analysis | ||
| 5917 | @item Parametric/bootstrapped confidence intervals around an effect size or a | ||
| 5918 | correlation coefficient | ||
| 5919 | @item Circular statistics | ||
| 5920 | @item Chi-squared tests | ||
| 5921 | @item Plotting: Bland-Altman plot, Q-Q plot, paired plot, robust correlation, | ||
| 5922 | and more | ||
| 5923 | @end itemize") | ||
| 5924 | (license license:gpl3))) | ||
| 5925 | |||
| 5926 | (define-public python-plotly | ||
| 5927 | (package | ||
| 5928 | (name "python-plotly") | ||
| 5929 | (version "6.8.0") | ||
| 5930 | (source | ||
| 5931 | (origin | ||
| 5932 | (method git-fetch) | ||
| 5933 | (uri (git-reference | ||
| 5934 | (url "https://github.com/plotly/plotly.py") | ||
| 5935 | (commit (string-append "v" version)))) | ||
| 5936 | (file-name (git-file-name name version)) | ||
| 5937 | (sha256 | ||
| 5938 | (base32 "147vgm22zrg4wcjc427mxszbb8v6vhs7hgchcm8678cy304hawvd")))) | ||
| 5939 | (build-system pyproject-build-system) | ||
| 5940 | (arguments | ||
| 5941 | (list | ||
| 5942 | ;; tests: 3039 passed, 24 skipped, 292 deselected, 4 xfailed, 556 warnings | ||
| 5943 | #:test-flags | ||
| 5944 | ;; Missing dependencies. | ||
| 5945 | #~(list "--ignore=plotly/matplotlylib/mplexporter/tests/test_basic.py" | ||
| 5946 | "--ignore=plotly/matplotlylib/mplexporter/tests/test_utils.py" | ||
| 5947 | "--ignore=plotly/matplotlylib/tests/test_renderer.py" | ||
| 5948 | "--ignore=tests/test_io/test_renderers.py" | ||
| 5949 | "--ignore=tests/test_optional/test_kaleido/test_kaleido.py" | ||
| 5950 | ;; XXX: Combination of missing packages and assertion errors. | ||
| 5951 | "-k" (string-join | ||
| 5952 | (list "not test_acceptance_named" | ||
| 5953 | "test_colorscale_and_levels_same_length" | ||
| 5954 | "test_correct_order_param" | ||
| 5955 | "test_date_in_hover" | ||
| 5956 | "test_dependencies_not_imported" | ||
| 5957 | "test_fips_values_same_length" | ||
| 5958 | "test_from_json_output_type" | ||
| 5959 | "test_get_module_exists_submodule" | ||
| 5960 | "test_iplot_mpl_works" | ||
| 5961 | "test_iplot_works_after_you_call_init_notebook_mode" | ||
| 5962 | "test_iplot_works_without_init_notebook_mode" | ||
| 5963 | "test_lazy_imports" | ||
| 5964 | "test_ols_trendline_slopes" | ||
| 5965 | "test_overall_trendline" | ||
| 5966 | "test_read_json_from_file_string" | ||
| 5967 | "test_read_json_from_filelike" | ||
| 5968 | "test_read_json_from_pathlib" | ||
| 5969 | "test_render_mode" | ||
| 5970 | "test_scope_is_not_list" | ||
| 5971 | "test_trendline_enough_values" | ||
| 5972 | "test_trendline_nan_values" | ||
| 5973 | "test_trendline_on_timeseries" | ||
| 5974 | "test_trendline_results_passthrough") | ||
| 5975 | " and not ")) | ||
| 5976 | #:phases | ||
| 5977 | #~(modify-phases %standard-phases | ||
| 5978 | (add-before 'build 'skip-npm | ||
| 5979 | ;; npm is not packaged so build without it | ||
| 5980 | (lambda _ | ||
| 5981 | (setenv "SKIP_NPM" "T")))))) | ||
| 5982 | ;; XXX: Plotly requires a long list of test only packages, do not | ||
| 5983 | ;; propagate them, see: | ||
| 5984 | ;; <https://github.com/plotly/plotly.py/blob/v6.8.0/pyproject.toml#L56>. | ||
| 5985 | (native-inputs | ||
| 5986 | (list ;; python-anywidget ;not packaged yet in Guix | ||
| 5987 | python-colorcet | ||
| 5988 | python-geopandas | ||
| 5989 | python-hatchling | ||
| 5990 | python-inflect | ||
| 5991 | ;; python-kaleido ;not packaged yet in Guix | ||
| 5992 | python-numpy | ||
| 5993 | python-orjson | ||
| 5994 | python-pandas-minimal | ||
| 5995 | ;; python-pdfrw ;not packaged yet in Guix | ||
| 5996 | python-pillow | ||
| 5997 | ;; python-plotly-geo ;not packaged yet in Guix | ||
| 5998 | python-polars | ||
| 5999 | python-pyarrow | ||
| 6000 | python-pyshp | ||
| 6001 | python-pytest | ||
| 6002 | python-pytz | ||
| 6003 | python-scikit-image | ||
| 6004 | python-scipy-minimal | ||
| 6005 | python-shapely | ||
| 6006 | python-statsmodels | ||
| 6007 | python-xarray | ||
| 6008 | tzdata-for-tests)) | ||
| 6009 | (propagated-inputs | ||
| 6010 | (list python-narwhals | ||
| 6011 | python-packaging)) | ||
| 6012 | (home-page "https://plotly.com/python/") | ||
| 6013 | (synopsis "Interactive plotting library for Python") | ||
| 6014 | (description | ||
| 6015 | "Plotly's Python graphing library makes interactive,publication-quality | ||
| 6016 | graphs online. Examples of how to make line plots, scatter plots, area | ||
| 6017 | charts, bar charts, error bars, box plots, histograms, heatmaps, subplots, | ||
| 6018 | multiple-axes, polar charts, and bubble charts.") | ||
| 6019 | (license license:expat))) | ||
| 6020 | |||
| 6021 | (define-public python-plotnine | ||
| 6022 | (package | ||
| 6023 | (name "python-plotnine") | ||
| 6024 | (version "0.15.7") | ||
| 6025 | (source | ||
| 6026 | (origin | ||
| 6027 | (method git-fetch) | ||
| 6028 | (uri (git-reference | ||
| 6029 | (url "https://github.com/has2k1/plotnine") | ||
| 6030 | (commit (string-append "v" version)))) | ||
| 6031 | (file-name (git-file-name name version)) | ||
| 6032 | (sha256 | ||
| 6033 | (base32 "0cf8bv9cjjdd0qa77kq6kpspwmbg8px6s5s5zplrns9awlskn8zg")))) | ||
| 6034 | (build-system pyproject-build-system) | ||
| 6035 | (arguments | ||
| 6036 | (list | ||
| 6037 | #:test-flags | ||
| 6038 | ;; XXX: Check for any new failing tests during next update cycle. | ||
| 6039 | ;; These all fail because the images are considered to be too different, | ||
| 6040 | ;; though they really do look fine. | ||
| 6041 | ;; See https://github.com/has2k1/plotnine/issues/627 | ||
| 6042 | `(list ,@(map (lambda (file) (string-append "--ignore=" file)) | ||
| 6043 | (list "tests/test_aes.py" | ||
| 6044 | "tests/test_annotation_logticks.py" | ||
| 6045 | "tests/test_coords.py" | ||
| 6046 | "tests/test_facet_labelling.py" | ||
| 6047 | "tests/test_facets.py" | ||
| 6048 | "tests/test_layout.py" | ||
| 6049 | "tests/test_position.py" | ||
| 6050 | "tests/test_qplot.py" | ||
| 6051 | "tests/test_plot_composition.py" | ||
| 6052 | "tests/test_scale_internals.py" | ||
| 6053 | "tests/test_scale_labelling.py" | ||
| 6054 | "tests/test_theme.py")) | ||
| 6055 | "--ignore-glob=tests/test_geom*.py" | ||
| 6056 | "--ignore-glob=tests/test_stat*.py" | ||
| 6057 | "-k" ; Other failures | ||
| 6058 | (string-append "not " | ||
| 6059 | (string-join | ||
| 6060 | (list | ||
| 6061 | ;; This triggers an unexpected but harmless | ||
| 6062 | ;; warning. | ||
| 6063 | "test_save_method" | ||
| 6064 | ;; This test fails to set the locale. | ||
| 6065 | "test_no_after_scale_warning" | ||
| 6066 | ;; Missing optional modules | ||
| 6067 | "test_non_linear_smooth" | ||
| 6068 | "test_non_linear_smooth_no_ci") | ||
| 6069 | " and not " | ||
| 6070 | 'infix))) | ||
| 6071 | #:phases | ||
| 6072 | #~(modify-phases %standard-phases | ||
| 6073 | (add-before 'check 'pre-check | ||
| 6074 | (lambda* (#:key inputs outputs #:allow-other-keys) | ||
| 6075 | ;; The data files are referenced by the tests but they are not | ||
| 6076 | ;; installed. | ||
| 6077 | (copy-recursively "plotnine/data" | ||
| 6078 | (string-append (site-packages inputs | ||
| 6079 | outputs) | ||
| 6080 | "/plotnine/data")) | ||
| 6081 | (setenv "CI" "1") ;skip tests that are known to fail on CI. | ||
| 6082 | ;; Matplotlib needs to be able to write its configuration file | ||
| 6083 | ;; somewhere. | ||
| 6084 | (setenv "MPLCONFIGDIR" "/tmp") | ||
| 6085 | (setenv "TZ" "UTC") | ||
| 6086 | (setenv "TZDIR" | ||
| 6087 | (search-input-directory inputs "share/zoneinfo"))))))) | ||
| 6088 | (propagated-inputs (list python-adjusttext | ||
| 6089 | python-matplotlib | ||
| 6090 | python-mizani | ||
| 6091 | python-numpy | ||
| 6092 | python-patsy | ||
| 6093 | python-scipy | ||
| 6094 | python-statsmodels)) | ||
| 6095 | (native-inputs (list python-geopandas | ||
| 6096 | python-mock | ||
| 6097 | python-pandas | ||
| 6098 | python-pytest | ||
| 6099 | python-setuptools | ||
| 6100 | python-setuptools-scm | ||
| 6101 | python-wheel | ||
| 6102 | tzdata-for-tests)) | ||
| 6103 | (home-page "https://github.com/has2k1/plotnine") | ||
| 6104 | (synopsis "Grammar of Graphics for Python") | ||
| 6105 | (description | ||
| 6106 | "Plotnine is a Python implementation of the Grammar of Graphics. | ||
| 6107 | It is a powerful graphics concept for creating plots and visualizations in a | ||
| 6108 | structured and declarative manner. It is inspired by the R package ggplot2 | ||
| 6109 | and aims to provide a similar API and functionality in Python.") | ||
| 6110 | (license license:expat))) | ||
| 6111 | |||
| 6112 | (define-public python-pytest-pyvista | ||
| 6113 | (package | ||
| 6114 | (name "python-pytest-pyvista") | ||
| 6115 | (version "0.3.2") | ||
| 6116 | (source | ||
| 6117 | (origin | ||
| 6118 | (method url-fetch) | ||
| 6119 | (uri (pypi-uri "pytest_pyvista" version)) | ||
| 6120 | (sha256 | ||
| 6121 | (base32 "0hgk3a5wwymk3k7ih4lsmkd44dfnsd842zv5859izqxkw74j2xpn")))) | ||
| 6122 | (build-system pyproject-build-system) | ||
| 6123 | (arguments | ||
| 6124 | (list | ||
| 6125 | ;; No tests included in the PyPI tarball. | ||
| 6126 | #:tests? #f)) | ||
| 6127 | (propagated-inputs (list python-numpy python-pillow python-pytest-8)) | ||
| 6128 | (native-inputs (list python-flit-core)) | ||
| 6129 | (home-page "https://github.com/pyvista/pytest-pyvista") | ||
| 6130 | (synopsis "Pytest plugin for comparing PyVista plot images") | ||
| 6131 | (description "This package provides a Pytest plugin that facilitates | ||
| 6132 | the comparison of images produced by PyVista, generating cached images from | ||
| 6133 | tests and comparing subsequent results against that cache.") | ||
| 6134 | (license license:expat))) | ||
| 6135 | |||
| 6136 | (define-public python-pyvista | ||
| 6137 | (package | ||
| 6138 | (name "python-pyvista") | ||
| 6139 | (version "0.46.5") | ||
| 6140 | (source | ||
| 6141 | (origin | ||
| 6142 | (method git-fetch) | ||
| 6143 | (uri (git-reference | ||
| 6144 | (url "https://github.com/pyvista/pyvista") | ||
| 6145 | (commit (string-append "v" version)))) | ||
| 6146 | (file-name (git-file-name name version)) | ||
| 6147 | (sha256 | ||
| 6148 | (base32 "0553bp4fhbar9z0ybjv1mw1jhb5rhrr4v6q2bzmia0ww0dn8fc69")))) | ||
| 6149 | (build-system pyproject-build-system) | ||
| 6150 | (arguments | ||
| 6151 | (list | ||
| 6152 | ;; tests: 5891 passed, 623 skipped, 355 deselected, 3 xfailed, 167 warnings | ||
| 6153 | #:test-flags | ||
| 6154 | ;; TODO: Find out what's going on with skipped tests. | ||
| 6155 | #~(list "--ignore=tests/plotting/test_charts.py" | ||
| 6156 | "--ignore=tests/examples/test_download_files.py" | ||
| 6157 | "--ignore=tests/examples/test_downloads.py" | ||
| 6158 | "--ignore=tests/plotting/test_texture.py" | ||
| 6159 | ;; Tries to download data from GitHub at collection time. | ||
| 6160 | "--ignore=tests/core/test_dataobject_filters.py" | ||
| 6161 | ;; Tries to download data from GitHub at collection time. | ||
| 6162 | "--ignore=tests/core/test_dataset_filters.py" | ||
| 6163 | ;; Tries to download data from GitHub at collection time. | ||
| 6164 | "--ignore=tests/plotting/test_plotter.py" | ||
| 6165 | "-k" (string-join | ||
| 6166 | (list "not test_actor_texture" | ||
| 6167 | "test_add_multiple" | ||
| 6168 | "test_add_timer_event" | ||
| 6169 | "test_avsucd_reader" | ||
| 6170 | "test_binarymarchingcubesreader" | ||
| 6171 | "test_bmpreader" | ||
| 6172 | "test_box_axes" | ||
| 6173 | "test_byureader" | ||
| 6174 | "test_cast_to_numpy_raises" | ||
| 6175 | "test_compute_boundary_mesh_quality" | ||
| 6176 | "test_connectivity_" | ||
| 6177 | "test_dataset_loader_cubemap" | ||
| 6178 | "test_dataset_loader_dicom" | ||
| 6179 | "test_dataset_loader_from_nested_files_and_directory" | ||
| 6180 | "test_dataset_loader_from_nested_multiblock" | ||
| 6181 | "test_dataset_loader_one_file" | ||
| 6182 | "test_dataset_loader_two_files_both_loadable" | ||
| 6183 | "test_dataset_loader_two_files_one_loadable" | ||
| 6184 | "test_dcmreader" | ||
| 6185 | "test_demreader" | ||
| 6186 | "test_ensight_multi_block_io" | ||
| 6187 | "test_ensightreader_arrays" | ||
| 6188 | "test_ensightreader_time_sets" | ||
| 6189 | "test_ensightreader_timepoints" | ||
| 6190 | "test_facetreader" | ||
| 6191 | "test_fluentcffreader" | ||
| 6192 | "test_gambitreader" | ||
| 6193 | "test_gaussian_cubes_reader" | ||
| 6194 | "test_gesignareader" | ||
| 6195 | "test_gif_reader" | ||
| 6196 | "test_hdf_reader" | ||
| 6197 | "test_hdr_reader" | ||
| 6198 | "test_init_cmap" | ||
| 6199 | "test_interpolate" | ||
| 6200 | "test_jpegreader" | ||
| 6201 | "test_legend_" | ||
| 6202 | "test_load_dataset_no_reader" | ||
| 6203 | "test_load_theme" | ||
| 6204 | "test_meta_image_reader" | ||
| 6205 | "test_multiblockplot3dreader" | ||
| 6206 | "test_nifti_reader" | ||
| 6207 | "test_nrrd_reader" | ||
| 6208 | "test_objreader" | ||
| 6209 | "test_only_screenshots_flag" | ||
| 6210 | "test_openfoam_case_type" | ||
| 6211 | "test_openfoam_cell_to_point_default" | ||
| 6212 | "test_openfoam_patch_arrays" | ||
| 6213 | "test_openfoam_skip_zero_time" | ||
| 6214 | "test_openfoamreader_active_time" | ||
| 6215 | "test_openfoamreader_arrays_time" | ||
| 6216 | "test_openfoamreader_read_data_time_point" | ||
| 6217 | "test_openfoamreader_read_data_time_value" | ||
| 6218 | "test_particle_reader" | ||
| 6219 | "test_partition" | ||
| 6220 | "test_pdbreader" | ||
| 6221 | "test_plot3dmetareader" | ||
| 6222 | "test_plot_return_img_with_cpos" | ||
| 6223 | "test_plot_return_img_without_cpos" | ||
| 6224 | "test_png_reader" | ||
| 6225 | "test_pnm_reader" | ||
| 6226 | "test_prostar_reader" | ||
| 6227 | "test_protein_ribbon" | ||
| 6228 | "test_pvdreader" | ||
| 6229 | "test_pvdreader_no_part_group" | ||
| 6230 | "test_pvdreader_no_time_group" | ||
| 6231 | "test_read_cgns" | ||
| 6232 | "test_repr" | ||
| 6233 | "test_save_before_close_callback" | ||
| 6234 | "test_slc_reader" | ||
| 6235 | "test_stlreader" | ||
| 6236 | "test_tecplotreader" | ||
| 6237 | "test_tiff_reader" | ||
| 6238 | "test_timer" | ||
| 6239 | "test_translate_direction_collinear" | ||
| 6240 | "test_user_logo" | ||
| 6241 | "test_xdmf_reader" | ||
| 6242 | ;; XXX: incompatible with Numpy@2 | ||
| 6243 | ;; Drop when updating along with vtk. | ||
| 6244 | "test_check_subdtype_changes_type" | ||
| 6245 | ;; These tests try to download data from GitHub. | ||
| 6246 | "test_read_exodus" | ||
| 6247 | "test_nek5000_reader" | ||
| 6248 | "test_exodus_reader_ext" | ||
| 6249 | "test_exodus_reader_core" | ||
| 6250 | "test_exodus_blocks" | ||
| 6251 | "test_download_dataset_texture" | ||
| 6252 | "test_structured_grid_cast_to_explicit_structured_grid" | ||
| 6253 | "test_pad_image_multi_component_with_scalar" | ||
| 6254 | "test_pad_image_raises" | ||
| 6255 | "test_points_to_cells_and_cells_to_points_dimensions" | ||
| 6256 | ;; These tests download cow.vtp from GitHub. | ||
| 6257 | "test_meshio[cow_ugrid]" | ||
| 6258 | "test_meshio[points_only]" | ||
| 6259 | ;; Looks for pyproject.toml in installed package. | ||
| 6260 | "test_max_positional_args_matches_pyproject") | ||
| 6261 | " and not ")) | ||
| 6262 | #:phases | ||
| 6263 | #~(modify-phases %standard-phases | ||
| 6264 | ;; vtk check fails in sanity-check, comment out | ||
| 6265 | (add-after 'unpack 'patch-pyproject | ||
| 6266 | (lambda _ | ||
| 6267 | (substitute* "pyproject.toml" | ||
| 6268 | (("'vtk[^']*'," all) (string-append "#" all))))) | ||
| 6269 | (add-after 'unpack 'fix-failing-tests | ||
| 6270 | (lambda _ | ||
| 6271 | (substitute* "tests/plotting/test_plotting.py" | ||
| 6272 | (("\"\"\"Determine if using mesa.\"\"\"" all) | ||
| 6273 | (string-append all "\n return False"))) | ||
| 6274 | (substitute* "tests/test_meshio.py" | ||
| 6275 | (("cow = .*$" all) (string-append "#" all "\n")) | ||
| 6276 | ((", cow") "")))) | ||
| 6277 | ;; test phase writes files to $HOME | ||
| 6278 | (add-before 'check 'redirect-HOME | ||
| 6279 | (lambda _ | ||
| 6280 | (setenv "HOME" "/tmp")))))) | ||
| 6281 | (native-inputs | ||
| 6282 | (list nss-certs-for-test | ||
| 6283 | python-aiohttp | ||
| 6284 | python-ipython | ||
| 6285 | python-mypy | ||
| 6286 | python-pandas | ||
| 6287 | python-pytest-8 | ||
| 6288 | python-pytest-cases | ||
| 6289 | python-pytest-mock | ||
| 6290 | python-pytest-pyvista | ||
| 6291 | python-scipy | ||
| 6292 | python-tqdm | ||
| 6293 | python-trimesh | ||
| 6294 | which | ||
| 6295 | xorg-server-for-tests)) | ||
| 6296 | (propagated-inputs | ||
| 6297 | (list python-cmcrameri | ||
| 6298 | python-cmocean | ||
| 6299 | python-colorcet | ||
| 6300 | python-imageio | ||
| 6301 | python-matplotlib | ||
| 6302 | python-meshio | ||
| 6303 | python-numpy | ||
| 6304 | python-pillow | ||
| 6305 | python-pooch | ||
| 6306 | python-scooby | ||
| 6307 | vtk-9.5)) | ||
| 6308 | (home-page "https://docs.pyvista.org/") | ||
| 6309 | (synopsis "3D plotting and mesh analysis through VTK") | ||
| 6310 | (description | ||
| 6311 | "PyVista is... | ||
| 6312 | |||
| 6313 | @itemize | ||
| 6314 | @item @emph{Pythonic VTK}: a high-level API to the Visualization | ||
| 6315 | Toolkit (VTK); | ||
| 6316 | @item mesh data structures and filtering methods for spatial datasets; | ||
| 6317 | @item 3D plotting made simple and built for large/complex data geometries. | ||
| 6318 | @end itemize | ||
| 6319 | |||
| 6320 | This package provides a Pythonic, well-documented interface exposing VTK's | ||
| 6321 | powerful visualization backend to facilitate rapid prototyping, analysis, and | ||
| 6322 | visual integration of spatially referenced datasets.") | ||
| 6323 | (license license:expat))) | ||
| 6324 | |||
| 6325 | (define-public python-pyvistaqt | ||
| 6326 | (package | ||
| 6327 | (name "python-pyvistaqt") | ||
| 6328 | (version "0.11.3") | ||
| 6329 | (source | ||
| 6330 | (origin | ||
| 6331 | (method git-fetch) | ||
| 6332 | (uri (git-reference | ||
| 6333 | (url "https://github.com/pyvista/pyvistaqt") | ||
| 6334 | (commit version))) | ||
| 6335 | (file-name (git-file-name name version)) | ||
| 6336 | (sha256 | ||
| 6337 | (base32 "04f9cd98k463pdrpi8jby411x9mc0ih62gl0nv0h9w3r7pwl61yl")))) | ||
| 6338 | (build-system pyproject-build-system) | ||
| 6339 | (arguments | ||
| 6340 | (list | ||
| 6341 | #:phases | ||
| 6342 | #~(modify-phases %standard-phases | ||
| 6343 | (add-after 'unpack 'fix-pytest | ||
| 6344 | (lambda _ | ||
| 6345 | (substitute* "tests/conftest.py" | ||
| 6346 | (("pytest.skip") | ||
| 6347 | "pytest.mark.skipif")))) | ||
| 6348 | (add-before 'check 'before-check | ||
| 6349 | (lambda _ | ||
| 6350 | ;; Testing requires write access. | ||
| 6351 | (setenv "HOME" "/tmp") | ||
| 6352 | ;; Testing requires a running xorg server. | ||
| 6353 | (system "Xvfb :99 -screen 0 1024x768x24 &") | ||
| 6354 | (setenv "DISPLAY" ":99.0")))))) | ||
| 6355 | (propagated-inputs (list python-pyvista python-qtpy)) | ||
| 6356 | (native-inputs (list python-ipython | ||
| 6357 | python-matplotlib | ||
| 6358 | python-numpy | ||
| 6359 | python-pyqt-6 | ||
| 6360 | python-pytest | ||
| 6361 | python-pytest-qt | ||
| 6362 | python-setuptools | ||
| 6363 | python-sphinx-gallery | ||
| 6364 | xorg-server)) | ||
| 6365 | (home-page "https://github.com/pyvista/pyvistaqt") | ||
| 6366 | (synopsis "Qt support for PyVista") | ||
| 6367 | (description | ||
| 6368 | "@code{pyvistaqt} is a helper module for @code{pyvista} to enable you to | ||
| 6369 | plot using Qt by placing a vtk-widget into a background renderer. This can be | ||
| 6370 | quite useful when you desire to update your plot in real-time.") | ||
| 6371 | (license license:expat))) | ||
| 6372 | |||
| 6373 | (define-public python-simplespectral | ||
| 6374 | (package | ||
| 6375 | (name "python-simplespectral") | ||
| 6376 | (version "1.0.0") | ||
| 6377 | (source | ||
| 6378 | (origin | ||
| 6379 | (method url-fetch) | ||
| 6380 | (uri (pypi-uri "SimpleSpectral" version)) | ||
| 6381 | (sha256 | ||
| 6382 | (base32 "0qh3xwdv9cwcqdamvglrhm586p4yaq1hd291py1fvykhk2a2d4w6")))) | ||
| 6383 | (build-system pyproject-build-system) | ||
| 6384 | (arguments | ||
| 6385 | (list #:tests? #f)) ;No tests, also not in git repository. | ||
| 6386 | (native-inputs | ||
| 6387 | (list python-setuptools)) | ||
| 6388 | (propagated-inputs | ||
| 6389 | (list python-numpy python-scipy)) | ||
| 6390 | (home-page "https://github.com/xmikos/simplespectral") | ||
| 6391 | (synopsis "FFT module for Python") | ||
| 6392 | (description | ||
| 6393 | "This package provides a simplified @code{scipy.signal.spectral} module | ||
| 6394 | to do spectral analysis in Python.") | ||
| 6395 | (license license:expat))) | ||
| 6396 | |||
| 6397 | (define-public python-pods | ||
| 6398 | (package | ||
| 6399 | (name "python-pods") | ||
| 6400 | (version "0.1.17") | ||
| 6401 | (source | ||
| 6402 | (origin | ||
| 6403 | (method url-fetch) | ||
| 6404 | (uri (pypi-uri "pods" version)) | ||
| 6405 | (sha256 | ||
| 6406 | (base32 "1z57jdwml2jzr2dq20p7pzx3ayhajgfd2d0xqjvgzx576hp2z1ac")))) | ||
| 6407 | (build-system pyproject-build-system) | ||
| 6408 | ;; Tests depend on Nose framework and try to download test data from | ||
| 6409 | ;; <https://github.com/SheffieldML/GPmat>. | ||
| 6410 | (arguments (list #:tests? #f)) | ||
| 6411 | (native-inputs | ||
| 6412 | (list python-poetry-core)) | ||
| 6413 | (propagated-inputs | ||
| 6414 | (list python-pandas | ||
| 6415 | python-pyyaml | ||
| 6416 | python-scipy | ||
| 6417 | python-tables)) | ||
| 6418 | (home-page "https://github.com/lawrennd/ods") | ||
| 6419 | (synopsis "Python software for Open Data Science") | ||
| 6420 | (description "This package provides utilities and tools for open data | ||
| 6421 | science including tools for accessing data sets in Python.") | ||
| 6422 | (license license:bsd-3))) | ||
| 6423 | |||
| 6424 | (define-public python-polars-runtime-32 | ||
| 6425 | (package | ||
| 6426 | (name "python-polars-runtime-32") | ||
| 6427 | (version "1.38.1") | ||
| 6428 | (source | ||
| 6429 | (origin | ||
| 6430 | (method url-fetch) | ||
| 6431 | (uri (pypi-uri "polars_runtime_32" version)) | ||
| 6432 | (sha256 | ||
| 6433 | (base32 "1v72zkyhcziiizpymjlh2d5rwnkmvhlp18ln8brp31y5yp8hxwh4")))) | ||
| 6434 | (build-system pyproject-build-system) | ||
| 6435 | (arguments | ||
| 6436 | (list | ||
| 6437 | #:imported-modules `(,@%cargo-build-system-modules | ||
| 6438 | ,@%pyproject-build-system-modules) | ||
| 6439 | #:modules '(((guix build cargo-build-system) #:prefix cargo:) | ||
| 6440 | (guix build pyproject-build-system) | ||
| 6441 | (guix build utils)) | ||
| 6442 | ;; There are rust tests which would be costly to run, but no python ones. | ||
| 6443 | #:tests? #f | ||
| 6444 | #:phases | ||
| 6445 | #~(modify-phases %standard-phases | ||
| 6446 | (add-after 'unpack 'build-without-rust-nightly | ||
| 6447 | (lambda _ | ||
| 6448 | ;; Add cargo flags that allow compilation without Rust nightly. | ||
| 6449 | (substitute* "pyproject.toml" | ||
| 6450 | ((".*tool.maturin.*" all) | ||
| 6451 | (string-append all "no-default-features = true\n" | ||
| 6452 | "features = [\"full\"]\n"))))) | ||
| 6453 | (add-after 'unpack 'fix-tikv-jemallocator | ||
| 6454 | (lambda _ | ||
| 6455 | ;; removes a patch.crates-io option that is packaged in | ||
| 6456 | ;; gnu/packages/rust-sources: rust-tikv-jemallocator-for-polars | ||
| 6457 | (substitute* "Cargo.toml" | ||
| 6458 | (("^tikv-jemallocator.*") "")))) | ||
| 6459 | ;; jemalloc needs unbundling for tikv-jemallocator-sys | ||
| 6460 | (add-before 'build 'override-jemalloc | ||
| 6461 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 6462 | (let ((jemalloc (assoc-ref inputs "jemalloc"))) | ||
| 6463 | ;; This flag is needed when not using the bundled jemalloc. | ||
| 6464 | ;; https://github.com/tikv/jemallocator/issues/19 | ||
| 6465 | (setenv "CARGO_FEATURE_UNPREFIXED_MALLOC_ON_SUPPORTED_PLATFORMS" "1") | ||
| 6466 | (setenv "JEMALLOC_OVERRIDE" | ||
| 6467 | (string-append jemalloc "/lib/libjemalloc_pic.a"))))) | ||
| 6468 | (add-after 'unpack 'prepare-cargo-build-system | ||
| 6469 | (lambda args | ||
| 6470 | (for-each | ||
| 6471 | (lambda (phase) | ||
| 6472 | (format #t "Running cargo phase: ~a~%" phase) | ||
| 6473 | (apply (assoc-ref cargo:%standard-phases phase) | ||
| 6474 | #:cargo-target #$(cargo-triplet) | ||
| 6475 | args)) | ||
| 6476 | '(prepare-rust-crates | ||
| 6477 | unpack-rust-crates | ||
| 6478 | configure | ||
| 6479 | check-for-pregenerated-files | ||
| 6480 | patch-cargo-checksums))))))) | ||
| 6481 | (inputs | ||
| 6482 | (cons* jemalloc | ||
| 6483 | lz4 | ||
| 6484 | (list zstd "lib") | ||
| 6485 | (cargo-inputs 'python-polars-runtime-32))) | ||
| 6486 | (native-inputs | ||
| 6487 | (append | ||
| 6488 | (list maturin | ||
| 6489 | pkg-config | ||
| 6490 | rust | ||
| 6491 | `(,rust "cargo")) | ||
| 6492 | (or (and=> (%current-target-system) | ||
| 6493 | (compose list make-rust-sysroot)) | ||
| 6494 | '()))) | ||
| 6495 | (home-page "https://pola.rs/") | ||
| 6496 | (synopsis "Blazingly fast DataFrame library") | ||
| 6497 | (description "Polars is an analytical query engine written for DataFrames. | ||
| 6498 | It is designed to be fast, easy to use and expressive.") | ||
| 6499 | (properties '(("upstream-name" . "polars-runtime-32") | ||
| 6500 | (tunable? . #true))) | ||
| 6501 | (license license:expat))) | ||
| 6502 | |||
| 6503 | (define-public python-polars | ||
| 6504 | (package | ||
| 6505 | (name "python-polars") | ||
| 6506 | (version "1.38.1") | ||
| 6507 | (source | ||
| 6508 | (origin | ||
| 6509 | (method url-fetch) | ||
| 6510 | (uri (pypi-uri "polars" version)) | ||
| 6511 | (sha256 | ||
| 6512 | (base32 "0fc2fx2p72g01nhhhfs1fzbwz58rcj7zppascanq1y2f6kjjnfl0")))) | ||
| 6513 | (build-system pyproject-build-system) | ||
| 6514 | ;; The wheel doesn't have tests. | ||
| 6515 | ;; TODO On the next update, hopefully if delete-all-but has made it | ||
| 6516 | ;; into guix, switch to a git-source and keep src/polars and tests | ||
| 6517 | ;; subdirectories. | ||
| 6518 | (arguments (list #:tests? #f)) | ||
| 6519 | (propagated-inputs (list python-polars-runtime-32)) | ||
| 6520 | (native-inputs (list python-setuptools)) | ||
| 6521 | (home-page "https://pola.rs/") | ||
| 6522 | (synopsis "Blazingly fast DataFrame library") | ||
| 6523 | (description | ||
| 6524 | "Polars is a DataFrame library for manipulating structured data.") | ||
| 6525 | (license license:expat))) | ||
| 6526 | |||
| 6527 | (define-public python-pydicom | ||
| 6528 | (package | ||
| 6529 | (name "python-pydicom") | ||
| 6530 | (version "2.4.4") | ||
| 6531 | (source (origin | ||
| 6532 | (method git-fetch) | ||
| 6533 | (uri (git-reference | ||
| 6534 | (url "https://github.com/pydicom/pydicom") | ||
| 6535 | (commit (string-append "v" version)))) | ||
| 6536 | (file-name (git-file-name name version)) | ||
| 6537 | (sha256 | ||
| 6538 | (base32 | ||
| 6539 | "0ksyyc1hbhyqy289a2frn84ss29fb7czirx3dkxx56f4ia33b4c8")))) | ||
| 6540 | (build-system pyproject-build-system) | ||
| 6541 | (arguments | ||
| 6542 | (list | ||
| 6543 | #:test-flags | ||
| 6544 | ;; Skip tests that require networking. | ||
| 6545 | #~(list "-k" (string-append | ||
| 6546 | "not test_jpeg_ls_pixel_data.py" | ||
| 6547 | " and not test_gdcm_pixel_data.py" | ||
| 6548 | " and not test_pillow_pixel_data.py" | ||
| 6549 | " and not test_rle_pixel_data.py" | ||
| 6550 | " and not Test_JPEG_LS_Lossless_transfer_syntax" | ||
| 6551 | " and not test_numpy_pixel_data.py" | ||
| 6552 | " and not test_data_manager.py" | ||
| 6553 | " and not test_handler_util.py" | ||
| 6554 | " and not test_overlay_np.py" | ||
| 6555 | " and not test_encoders_pydicom.py" | ||
| 6556 | " and not test_encaps.py" | ||
| 6557 | " and not test_reading_ds_with_known_tags_with_UN_VR" | ||
| 6558 | " and not TestDatasetOverlayArray" | ||
| 6559 | " and not TestReader" | ||
| 6560 | " and not test_filewriter.py")))) | ||
| 6561 | (native-inputs (list python-pytest python-flit-core)) | ||
| 6562 | (inputs (list gdcm libjpeg-turbo)) | ||
| 6563 | (propagated-inputs (list python-numpy python-pillow)) | ||
| 6564 | (home-page "https://github.com/pydicom/pydicom") | ||
| 6565 | (synopsis "Python library for reading and writing DICOM data") | ||
| 6566 | (description "@code{python-pydicom} is a Python library for reading and | ||
| 6567 | writing DICOM medical imaging data. It can read, modify and write DICOM | ||
| 6568 | data.") | ||
| 6569 | (license license:expat))) | ||
| 6570 | |||
| 6571 | (define-public python-supersmoother | ||
| 6572 | ;; 0.4 was release in 2017, there a lot of changes on master branch | ||
| 6573 | ;; providing tests fixtures. | ||
| 6574 | (let ((commit "0a81544ac6bb33bdb08deeba69e97a4ceebcebcf") | ||
| 6575 | (revision "0")) | ||
| 6576 | (package | ||
| 6577 | (name "python-supersmoother") | ||
| 6578 | (version (git-version "0.4" revision commit)) | ||
| 6579 | (source | ||
| 6580 | (origin | ||
| 6581 | (method git-fetch) ; no package in PyPI | ||
| 6582 | (uri (git-reference | ||
| 6583 | (url "https://github.com/jakevdp/supersmoother") | ||
| 6584 | (commit commit))) | ||
| 6585 | (file-name (git-file-name name version)) | ||
| 6586 | (sha256 | ||
| 6587 | (base32 "1r79nssw4a44zizvqg8y685nv3asdfj440s227phfww6kz33s3la")))) | ||
| 6588 | (build-system pyproject-build-system) | ||
| 6589 | (native-inputs | ||
| 6590 | (list python-pytest | ||
| 6591 | python-scipy | ||
| 6592 | python-setuptools)) | ||
| 6593 | (propagated-inputs | ||
| 6594 | (list python-numpy)) | ||
| 6595 | (home-page "http://github.com/jakevdp/supersmoother") | ||
| 6596 | (synopsis "Python implementation of Friedman's Supersmoother") | ||
| 6597 | (description | ||
| 6598 | "This package provides an efficient implementation of | ||
| 6599 | @url{https://www.slac.stanford.edu/pubs/slacpubs/3250/slac-pub-3477.pdf, | ||
| 6600 | Friedman's SuperSmoother} based in Python. It makes use of numpy for fast | ||
| 6601 | numerical computation.") | ||
| 6602 | (license license:bsd-2)))) | ||
| 6603 | |||
| 6604 | (define-public python-pylems | ||
| 6605 | (package | ||
| 6606 | (name "python-pylems") | ||
| 6607 | (version "0.6.9") | ||
| 6608 | (source | ||
| 6609 | (origin | ||
| 6610 | (method git-fetch) | ||
| 6611 | (uri (git-reference | ||
| 6612 | (url "https://github.com/LEMS/pylems") | ||
| 6613 | (commit (string-append "v" version)))) | ||
| 6614 | (file-name (git-file-name name version)) | ||
| 6615 | (sha256 | ||
| 6616 | (base32 "0gimdx89cdla1b6zzkdrmj979nn2zy2475qvpwxxas0iv27ql0vj")))) | ||
| 6617 | (build-system pyproject-build-system) | ||
| 6618 | (arguments | ||
| 6619 | ;; Disable tests that require networking | ||
| 6620 | (list #:test-flags #~(list "./lems/test" "-k" "not test_load_write_xml"))) | ||
| 6621 | (native-inputs (list python-setuptools python-pytest)) | ||
| 6622 | (propagated-inputs (list python-lxml python-matplotlib)) | ||
| 6623 | (home-page "https://github.com/LEMS/pylems") | ||
| 6624 | (synopsis | ||
| 6625 | "Python support for the Low Entropy Model Specification language (LEMS)") | ||
| 6626 | (description "A @acronym{LEMS, Low Entropy Model Specification} simulator | ||
| 6627 | written in Python which can be used to run NeuroML2 models.") | ||
| 6628 | (license license:lgpl3))) | ||
| 6629 | |||
| 6630 | (define-public python-pynrrd | ||
| 6631 | (package | ||
| 6632 | (name "python-pynrrd") | ||
| 6633 | (version "1.1.3") | ||
| 6634 | (source (origin | ||
| 6635 | (method git-fetch) | ||
| 6636 | (uri (git-reference | ||
| 6637 | (url "https://github.com/mhe/pynrrd") | ||
| 6638 | (commit (string-append "v" version)))) | ||
| 6639 | (file-name (git-file-name name version)) | ||
| 6640 | (sha256 | ||
| 6641 | (base32 | ||
| 6642 | "1l0hjbqzf5i1bmpxpblpyyqkhci3mb5n07x6hqf2a91hggfyrvda")))) | ||
| 6643 | (build-system pyproject-build-system) | ||
| 6644 | (native-inputs | ||
| 6645 | (list python-pytest python-setuptools)) | ||
| 6646 | (propagated-inputs | ||
| 6647 | (list python-numpy)) | ||
| 6648 | (home-page "https://github.com/mhe/pynrrd") | ||
| 6649 | (synopsis "Python module for reading and writing NRRD files") | ||
| 6650 | (description | ||
| 6651 | "@code{pynrrd} is a Python module for reading and writing @acronym{NRRD, | ||
| 6652 | Nearly Raw Raster Data} files (format designed to support scientific | ||
| 6653 | visualization and image processing involving N-dimensional raster data) into | ||
| 6654 | and from numpy arrays.") | ||
| 6655 | (license license:expat))) | ||
| 6656 | |||
| 6657 | (define-public python-pynsee | ||
| 6658 | (package | ||
| 6659 | (name "python-pynsee") | ||
| 6660 | (version "0.1.8") | ||
| 6661 | (source | ||
| 6662 | (origin | ||
| 6663 | (method url-fetch) | ||
| 6664 | (uri (pypi-uri "pynsee" version)) | ||
| 6665 | (sha256 | ||
| 6666 | (base32 "1w084ynwdd9f4wpcnakqc0nxcbj9gr8vppv4rd258i3dp1qq4sw5")))) | ||
| 6667 | (build-system pyproject-build-system) | ||
| 6668 | (arguments (list #:tests? #f)) ; XXX: Tests require network access. | ||
| 6669 | (native-inputs | ||
| 6670 | (list python-setuptools | ||
| 6671 | python-wheel)) | ||
| 6672 | (propagated-inputs | ||
| 6673 | (list python-appdirs | ||
| 6674 | python-openpyxl | ||
| 6675 | python-pandas | ||
| 6676 | python-platformdirs | ||
| 6677 | python-pyarrow | ||
| 6678 | python-requests | ||
| 6679 | python-shapely | ||
| 6680 | python-tqdm | ||
| 6681 | python-unidecode | ||
| 6682 | python-urllib3 | ||
| 6683 | python-xlrd)) | ||
| 6684 | (home-page "https://pynsee.readthedocs.io") | ||
| 6685 | (synopsis | ||
| 6686 | "Tools to Easily Search and Download French Data From INSEE and IGN APIs") | ||
| 6687 | (description | ||
| 6688 | "This package provides tools to easily search and download French data | ||
| 6689 | from INSEE and IGN APIs. This data includes more than 150 000 macroeconomic | ||
| 6690 | series, a dozen datasets of local french data, numerous sources available on | ||
| 6691 | @url{insee.fr}, geographical limits of administrative areas taken from IGN as | ||
| 6692 | well as key metadata and SIRENE database containing data on all French | ||
| 6693 | compagnies.") | ||
| 6694 | (license license:expat))) | ||
| 6695 | |||
| 6696 | (define-public python-pyqtgraph | ||
| 6697 | (package | ||
| 6698 | (name "python-pyqtgraph") | ||
| 6699 | (version "0.13.7") | ||
| 6700 | (source | ||
| 6701 | (origin | ||
| 6702 | (method url-fetch) | ||
| 6703 | (uri (pypi-uri "pyqtgraph" version)) | ||
| 6704 | (sha256 | ||
| 6705 | (base32 "1qyr461hcvhgy02slfkgrbip2xwa8zz6dvmi1476v6f66lclzy34")))) | ||
| 6706 | (build-system pyproject-build-system) | ||
| 6707 | (arguments | ||
| 6708 | ;; tests: 949 passed, 1356 skipped, 2 deselected, 8 xfailed, 130 warnings | ||
| 6709 | (list #:test-flags | ||
| 6710 | ;; Failed: CALL ERROR: Exceptions caught in Qt event loop. | ||
| 6711 | #~(list "--deselect=tests/exporters/test_svg.py::test_plotscene" | ||
| 6712 | ;; The test_reload test fails. It suggests to disable | ||
| 6713 | ;; assert rewriting in Pytest, but it still doesn't pass. | ||
| 6714 | "-k" "not test_reload" | ||
| 6715 | ;; Run unit tets only. | ||
| 6716 | "tests") | ||
| 6717 | #:phases | ||
| 6718 | #~(modify-phases %standard-phases | ||
| 6719 | (add-before 'check 'set-qpa | ||
| 6720 | (lambda _ | ||
| 6721 | (setenv "QT_QPA_PLATFORM" "offscreen")))))) | ||
| 6722 | (native-inputs | ||
| 6723 | (list python-pytest | ||
| 6724 | ;; Do not propagate Qt5/Qt6 let the user of the package to select | ||
| 6725 | ;; any supported one, see | ||
| 6726 | ;; <https://pyqtgraph.readthedocs.io/en/pyqtgraph-0.13.7> | ||
| 6727 | ;; </getting_started/how_to_use.html#pyqt-and-pyside>. | ||
| 6728 | python-pyqt-6 | ||
| 6729 | python-pytest-qt | ||
| 6730 | python-setuptools)) | ||
| 6731 | (propagated-inputs | ||
| 6732 | (list python-h5py | ||
| 6733 | python-numpy | ||
| 6734 | python-pyopengl | ||
| 6735 | python-scipy)) | ||
| 6736 | (home-page "https://www.pyqtgraph.org") | ||
| 6737 | (synopsis "Scientific graphics and GUI library for Python") | ||
| 6738 | (description | ||
| 6739 | "PyQtGraph is a Pure-python graphics library for PyQt5, PyQt6, PySide2 | ||
| 6740 | and PySide6. It is intended for use in mathematics, scientific or engineering | ||
| 6741 | applications.") | ||
| 6742 | (license license:expat))) | ||
| 6743 | |||
| 6744 | (define-public pyzo | 6781 | (define-public pyzo |
| 6745 | (package | 6782 | (package |
| 6746 | (name "pyzo") | 6783 | (name "pyzo") |
| @@ -6887,45 +6924,7 @@ providing a clean and modern domain specific specification language (DSL) in | |||
| 6887 | Python style, together with a fast and comfortable execution environment.") | 6924 | Python style, together with a fast and comfortable execution environment.") |
| 6888 | (license license:expat))) | 6925 | (license license:expat))) |
| 6889 | 6926 | ||
| 6890 | (define-public python-orsopy | ||
| 6891 | (package | ||
| 6892 | (name "python-orsopy") | ||
| 6893 | (version "1.2.1") | ||
| 6894 | (source | ||
| 6895 | (origin | ||
| 6896 | (method git-fetch) | ||
| 6897 | (uri (git-reference | ||
| 6898 | (url "https://github.com/reflectivity/orsopy") | ||
| 6899 | (commit (string-append "v" version)))) | ||
| 6900 | (file-name (git-file-name name version)) | ||
| 6901 | (sha256 | ||
| 6902 | (base32 "15av7b38h9x0f09dzxb111r2kxm6an461l9ajb01r8r7mv7m5bw9")))) | ||
| 6903 | (build-system pyproject-build-system) | ||
| 6904 | (arguments | ||
| 6905 | (list | ||
| 6906 | #:test-flags | ||
| 6907 | ;; These tests require network access. | ||
| 6908 | #~(cons* "--ignore=orsopy/slddb/tests/test_webapi.py" | ||
| 6909 | (map (lambda (test) | ||
| 6910 | (string-append "--deselect=orsopy/fileio/tests/" | ||
| 6911 | "test_model_language.py::" test)) | ||
| 6912 | (list "TestSubStack::test_resolve_layers" | ||
| 6913 | "TestMaterial::test_density_lookup_elements" | ||
| 6914 | "TestSampleModel::test_resolve_to_layers"))))) | ||
| 6915 | (propagated-inputs | ||
| 6916 | (list python-numpy python-pyyaml python-jsonschema python-h5py)) | ||
| 6917 | (native-inputs | ||
| 6918 | (list python-pint python-pytest python-setuptools)) | ||
| 6919 | (home-page "https://github.com/reflectivity/orsopy") | ||
| 6920 | (synopsis "Open Reflectometry Standards Organization Python tools") | ||
| 6921 | (description | ||
| 6922 | "This package provides Python tools for the Open Reflectometry Standards | ||
| 6923 | Organization (ORSO). It includes utilities for working with reflectometry | ||
| 6924 | data files and the ORSO file format.") | ||
| 6925 | (license license:expat))) | ||
| 6926 | |||
| 6927 | ;;; | 6927 | ;;; |
| 6928 | ;;; Avoid adding new packages to the end of this file. To reduce the chances | 6928 | ;;; Avoid adding new packages to the end of this file. To reduce the chances |
| 6929 | ;;; of a merge conflict, place them above by existing packages with similar | 6929 | ;;; of a merge conflict, place them above in alphabetical order. |
| 6930 | ;;; functionality or similar names. | ||
| 6931 | ;;; | 6930 | ;;; |
