dpd-components
This repository contains components for Django Plotly Dash. This is a Plotly Dash plugin.
The source for this project can be seen here: https://github.com/GibbsConsulting/dpd-components
To install the package
pip install dpd-components
Development environment setup
Development requires python 3 and node.js to build the python and javascript parts.
To set up a development environment:
virtualenv env -p python3.6source env/bin/activatepip install dev_requirements.txtnpm install builder-initexport PATH=$PATH:$PWD/node_modules/.binbuilder-init dash-components-archetype
If needed, relocate the component into root directory.
Development
Once the environment has been prepared, the following two commands are needed to initialise a terminal or other session:
source env/bin/activateexport PATH=$PATH:$PWD/node_modules/.bin
Also, in the virtualenv of the python project using DjangoDash
(or similar), this project can be added in development form
cd ... this repo root directory ...python setyp.py develop
Build commands
To test the component:
python usage.py
To run the README compiler:
grip
To perform a local rebuild:
npm prepublishpython setup.py install
To run just the javascript for debugging:
builder run demo
Release
To prepare a release, the version number in both dpd_components/version.py
and package.json
has to be updated.
Releases require both javascript and python components to be generated and uploaded, as described in the plotly online documentation.