Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update CONTRIBUTING.md #158

Merged
merged 4 commits into from
Mar 7, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 37 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,45 @@ Overall, vignette submission will follow the guidelines in [GitHub flow](https:/
Since this process requires git, if you are having trouble installing git or accessing your command line, please take a look at our detailed tutorial on using git through R: [Contributing with git2r](CONTRIBUTING_WITH_GIT2R.html).


## Setup for new contributors

If you are a new contributor, you will need to make sure you have git set up and a fork of this repository. Please follow these instructions carefully. If you have already set up your repository, go to the next section.

1. Set up a GitHub account if you don't already have one, see [here](https://guides.github.com/activities/hello-world/) for a quick tutorial on using GitHub.
2. Download an appropriate Git client for your computer, see [here](https://help.github.com/articles/set-up-git/), and set it up.
3. Fork the [source repository](http://github.com/NESCent/popgenInfo) on GitHub using the `Fork` button (See [GitHub's tutorial](https://help.github.com/articles/fork-a-repo/)).
4. On the command line, clone the repository to your machine using
`git clone https://github.com/YourAccount/popgenInfo.git`
Note: the https protocol is easier to follow, but it's possible to use ssh as well ([details here](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork)).
5. Add the NESCent repository to upstream with
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you mean as instead of to? Otherwise, the notion of adding a repository to upstream sounds odd to me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 will fix

`git remote add NESCent https://github.com/NESCent/popgenInfo.git`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a strong reason to name the remote NESCent? The convention is upstream, which is also used in the Github tutorial that's referenced. The name NESCent also IMHO is is tied more to the current location of the repository than needed - that the repo is under the NESCent organization is more circumstantial than required for the functioning of the whole workflow.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a good point. I can change this easily, but it will also mean that I will also need to change the git2r vignette and inform our collaborators to rename their remote upstream.

I will make further commits.

to keep your fork up to date with the master repository. [See these instructions for details](https://help.github.com/articles/fork-a-repo/#step-3-configure-git-to-sync-your-fork-with-the-original-spoon-knife-repository)

## Step-by-step process for submission

1. Set up a GitHub account if you don't already have one, see [here](https://guides.github.com/activities/hello-world/) for a quick tutorial on using GitHub. Download an appropriate Git client for your computer, see [here](https://help.github.com/articles/set-up-git/), and set it up.
2. Fork the [source repository](http://github.com/NESCent/popgenInfo) on GitHub using the `Fork` button (See [GitHub's tutorial](https://help.github.com/articles/fork-a-repo/)).
3. Clone the repository to your machine using `git clone https://github.com/YourAccount/popgenInfo.git` on the command line. Note: the https protocol is easier to follow, but it's possible to use ssh as well ([details here](https://help.github.com/articles/fork-a-repo/#step-2-create-a-local-clone-of-your-fork)). Follow [these instructions](https://help.github.com/articles/fork-a-repo/#step-3-configure-git-to-sync-your-fork-with-the-original-spoon-knife-repository) to keep your fork up to date with the master repository.
4. Then, from the command line, move to the popgenInfo directory using `cd popgenInfo`.
5. Create a branch for your changes using `git checkout -b Your_branch_name`.
6. If you are on windows or macintosh, you can open Rstudio by double-clicking on the `popgenInfo.Rproj` file in your file browser. If you are on linux, you can open it by typing `rstudio popgenInfo.Rproj`.
7. If you haven't done so, create your vignette from the [`TEMPLATE.Rmd`](https://github.com/nescent/popgenInfo/tree/master/TEMPLATE.Rmd) file and move any associated data to the **data/** directory.
6. Move your vignette in `.Rmd` format into the **use/** directory.
8. Add the file to git using `git add use/yourfilename.Rmd`.
9. Then commit this using `git commit` and add some short text describing what your file is.
10. Then run `git push origin Your_branch_name`.
11. To do a pull request, navigate to your branch on GitHub. Click `Compare & review` or the pull request icon.
12. Once you have reviewed the changes, click `Create pull request`. Once the request is approved, the file will be automatically sent to a remote server that compiles the document into a html file.
If you have a vignette you would like to submit, please follow these instructions to submit it for review.

1. Update your fork
1. From the command line, move to the **popgenInfo** directory using `cd popgenInfo`
2. Switch to your master branch with `git checkout master`
3. Update with
```sh
git fetch NESCent # grab all the changes from NESCent
git merge NEScent/master # add them to your local fork
git push # push them up to your fork on github
```

2. Create a branch for your changes using `git checkout -b Your_branch_name`.
3. Add your vignette
1. If you are on windows or macintosh, you can open Rstudio by double-clicking on the **popgenInfo.Rproj** file in your file browser. If you are on linux, you can open it by typing `rstudio popgenInfo.Rproj`.
2. If you haven't done so, create your vignette from the [`TEMPLATE.Rmd`](https://github.com/nescent/popgenInfo/tree/master/TEMPLATE.Rmd) file and move any associated data to the **data/** directory.
3. Move your vignette in `.Rmd` format into the **use/** directory.
4. Add the file to git using `git add use/yourfilename.Rmd data/yourdata.txt`.
5. Then commit this using `git commit` and add some short text describing what your file is.
4. Push to your fork and create a new pull request
1. From the command line, run `git push --set-upstream origin Your_branch_name` to push your branch to your remote fork
2. To do a pull request, navigate to your branch on GitHub. Click `Compare & review` or the pull request icon.
3. Once you have reviewed the changes, click `Create pull request`. Once the request is approved, the file will be automatically sent to a remote server that compiles the document into a html file.

## Guidelines for approval

Expand Down