gnu: python-pandera: Update to 0.26.1.

* gnu/packages/python-science.scm (python-pandera): Update to 0.26.1.
[source]: Switch to url-fetch, PyPI archive provides tests and build
successfully while git version missed a lot of sub module after install.
[arguments] <test-flags>: Rework skipped tests and ignored test files.
[inputs]: Add python-dask, python-distributed, python-geopandas,
python-hypothesis, python-modin, python-numpy, python-pandas,
python-scipy, and python-shapely.
[propagated-inputs]: Remove python-hypothesis-next, python-modin,
python-multimethod, python-numpy, python-pandas, python-pandas-stubs,
python-scipy, and python-wrapt; add python-typing-extensions.
[native-inputs]: Remove python-dask, python-fastapi, python-geopandas,
python-pyarrow, python-sphinx, and python-wheel; add python-joblib and
python-setuptools-scm.

Change-Id: I376f11e39c47875a5a70ee5f7d4653dd77403e28
This commit is contained in:
Sharlatan Hellseher 2025-09-24 21:46:44 +01:00
parent d99b119794
commit 8353cbeaf2
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -3853,76 +3853,72 @@ idea of the remaining amount of computation to be done.")
(define-public python-pandera (define-public python-pandera
(package (package
(name "python-pandera") (name "python-pandera")
;; FIXME: The latest version requires hypothesis >= 6.92.7, which can't be (version "0.26.1")
;; picked from python-hypothesis-next for some reason.
(version "0.18.0")
(source (source
(origin (origin
;; No tests in the PyPI tarball. (method url-fetch)
(method git-fetch) (uri (pypi-uri "pandera" version))
(uri (git-reference
(url "https://github.com/unionai-oss/pandera")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256 (sha256
(base32 "14b5aij5zjkwvsimg0v00qvp59mhhq7ljim4qghcn432vkg9gh47")))) (base32 "10px2wy3rb8gg2jyry8962yrd0m3jq88wgjcpyrk23bp55j5m9c1"))))
(build-system pyproject-build-system) (build-system pyproject-build-system)
(arguments (arguments
(list (list
;; tests: 3093 passed, 48 skipped, 21 xfailed, 8232 warnings
#:test-flags #:test-flags
#~(list "--numprocesses" (number->string (min 8 (parallel-job-count))) ;; With higher threads count tests randomly fail during collection.
#~(list "--numprocesses" (number->string (min 4 (parallel-job-count)))
;; TODO: Ignore tests for not packaged python-ibis-framework,
;; python-polars, and python-pyspark.
"--ignore=tests/ibis"
"--ignore=tests/polars"
"--ignore=tests/pyspark" "--ignore=tests/pyspark"
"-k" (string-join "-k" (string-join
;; Failed: DID NOT RAISE <class 'pandera.errors.SchemaError'> ;; Network access is required.
(list "not test_from_records_validates_the_schema" (list "not test_items_endpoint"
"test_init_pandas_dataframe_errors" "test_transactions_endpoint"
"test_schema_dtype_crs_without_coerce" "test_upload_file_endpoint"
"test_schema_from_dataframe" ;; AssertionError: assert dtype('bool') == 'object'
"test_schema_model" "test_index_dtypes[dask-Index-True-bool]"
"test_validate_coerce_on_init" "test_index_dtypes[dask-Index-False-bool]"
;; multimethod.DispatchError: ('str_length: 0 ;; TypeError: __class__ assignment: 'GeoDataFrame'
;; methods found', (<class ;; object layout differs from 'DataFrame'
;; 'pandas.core.series.Series'>, <class 'NoneType'>, "test_schema_model[data0-True]"
;; <class 'int'>), []) "test_schema_from_dataframe[data1-True]"
"test_succeeding" "test_schema_no_geometry")
"test_failing"
"test_failing_with_none"
;; pandera.errors.SchemaError: Error while executing
;; check function: KeyError("foo")
"test_check_groups"
;; [pandas_series.py-plugin_mypy.ini-expected_errors13]
;; - assert 1 == 2
"test_pandas_stubs_false_positives"
;; TypeError: type 'Series' is not subscriptable
"test_pandas_modules_importable")
" and not ")))) " and not "))))
;; Pandera comes with a lot of extras. We test as many as possible, but do (native-inputs
;; not include all of them in the propagated-inputs. Currently, we have to (list python-joblib
;; skip the pyspark and io tests due to missing packages python-pyspark python-pytest
;; and python-frictionless. python-pytest-asyncio
(propagated-inputs (list python-hypothesis-next ;strategies extra python-pytest-xdist
python-modin python-setuptools
python-multimethod python-setuptools-scm
python-numpy python-uvicorn))
python-packaging (inputs
python-pandas ;; [optional]
python-pandas-stubs ;mypy extra ;; Pandera comes with a lot of extras. We test as many as possible, but do
python-pydantic-2 ;; not include all of them in the propagated-inputs. Currently, we have to
python-scipy ;hypotheses extra ;; skip the pyspark and io tests due to missing packages python-pyspark
python-typeguard ;; and python-frictionless.
python-typing-inspect (list python-dask
python-wrapt)) python-distributed
(native-inputs (list python-dask ;dask extra python-geopandas
python-fastapi ;fastapi extra python-hypothesis
python-geopandas ;geopandas extra ;; python-ibis-framework ;missing from Guix
python-pyarrow ;needed to run fastapi tests python-modin
python-pytest python-numpy
python-pytest-asyncio python-pandas
python-pytest-xdist ;; python-polars ;missing from Guix
python-setuptools ;; python-pyspark ;missing from Guix
python-sphinx ;; python-ray ;missing from Guix
python-uvicorn ;needed to run fastapi tests python-scipy
python-wheel)) python-shapely))
(propagated-inputs
(list python-packaging
python-pydantic-2
python-typeguard
python-typing-extensions
python-typing-inspect))
(home-page "https://github.com/unionai-oss/pandera") (home-page "https://github.com/unionai-oss/pandera")
(synopsis "Perform data validation on dataframe-like objects") (synopsis "Perform data validation on dataframe-like objects")
(description (description