diff --git a/pkgs/development/python-modules/altair/default.nix b/pkgs/development/python-modules/altair/default.nix index 9bf7c73401b1..bc86a2f5255d 100644 --- a/pkgs/development/python-modules/altair/default.nix +++ b/pkgs/development/python-modules/altair/default.nix @@ -3,10 +3,12 @@ buildPythonPackage, fetchFromGitHub, hatchling, + anywidget, ipython, ipywidgets, jinja2, jsonschema, + mistune, narwhals, numpy, packaging, @@ -17,21 +19,20 @@ pythonOlder, toolz, typing-extensions, - vega-datasets, + vl-convert-python, + writableTmpDirAsHomeHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "altair"; - version = "5.5.0"; + version = "6.0.0"; pyproject = true; - disabled = pythonOlder "3.9"; - src = fetchFromGitHub { owner = "altair-viz"; repo = "altair"; - tag = "v${version}"; - hash = "sha256-lrKC4FYRQEax5E0lQNhO9FLk5UOJ0TnYzqZjndlRpGI="; + tag = "v${finalAttrs.version}"; + hash = "sha256-+Qc51L4tL1pRDpWwadxPpTE4tDH3FTO/wH67FtXMN7k="; }; build-system = [ hatchling ]; @@ -48,16 +49,23 @@ buildPythonPackage rec { ++ lib.optional (pythonOlder "3.14") typing-extensions; nativeCheckInputs = [ + anywidget ipython ipywidgets + mistune polars pytest-xdist pytestCheckHook - vega-datasets + vl-convert-python + writableTmpDirAsHomeHook ]; pythonImportsCheck = [ "altair" ]; + enabledTestPaths = [ + "tests/" + ]; + disabledTests = [ # ValueError: Saving charts in 'svg' format requires the vl-convert-python or altair_saver package: see http://github.com/altair-viz/altair_saver/ "test_renderer_with_none_embed_options" @@ -66,13 +74,17 @@ buildPythonPackage rec { "test_dataframe_to_csv[pandas]" # Network access "test_theme_remote_lambda" + "test_chart_validation_errors" + "test_multiple_field_strings_in_condition" ]; disabledTestPaths = [ # Disabled because it requires internet connectivity "tests/test_examples.py" + "tests/test_datasets.py" + "altair/datasets/_data.py" # TODO: Disabled because of missing altair_viewer package - "tests/vegalite/v5/test_api.py" + "tests/vegalite/v6/test_api.py" # avoid updating files and dependency on black "tests/test_toplevel.py" # require vl-convert package @@ -90,4 +102,4 @@ buildPythonPackage rec { vinetos ]; }; -} +})