shiny-plotly 0.4.1__tar.gz → 0.4.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/CHANGELOG.md +6 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/PKG-INFO +1 -1
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/pyproject.toml +1 -1
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_validate.py +5 -4
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_update.py +5 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/.gitignore +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/LICENSE +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/README.md +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/core_app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/dark_app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/events_app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/express_app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/shinylive/app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/shinylive/requirements.txt +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/examples/streaming_app.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/__init__.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_deps.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_html.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_render.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_serve.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/_update.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/py.typed +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/src/shiny_plotly/www/shiny-plotly.js +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/__init__.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/apps.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/conftest.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_browser.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_dark_mode.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_events.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_shinylive_demo.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_streaming_example.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/browser/test_update.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/helpers.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/newplot.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_compressed_js.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_examples.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_fig_to_ui.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_pages_contract.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_plotly_js.py +0 -0
- {shiny_plotly-0.4.1 → shiny_plotly-0.4.2}/tests/test_render_plotly.py +0 -0
|
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.4.2](https://github.com/rvben/shiny-plotly/compare/v0.4.1...v0.4.2) - 2026-09-25
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- A numpy bool is refused as `indices`, `max_points` or `max_event_points`, like a Python `bool`. With numpy older than 2.3, `np.True_` was taken as the integer 1 (with only a DeprecationWarning), so `max_points=np.True_` capped a trace at one point instead of raising.
|
|
15
|
+
|
|
10
16
|
## [0.4.1](https://github.com/rvben/shiny-plotly/compare/v0.4.0...v0.4.1) - 2026-09-25
|
|
11
17
|
|
|
12
18
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: shiny-plotly
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
4
4
|
Summary: Render plotly figures in Shiny for Python with plain plotly.js, without the shinywidgets layer.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rvben/shiny-plotly
|
|
6
6
|
Project-URL: Repository, https://github.com/rvben/shiny-plotly
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "shiny-plotly"
|
|
7
|
-
version = "0.4.
|
|
7
|
+
version = "0.4.2"
|
|
8
8
|
description = "Render plotly figures in Shiny for Python with plain plotly.js, without the shinywidgets layer."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -11,11 +11,12 @@ def as_int(value: Any) -> int:
|
|
|
11
11
|
``value`` as a Python int, for anything integer-like: ``int`` and numpy's integers.
|
|
12
12
|
|
|
13
13
|
Raises TypeError for anything else. ``bool`` is refused by name: it is an int in Python
|
|
14
|
-
but serializes to a JSON ``true``, which plotly.js does not read as a number
|
|
15
|
-
bool is
|
|
16
|
-
|
|
14
|
+
but serializes to a JSON ``true``, which plotly.js does not read as a number. numpy's
|
|
15
|
+
bool is refused by its dtype, since numpy before 2.3 still lets it pass as an index,
|
|
16
|
+
with only a DeprecationWarning, as 0 or 1. A float, even a whole one, is refused as
|
|
17
|
+
well, the way ``range()`` and list indexing refuse it.
|
|
17
18
|
"""
|
|
18
|
-
if isinstance(value, bool):
|
|
19
|
+
if isinstance(value, bool) or getattr(getattr(value, "dtype", None), "kind", None) == "b":
|
|
19
20
|
raise TypeError(f"expected an integer, got {value!r}")
|
|
20
21
|
return operator.index(value)
|
|
21
22
|
|
|
@@ -196,6 +196,11 @@ def test_numpy_non_integers_are_refused_like_their_python_counterparts():
|
|
|
196
196
|
run(extend_traces("fig", {"y": [[1]]}, max_points=np.bool_(True)))
|
|
197
197
|
with pytest.raises(ValueError, match="indices"):
|
|
198
198
|
run(restyle("fig", {"opacity": 1}, indices=np.array([0.5])))
|
|
199
|
+
# numpy before 2.3 still reads its bools as indices 0 and 1, warning only.
|
|
200
|
+
with pytest.raises(ValueError, match="indices"):
|
|
201
|
+
run(restyle("fig", {"opacity": 1}, indices=np.True_))
|
|
202
|
+
with pytest.raises(ValueError, match="indices"):
|
|
203
|
+
run(restyle("fig", {"opacity": 1}, indices=np.array([True, False])))
|
|
199
204
|
|
|
200
205
|
|
|
201
206
|
def test_add_traces_requires_at_least_one_trace():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|