-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2507 from plotly/master-2.9.3
Master 2.9.3
- Loading branch information
Showing
22 changed files
with
107 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
__version__ = "2.9.2" | ||
__version__ = "2.9.3" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import pytest | ||
from dash import Dash, html, Output, Input | ||
|
||
|
||
@pytest.mark.skip(reason="Hot-reload & clientside callbacks doesn't work properly") | ||
def test_clrs001_clientside_inline_restarts(dash_duo_mp): | ||
# FIXME find another way to test clientside callbacks restarts | ||
reloads = 0 | ||
|
||
def create_app(): | ||
nonlocal reloads | ||
|
||
app = Dash(__name__) | ||
|
||
app.layout = html.Div( | ||
[ | ||
html.Button("Click", id="click"), | ||
html.Div(id="output"), | ||
html.Div(reloads, id="reload"), | ||
] | ||
) | ||
|
||
app.clientside_callback( | ||
"(n_clicks) => `clicked ${n_clicks}`", | ||
Output("output", "children"), | ||
Input("click", "n_clicks"), | ||
prevent_initial_call=True, | ||
) | ||
reloads += 1 | ||
return app | ||
|
||
hot_reload_settings = dict( | ||
dev_tools_hot_reload=True, | ||
dev_tools_ui=True, | ||
dev_tools_serve_dev_bundles=True, | ||
dev_tools_hot_reload_interval=0.1, | ||
dev_tools_hot_reload_max_retry=100, | ||
) | ||
|
||
dash_duo_mp.start_server(create_app(), **hot_reload_settings) | ||
dash_duo_mp.find_element("#click").click() | ||
dash_duo_mp.wait_for_text_to_equal("#output", "clicked 1") | ||
|
||
dash_duo_mp.server.stop() | ||
|
||
dash_duo_mp.start_server(create_app(), navigate=False, **hot_reload_settings) | ||
dash_duo_mp.wait_for_text_to_equal("#reload", "1") | ||
dash_duo_mp.find_element("#click").click() | ||
# reloaded so 1 again. | ||
dash_duo_mp.wait_for_text_to_equal("#output", "clicked 1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters