python313Packages.plotly: 5.24.1 -> 6.1.0
https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md
This commit is contained in:
committed by
Robert Schütz
parent
4acc7bf268
commit
aed4e2c7f6
@@ -3,118 +3,112 @@
|
||||
stdenv,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
# build-system
|
||||
jupyter-packaging,
|
||||
setuptools,
|
||||
|
||||
# dependencies
|
||||
narwhals,
|
||||
packaging,
|
||||
tenacity,
|
||||
|
||||
# optional-dependencies
|
||||
numpy,
|
||||
kaleido,
|
||||
pytestCheckHook,
|
||||
pandas,
|
||||
requests,
|
||||
matplotlib,
|
||||
xarray,
|
||||
pillow,
|
||||
scipy,
|
||||
statsmodels,
|
||||
|
||||
# tests
|
||||
anywidget,
|
||||
ipython,
|
||||
ipywidgets,
|
||||
which,
|
||||
matplotlib,
|
||||
nbformat,
|
||||
pandas,
|
||||
pdfrw,
|
||||
pillow,
|
||||
polars,
|
||||
pyarrow,
|
||||
pytestCheckHook,
|
||||
requests,
|
||||
scikit-image,
|
||||
orca,
|
||||
psutil,
|
||||
scipy,
|
||||
statsmodels,
|
||||
which,
|
||||
xarray,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "plotly";
|
||||
version = "5.24.1";
|
||||
version = "6.1.0";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "plotly";
|
||||
repo = "plotly.py";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-ONuX5/GlirPF8+7bZtib1Xsv5llcXcSelFfGyeTc5L8=";
|
||||
hash = "sha256-B5wjZTnL/T+zRbPd3tVSekDbYnKBvIdIpXhc3sUvT3E=";
|
||||
};
|
||||
|
||||
sourceRoot = "${src.name}/packages/python/plotly";
|
||||
|
||||
# tracking numpy 2 issue: https://github.com/plotly/plotly.py/pull/4622
|
||||
postPatch = ''
|
||||
substituteInPlace pyproject.toml \
|
||||
--replace-fail "\"jupyterlab~=3.0;python_version>='3.6'\"," ""
|
||||
|
||||
substituteInPlace plotly/tests/test_optional/test_utils/test_utils.py \
|
||||
--replace-fail "np.NaN" "np.nan" \
|
||||
--replace-fail "np.NAN" "np.nan" \
|
||||
--replace-fail "np.Inf" "np.inf"
|
||||
|
||||
substituteInPlace plotly/tests/test_optional/test_px/test_imshow.py \
|
||||
--replace-fail "- 255 * img.max()" "- np.int64(255) * img.max()"
|
||||
--replace-fail '"hatch", ' "" \
|
||||
--replace-fail "jupyter_packaging~=0.10.0" jupyter_packaging
|
||||
'';
|
||||
|
||||
env.SKIP_NPM = true;
|
||||
|
||||
build-system = [ setuptools ];
|
||||
build-system = [
|
||||
setuptools
|
||||
jupyter-packaging
|
||||
];
|
||||
|
||||
dependencies = [
|
||||
narwhals
|
||||
packaging
|
||||
tenacity
|
||||
kaleido
|
||||
];
|
||||
|
||||
# packages/python/plotly/optional-requirements.txt
|
||||
optional-dependencies = {
|
||||
orca = [
|
||||
orca
|
||||
requests
|
||||
psutil
|
||||
];
|
||||
express = [ numpy ];
|
||||
kaleido = [ kaleido ];
|
||||
};
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pandas
|
||||
requests
|
||||
matplotlib
|
||||
xarray
|
||||
pillow
|
||||
scipy
|
||||
statsmodels
|
||||
anywidget
|
||||
ipython
|
||||
ipywidgets
|
||||
which
|
||||
matplotlib
|
||||
nbformat
|
||||
pandas
|
||||
pdfrw
|
||||
pillow
|
||||
polars
|
||||
pyarrow
|
||||
pytestCheckHook
|
||||
requests
|
||||
scikit-image
|
||||
];
|
||||
scipy
|
||||
statsmodels
|
||||
which
|
||||
xarray
|
||||
] ++ lib.flatten (lib.attrValues optional-dependencies);
|
||||
|
||||
disabledTests = [
|
||||
# failed pinning test, sensitive to dep versions
|
||||
"test_legend_dots"
|
||||
"test_linestyle"
|
||||
# test bug, i assume sensitive to dep versions
|
||||
"test_sanitize_json"
|
||||
# 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
|
||||
"test_dependencies_not_imported"
|
||||
"test_lazy_imports"
|
||||
# numpy2 related error, RecursionError
|
||||
# https://github.com/plotly/plotly.py/pull/4622#issuecomment-2452886352
|
||||
"test_masked_constants_example"
|
||||
# [0.0, 'rgb(252, 255, 164)'] != [0.0, '#fcffa4']
|
||||
"test_acceptance_named"
|
||||
];
|
||||
|
||||
disabledTestPaths = 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"
|
||||
];
|
||||
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"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "plotly" ];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user