-
Notifications
You must be signed in to change notification settings - Fork 0
Session 4 guide
Selin Jessa edited this page May 14, 2020
·
12 revisions
- 30 min: discussion, debugging, tour various build issues
- 10 min: Intro to Dependencies, DESCRIPTION, NAMESPACE, and examples
- 5 min: Review the whole workflow, and merge to
master-privateto close issues - 10 min: Demo of adding a dependency
In this task, we'll run through the whole contribution workflow again, but this time,
we'll be each adding a function that has an external dependency. The idea is to practice the whole branch-change-commit-rebase workflow. Again, we'll then open a PR from our issue branch to develop-private,
and ensure our code passes status checks & reviews before integrating it.
At this point, we'll generally assume everyone has created a function with tests, and that it is now merged into
the codebase (master-private), and the issue closed. If not, you can easily start this task independently from the previous issue!
- Open a new issue specifying what you'll be adding
- Create a new branch
- First, ensure your local repository is up to date: while on
develop-private, pull any changes from GitHub -
While still on the
develop-privatebranch, create a new branch, corresponding to your new issue
- First, ensure your local repository is up to date: while on
- Add your contribution for today's task, by creating a new function which uses a function from an
external package available on CRAN. You will need to:
- Add the package as a dependency in DESCRIPTION
- Import the function with and
@importstatement in your function
- When you've finished, commit & push your changes, and once Travis status checks pass, open a pull request from your issue branch onto the
develop-privatebranch - If anybody has made changes to the
develop-privatebranch in between your commits to your branch, don't forget to rebase regularly onto develop private:- Get the latest changes on the
develop-privatebranch:git checkout develop-privatethengit pull - Go back to your issue branch,
git checkout issue/XXX - Rebase:
git rebase develop-private
- Get the latest changes on the
✨ Keep in mind our workflow from previous sessions - you'll need to...
- ...follow the steps from Session 1 to create and document a function
- ...follow the steps from Session 2 to create a test for it
- ...follow the steps from Session 3 to push your changes, and run through the debugging cycle until the Travis status checks pass