Skip to content

Commit

Permalink
Merge branch 'dev' into fix-is-outside-range-function
Browse files Browse the repository at this point in the history
  • Loading branch information
nickmelnikov82 committed Apr 15, 2022
2 parents 067e587 + 9bebdce commit 6107481
Show file tree
Hide file tree
Showing 47 changed files with 522 additions and 329 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ jobs:
. venv/bin/activate && rm -rf components/dash-core-components/dash_core_components
cd components/dash-core-components
TESTFILES=$(circleci tests glob "tests/integration/**/test_*.py" | circleci tests split --split-by=timings)
pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml --junitprefix="components.dash-core-components" ${TESTFILES}
pytest --headless --nopercyfinalize --junitxml=test-reports/junit_intg.xml --junitprefix="components.dash-core-components" ${TESTFILES} --reruns 3
- store_artifacts:
path: ~/dash/components/dash-core-components/test-reports
- store_test_results:
Expand Down Expand Up @@ -385,7 +385,7 @@ jobs:
PERCY_ENABLE: 1
PERCY_PARALLEL_TOTAL: -1

parallelism: 4
parallelism: 5

steps:
- checkout:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
All notable changes to `dash` will be documented in this file.
This project adheres to [Semantic Versioning](https://semver.org/).

## [2.3.1] - 2022-03-29

### Fixed

- [#1963](https://github.com/plotly/dash/pull/1963) Fix [#1780](https://github.com/plotly/dash/issues/1780) flask shutdown deprecation warning when running dashduo threaded tests.
- [#1995](https://github.com/plotly/dash/pull/1995) Fix [#1992](https://github.com/plotly/dash/issues/1992) ImportError: cannot import name 'get_current_traceback' from 'werkzeug.debug.tbtools'.

## [2.3.0] - 2022-03-13

### Added
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Built on top of [Plotly.js](https://github.com/plotly/plotly.js), [React](https:
|![Sample Dash App](https://user-images.githubusercontent.com/1280389/30086128-9bb4a28e-9267-11e7-8fe4-bbac7d53f2b0.gif) | Here’s a simple example of a Dash App that ties a Dropdown to a Plotly Graph. As the user selects a value in the Dropdown, the application code dynamically exports data from Google Finance into a Pandas DataFrame. This app was written in just **43** lines of code ([view the source](https://gist.github.com/chriddyp/3d2454905d8f01886d651f207e2419f0)). |
|![Crossfiltering Dash App](https://user-images.githubusercontent.com/1280389/30086123-97c58bde-9267-11e7-98a0-7f626de5199a.gif)|Dash app code is declarative and reactive, which makes it easy to build complex apps that contain many interactive elements. Here’s an example with 5 inputs, 3 outputs, and cross filtering. This app was composed in just 160 lines of code, all of which were Python.|
|![Dash App with Mapbox map showing walmart store openings](https://user-images.githubusercontent.com/1280389/30086299-768509d0-9268-11e7-8e6b-626ac9ca512c.gif)| Dash uses [Plotly.js](https://github.com/plotly/plotly.js) for charting. About 50 chart types are supported, including maps. |
|![Financial report](https://github.com/plotly/dash-docs/blob/516f80c417051406210b94ea23a6d3b6cd84d146/assets/images/gallery/dash-financial-report.gif)| Dash isn't just for dashboards. You have full control over the look and feel of your applications. Here's a Dash App that's styled to look like a PDF report. |
|![Financial report](https://user-images.githubusercontent.com/2678795/161153710-57952401-6e07-42d5-ba3e-bab6419998c7.gif)| Dash isn't just for dashboards. You have full control over the look and feel of your applications. Here's a Dash App that's styled to look like a PDF report. |

To learn more about Dash, read the [extensive announcement letter](https://medium.com/@plotlygraphs/introducing-dash-5ecf7191b503) or [jump in with the user guide](https://plotly.com/dash).

Expand Down Expand Up @@ -53,4 +53,4 @@ Enterprise AI Features: Everything that your data science team needs to rapidly

See [https://plotly.com/contact-us/](https://plotly.com/contact-us/) to get in touch.

![image](https://images.prismic.io/plotly-marketing-website/493eec39-8467-4610-b9d0-d6ad3ea61423_Dash+Open+source%2BDash+enterprise2-01.jpg?auto=compress,format)
![Dash Enterprise](https://user-images.githubusercontent.com/2678795/161155614-21c54a22-f821-4dda-b910-ee27e27fb5f2.png)
2 changes: 1 addition & 1 deletion components/dash-core-components/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"private::lint.prettier": "prettier --config .prettierrc src/**/*.js --list-different",
"prepublishOnly": "rm -rf lib && babel src --out-dir lib --copy-files && rm -rf lib/jl/ lib/*.jl",
"test": "run-s -c lint test:intg test:pyimport",
"test:intg": "pytest --nopercyfinalize --headless tests/integration",
"test:intg": "pytest --nopercyfinalize --headless tests/integration --reruns 3",
"test:pyimport": "python -m unittest tests/test_dash_import.py",
"prebuild:js": "cp node_modules/plotly.js-dist-min/plotly.min.js dash_core_components_base/plotly.min.js && cp node_modules/mathjax/es5/tex-svg.js dash_core_components_base/mathjax.js",
"build:js": "webpack --mode production",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import time

import pytest
import werkzeug

from dash import Dash, Input, Output, html, dcc, no_update


Expand Down Expand Up @@ -73,6 +75,11 @@ def test_dtps010_local_and_session_persistence(dash_dcc):
assert dash_dcc.get_logs() == []


@pytest.mark.xfail(
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
reason="Bug with 204 and Transfer-Encoding",
strict=False,
)
def test_dtps011_memory_persistence(dash_dcc):
app = Dash(__name__)
app.layout = html.Div(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def update_options(search_value):
dash_dcc.start_server(app)

# Get the inner input used for search value.
dropdown = dash_dcc.find_element("#my-dynamic-dropdown")
input_ = dropdown.find_element_by_css_selector("input")
input_ = dash_dcc.find_element("#my-dynamic-dropdown input")

# Focus on the input to open the options menu
input_.send_keys("x")
Expand All @@ -36,15 +35,15 @@ def update_options(search_value):
input_.clear()
input_.send_keys("o")

options = dropdown.find_elements_by_css_selector(".VirtualizedSelectOption")
options = dash_dcc.find_elements("#my-dynamic-dropdown .VirtualizedSelectOption")

# Should show all options.
assert len(options) == 3

# Searching for `on`
input_.send_keys("n")

options = dropdown.find_elements_by_css_selector(".VirtualizedSelectOption")
options = dash_dcc.find_elements("#my-dynamic-dropdown .VirtualizedSelectOption")

assert len(options) == 1
print(options)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
import pytest
import time
import json

import werkzeug

from dash import Dash, Input, Output, State, dcc, html
from dash.exceptions import PreventUpdate
from selenium.webdriver.common.by import By
Expand Down Expand Up @@ -128,7 +131,7 @@ def show_relayout_data(data):

# use this opportunity to test restyleData, since there are multiple
# traces on this graph
legendToggle = dash_dcc.driver.find_element_by_css_selector(
legendToggle = dash_dcc.find_element(
"#example-graph .traces:first-child .legendtoggle"
)
legendToggle.click()
Expand All @@ -142,7 +145,7 @@ def show_relayout_data(data):
)

# and test relayoutData while we're at it
autoscale = dash_dcc.driver.find_element_by_css_selector("#example-graph .ewdrag")
autoscale = dash_dcc.find_element("#example-graph .ewdrag")
autoscale.click()
autoscale.click()
dash_dcc.wait_for_text_to_equal("#relayout-data", '{"xaxis.autorange": true}')
Expand Down Expand Up @@ -185,6 +188,10 @@ def render_content(click, prev_graph):
assert dash_dcc.get_logs() == []


@pytest.mark.skipif(
werkzeug.__version__ in ("2.1.0", "2.1.1"),
reason="Bug with no_update 204 responses get Transfer-Encoding header.",
)
@pytest.mark.parametrize("is_eager", [True, False])
def test_grva004_graph_prepend_trace(dash_dcc, is_eager):
app = Dash(__name__, eager_loading=is_eager)
Expand Down Expand Up @@ -357,6 +364,10 @@ def display_data(trigger, fig):
assert dash_dcc.get_logs() == []


@pytest.mark.skipif(
werkzeug.__version__ in ("2.1.0", "2.1.1"),
reason="Bug with no_update 204 responses get Transfer-Encoding header.",
)
@pytest.mark.parametrize("is_eager", [True, False])
def test_grva005_graph_extend_trace(dash_dcc, is_eager):
app = Dash(__name__, eager_loading=is_eager)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def extras(t):
dcc.Link(
children="Absolute Path",
id="link1",
href=dash_dcc.server.url + "/extra/eseehc",
href="/extra/eseehc",
refresh=True,
),
dcc.Location(id="url", refresh=False),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def display_page(pathname):
dash_dcc.wait_for_text_to_equal("#page-content", "You are on page /test-link")

wait.until(
lambda: test_link.get_attribute("href") == "http://localhost:8050/test-link", 3
lambda: test_link.get_attribute("href")
== "http://localhost:{}/test-link".format(dash_dcc.server.port),
3,
)
wait.until(lambda: call_count.value == 2, 3)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def update_pathname(n_clicks, current_pathname):
# Check that link updates pathname
dash_dcc.find_element("#test-link").click()
until(
lambda: dash_dcc.driver.current_url.replace("http://localhost:8050", "")
lambda: dash_dcc.driver.current_url.replace(
"http://localhost:{}".format(dash_dcc.server.port), ""
)
== "/test/pathname",
3,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
import pytest
import werkzeug

import dash.testing.wait as wait


@pytest.mark.xfail(
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
reason="Bug with 204 and Transfer-Encoding",
strict=False,
)
def test_stdl001_data_lifecycle_with_different_condition(store_app, dash_dcc):
dash_dcc.start_server(store_app)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import werkzeug

from dash import Dash, Input, Output, dcc, html
from dash.exceptions import PreventUpdate
import json
Expand Down Expand Up @@ -119,6 +121,11 @@ def render_content(tab):
assert dash_dcc.get_logs() == []


@pytest.mark.xfail(
condition=werkzeug.__version__ in ("2.1.0", "2.1.1"),
reason="Bug with 204 and Transfer-Encoding",
strict=False,
)
@pytest.mark.parametrize("is_eager", [True, False])
def test_tabs_render_without_selected(dash_dcc, is_eager):
app = Dash(__name__, eager_loading=is_eager)
Expand Down
34 changes: 8 additions & 26 deletions components/dash-html-components/scripts/data/attributes.json
Original file line number Diff line number Diff line change
Expand Up @@ -417,12 +417,6 @@
],
"description": "Indicates the upper bound of the lower range."
},
"manifest": {
"elements": [
"html"
],
"description": "Specifies the URL of the document's cache manifest. Note: This attribute is obsolete, use <link rel=\"manifest\"> instead."
},
"max": {
"elements": [
"input",
Expand Down Expand Up @@ -511,7 +505,7 @@
"details",
"dialog"
],
"description": "Indicates whether the the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element)."
"description": "Indicates whether the contents are currently visible (in the case of a <details> element) or whether the dialog is active and can be interacted with (in the case of a <dialog> element)."
},
"optimum": {
"elements": [
Expand Down Expand Up @@ -591,6 +585,12 @@
],
"description": "Indicates whether the list should be displayed in a descending order instead of a ascending."
},
"role": {
"elements": [
"Globalattribute"
],
"description": "Defines an explicit role for an element for use by assistive technologies."
},
"rows": {
"elements": [
"textarea"
Expand All @@ -616,12 +616,6 @@
],
"description": "Defines the cells that the header test (defined in the th element) relates to."
},
"scoped": {
"elements": [
"style"
],
"description": ""
},
"selected": {
"elements": [
"option"
Expand Down Expand Up @@ -714,12 +708,6 @@
],
"description": "Defines CSS styles which will override styles previously set."
},
"summary": {
"elements": [
"table"
],
"description": ""
},
"tabIndex": {
"elements": [
"Globalattribute"
Expand Down Expand Up @@ -852,6 +840,7 @@
"hidden",
"id",
"lang",
"role",
"spellCheck",
"style",
"tabIndex",
Expand Down Expand Up @@ -1110,9 +1099,6 @@
"marquee": [
"loop"
],
"html": [
"manifest"
],
"source": [
"media",
"sizes",
Expand All @@ -1122,7 +1108,6 @@
],
"style": [
"media",
"scoped",
"type"
],
"map": [
Expand All @@ -1148,9 +1133,6 @@
"colgroup": [
"span"
],
"table": [
"summary"
],
"menu": [
"type"
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,11 +145,6 @@ function generatePropTypes(element, attributes) {
*/
'key': PropTypes.string,

/**
* The ARIA role attribute
*/
'role': PropTypes.string,

/**
* A wildcard data attribute
*/
Expand Down
Loading

0 comments on commit 6107481

Please sign in to comment.