2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# Runtime dependencies
|
|
|
|
hatchling,
|
|
|
|
toolz,
|
|
|
|
numpy,
|
|
|
|
jsonschema,
|
|
|
|
typing-extensions,
|
|
|
|
pandas,
|
|
|
|
jinja2,
|
|
|
|
packaging,
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# Build, dev and test dependencies
|
|
|
|
anywidget,
|
|
|
|
ipython,
|
|
|
|
pytestCheckHook,
|
|
|
|
vega-datasets,
|
|
|
|
sphinx,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "altair";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "5.2.0";
|
2023-08-04 22:07:22 +00:00
|
|
|
format = "pyproject";
|
2023-08-22 20:05:09 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "altair-viz";
|
|
|
|
repo = "altair";
|
2023-10-19 13:55:26 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-uTG+V0SQgAQtMjvrVvKVKgIBT9qO+26EPRxQCEXj/gc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ hatchling ];
|
2023-08-04 22:07:22 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-08-04 22:07:22 +00:00
|
|
|
jinja2
|
2020-04-24 23:36:52 +00:00
|
|
|
jsonschema
|
|
|
|
numpy
|
2023-08-22 20:05:09 +00:00
|
|
|
packaging
|
2020-04-24 23:36:52 +00:00
|
|
|
pandas
|
|
|
|
toolz
|
2023-08-22 20:05:09 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.11") typing-extensions;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-08-22 20:05:09 +00:00
|
|
|
anywidget
|
2020-04-24 23:36:52 +00:00
|
|
|
ipython
|
|
|
|
sphinx
|
2023-11-16 04:20:00 +00:00
|
|
|
vega-datasets
|
2023-08-04 22:07:22 +00:00
|
|
|
pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2021-03-23 19:22:30 +00:00
|
|
|
pythonImportsCheck = [ "altair" ];
|
|
|
|
|
2023-08-04 22:07:22 +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-22 20:05:09 +00:00
|
|
|
# require vl-convert package
|
|
|
|
"tests/utils/test_compiler.py"
|
2023-08-04 22:07:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Declarative statistical visualization library for Python";
|
2023-08-04 22:07:22 +00:00
|
|
|
homepage = "https://altair-viz.github.io";
|
|
|
|
downloadPage = "https://github.com/altair-viz/altair";
|
2023-10-19 13:55:26 +00:00
|
|
|
changelog = "https://altair-viz.github.io/releases/changes.html";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2024-06-05 15:53:02 +00:00
|
|
|
maintainers = with maintainers; [
|
|
|
|
teh
|
|
|
|
vinetos
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|