dpd-components v0.1.0
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-componentsDevelopment 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.6
source env/bin/activate
pip install dev_requirements.txt
npm install builder-init
export PATH=$PATH:$PWD/node_modules/.bin
builder-init dash-components-archetypeIf 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/activate
export PATH=$PATH:$PWD/node_modules/.binAlso, 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 developBuild commands
To test the component:
python usage.pyTo run the README compiler:
gripTo perform a local rebuild:
npm prepublish
python setup.py installTo run just the javascript for debugging:
builder run demoRelease
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.