Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

plotly/dash-core-components

Folders and files

NameName
Last commit message
Last commit date

Latest commit

c2153db · Jun 10, 2020
Jun 5, 2020
Mar 27, 2020
Mar 14, 2020
Mar 27, 2020
Oct 14, 2017
May 2, 2020
May 27, 2020
Mar 27, 2020
Jul 2, 2019
Jun 26, 2016
Aug 26, 2019
Apr 29, 2018
Oct 21, 2019
Mar 14, 2020
Dec 17, 2019
Mar 14, 2020
Aug 31, 2018
May 5, 2020
Mar 27, 2020
Sep 5, 2019
Feb 27, 2020
Jun 12, 2019
Mar 27, 2020
Sep 26, 2019
Jan 9, 2020
May 3, 2020
Jun 2, 2020
Feb 28, 2019
Jun 21, 2019
May 5, 2020
May 5, 2020
Apr 9, 2020
Mar 19, 2019
Mar 27, 2020
Feb 27, 2020
Feb 28, 2019

Repository files navigation

Dash Core Components

This package provides the core React component suite for Dash.

CircleCI

Development

The dash package contains some tools to build components and drive the bundles build process. To avoid the circular dependency situation, we don't add dash as a required install in the dash-core-components setup. But, in order to do development locally, you need to install dash before everything.

  1. Install the dependencies with:
# it's recommended to install your python packages in a virtualenv
# python 2
$ pip install virtualenv --user && virtualenv venv && . venv/bin/activate
# python 3
$ python -m venv venv && . venv/bin/activate

# make sure dash is installed with dev and testing dependencies
$ pip install dash[dev,testing]  # in some shells you need \ to escape []

# run the build process
$ npm i --ignore-scripts && npm run build

# install dcc in editable mode
$ pip install -e .

Demo server

You can start up a demo development server to see a demo of the rendered components:

$ npm start

You have to maintain the list of components in demo/Demo.react.js.

Code quality and tests

To run integration tests (test_integration.py)

You can run the Selenium integration tests with the

npm test

command, and the Jest unit tests with the

npm run test-unit

Testing your components in Dash

  1. Run the build watcher by running $ npm run build:watch

  2. Run the dash layout you want to test

     # Import dash_core_components to your layout, then run it:
     $ python my_dash_layout.py
    

Uninstalling python package locally

$ npm run uninstall-local

Publishing

There's an npm script that will handle publish, provided you have the right credentials. You can run it by running

$ npm run publish-all

See the Publishing New Components/Features section of the Contributing guide for step-by-step instructions on publishing new components.

Dash Component Boilerplate

See the dash-component-boilerplate repo for more information.

Big Thanks

Cross-browser Testing Powered by image