-
Notifications
You must be signed in to change notification settings - Fork 109
Tutorial for maintainers
TODO:
- Travis check details add graphs
This tutorial describes the entire workflow of pull request management. Students create pull requests from their branches. Our job is to merge them to the master branch if all requirements are met or request changes otherwise. Refer to the submission instructions on the class website for more information regarding the Bookdown structure.
CC1 and CC2 are responsible for this part.
When each pull request comes in, it will be tagged with two labels: type label and content label, which is the same as the Google Sheet on Courseworks. A maintainer will be assigned (referred to as assignee
in step 2), and he/she will be responsible for checking whether all requirements are met.
CC8, CC9, and CC10 are responsible for this part.
There are certain checks that a pull request needs to pass before it can be merged into the master branch. When you are assigned a pull request, work on that pull request by following the steps below.
A pull request must not be from a master branch of contributors' fork. If it is, let contributors know that they need to create a new branch. You can direct them to this link which explains what to do if you forgot to branch.
- Each group should submit exactly one
.Rmd
file. - The
.Rmd
filenames in the project repo are words only and joined with underscores, i.e. Do not include whitespace in the name. - The
.Rmd
files must not contain the YAML header (the section at the top of the.Rmd
that includes name, title, date, output, etc.) including the --- line. - The first line starts with a single hashtag (#) followed by a project name (this does not have to be exact same as the project folder name and may include white space). There should be a whitespace after the hashtag, otherwise it will not be rendered as header. No single # headers are used anywhere else in the document (multiple hashtag headers (e.g. ##, ###) are fine).
- The second line must be a blank line.
- if they have a
setup
chunk, the labelsetup
must be removed.
- They should not submit a
.html
version of their project. - Additional resources are in
resources/<project_name>/
only. - Remind contributors of a possibility of path change in their
.rmd
files whenresources/<project_name>/
is created.
You will either merge a pull request or request a change.
If there is any requirement that a request does not meet, request a change and add reasons why the pull request cannot be merged.
Then, add a changes requested
label to this pull request.
Your job for this pull request is done for now. Once contributors fix their requests, repeat the checking in 2.1 again on updated requests.
When you are satisfied that all the files in the pull request are in the proper format, you will make some changes to bookdown files on the branch of the pull request, and then merge the pull request, as described below. Do not make these changes to the master branch, because they will cause the book to fail to render.
To let bookdown render successfully, we need to put that Rmd
file into _bookdown.yml
.
- In
_bookdown.yml
, add the name of theRmd
file in the branch underrmd_files
. Try your best to put the file name under the right tag. The class website should now be updated and show the content from the rmd file you just added to_bookdown.yml
.
- If the project includes any packages that can be only installed by
devtools::install_github()
, such asucidata
. Go to.travis.yml
, add the package name in the rmd file in the branch underr_github_packages
.
- If the project includes any packages that can be installed by
install.packages()
, such astidyverse
. Go toDESCRIPTION
, add the package name in the branch underImports
.
Navigate to check
tab of a pull request. You see a green check mark if the rmd
file in the request is compatible with the class website. Note that it may take a while for this automatic checking process.
-
Request review of Bo (CC8)/ Yingyu (CC9)/ Tian (CC10).
-
Merge the request.
-
Go to the website to see if it's working. Travis needs to rebuild the book after a pull request is merged. Check here to see the progress. You have to clear cache before refreshing the website page to see this. If anything goes wrong, revert the merge and repeat step 2.3.1.
-
Comment under that pull request to congratulate them on successfully being merged.
There may only be less than 10 lines in some submissions as they link their contributions to outside source, and these chapters should be merged together.
A standard operation: #29.