2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
2024-10-11 05:15:48 +00:00
|
|
|
stdenv,
|
2024-06-05 15:53:02 +00:00
|
|
|
buildPythonPackage,
|
2024-10-09 16:51:18 +00:00
|
|
|
fetchFromGitHub,
|
2024-07-27 06:49:29 +00:00
|
|
|
setuptools,
|
|
|
|
packaging,
|
2024-06-05 15:53:02 +00:00
|
|
|
tenacity,
|
2024-09-19 14:19:46 +00:00
|
|
|
kaleido,
|
2024-10-09 16:51:18 +00:00
|
|
|
pytestCheckHook,
|
|
|
|
pandas,
|
|
|
|
requests,
|
|
|
|
matplotlib,
|
|
|
|
xarray,
|
|
|
|
pillow,
|
|
|
|
scipy,
|
|
|
|
statsmodels,
|
|
|
|
ipython,
|
|
|
|
ipywidgets,
|
|
|
|
which,
|
|
|
|
nbformat,
|
|
|
|
scikit-image,
|
2024-10-11 05:15:48 +00:00
|
|
|
orca,
|
|
|
|
psutil,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "plotly";
|
2024-10-11 05:15:48 +00:00
|
|
|
version = "5.24.1";
|
2024-07-27 06:49:29 +00:00
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "plotly";
|
|
|
|
repo = "plotly.py";
|
|
|
|
rev = "refs/tags/v${version}";
|
2024-10-11 05:15:48 +00:00
|
|
|
hash = "sha256-ONuX5/GlirPF8+7bZtib1Xsv5llcXcSelFfGyeTc5L8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
sourceRoot = "${src.name}/packages/python/plotly";
|
|
|
|
|
2024-07-27 06:49:29 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace pyproject.toml \
|
|
|
|
--replace-fail "\"jupyterlab~=3.0;python_version>='3.6'\"," ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
env.SKIP_NPM = true;
|
|
|
|
|
|
|
|
build-system = [ setuptools ];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
packaging
|
2021-09-18 10:52:07 +00:00
|
|
|
tenacity
|
2024-09-19 14:19:46 +00:00
|
|
|
kaleido
|
2020-04-24 23:36:52 +00:00
|
|
|
];
|
|
|
|
|
2024-10-11 05:15:48 +00:00
|
|
|
# packages/python/plotly/optional-requirements.txt
|
|
|
|
optional-dependencies = {
|
|
|
|
orca = [
|
|
|
|
orca
|
|
|
|
requests
|
|
|
|
psutil
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
pandas
|
|
|
|
requests
|
|
|
|
matplotlib
|
|
|
|
xarray
|
|
|
|
pillow
|
|
|
|
scipy
|
|
|
|
statsmodels
|
|
|
|
ipython
|
|
|
|
ipywidgets
|
|
|
|
which
|
|
|
|
nbformat
|
|
|
|
scikit-image
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
2024-10-11 05:15:48 +00:00
|
|
|
# failed pinning test, sensitive to dep versions
|
2024-10-09 16:51:18 +00:00
|
|
|
"test_legend_dots"
|
|
|
|
"test_linestyle"
|
2024-10-11 05:15:48 +00:00
|
|
|
# test bug, i assume sensitive to dep versions
|
2024-10-09 16:51:18 +00:00
|
|
|
"test_sanitize_json"
|
2024-10-11 05:15:48 +00:00
|
|
|
# requires vaex and polars, vaex is not packaged
|
|
|
|
"test_build_df_from_vaex_and_polars"
|
|
|
|
"test_build_df_with_hover_data_from_vaex_and_polars"
|
|
|
|
# lazy loading error, could it be the sandbox PYTHONPATH?
|
|
|
|
# AssertionError: assert "plotly" not in sys.modules
|
2024-10-09 16:51:18 +00:00
|
|
|
"test_dependencies_not_imported"
|
|
|
|
"test_lazy_imports"
|
|
|
|
];
|
2024-10-11 05:15:48 +00:00
|
|
|
disabledTestPaths =
|
|
|
|
[
|
|
|
|
# unable to locate orca binary, adding the package does not fix it
|
|
|
|
"plotly/tests/test_orca/"
|
|
|
|
]
|
|
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
|
|
# requires local networking
|
|
|
|
"plotly/tests/test_io/test_renderers.py"
|
|
|
|
# fails to launch kaleido subprocess
|
|
|
|
"plotly/tests/test_optional/test_kaleido"
|
|
|
|
];
|
2024-07-27 06:49:29 +00:00
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
pythonImportsCheck = [ "plotly" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-10-09 16:51:18 +00:00
|
|
|
meta = {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python plotting library for collaborative, interactive, publication-quality graphs";
|
|
|
|
homepage = "https://plot.ly/python/";
|
2024-10-09 16:51:18 +00:00
|
|
|
downloadPage = "https://github.com/plotly/plotly.py";
|
|
|
|
changelog = "https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md";
|
|
|
|
license = lib.licenses.mit;
|
|
|
|
maintainers = with lib.maintainers; [ pandapip1 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|