Skip to content

Commit 51838f9

Browse files
author
Marc-André Rivet
committed
Merge remote-tracking branch 'origin/master' into 1.0.0-release
# Conflicts: # CHANGELOG.md # dash/version.py
2 parents 5df0da3 + 50c6c41 commit 51838f9

26 files changed

+1228
-702
lines changed

.circleci/requirements/dev-requirements-py37.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dash_core_components==0.35.1
1+
dash_core_components>=0.40.2
22
dash_html_components==0.12.0rc3
33
dash-flow-example==0.0.3
44
dash-dangerously-set-inner-html

.circleci/requirements/dev-requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
dash_core_components==0.35.1
1+
dash_core_components>=0.40.2
22
dash_html_components>=0.12.0rc3
33
dash_flow_example==0.0.3
44
dash-dangerously-set-inner-html

.pylintrc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ disable=fixme,
5858
missing-docstring,
5959
invalid-name,
6060
too-many-lines,
61-
old-style-class
61+
old-style-class,
62+
superfluous-parens
63+
6264
# Enable the message, report, category or checker with the given id(s). You can
6365
# either give multiple identifier separated by comma (,) or put this option
6466
# multiple time (only on the command line, not in the configuration file where

.pylintrc37

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ disable=invalid-name,
146146
no-else-return,
147147
useless-object-inheritance,
148148
possibly-unused-variable,
149-
too-many-lines
149+
too-many-lines,
150+
too-many-statements
150151

151152
# Enable the message, report, category or checker with the given id(s). You can
152153
# either give multiple identifier separated by comma (,) or put this option

