python3Packages.{plotly,chart-studio}: fixes (#421308)

This commit is contained in:
Gaétan Lepage
2025-07-12 07:39:19 +02:00
committed by GitHub
2 changed files with 42 additions and 36 deletions
@@ -10,22 +10,18 @@
pytestCheckHook,
}:
buildPythonPackage rec {
buildPythonPackage {
pname = "chart-studio";
version = "1.1.0-unstable-2024-07-23";
version = "1.1.0-unstable-2025-01-30";
pyproject = true;
# chart-studio was split from plotly
src = fetchFromGitHub {
owner = "plotly";
repo = "plotly.py";
# We use plotly's upstream version as it's the same repo, but chart studio has its own version number.
rev = "v5.23.0";
hash = "sha256-K1hEs00AGBCe2fgytyPNWqE5M0jU5ESTzynP55kc05Y=";
repo = "chart-studio";
rev = "44c7c43be0fe7e031ec281c86ee7dae0efa0619e";
hash = "sha256-RekcZzUcunIqXOSriW+RvpLdvATQWTeRAiR8LFodfQg=";
};
sourceRoot = "${src.name}/packages/python/chart-studio";
build-system = [ setuptools ];
dependencies = [
@@ -36,6 +32,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
mock
plotly
pytestCheckHook
];
@@ -46,13 +43,12 @@ buildPythonPackage rec {
# most tests talk to a network service, so only run ones that don't do that.
pytestFlagsArray = [
"chart_studio/tests/test_core"
"chart_studio/tests/test_plot_ly/test_api"
];
meta = {
description = "Utilities for interfacing with Plotly's Chart Studio service";
homepage = "https://github.com/plotly/plotly.py/tree/master/packages/python/chart-studio";
homepage = "https://github.com/plotly/chart-studio";
license = with lib.licenses; [ mit ];
maintainers = [ ];
maintainers = with lib.maintainers; [ sarahec ];
};
}
@@ -38,14 +38,14 @@
buildPythonPackage rec {
pname = "plotly";
version = "6.1.2";
version = "6.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "plotly";
repo = "plotly.py";
tag = "v${version}";
hash = "sha256-+vIq//pDLaaTmRGW+oytho3TfMmLCtuIoHeFenLVcek=";
hash = "sha256-Vfj5jG0AkBjivExOx7oMoocTopWl0yMc1INpEbtlgTc=";
};
postPatch = ''
@@ -105,27 +105,34 @@ buildPythonPackage rec {
__darwinAllowLocalNetworking = true;
disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
# fails to launch kaleido subprocess
"tests/test_optional/test_kaleido"
# numpy2 related error, RecursionError
# See: https://github.com/plotly/plotly.py/issues/4852
"tests/test_plotly_utils/validators/test_angle_validator.py"
"tests/test_plotly_utils/validators/test_any_validator.py"
"tests/test_plotly_utils/validators/test_color_validator.py"
"tests/test_plotly_utils/validators/test_colorlist_validator.py"
"tests/test_plotly_utils/validators/test_colorscale_validator.py"
"tests/test_plotly_utils/validators/test_dataarray_validator.py"
"tests/test_plotly_utils/validators/test_enumerated_validator.py"
"tests/test_plotly_utils/validators/test_fig_deepcopy.py"
"tests/test_plotly_utils/validators/test_flaglist_validator.py"
"tests/test_plotly_utils/validators/test_infoarray_validator.py"
"tests/test_plotly_utils/validators/test_integer_validator.py"
"tests/test_plotly_utils/validators/test_number_validator.py"
"tests/test_plotly_utils/validators/test_pandas_series_input.py"
"tests/test_plotly_utils/validators/test_string_validator.py"
"tests/test_plotly_utils/validators/test_xarray_input.py"
];
disabledTestPaths =
[
# Broken imports
"plotly/matplotlylib/mplexporter/tests"
# Fails to catch error when serializing document
"tests/test_optional/test_kaleido/test_kaleido.py::test_defaults"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# fails to launch kaleido subprocess
"tests/test_optional/test_kaleido"
# numpy2 related error, RecursionError
# See: https://github.com/plotly/plotly.py/issues/4852
"tests/test_plotly_utils/validators/test_angle_validator.py"
"tests/test_plotly_utils/validators/test_any_validator.py"
"tests/test_plotly_utils/validators/test_color_validator.py"
"tests/test_plotly_utils/validators/test_colorlist_validator.py"
"tests/test_plotly_utils/validators/test_colorscale_validator.py"
"tests/test_plotly_utils/validators/test_dataarray_validator.py"
"tests/test_plotly_utils/validators/test_enumerated_validator.py"
"tests/test_plotly_utils/validators/test_fig_deepcopy.py"
"tests/test_plotly_utils/validators/test_flaglist_validator.py"
"tests/test_plotly_utils/validators/test_infoarray_validator.py"
"tests/test_plotly_utils/validators/test_integer_validator.py"
"tests/test_plotly_utils/validators/test_number_validator.py"
"tests/test_plotly_utils/validators/test_pandas_series_input.py"
"tests/test_plotly_utils/validators/test_string_validator.py"
"tests/test_plotly_utils/validators/test_xarray_input.py"
];
pythonImportsCheck = [ "plotly" ];
@@ -135,6 +142,9 @@ buildPythonPackage rec {
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 ];
maintainers = with lib.maintainers; [
pandapip1
sarahec
];
};
}