Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Local modifications of Dash Core Components don't get updated in my dash application

Hi.

I’m doing some modifications to the Tabs component for my Dash app, those modifications are in my github fork.
I followed the steps shown in the Dash Core Components repo, I did some small modifications to the Tabs components and then tried them in my Dash app. It worked. However, after that, if I do more modifications to that component, I do npm start and python setup.py install; the Dash app doesn’t get the last version of my custom Tab and those last modifications don’t get into my app.
Nevertheless, the demo development server indeed includes the latest version and works as expected.

I’ve tried to use either global, user or virtual environment for the python packages location, they take the version I’m currently developing, but I can’t get them to be updated with the last version.
I’ve tried to use python setup.py install --force, I’ve even tried to remove the dash_core_components folder inside site-packages (rm -r venv/lib/python3.5/site-packages/dash_core_components-0.13.0rc8.dev1-py3.5.egg) and recreate it, but none worked.

Might I’m missing something?

Try doing npm run prepublish instead of npm start. This will generate the metadata.json info that’s required to generate the python classes dynamically.
python setup.py install should work. I usually double check that it works by modifying the version.py number and doing print(dcc.__version__) at the top of my scripts.
I usually find it easiest to run my test scripts in the root of the dash-core-components folder. If you work inside this folder, doing import dash_core_components will import from the local dash_core_components folder, saving you a python setup.py install step.

It worked! Thank you @chriddyp!
So is the documentation alright and my configuration is unusual, or the documentation should say something about npm run prepublish?
Thank you also for the tip to test quicker the components from the root of dcc folder. I usually test them first in Javascript within the demo folder, but It’d be definitely useful when I wanted to test them in Dash.