Comments (11)
@shammamah : I did
import dash
def run_standalone_app(layout, callbacks, port=8050, debug=True):
app = dash.Dash()
app.scripts.config.serve_locally = True
app.config["suppress_callback_exceptions"] = True
server = app.server
app.layout = layout() # assign layout
callbacks(app) # register all of the callbacks
app.run_server(debug=debug, port=port)
in a app_standalone.py
file in tests/dashbio_demos/utils
, then
if __name__ == '__main__':
from tests.dashbio_demos.utils.app_standalone import run_standalone_app
run_standalone_app(layout, callbacks)
at the end of an app file works (for me at least).
Then the css needs to be linked properly :)
from dash-bio.
@mkcor I don't have a branch for this yet, you can create it :)
from dash-bio.
Aww unrelated but app_molecule3d.py
must have been written on Windows because I'm stuck in this nightmare https://stackoverflow.com/questions/64749/m-character-at-end-of-lines :(
from dash-bio.
@shammamah Oh, of course it works locally!! haha
Will edit ;)
from dash-bio.
@mkcor @Bachibouzouk We can easily convert each app_[]
file to a standalone app by adding the following lines:
app = dash.Dash()
app.scripts.config.serve_locally = True
app.config["suppress_callback_exceptions"] = True
server = app.server
somewhere in the beginning of the file and
if __name__ == '__main__':
app.layout = layout() # assign layout
callbacks(app) # register all of the callbacks
app.run_server(debug=True)
at the end. Will try this out with one of our applications and confirm :)
from dash-bio.
@Bachibouzouk Great idea -- then all we really need to change is the Procfile
for each application :)
from dash-bio.
Ok! @Bachibouzouk Do you have a work-in-progress branch for this, that I should piggyback on? If not, I'll create one.
from dash-bio.
My work-in-progress lives on branch mkcor-standalone-apps.
For the first commit on it (14b5023), I have used this nice GitHub feature: https://help.github.com/articles/creating-a-commit-with-multiple-authors/ ;)
I haven't included server = app.server
in the code for the helper function, since server
isn't used afterwards (tested locally that demo apps still run as standalone as expected without it).
from dash-bio.
@mkcor We need to expose the variable for the apps to run on the server. So it will work locally, but it will break once it's uploaded :)
from dash-bio.
@shammamah : is this issue still open?
from dash-bio.
@Bachibouzouk It shouldn't be! Fixed in #149 -- must have forgotten to close it :)
from dash-bio.
Related Issues (20)
- Browser scrolls and zooms simultaniously NglMoleculeViewer HOT 1
- Molecule3dViewer from .xyz? HOT 1
- More customizable dash-bio Oncoprint features?
- Removing heatmap outline in Circos plot?
- Alignment chart hover display
- Small bug in dash-bio/dash_bio/component_factory/_manhattan.py HOT 1
- Re-enable Speck component tests
- Can't display ESMFold Protein Predictions HOT 1
- Y axis labels overlapping
- Clustergram documentation error
- Clustergram "row_colors" and "column_colors" properties documentation not clear HOT 2
- jsme in callbacks HOT 1
- Oncoprint error: Cannot read properties of undefined (reading 'displayName') HOT 1
- Molecule3dViewer dynamic height and width
- NglMoleculeViewer downloadImage resets view
- JSME examples don't run - fails to load /jsme/jsme.nocache.js HOT 1
- dash_bio.Circos tooltip wrong position if page is scrolled HOT 2
- ManhattanPlot: Incorrect tooltip information for all variants below threshold HOT 1
- Nonstandard Atom Window Text Input Element Unfocusable HOT 1
- js element TypeError: Cannot read properties of undefined (reading 'Config')
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dash-bio.