Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 65 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
# Contributing to dash-core-components

## Getting Started

Refer to the [readme](README.md) for installation and development instructions.

## Contributions

[Dash Core Components][] consist of pluggable components for creating interactive user interfaces. For generic HTML5 elements, see [Dash HTML Components][]. Contributions are welcome! This repository's open [issues][] are a good place to start. Another way to contribute is to [write your own components][] using the [Dash Components Archetype][].

## Coding Style

Please lint any additions to react components with `npm run lint`. Rules defined in [.eslintrc](.eslintrc) are inherited from [`dash-components-archetype`](https://github.com/plotly/dash-components-archetype)'s [eslintrc-react.json][]

## Pull Request Guidelines

Use the [GitHub flow][] when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the master branch).

## Running the Tests

In order to run the tests, you first need to have built the JavaScript
`dash_core_components` library. You will need to build the library again if
you've pulled from upstream otherwise you may be running with an out of date
`bundle.js`. See the instructions for building `bundle.js` in the "Testing
Locally" section of README.md.
`bundle.js`. See the instructions for building `bundle.js` in the [Testing
Locally](README.md#testing-locally) section of README.md.

You also need to set the environment variable `TOX_PYTHON_27` and with the
location of the Python 2 installations you want tox to use for creating the
Expand All @@ -30,3 +48,48 @@ If you encounter errors about Multi-server + Multi-processing when running under
```
DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1 python -m unittest -v test.test_integration.Tests.test_inputs
```

## Publishing New Components/Features

For now, multiple steps are necessary for publishing to NPM and PyPi,
respectively. TODO:
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up publishing steps into one workflow.

1. Create a pull request and tag the Plotly team (`@plotly/dash`) as well as an appropriate reviewer (frequent [contributors][] are a safe bet).
2. After a review has been done and your changes have been approved, create a prerelease and comment in the PR. Version numbers should follow [semantic versioning][]. To create a prerelease:
* Add `rc1` to `version.py` (`./dash_core_components/version.py`) e.g. `0.13.0rc1`
* Add `-rc1` to `package.json` e.g. `0.13.0-rc1`
* Update the `unpkg` link in `./dash_core_components/__init__.py`, replacing `__version__` with your release candidate (e.g. `"0.13.0-rc1"`)
* Run `npm run publish-all`.
- If needed, ask @chriddyp to get NPM / PyPi package publishing access.
- If the `publish-all` script fails on the `twine` command, try running
```sh
twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number
```
3. Comment in the PR with the prerelease version
4. Update the top-level comment to include info about how to install, a summary of the changes, and a simple example. For a good example, see the [Confirmation Modal component][].
* This makes it easier for a community member to come in and try it out. As more folks review, it's harder to find the installation instructions deep in the PR
* Keep this top-level comment updated with installation instructions (e.g. the `pip install` command)
5. Make a post in the [Dash Community Forum][]
* Title it `":mega: Announcement! New <Your Feature> - Feedback Welcome"`
* In the description, link to the PR and any relevant issue(s)
* Pin the topic so that it appears at the top of the forum for two weeks
* For a good example, see the [Confirmation Modal announcement][]

## Financial Contributions

If your company wishes to sponsor development of open source dash components, please [get in touch][].

[Dash Core Components]: https://dash.plot.ly/dash-core-components
[Dash HTML Components]: https://github.com/plotly/dash-html-components
[write your own components]: https://dash.plot.ly/plugins
[Dash Components Archetype]: https://github.com/plotly/dash-components-archetype
[issues]: https://github.com/plotly/dash-core-components/issues
[GitHub flow]: https://guides.github.com/introduction/flow/
[eslintrc-react.json]: https://github.com/plotly/dash-components-archetype/blob/master/config/eslint/eslintrc-react.json
[contributors]: https://github.com/plotly/dash-core-components/graphs/contributors
[semantic versioning]: https://semver.org/
[Dash Community Forum]: https://community.plot.ly/c/dash
[Confirmation Modal component]: https://github.com/plotly/dash-core-components/pull/211#issue-195280462
[Confirmation Modal announcement]: https://community.plot.ly/t/announcing-dash-confirmation-modal-feedback-welcome/11627
[get in touch]: https://plot.ly/products/consulting-and-oem
21 changes: 1 addition & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,26 +111,7 @@ $ npm run uninstall-local

## Publishing

For now, multiple steps are necessary for publishing to NPM and PyPi,
respectively. TODO:
[#5](https://github.com/plotly/dash-components-archetype/issues/5) will roll up
publishing steps into one workflow.

Ask @chriddyp to get NPM / PyPi package publishing access.

1 - Update `version.py`, we're using [semantic versioning](https://semver.org/)!

2 - Update `package.json`

4 - Publish: `npm run publish-all` (Make sure you have access to NPM and PyPI)
4b - If the `publish-all` script fails on the `twine` command, try running
```sh
twine upload dist/dash_core_components-X.X.X.tar.gz # where xx.x.x is the version number
```

If you want to publish a prerelease package, change `version.py` to X.X.XrcX (0.23.1rc1 for example) and
`package.json` to X.X.X-rcX (notice how the rc syntax is different between node and python. npm requires a - between the version number and the prerelease tag while python's pip just has 0.23.1rc1)

See the [Publishing New Components/Features](CONTRIBUTING.md#publishing-new-componentsfeatures) section of the Contributing guide for step-by-step instructions on publishing new components.

## Builder / Archetype

Expand Down