2023-06-16 11:43:35 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
hatchling,
|
2024-09-29 15:03:36 +00:00
|
|
|
ipython,
|
|
|
|
ipywidgets,
|
2023-06-16 11:43:35 +00:00
|
|
|
jinja2,
|
2024-09-29 15:03:36 +00:00
|
|
|
jsonschema,
|
|
|
|
narwhals,
|
|
|
|
numpy,
|
2023-08-14 08:50:26 +00:00
|
|
|
packaging,
|
2024-09-29 15:03:36 +00:00
|
|
|
pandas,
|
|
|
|
polars,
|
|
|
|
pytest-xdist,
|
2022-02-06 18:45:29 +00:00
|
|
|
pytestCheckHook,
|
2024-09-29 15:03:36 +00:00
|
|
|
pythonOlder,
|
|
|
|
toolz,
|
|
|
|
typing-extensions,
|
2023-11-04 04:41:12 +00:00
|
|
|
vega-datasets,
|
2019-08-07 02:00:18 +00:00
|
|
|
}:
|
2017-07-15 05:58:25 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "altair";
|
2024-09-29 15:03:36 +00:00
|
|
|
version = "5.4.1";
|
|
|
|
pyproject = true;
|
|
|
|
|
2023-08-14 08:50:26 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2017-07-15 05:58:25 +00:00
|
|
|
|
2023-06-16 11:43:35 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "altair-viz";
|
|
|
|
repo = "altair";
|
2023-10-16 08:04:02 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-29 15:03:36 +00:00
|
|
|
hash = "sha256-7C51ACaBuNtOSXqLpuCI5bnLyE9U64vNXlD4/msPq2k=";
|
2017-07-15 05:58:25 +00:00
|
|
|
};
|
|
|
|
|
2024-09-29 15:03:36 +00:00
|
|
|
build-system = [ hatchling ];
|
2023-06-16 11:43:35 +00:00
|
|
|
|
2024-09-29 15:03:36 +00:00
|
|
|
dependencies = [
|
2023-06-16 11:43:35 +00:00
|
|
|
jinja2
|
2019-08-07 02:00:18 +00:00
|
|
|
jsonschema
|
2024-09-29 15:03:36 +00:00
|
|
|
narwhals
|
2019-08-07 02:00:18 +00:00
|
|
|
numpy
|
2023-08-14 08:50:26 +00:00
|
|
|
packaging
|
2019-08-07 02:00:18 +00:00
|
|
|
pandas
|
|
|
|
toolz
|
2024-09-29 15:03:36 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.14") typing-extensions;
|
2018-12-02 13:04:24 +00:00
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2019-08-07 02:00:18 +00:00
|
|
|
ipython
|
2024-09-29 15:03:36 +00:00
|
|
|
ipywidgets
|
|
|
|
polars
|
|
|
|
pytest-xdist
|
2023-06-16 11:43:35 +00:00
|
|
|
pytestCheckHook
|
2024-09-29 15:03:36 +00:00
|
|
|
vega-datasets
|
2019-08-07 02:00:18 +00:00
|
|
|
];
|
2018-03-20 15:33:08 +00:00
|
|
|
|
2021-03-11 18:16:10 +00:00
|
|
|
pythonImportsCheck = [ "altair" ];
|
|
|
|
|
2024-06-19 03:04:36 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
|
2023-06-16 11:43:35 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Disabled because it requires internet connectivity
|
|
|
|
"tests/test_examples.py"
|
|
|
|
# TODO: Disabled because of missing altair_viewer package
|
|
|
|
"tests/vegalite/v5/test_api.py"
|
|
|
|
# avoid updating files and dependency on black
|
|
|
|
"tests/test_toplevel.py"
|
2023-08-14 08:50:26 +00:00
|
|
|
# require vl-convert package
|
|
|
|
"tests/utils/test_compiler.py"
|
2023-06-16 11:43:35 +00:00
|
|
|
];
|
2017-07-15 05:58:25 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-07-15 05:58:25 +00:00
|
|
|
description = "Declarative statistical visualization library for Python";
|
2023-06-16 11:43:35 +00:00
|
|
|
homepage = "https://altair-viz.github.io";
|
|
|
|
downloadPage = "https://github.com/altair-viz/altair";
|
2023-10-16 08:02:59 +00:00
|
|
|
changelog = "https://altair-viz.github.io/releases/changes.html";
|
2017-07-15 05:58:25 +00:00
|
|
|
license = licenses.bsd3;
|
2023-06-16 11:45:44 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
teh
|
|
|
|
vinetos
|
|
|
|
];
|
2017-07-15 05:58:25 +00:00
|
|
|
};
|
|
|
|
}
|