This is a way for us to learn from each other and see how others process datasets.
fork
(copy) of this repository in the First Contribution sectionforked
repository add your R script you would like reviewed to the R
folderpull requests
tab in the main NCEAS/data-procesing
repositoryNew pull request
compare across forks
Create pull request
Select a pull request to review
+
that will show up and leave your commentssubmit review
to let the original requester know you are done.
We generally follow the tidyverse style conventions, with the following specific style preferences:
stopifnot
statements
Once you've opened the project you can create a new file and save it to the R folder. Alternatively, you can create a new folder with your name in the R folder, and then create a new file in that subdirectory. If this is a script you previously developed, I recommend just copying pasting your code into a new R file. Alternatively you can use the "Upload button" in the "Files" section of the Rstudio viewer to upload your R script.
There are two options for this next step. You can complete it using the command line in terminal, or the Git tab in RStudio.
git add .
Adds all changes to the next commit. git commit -m "adding processing scripts"
commits your changes. Type an appropriate commit message in the quotation marks.git push origin master
this pushes your commit to the master branch of your fork (your github profile).If the commit to your fork is successful, then navigate to your fork: https://github.com/YOURUSERNAME/data-processing. From here click on "New Pull Request" to submit your code for review.
After you've recieved comments on your pull request you'll probably need to make some changes to your code. This is normal and you will most likely have to make some changes to your pull request based on the maintainer's review.
Open Rstudio and re-open the data-processing.Rproj. Follow this path: File >> Open Project >> data-processing folder >> data-processing.Rproj.
Make changes to your files and follow step 5 from First Contribution to commit your changes. It is generally a good idea to make multiple commits rather than one large commit. For instance you could make one commit called "fixed typos and added comments", and commit called "fixed for loop". Try to keep your changes in each commit related to the commit message, however, it's not necessary to make one commit for every small change you make. Use your best judgement and look at other peoples' commits, you'll get the feel of what makes a good commit.
If you have an open pull request (you should at this point), github will recognize this and add your most recent commits to the bottom of your pull request. Your reviewer will usually get an email notifying them that you made changes, however, it's a good idea to tag them (ex. @dmullen17) in the comments of your pull request and let them know you made updates.
If you've contributed to a repository in the past and need to do so again, it's likely that the contents changed since your last contribution. Before you can submit another pull request we need to Pull any changes to your local directory.
We can Pull any changes from upstream master (github.com/NCEAS/data-processing) using Terminal - unfortunately the Git tab in Rstudio can't do this.
git remote add upstream https://github.com/NCEAS/data-processing.git
- adds the upstream repository (you only have to do this once)git pull upstream master
- pulls any changes from the data-processing branchFollow steps 4-6 from First Contribution
Work on this repository was supported by:
Additional support was provided by the National Center for Ecological Analysis and Synthesis, a Center funded by the University of California, Santa Barbara, and the State of California.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.