Skip to content

Latest commit

 

History

History
107 lines (83 loc) · 6.33 KB

CONTRIBUTING.md

File metadata and controls

107 lines (83 loc) · 6.33 KB

Contributing to dash

Getting Started

Refer to the readme for installation and development instructions.

Coding Style

Please lint any additions to Python code with pylint and flake8.

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

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

Local configuration

You can configure the test server with the following variables:

DASH_TEST_CHROMEPATH

If you run a special chrome set the path to your chrome binary with this environment variable.

DASH_TEST_PROCESSES

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.

Example: single test run with configuration

DASH_TEST_CHROMEPATH=/bin/google-chrome-beta DASH_TEST_PROCESSES=1 python -m unittest -v test.test_integration.Tests.test_inputs

Making a contribution

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.

  1. Create a pull request and tag the Plotly team (@plotly/dash) and tag / request review from @rmarren1 and @T4rk1n.
  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/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 a tar.gz file ending with your selected version number. Double check that this version number ends with rc#, as to not mistakenly publish the package.
    • Run twine upload dist/<package_name>.
  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.
    • 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

Beginner tip: Copy and paste this section as a comment in your PR, then check off the boxes as you go!

Pre-Merge checklist

  • 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 of CHANGELOG.md. For larger additions, your CHANGELOG.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.

Post-Merge checklist

  • 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.

Pre-Release checklist

  • 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.

Release Step

  • python setup.py sdist to build.
  • twine upload dist/<the_version_you_just_built> to upload to PyPi.

Post-Release checklist

  • 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.

Financial Contributions

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.