Refer to the readme for installation and development instructions.
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
.
To run all of the tests:
python -m unittest 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.
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.