CHANGELOG.md

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,35 @@
1-
## [1.0.0-rc1] - 2018-11-12
1+
## [1.0.0a1] - 2018-12-17
22
### Changed
3-
- Updated `react` and `react-dom` in other Dash repo's to version `16.6.1`. Upgrading to React 16 includes some small breaking changes, discussed [here](https://reactjs.org/blog/2017/09/26/react-v16.0.html#breaking-changes)
3+
- Initial Dash 1.0 alpha release [#3](https://github.com/plotly/dash-core/issues/3)
4+
5+
## 0.33.0 - 2018-12-10
6+
## Added
7+
- Added specific Dash exception types to replace generic exceptions (InvalidIndexException, DependencyException, ResourceException) [#487](https://github.com/plotly/dash/pull/487)
8+
9+
## 0.32.2 - 2018-12-09
10+
## Fixed
11+
- Fix typo in missing events/inputs error message [#485](https://github.com/plotly/dash/pull/485)
12+
13+
## 0.32.1 - 2018-12-07
14+
## Changed
15+
- Muted dash related missing props docstring from extract-meta warnings [#484](https://github.com/plotly/dash/pull/484)
16+
17+
## 0.32.0 - 2018-12-07
18+
## Added
19+
- Support for .map file extension and dynamic (on demand) loading [#478](https://github.com/plotly/dash/pull/478)
20+
21+
## 0.31.1 - 2018-11-29
22+
## Fixed
23+
- Fix `_imports_.py` indentation generation. [#473](https://github.com/plotly/dash/pull/473/files)
24+
25+
## 0.31.0 - 2018-11-29
26+
## Added
27+
- Combined `extract-meta` and python component files generation in a cli [#451](https://github.com/plotly/dash/pull/451)
28+
29+
## 0.30.0 - 2018-11-14
30+
## Added
31+
- Hot reload from the browser [#362](https://github.com/plotly/dash/pull/362)
32+
- Silence routes logging with `dev_tools_silence_routes_logging`.
433

534
## 0.29.0 - 2018-11-06
635
## Added
@@ -92,7 +121,7 @@
92121
- Take configs values from init or environ variables (Prefixed with `DASH_`). [#322](https://github.com/plotly/dash/pull/322)
93122

94123
## Fixed
95-
- Take `requests_pathname_prefix` config when creating scripts tags.
124+
- Take `requests_pathname_prefix` config when creating scripts tags.
96125
- `requests/routes_pathname_prefix` must starts and end with `/`.
97126
- `requests_pathname_prefix` must ends with `routes_pathname_prefix`. If you supplied both `requests` and `routes` pathname before this update, make sure `requests_pathname_prefix` ends with the same value as `routes_pathname_prefix`.
98127
- `url_base_pathname` set both `requests/routes` pathname, cannot supply it with either `requests` or `routes` pathname prefixes.

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ _For larger features, your contribution will have a higher likelihood of getting
8686
- [ ] If significant enough, you have created an issue about documenting the new feature or change and you have added it to the [Documentation] project.
8787
- [ ] You have created a pull request in [Dash Docs] with the new release of your feature by editing that project's [`requirements.txt` file](https://github.com/plotly/dash-docs/blob/master/requirements.txt) and you have assigned `@chriddyp` to review.
8888

89-
### Versioning Policy
89+
## Versioning Policy
9090
This repository adheres to [semver](https://semver.org/). The following policy is in effect for `dash`, `dash-core-components`, `dash-html-components` and `dash-renderer`:
9191
1. Matching major version numbers are guarenteed to work together.
9292
2. Any change to the public API (breaking change) will increase a major version.
@@ -95,17 +95,17 @@ This repository adheres to [semver](https://semver.org/). The following policy i
9595

9696
### Major Release Candidate Window
9797
1. The major release candidate window will be announced internally at Plotly and through our popular community channels.
98-
2. Within one day `dash`, `dash-core-components`, `dash-html-components` and `dash-renderer` master branches will be reversioned as `N.0.0-rc1` and published.
98+
2. `dash`, `dash-core-components`, `dash-html-components` and `dash-renderer` master branches will be reversioned as `N.0.0-rc1` on the same day and published for testing.
9999
3. Pull requests especially those containing breaking changes will be merged.
100100
4. Per repo tests will be updated to target the latest `rc` versions.
101101
5. [dash-docs](https://github.com/plotly/dash-docs), some apps in the [dash gallery](https://dash.plot.ly/gallery) and Plotly internal projects will be updated to target the latest `rc` versions.
102102
6. steps 3-5 will continue until all breaking changes have been merged.
103103
7. A major release candidate freeze will go into effect. During this time steps 3-5 will continue but only bug fixes will be merged.
104-
8. Within one day `dash`, `dash-core-components`, `dash-html-components` and `dash-renderer` master branches will be reversioned as `N.0.0` and published ending the major release cnadidate window.
104+
8. Once testing and Q/A is complete `dash`, `dash-core-components`, `dash-html-components` and `dash-renderer` master branches will be reversioned as `N.0.0` and published ending the major release candidate window.
105105

106106
### Backporting fixes
107107
During and after the major release candidate window bug fixes that can apply to pre-major release candidate releases should be backported. This is accomplished by:
108-
1. If a pre-major release branch does not exist then check out a branch at the tag defining the last published release before the previous major release candidate window began. For example if we are in the `1.x` series and the last pre-`1.x` series release is `v0.18.1` checkout a branch at `0.18.1` called `0.18-release`. If the branch does exist check it out.
108+
1. If a pre-major release branch does not exist then check out a branch at the tag defining the last published release before the previous major release candidate window began. For example if we are in the `1.x` series and the last pre-`1.x` series release is `v0.18.1` checkout a branch at `v0.18.1` called `0.18-release`. If the branch does exist check it out.
109109
2. Cherry-pick or otherwise reapply the fix to the pre-major release branch and update the patch version. In the example above the new version and tag will be `v0.18.2` on the `0.18-release` branch.
110110
3. Publish.
111111

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
include README.md
22
include LICENSE
33
include dash/favicon.ico
4+
include dash/extract-meta.js

dash/_configs.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,12 @@ def env_configs():
2222
'DASH_COMPONENTS_CACHE_MAX_AGE',
2323
'DASH_INCLUDE_ASSETS_FILES',
2424
'DASH_SERVE_DEV_BUNDLES',
25-
'DASH_DEBUG'
25+
'DASH_DEBUG',
26+
'DASH_HOT_RELOAD',
27+
'DASH_HOT_RELOAD_INTERVAL',
28+
'DASH_HOT_RELOAD_WATCH_INTERVAL',
29+
'DASH_HOT_RELOAD_MAX_RETRY',
30+
'DASH_SILENCE_ROUTES_LOGGING'
2631
)})
2732

2833

dash/_utils.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import uuid
2+
3+
14
def interpolate_str(template, **data):
25
s = template
36
for k, v in data.items():
@@ -20,12 +23,15 @@ def format_tag(tag_name, attributes, inner='', closed=False, opened=False):
2023
'{}="{}"'.format(k, v) for k, v in attributes.items()]))
2124

2225

26+
def generate_hash():
27+
return str(uuid.uuid4().hex).strip('-')
28+
29+
2330
def get_asset_path(
2431
requests_pathname,
2532
routes_pathname,
2633
asset_path,
2734
asset_url_path):
28-
2935
i = requests_pathname.rfind(routes_pathname)
3036
req = requests_pathname[:i]
3137

dash/_watch.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
import collections
2+
import os
3+
import re
4+
import time
5+
6+
7+
def watch(folders, on_change, pattern=None, sleep_time=0.1):
8+
pattern = re.compile(pattern) if pattern else None
9+
watched = collections.defaultdict(lambda: -1)
10+
11+
def walk():
12+
walked = []
13+
for folder in folders:
14+
for current, _, files, in os.walk(folder):
15+
for f in files:
16+
if pattern and not pattern.search(f):
17+
continue
18+
path = os.path.join(current, f)
19+
20+
info = os.stat(path)
21+
new_time = info.st_mtime
22+
23+
if new_time > watched[path] > 0:
24+
on_change(path, new_time, False)
25+
26+
watched[path] = new_time
27+
walked.append(path)
28+
29+
# Look for deleted files
30+
for w in [x for x in watched.keys() if x not in walked]:
31+
del watched[w]
32+
on_change(w, -1, True)
33+
34+
while True:
35+
walk()
36+
time.sleep(sleep_time)

0 commit comments

Comments
 (0)