Accepting request 1074796 from devel:languages:python:numeric
OBS-URL: https://build.opensuse.org/request/show/1074796 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-plotly?expand=0&rev=36
This commit is contained in:
commit
c8d44afad4
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:4efef479c2ec1d86dcdac8405b6ca70ca65649a77408e39a7e84a1ea2db6c787
|
|
||||||
size 7645514
|
|
3
plotly-5.13.1.tar.gz
Normal file
3
plotly-5.13.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:90ee9a1fee0dda30e2830e129855081ea17bd1b06a553a62b62de15caff1a219
|
||||||
|
size 7603593
|
@ -1,81 +0,0 @@
|
|||||||
Index: plotly.py-5.11.0/packages/python/plotly/plotly/figure_factory/_streamline.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/plotly/figure_factory/_streamline.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/plotly/figure_factory/_streamline.py
|
|
||||||
@@ -180,11 +180,11 @@ class _Streamline(object):
|
|
||||||
Set up for RK4 function, based on Bokeh's streamline code
|
|
||||||
"""
|
|
||||||
if isinstance(xi, np.ndarray):
|
|
||||||
- self.x = xi.astype(np.int)
|
|
||||||
- self.y = yi.astype(np.int)
|
|
||||||
+ self.x = xi.astype(int)
|
|
||||||
+ self.y = yi.astype(int)
|
|
||||||
else:
|
|
||||||
- self.val_x = np.int(xi)
|
|
||||||
- self.val_y = np.int(yi)
|
|
||||||
+ self.val_x = int(xi)
|
|
||||||
+ self.val_y = int(yi)
|
|
||||||
a00 = a[self.val_y, self.val_x]
|
|
||||||
a01 = a[self.val_y, self.val_x + 1]
|
|
||||||
a10 = a[self.val_y + 1, self.val_x]
|
|
||||||
Index: plotly.py-5.11.0/packages/python/plotly/plotly/express/imshow_utils.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/plotly/express/imshow_utils.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/plotly/express/imshow_utils.py
|
|
||||||
@@ -21,7 +21,6 @@ _integer_types = (
|
|
||||||
_integer_ranges = {t: (np.iinfo(t).min, np.iinfo(t).max) for t in _integer_types}
|
|
||||||
dtype_range = {
|
|
||||||
np.bool_: (False, True),
|
|
||||||
- np.bool8: (False, True),
|
|
||||||
np.float16: (-1, 1),
|
|
||||||
np.float32: (-1, 1),
|
|
||||||
np.float64: (-1, 1),
|
|
||||||
Index: plotly.py-5.11.0/packages/python/plotly/plotly/figure_factory/_violin.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/plotly/figure_factory/_violin.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/plotly/figure_factory/_violin.py
|
|
||||||
@@ -16,7 +16,7 @@ def calc_stats(data):
|
|
||||||
"""
|
|
||||||
Calculate statistics for use in violin plot.
|
|
||||||
"""
|
|
||||||
- x = np.asarray(data, np.float)
|
|
||||||
+ x = np.asarray(data, float)
|
|
||||||
vals_min = np.min(x)
|
|
||||||
vals_max = np.max(x)
|
|
||||||
q2 = np.percentile(x, 50, interpolation="linear")
|
|
||||||
@@ -160,7 +160,7 @@ def violinplot(vals, fillcolor="#1f77b4"
|
|
||||||
"""
|
|
||||||
Refer to FigureFactory.create_violin() for docstring.
|
|
||||||
"""
|
|
||||||
- vals = np.asarray(vals, np.float)
|
|
||||||
+ vals = np.asarray(vals, float)
|
|
||||||
# summary statistics
|
|
||||||
vals_min = calc_stats(vals)["min"]
|
|
||||||
vals_max = calc_stats(vals)["max"]
|
|
||||||
@@ -231,7 +231,7 @@ def violin_no_colorscale(
|
|
||||||
)
|
|
||||||
color_index = 0
|
|
||||||
for k, gr in enumerate(group_name):
|
|
||||||
- vals = np.asarray(gb.get_group(gr)[data_header], np.float)
|
|
||||||
+ vals = np.asarray(gb.get_group(gr)[data_header], float)
|
|
||||||
if color_index >= len(colors):
|
|
||||||
color_index = 0
|
|
||||||
plot_data, plot_xrange = violinplot(
|
|
||||||
@@ -319,7 +319,7 @@ def violin_colorscale(
|
|
||||||
min_value = min(group_stats_values)
|
|
||||||
|
|
||||||
for k, gr in enumerate(group_name):
|
|
||||||
- vals = np.asarray(gb.get_group(gr)[data_header], np.float)
|
|
||||||
+ vals = np.asarray(gb.get_group(gr)[data_header], float)
|
|
||||||
|
|
||||||
# find intermediate color from colorscale
|
|
||||||
intermed = (group_stats[gr] - min_value) / (max_value - min_value)
|
|
||||||
@@ -411,7 +411,7 @@ def violin_dict(
|
|
||||||
)
|
|
||||||
|
|
||||||
for k, gr in enumerate(group_name):
|
|
||||||
- vals = np.asarray(gb.get_group(gr)[data_header], np.float)
|
|
||||||
+ vals = np.asarray(gb.get_group(gr)[data_header], float)
|
|
||||||
plot_data, plot_xrange = violinplot(vals, fillcolor=colors[gr], rugplot=rugplot)
|
|
||||||
layout = graph_objs.Layout()
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
|||||||
Index: plotly.py-5.11.0/packages/python/plotly/plotly/tests/test_optional/test_px/test_imshow.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/plotly/tests/test_optional/test_px/test_imshow.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/plotly/tests/test_optional/test_px/test_imshow.py
|
|
||||||
@@ -9,7 +9,7 @@ import datetime
|
|
||||||
from plotly.express.imshow_utils import rescale_intensity
|
|
||||||
|
|
||||||
img_rgb = np.array([[[255, 0, 0], [0, 255, 0], [0, 0, 255]]], dtype=np.uint8)
|
|
||||||
-img_gray = np.arange(100, dtype=np.float).reshape((10, 10))
|
|
||||||
+img_gray = np.arange(100, dtype=float).reshape((10, 10))
|
|
||||||
|
|
||||||
|
|
||||||
def decode_image_string(image_string):
|
|
||||||
@@ -47,7 +47,7 @@ def test_automatic_zmax_from_dtype():
|
|
||||||
dtypes_dict = {
|
|
||||||
np.uint8: 2**8 - 1,
|
|
||||||
np.uint16: 2**16 - 1,
|
|
||||||
- np.float: 1,
|
|
||||||
+ float: 1,
|
|
||||||
bool: 255,
|
|
||||||
}
|
|
||||||
for key, val in dtypes_dict.items():
|
|
||||||
Index: plotly.py-5.11.0/packages/python/plotly/_plotly_utils/tests/validators/test_integer_validator.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/_plotly_utils/tests/validators/test_integer_validator.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/_plotly_utils/tests/validators/test_integer_validator.py
|
|
||||||
@@ -58,7 +58,7 @@ def test_acceptance_min_max(val, validat
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
- "val", [-1.01, -10, 2.1, 3, np.iinfo(np.int).max, np.iinfo(np.int).min]
|
|
||||||
+ "val", [-1.01, -10, 2.1, 3, np.iinfo(int).max, np.iinfo(int).min]
|
|
||||||
)
|
|
||||||
def test_rejection_min_max(val, validator_min_max):
|
|
||||||
with pytest.raises(ValueError) as validation_failure:
|
|
||||||
Index: plotly.py-5.11.0/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py
|
|
||||||
===================================================================
|
|
||||||
--- plotly.py-5.11.0.orig/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py
|
|
||||||
+++ plotly.py-5.11.0/packages/python/plotly/plotly/tests/test_optional/test_utils/test_utils.py
|
|
||||||
@@ -414,8 +414,8 @@ class TestNumpyIntegerBaseType(TestCase)
|
|
||||||
import plotly.graph_objects as go
|
|
||||||
from plotly.subplots import make_subplots
|
|
||||||
|
|
||||||
- indices_rows = np.array([1], dtype=np.int)
|
|
||||||
- indices_cols = np.array([1], dtype=np.int)
|
|
||||||
+ indices_rows = np.array([1], dtype=int)
|
|
||||||
+ indices_cols = np.array([1], dtype=int)
|
|
||||||
fig = make_subplots(rows=1, cols=1)
|
|
||||||
fig.add_trace(go.Scatter(y=[1]), row=indices_rows[0], col=indices_cols[0])
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:fb85d1c6013cb91324bd610e02f820880e14aa7daa9bbc6c3572b7250764ee33
|
|
||||||
size 30575379
|
|
3
plotly.py-5.13.1-gh.tar.gz
Normal file
3
plotly.py-5.13.1-gh.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:8e66237994ed933ac019c98d603587951b323218c70d45b4bedb21eb8b37658d
|
||||||
|
size 30629748
|
@ -1,3 +1,49 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Mar 26 13:47:18 UTC 2023 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 5.13.1
|
||||||
|
* Updated Plotly.js to from version 2.18.0 to version 2.18.2. See
|
||||||
|
the plotly.js CHANGELOG for more information. These changes are
|
||||||
|
reflected in the auto-generated plotly.graph_objects module.
|
||||||
|
* Updated distutils.Version to packaging.Version #3897] and
|
||||||
|
#4055]
|
||||||
|
- Release 5.13.0
|
||||||
|
* Updated Plotly.js to from version 2.17.1 to version 2.18.0. See
|
||||||
|
the plotly.js CHANGELOG for more information. Notable changes
|
||||||
|
include:
|
||||||
|
* Add sync tickmode option [#6356, #6443], with thanks to
|
||||||
|
@filipesantiagoAM and @VictorBezak for the contribution!
|
||||||
|
* Build process now uses Node 18.x and version 2 lockfile (should
|
||||||
|
be an invisible change for users) [#4034]
|
||||||
|
* write_html() now explicitly encodes output as UTF-8 because
|
||||||
|
Plotly.js' bundle contains such characters [#4021] and [#4022]
|
||||||
|
* fixed iframe renderer regression from 5.12 and also fixed error
|
||||||
|
when this renderer was used in the very first cell in a
|
||||||
|
notebook [#4036]
|
||||||
|
- Release 5.12.0
|
||||||
|
* Support for ipywidgets 8 [#3930]
|
||||||
|
* Updated Plotly.js to from version 2.16.1 to version 2.17.1. See
|
||||||
|
the plotly.js CHANGELOG for more information. Notable changes
|
||||||
|
include:
|
||||||
|
* Add shift and autoshift to cartesian y axes to help avoid
|
||||||
|
overlapping of multiple axes [#6334], with thanks to Gamma
|
||||||
|
Technologies for sponsoring the related development!
|
||||||
|
* Introduce group attributes for scatter trace i.e.
|
||||||
|
alignmentgroup, offsetgroup, scattermode and scattergap
|
||||||
|
[#6381], this feature was anonymously sponsored: thank you to
|
||||||
|
our sponsor!
|
||||||
|
* Add marker.cornerradius attribute to treemap trace [#6351]
|
||||||
|
* Fixed the usage of some deprecated NumPy types which were
|
||||||
|
removed in NumPy 1.24 [#3997]
|
||||||
|
* Fixed bug for trendlines with datetime axes [#3683]
|
||||||
|
* marker.angle attribute now accepts iterables where appropriate
|
||||||
|
[#4013]
|
||||||
|
* selector=0 now correctly returns the first trace in
|
||||||
|
.select_traces() and related methods [#3817]
|
||||||
|
- Drop patches merged upstream
|
||||||
|
* plotly-fix-sources-np1.24.patch
|
||||||
|
* plotly-fix-tests-np1.24.patch
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Dec 24 12:18:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Sat Dec 24 12:18:06 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-plotly
|
# spec file for package python-plotly
|
||||||
#
|
#
|
||||||
# Copyright (c) 2022 SUSE LLC
|
# Copyright (c) 2023 SUSE LLC
|
||||||
#
|
#
|
||||||
# All modifications and additions to the file contributed by third parties
|
# All modifications and additions to the file contributed by third parties
|
||||||
# remain the property of their copyright owners, unless otherwise agreed
|
# remain the property of their copyright owners, unless otherwise agreed
|
||||||
@ -16,9 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%define skip_python2 1
|
|
||||||
Name: python-plotly
|
Name: python-plotly
|
||||||
Version: 5.11.0
|
Version: 5.13.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Library for collaborative, interactive, publication-quality graphs
|
Summary: Library for collaborative, interactive, publication-quality graphs
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -28,9 +27,6 @@ Source: https://files.pythonhosted.org/packages/source/p/plotly/plotly-%
|
|||||||
# Additionally use the GitHub archive for the test suite
|
# Additionally use the GitHub archive for the test suite
|
||||||
Source1: https://github.com/plotly/plotly.py/archive/refs/tags/v%{version}.tar.gz#/plotly.py-%{version}-gh.tar.gz
|
Source1: https://github.com/plotly/plotly.py/archive/refs/tags/v%{version}.tar.gz#/plotly.py-%{version}-gh.tar.gz
|
||||||
Source100: python-plotly-rpmlintrc
|
Source100: python-plotly-rpmlintrc
|
||||||
# PATCH-FIX-UPSTREAM plotly-fix-tests-np1.24.patch and plotly-fix-sources-np1.24.patch gh#plotly/plotly.py#3997
|
|
||||||
Patch1: plotly-fix-sources-np1.24.patch
|
|
||||||
Patch2: plotly-fix-tests-np1.24.patch
|
|
||||||
BuildRequires: %{python_module base >= 3.6}
|
BuildRequires: %{python_module base >= 3.6}
|
||||||
BuildRequires: %{python_module jupyterlab >= 3}
|
BuildRequires: %{python_module jupyterlab >= 3}
|
||||||
BuildRequires: %{python_module notebook >= 5.3}
|
BuildRequires: %{python_module notebook >= 5.3}
|
||||||
@ -65,7 +61,7 @@ BuildRequires: %{python_module requests}
|
|||||||
BuildRequires: %{python_module scikit-image}
|
BuildRequires: %{python_module scikit-image}
|
||||||
BuildRequires: %{python_module scipy}
|
BuildRequires: %{python_module scipy}
|
||||||
BuildRequires: %{python_module statsmodels}
|
BuildRequires: %{python_module statsmodels}
|
||||||
BuildRequires: %{python_module xarray}
|
BuildRequires: %{python_module xarray if %python-base >= 3.9}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
@ -116,16 +112,10 @@ Jupyterlab and Notebook integration and widgets.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n plotly-%{version} -b 1
|
%setup -q -n plotly-%{version} -b 1
|
||||||
%patch1 -p4
|
|
||||||
# remove script interpreter line in non-executable script
|
# remove script interpreter line in non-executable script
|
||||||
sed -i '1{/env python/ d}' _plotly_utils/png.py
|
sed -i '1{/env python/ d}' _plotly_utils/png.py
|
||||||
# homogenize mtime of all __init__.py files for deduplicated compile cache consistency
|
# homogenize mtime of all __init__.py files for deduplicated compile cache consistency
|
||||||
find . -name __init__.py -exec touch -m -r plotly/__init__.py '{}' ';'
|
find . -name __init__.py -exec touch -m -r plotly/__init__.py '{}' ';'
|
||||||
# patch the sources and tests in the github archive too
|
|
||||||
pushd ../plotly.py-%{version}
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
popd
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
@ -139,14 +129,18 @@ popd
|
|||||||
# No test suite in the PyPI package, which is required for the bundled JS files, we are using the GitHub repo tree now.
|
# No test suite in the PyPI package, which is required for the bundled JS files, we are using the GitHub repo tree now.
|
||||||
# Important: make sure you patched the sources the same as the github repo
|
# Important: make sure you patched the sources the same as the github repo
|
||||||
pushd ../plotly.py-%{version}/packages/python/plotly
|
pushd ../plotly.py-%{version}/packages/python/plotly
|
||||||
%pytest plotly/tests/test_core
|
# API parameter mismatch
|
||||||
|
donttest="test_described_subscript_error_on_type_error"
|
||||||
|
%pytest plotly/tests/test_core -k "not ($donttest)"
|
||||||
# not available
|
# not available
|
||||||
donttest="test_kaleido"
|
donttest="test_kaleido"
|
||||||
# API parameter mismatches and precision errors
|
# API parameter mismatches and precision errors
|
||||||
donttest+=" or test_matplotlylib"
|
donttest+=" or test_matplotlylib"
|
||||||
# flaky timing error
|
# flaky timing error
|
||||||
donttest+=" or test_fast_track_finite_arrays"
|
donttest+=" or test_fast_track_finite_arrays"
|
||||||
%pytest plotly/tests/test_optional -k "not ($donttest)"
|
# no xarray for python38
|
||||||
|
python38_ignore="--ignore plotly/tests/test_optional/test_px/test_imshow.py"
|
||||||
|
%pytest plotly/tests/test_optional -k "not ($donttest)" ${$python_ignore}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user