2023-08-04 22:07:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# Runtime dependencies
|
|
|
|
, hatchling
|
|
|
|
, toolz
|
2020-04-24 23:36:52 +00:00
|
|
|
, numpy
|
2023-08-04 22:07:22 +00:00
|
|
|
, jsonschema
|
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
, pandas
|
2023-08-04 22:07:22 +00:00
|
|
|
, jinja2
|
|
|
|
, importlib-metadata
|
|
|
|
|
|
|
|
# Build, dev and test dependencies
|
|
|
|
, ipython
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytestCheckHook
|
2020-04-24 23:36:52 +00:00
|
|
|
, vega_datasets
|
2023-08-04 22:07:22 +00:00
|
|
|
, sphinx
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "altair";
|
2023-08-04 22:07:22 +00:00
|
|
|
version = "5.0.1";
|
|
|
|
format = "pyproject";
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "altair-viz";
|
|
|
|
repo = "altair";
|
|
|
|
rev = "refs/tags/v${version}";
|
|
|
|
hash = "sha256-7bTrfryu4oaodVGNFNlVk9vXmDA5/9ahvCmvUGzZ5OQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
pandas
|
|
|
|
toolz
|
2023-08-04 22:07:22 +00:00
|
|
|
] ++ lib.optional (pythonOlder "3.8") importlib-metadata
|
|
|
|
++ lib.optional (pythonOlder "3.11") typing-extensions;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2020-04-24 23:36:52 +00:00
|
|
|
ipython
|
|
|
|
sphinx
|
|
|
|
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"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A 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";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.bsd3;
|
2023-08-04 22:07:22 +00:00
|
|
|
maintainers = with maintainers; [ teh vinetos ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|