plotly / dash-renderer

OBSOLETE has been merged into dash
https://github.com/plotly/dash
MIT License
97 stars 32 forks source link

Difference in Python packages using Debug mode? #90

Closed valentijnnieman closed 5 years ago

valentijnnieman commented 5 years ago

I'm using a modified version of dash_core_components that I built using python setup.py sdist in dev-requirements.txt like so: dash_core_components-0.33.0rc1.tar.gz this works well when not using debug mode in a Dash app, i.e. app.run_server(debug=False) but if I DO use it, all of the sudden it doesn't use the modified package. I am slightly puzzled and don't know how to fix this, any suggestions would be greatly appreciated!

T4rk1n commented 5 years ago

You need to set app.scripts.config.serve_locally=True for it to serve the modified package.

I recommend the following python environment when developping:

I then open all the repo in the same pycharm project so I can debug the javascript easily (the last opened pycharm window is the one that connect to the javascript debugger).

valentijnnieman commented 5 years ago

You need to set app.scripts.config.serve_locally=True for it to serve the modified package.

I did. It works on production mode, but when switching to development (using debug=True) it doesn't work anymore, it takes another version. I just have a copy of dash_core_components-0.33.0rc1.tar.gz in the root of the project and reference that in dev-requirements.txt. What I don't get is that it works fine in production mode, but not in development! Thanks for your help though, I'll try a fresh venv and see if that fixes anything.

valentijnnieman commented 5 years ago

Nevermind, I'm a big dummy! I forgot to build the dash_core_components dev bundle, so the sdist package only had the production one 🙈 I forgot about it being separated now. Thanks for your help @T4rk1n

T4rk1n commented 5 years ago

That's why I put the build:js-dev in prepublish 🙈, but prepublish doesn't run on setup.py sdist.