Skip to content

Getting Started Making Contributions

dnsosa edited this page Mar 29, 2020 · 14 revisions

This page covers how to land a Pull Request (PR) and other aspects of writing code for task-vt other than the actual writing of the code. For guidance on designing APIs, documenting, and formatting your code, see the Style Guide.

Overview

The general process for submitting code to a task-vt repository is as follows:

  1. Get matched to a task by one of the V&T team leads. These tasks will come from the CoronaWhy V&T Trello board. These Trello tasks will correspond to Github issues as well. Let @dnsosa know if you're having trouble accessing the Trello or finding the corresponding GitHub issue for a given Trello task.

  2. Create a branch to start working on your task

  3. If the work you are doing requires making some design decision, please solicit feedback from the V&T Task Force as you see necessary, and PLEASE document this as comprehensively as possible (without being overly verbose) in your docstrings and notebooks.

  4. Hack away! Please make sure all code is tested. For every new function you write please write a corresponding test function. Even if it's a silly test checking that things are the sizes/shapes you expect or that the right type is returned, this is still very useful and will save lots of time downstream. We want to make sure everyone's code works well together and nothing breaks. Here is an example of a function and a corresponding test. Please follow the naming convention that if your function is called foo_bar.py, the test function must be named foo_bar_test.py and placed in the same directory as foo_bar.py. I repeat, everything must be tested to get a PR. Please follow the tips in the Style Guide and follow PEP-8 standards as you write your code.

  5. Open a pull request for changes you made on your branch.

  6. Get your code reviewed by one of the reviewers.

  7. Make any changes that were requested during the review process.

Using git

Follow these steps to get started working on a new branch:

  • git clone https://github.com/CoronaWhy/task-vt.git
  • git checkout -b name_of_your_branch
  • Hack away!
  • git status
  • git add files_to_add
  • git commit -m "<your informative commit message>"
  • git push --set-upstream origin name_of_your_branch

Follow these steps if you're working on an existing branch:

  • git checkout name_of_your_branch
  • Hack away!
  • git status
  • git add files_to_add
  • git commit -m "<your informative commit message>"
  • git push name_of_your_branch

GitHub provides you with a link for submitting the pull request in the message output by git push.

Clone this wiki locally