Fork and clone the dash repo.
To set up your development environment, run the following commands:
# Move into the clone
$ cd dash
# Create a virtualenv
$ python3 -m venv venv
# Activate the virtualenv
$ . venv/bin/activate
# (On Windows, the above would be: venv\scripts\activate)
# Install the dev dependencies
$ pip install -r .circleci/requirements/dev-requirements.txt
Please lint any additions to Python code with pylint
and flake8
.
Use the GitHub flow when proposing contributions to this repository (i.e. create a feature branch and submit a PR against the master branch).
Warning: Tests do not currently run on Windows. Track our progress: #409.
To run the tests, you can use Python's unittest
module, or a test runner like nose2
.
For example, python -m unittest tests.test_integration
will run the integration tests.
To run all of the tests:
python -m unittest discover tests
Or:
nose2 -v
You can configure the test server with the following variables:
If you run a special chrome set the path to your chrome binary with this environment variable.
If you encounter errors about Multi-server + Multi-processing when running under Python 3 try running the tests with the number of server processes set to 1.
DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1 python -m unittest -v test.test_integration.Tests.test_inputs
For larger features, your contribution will have a higher likelihood of getting merged if you create an issue to discuss the changes that you'd like to make before you create a pull request.
- Create a pull request and tag the Plotly team (
@plotly/dash
) and tag / request review from @rmarren1 and @T4rk1n. - 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
toversion.py
(./dash/version.py
) e.g.0.13.0rc1
- If needed, ask @chriddyp to get PyPi package publishing access.
- Run
python setup.py sdist
to build a distribution zip. - Check the
dist
folder for atar.gz
file ending with your selected version number. Double check that this version number ends withrc#
, as to not mistakenly publish the package. - Run
twine upload dist/<package_name>
.
- Add
- Comment in the PR with the prerelease version
- Update the top-level comment to include info about how to install, a summary of the changes, and a simple example.
- 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)
- 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
- Title it
Beginner tip: Copy and paste this section as a comment in your PR, then check off the boxes as you go!
- All tests on CircleCI have passed.
- All visual regression differences have been approved.
- If changes are significant, a release candidate has been created and posted to Slack, the Plotly forums, and at the very top of the pull request.
- You have updated the
dash/version.py
file and the top ofCHANGELOG.md
. For larger additions, yourCHANGELOG.md
entry includes sample code about how the feature works. The entry should also link to the original pull request(s). - Two people have 💃'd the pull request. You can be one of these people if you are a Dash core contributor.
- You have tagged the release using
git tag v<version_number>
(for the contributor merging the PR). - You have pushed this tag using
git push <tag_name>
(for the contributor merging the PR). - You have deleted the branch.
- Everything in the Pre-Merge checklist is completed. (Except the last two if this is a release candidate).
-
git remote show origin
shows you are in the correct repository. -
git branch
shows that you are on the expected branch. -
git status
shows that there are no unexpected changes. -
dash/version.py
is at the correct version.
python setup.py sdist
to build.twine upload dist/<the_version_you_just_built>
to upload to PyPi.
- You have closed all issues that this pull request solves, and commented the new version number users should install.
- If significant enough, you have created an issue about documenting the new feature or change and you have added it to the Documentation project.
- You have created a pull request in Dash Docs with the new release of your feature by editing that project's
requirements.txt
file and you have assigned@chriddyp
to review.
This repository adheres to semver. The following policy is in effect for dash
, dash-core-components
, dash-html-components
and dash-renderer
:
- Matching major version numbers are guarenteed to work together.
- Any change to the public API (breaking change) will increase a major version.
1 and 2 imply that when any core dash*
repo introduces a breaking change all dash*
repos will increment their major versions to match. This process is called a major release candidate window and is outlined below.
- The major release candidate window will be announced internally at Plotly and through our popular community channels.
dash
,dash-core-components
,dash-html-components
anddash-renderer
master branches will be reversioned asN.0.0-rc1
on the same day and published for testing.- Pull requests especially those containing breaking changes will be merged.
- Per repo tests will be updated to target the latest
rc
versions. - dash-docs, some apps in the dash gallery and Plotly internal projects will be updated to target the latest
rc
versions. - steps 3-5 will continue until all breaking changes have been merged.
- A major release candidate freeze will go into effect. During this time steps 3-5 will continue but only bug fixes will be merged.
- Once testing and Q/A is complete
dash
,dash-core-components
,dash-html-components
anddash-renderer
master branches will be reversioned asN.0.0
and published ending the major release candidate window.
During and after the major release candidate window bug fixes that can apply to pre-major release candidate releases should be backported. This is accomplished by:
- If a pre-major release branch does not exist then check out a branch at the tag defining the last published release before the previous major release candidate window began. For example if we are in the
1.x
series and the last pre-1.x
series release isv0.18.1
checkout a branch atv0.18.1
called0.18-release
. If the branch does exist check it out. - Cherry-pick or otherwise reapply the fix to the pre-major release branch and update the patch version. In the example above the new version and tag will be
v0.18.2
on the0.18-release
branch. - Publish.
Dash, and many of Plotly's open source products, have been funded through direct sponsorship by companies. Get in touch about funding feature additions, consulting, or custom app development.