@@ -85,6 +85,7 @@ (define-module (gnu packages statistics)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-build)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages readline)
@@ -2082,6 +2083,44 @@ (define-public python-vega-datasets
and Vega-Lite examples.")
(license license:expat)))
+(define-public python-altair
+ (package
+ (name "python-altair")
+ (version "5.0.0")
+ (source (origin
+ (method git-fetch) ; no tests in PyPI
+ (uri (git-reference
+ (url "https://github.com/altair-viz/altair")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "11j7v2s25xwz3qdjbbps3ma2dd68cr87vxn22x9fyfzgbs9pc7mx"))))
+ (build-system pyproject-build-system)
+ (arguments
+ ;; test_render_examples_to_chart opens an external connection.
+ ;; test_save_html introduces a circular dependency on altair-viewer.
+ (list #:test-flags #~(list "-k" (string-append
+ "not test_render_examples_to_chart"
+ " and not test_save_html"))))
+ (propagated-inputs (list python-jinja2
+ python-jsonschema
+ python-numpy
+ python-pandas
+ python-toolz
+ python-typing-extensions))
+ (native-inputs (list python-black
+ python-hatchling
+ python-ipython
+ python-m2r
+ python-pytest
+ python-vega-datasets))
+ (home-page "https://altair-viz.github.io/")
+ (synopsis "Declarative statistical visualization library for Python")
+ (description
+ "Vega-Altair is a declarative statistical visualization library for Python.")
+ (license license:expat)))
+
(define-public python-hdmedians
(package
(name "python-hdmedians")