Skip to content

Contributing

Adam Hooper edited this page Jul 11, 2019 · 9 revisions

Here's how to change Workbench cope:

  1. Talk with us! File an issue on GitHub or join us on Gitter and let's get excited about what you want to do.
  2. Fork this repo, as per GitHub's forking documentation:
    1. Click "Fork"
    2. Clone your fork
    3. Set up your development environment
    4. git remote add upstream https://github.com/CJWorkbench/cjworkbench (so you can track our master branch later)
  3. Create your change:
    1. Make sure your master is the same as upstream/master:
      1. git fetch upstream
      2. git checkout master
      3. git pull
      4. git merge --ff-only upstream/master (or git reset --hard upstream/master if you wrote changes to master accidentally and wish to delete them)
    2. git checkout master
    3. Create a new branch: git branch my-great-feature
    4. Write a test that fails (bin/dev unittest, bin/dev npm test, bin/integration-test)
    5. Write code until the test passes
    6. bin/dev reformat-code to conform to our coding style
    7. bin/integration-test to ensure you haven't broken something critical
    8. Commit with a commit message referencing the GitHub issue
  4. Submit a pull request:
    1. git push origin my-great-feature
    2. Browse to https://github.com/CJWorkbench/cjworkbench and submit a pull request for your branch
  5. Iterate! We'll review your code; we may ask questions or propose changes. We may ask you to add commits to your pull request; we may also ask you to merge or rebase from our master.

Tooling that can help you

Black

Workbench code follows Black conventions. Workbench won't build images (and so bin/dev integration-test will fail) if your code isn't byte-perfect. Integrate Black with your text editor to avoid silly mistakes.