-
-
Notifications
You must be signed in to change notification settings - Fork 193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Async dash bio #430
Async dash bio #430
Conversation
@Marc-Andre-Rivet Could you please merge in the latest changes from |
What happens if someone upgrades to async-friendly dash-bio but they still have pre-async dash 1.0? Do we need to bump dash-bio's dash requirement up to 1.5? |
Sadly this will fail as dash will throw upon seeing |
# Conflicts: # dash_bio/bundle.js # dash_bio/metadata.json # package-lock.json # src/lib/components/Ideogram.react.js
'dynamic': True | ||
} for async_resource in async_resources]) | ||
|
||
_js_dist.extend([ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not for this PR, but at some point - like perhaps, whenever we get around to fully generating __init__.py
- this all seems ripe for abstracting into the dash core, like
_js_dist = _dash.development.list_resources(
['bundle.js'],
['async~{}.js'.format(resource) for resource in async_resources],
external_prefix='https://unpkg.com/dash-bio@{}/dash_bio'.format(__version__)
)
May still need some tweaking to handle edge cases like async: 'eager'|'lazy'
, but we should at least be able to auto-detect sourcemaps (which may not exist in release versions plotly/dash#910) and set them all dynamic: True
regardless of the resource setting.
@@ -42,7 +75,7 @@ | |||
).format(__version__), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey not new in this PR, but __version__
isn't used in this url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔎 Interesting, due to how unpkg.com
processes a this request, this works but will always return the latest released version of that file, could make for pretty nice bugs! Fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone using the remotely hosted code for an old version will have a nasty surprise after this update..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alexcjohnson Good catch! Surprised we haven't run into it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dash 1.5.1 is out, once that's listed here this looks great to me! 💃
- changelog - update artifacts
requirements.txt
Outdated
@@ -2,7 +2,7 @@ | |||
# pip install -r requirements.txt | |||
-e . | |||
cython>=0.19 | |||
dash>=1.0.0 | |||
dash>=1.5.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the demo apps (confusing since the repo contains both the package and the demo apps)... would be better to put it here instead:
Line 27 in 26df493
'dash>=1.0.0', |
Follow-up to plotly/dash#899. Dash-bio is the heaviest component package after DCC. This PR makes all components async.
** Finalizing this will require
dash==1.5.1
with async support to be released and updating the@plotly/webpack-dash-dynamic-import
plugin to1.1.1
About
Description of changes
Before merging