GNU bug report logs -
#68391
[PATCH 0/3] Add python-pandera
Previous Next
Reported by: Troy Figiel <troy <at> troyfigiel.com>
Date: Thu, 11 Jan 2024 21:39:01 UTC
Severity: normal
Tags: patch
Done: Mathieu Othacehe <othacehe <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 68391 in the body.
You can then email your comments to 68391 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#68391
; Package
guix-patches
.
(Thu, 11 Jan 2024 21:39:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Troy Figiel <troy <at> troyfigiel.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Thu, 11 Jan 2024 21:39:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This patch series adds python-pandera and its dependencies.
Unfortunately, directly upgrading python-typeguard to a more recent
version breaks a variety of packages (it has 300+ dependents). For that
reason, python-typeguard-4 has been introduced.
Troy Figiel (3):
gnu: Add python-typeguard-4.
gnu: Add python-pandas-stubs.
gnu: Add python-pandera.
gnu/packages/python-science.scm | 133 ++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 18 +++++
2 files changed, 151 insertions(+)
base-commit: 637b72e2b83a6332849218ef1f193124fa8239eb
--
2.42.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68391
; Package
guix-patches
.
(Thu, 11 Jan 2024 21:41:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 68391 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-xyz.scm (python-typeguard-4): New variable.
---
gnu/packages/python-xyz.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 46a5e81cb4..d7bbdbdb13 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24804,6 +24804,24 @@ (define-public python-typeguard
with PEP 484 argument (and return) type annotations.")
(license license:expat)))
+(define-public python-typeguard-4
+ (package
+ (inherit python-typeguard)
+ (name "python-typeguard")
+ ;; This is the latest version we can use, becaue python-typeguard >= 4.0.1
+ ;; requires python-typing-extensions >= 4.7.0.
+ (version "4.0.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "typeguard" version))
+ (sha256
+ (base32 "11yrc7pv2fajmicwiyc92sb5gphlw3zbxww8f2prrsh6rgdv6kqr"))))
+ (build-system pyproject-build-system)
+ (arguments
+ '())
+ (propagated-inputs (list python-typing-extensions))))
+
(define-public bpython
(package
(name "bpython")
--
2.42.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68391
; Package
guix-patches
.
(Thu, 11 Jan 2024 21:43:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 68391 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-science.scm (python-pandas-stubs): New variable.
---
gnu/packages/python-science.scm | 58 +++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 8065de0e99..d8e0b343fb 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -561,6 +561,64 @@ (define-public python-pandas
doing practical, real world data analysis in Python.")
(license license:bsd-3)))
+(define-public python-pandas-stubs
+ (package
+ (name "python-pandas-stubs")
+ ;; The versioning follows that of Pandas and uses the date of the
+ ;; python-pandas-stubs release. This is the latest version of
+ ;; python-pandas-stubs for python-pandas 1.4.4.
+ (version "1.4.4.220919")
+ (source
+ (origin
+ ;; No tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/pandas-dev/pandas-stubs")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14fhj1y71akwl41ws7cpazsbq5b8wf4rwaydqq2h39q7gylpcp99"))))
+ (build-system pyproject-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-before 'check 'prepare-x
+ (lambda _
+ (system "Xvfb &")
+ (setenv "DISPLAY" ":0")
+ ;; xsel needs to write a log file.
+ (setenv "HOME"
+ (getcwd)))))))
+ (propagated-inputs (list python-types-pytz))
+ ;; Add python-fastparquet to native inputs once it has been packaged. Its
+ ;; tests will be skipped for now.
+ (native-inputs (list python-lxml
+ python-matplotlib
+ python-pandas
+ python-poetry-core
+ python-pyarrow
+ python-pyreadstat
+ python-pytest
+ python-scipy
+ python-sqlalchemy
+ python-tables
+ python-tabulate
+ python-xarray
+ ;; Needed to test clipboard support.
+ which
+ xclip
+ xorg-server-for-tests
+ xsel))
+ (home-page "https://pandas.pydata.org")
+ (synopsis "Type annotations for pandas")
+ (description
+ "This package contains public type stubs for @code{python-pandas},
+following the convention of providing stubs in a separate package, as
+specified in @acronym{PEP, Python Enhancement Proposal} 561. The stubs cover
+the most typical use cases of @code{python-pandas}. In general, these stubs
+are narrower than what is possibly allowed by pandas, but follow a convention
+of suggesting best recommended practices for using @code{python-pandas}.")
+ (license license:bsd-3)))
+
(define-public python-pythran
(package
(name "python-pythran")
--
2.42.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68391
; Package
guix-patches
.
(Thu, 11 Jan 2024 21:43:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 68391 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/python-science.scm (python-pandera): New variable.
---
gnu/packages/python-science.scm | 75 +++++++++++++++++++++++++++++++++
1 file changed, 75 insertions(+)
diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index d8e0b343fb..f82cbdb79c 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -619,6 +619,81 @@ (define-public python-pandas-stubs
of suggesting best recommended practices for using @code{python-pandas}.")
(license license:bsd-3)))
+(define-public python-pandera
+ (package
+ (name "python-pandera")
+ (version "0.17.2")
+ (source
+ (origin
+ ;; No tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/unionai-oss/pandera")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1mnqk583z90k1n0z3lfa4rd0ng40v7hqfk7phz5gjmxlzfjbxa1x"))
+ (modules '((guix build utils)))
+ ;; These tests require PySpark. We need to remove the entire directory,
+ ;; since the conftest.py in this directory contains a PySpark import.
+ ;; (See: https://github.com/pytest-dev/pytest/issues/7452)
+ (snippet '(delete-file-recursively "tests/pyspark"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags '(list "-k"
+ (string-append
+ ;; Needs python-pandas >= 1.5
+ "not test_python_std_list_dict_generics"
+ " and not test_python_std_list_dict_empty_and_none"
+ " and not test_pandas_modules_importable"))))
+ ;; Pandera comes with a lot of extras. We test as many as possible, but do
+ ;; not include all of them in the propagated-inputs. Currently, we have to
+ ;; skip the pyspark and io tests due to missing packages python-pyspark
+ ;; and python-frictionless.
+ (propagated-inputs (list python-hypothesis ;strategies extra
+ python-multimethod
+ python-numpy
+ python-packaging
+ python-pandas
+ python-pandas-stubs ;mypy extra
+ python-pydantic
+ python-scipy ;hypotheses extra
+ python-typeguard-4
+ python-typing-inspect
+ python-wrapt))
+ (native-inputs (list python-dask ;dask extra
+ python-fastapi ;fastapi extra
+ python-geopandas ;geopandas extra
+ python-modin ;modin extra
+ python-pyarrow ;needed to run fastapi tests
+ python-pytest
+ python-pytest-asyncio
+ python-sphinx
+ python-uvicorn)) ;needed to run fastapi tests
+ (home-page "https://github.com/unionai-oss/pandera")
+ (synopsis "Perform data validation on dataframe-like objects")
+ (description
+ "@code{python-pandera} provides a flexible and expressive API for
+performing data validation on dataframe-like objects to make data processing
+pipelines more readable and robust. Dataframes contain information that
+@code{python-pandera} explicitly validates at runtime. This is useful in
+production-critical data pipelines or reproducible research settings. With
+@code{python-pandera}, you can:
+
+@itemize
+@item Define a schema once and use it to validate different dataframe types.
+@item Check the types and properties of columns.
+@item Perform more complex statistical validation like hypothesis testing.
+@item Seamlessly integrate with existing data pipelines via function decorators.
+@item Define dataframe models with the class-based API with pydantic-style syntax.
+@item Synthesize data from schema objects for property-based testing.
+@item Lazily validate dataframes so that all validation rules are executed.
+@item Integrate with a rich ecosystem of tools like @code{python-pydantic},
+@code{python-fastapi} and @code{python-mypy}.
+@end itemize")
+ (license license:expat)))
+
(define-public python-pythran
(package
(name "python-pythran")
--
2.42.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#68391
; Package
guix-patches
.
(Thu, 11 Jan 2024 22:07:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 68391 <at> debbugs.gnu.org (full text, mbox):
I just noticed there is a single `pandas' I did not rewrite as
`@code{python-pandas}' in the description of `python-pandas-stubs'. If
the patches look good as they are, I kindly ask a committer to make that
small adjustment before applying them, as to keep the look of the
description uniform.
Thanks!
Troy
Reply sent
to
Mathieu Othacehe <othacehe <at> gnu.org>
:
You have taken responsibility.
(Wed, 17 Jan 2024 10:07:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Troy Figiel <troy <at> troyfigiel.com>
:
bug acknowledged by developer.
(Wed, 17 Jan 2024 10:07:02 GMT)
Full text and
rfc822 format available.
Message #22 received at 68391-done <at> debbugs.gnu.org (full text, mbox):
Hey,
> I just noticed there is a single `pandas' I did not rewrite as
> `@code{python-pandas}' in the description of `python-pandas-stubs'. If
> the patches look good as they are, I kindly ask a committer to make that
> small adjustment before applying them, as to keep the look of the
> description uniform.
Fixed that and a typo in the first patch before applying,
Thanks,
Mathieu
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 14 Feb 2024 12:24:16 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 128 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.