Skip to content

Commit

Permalink
Merge pull request #121 from PSIAIMS/contribute-update
Browse files Browse the repository at this point in the history
Contribute update
  • Loading branch information
DrLynTaylor authored Nov 7, 2023
2 parents 3f77d17 + 1621be1 commit aa0d5ff
Show file tree
Hide file tree
Showing 10 changed files with 48 additions and 20 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
.Ruserdata
/_site/
/.quarto/
.DS_Store
8 changes: 8 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ project:
website:
navbar:
logo: "images/logo.png"
tools:
- icon: github
menu:
- text: Source Code
url: https://github.com/PSIAIMS/CAMIS/
- text: Report a Bug
url: https://github.com/PSIAIMS/CAMIS/issues/
left:
- href: index.qmd
text: Home
Expand All @@ -14,6 +21,7 @@ website:
- Conferences.qmd
- text: "White Paper"
href: "https://phuse.s3.eu-central-1.amazonaws.com/Deliverables/Data+Visualisation+%26+Open+Source+Technology/WP077.pdf"


format:
html:
Expand Down
26 changes: 13 additions & 13 deletions camis.Rproj
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
Version: 1.0
RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default
EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8
RnwWeave: Sweave
LaTeX: pdfLaTeX
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
33 changes: 26 additions & 7 deletions contribution.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,35 @@ Please contribute by submitting a pull request and our team will review it. If y

**Instructions for Contributions to** [**the CAMIS repository**](https://github.com/PSIAIMS/CAMIS)

1. Set up RStudio to clone the CAMIS github repo -- See this [guidance for more detail](https://github.com/PSIAIMS/CAMIS/blob/main/minutes/posts/13Feb2023_Contributing%20to%20the%20CAMIS%20project_Setting%20up%20communication%20between%20github%20and%20R%20studio.docx)
The following instructions assume you have not done a contribution in the past. If you have contributed in the past skip down to step 5

2. If this is your first contribution, contact [christina.e.fillmore\@gsk.com](mailto:[email protected]) and give her your github username, requesting to access the CAMIS repo for contributions
1. You will need to get git, github, and RStudio setup to talk to each other. To do this you will need to have a github account and git installed on your computer. To connect your computer to github, we tend to recommend using a PAT because it is bit easier than SSH. We have a script that can help you set that up, found [here](https://github.com/PSIAIMS/git-training/blob/3abcc07a37aa50be161392a0327007b92cf35f9c/git-cred.R).
For more information Jenny Bryan has a great [bookdown](https://happygitwithr.com) explaining how to get setup, alternatively see the following link for a [short guidance](https://github.com/PSIAIMS/CAMIS/blob/main/minutes/posts/13Feb2023_Contributing%20to%20the%20CAMIS%20project_Setting%20up%20communication%20between%20github%20and%20R%20studio.docx).

3. Go into RStudio and Create a branch --Within RStudio click the branch button (on the git tab top right). Within the box that comes up ensure you are on the "remote=origin" and "Sync branch with remote" is checked. You can name the branch something to do with the amends you intend to make.
2. Now with RStudio all setup, you will need to "fork" the repository, which basically mean you want to make a copy of this repository that you own, so it will be under your github profile. This will allow you to make changes, without needing direct permission. To do this you will need to go into github, into the CAMIS repo, and click "fork". This will give you some options of how you want to fork the repo, honestly you can just keep the defaults and then click "Create fork"

4. Edit and /or add files within the CAMIS directories. If you are adding SAS guidance store under sas folder, R guidance store under r folder, for "SAS vs R" comparison store under comp. Follow the naming convention of the files already stored in those folders.
![](images/contributions/forking.png)

5. Within R studio - Commit each change or new file added, and push to the repo from within R studio.
3. Once you've created a copy of this repository, you'll need to clone it from GitHub to your computer. Click the "code" button to do this. The method you'll use, either "HTTPS" or "SSH", depends on how you've connected your computer to GitHub. If you've set up using a PAT, select the "HTTPS" tab. If you've used "SSH", then choose that tab. Either way, you will need to copy the location in the box.

6. Go into github and do a pull request to sync your branch back to the origin. See [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request) for more detail. Note that your change will need a reviewer, so please add *DrLynTaylor* and *statasaurus* as reviewers.
![](images/contributions/clone.png)

7. Once your change is approved, and merged into the origin, the branch will be deleted and you will need to create a new branch to add further contributions. NOTE: you can make the new branch called the same as the old one if you wish but ensure you select to overwrite the previous one.
4. In RStudio, you will need to create a new project and select "Version Control" in the project wizard. Then you will select "Git" and finally paste the location copied from github into the URL box. Finally hit "Create Project" and you should be good to go!

![](images/contributions/clone2.png)

5. Go into RStudio and Create a branch -- Give you are working from your own fork, this step it is a bit optional. It is up to you if you want to make a separate branch or not. But, it is generally considered good practice, especially if you are planning on contributing regularly. To do this from RStudio click the branch button (on the git tab top right). Within the box that comes up ensure you are on the "remote=origin" and "Sync branch with remote" is checked. You can name the branch something to do with the amends you intend to make.

6. Edit and /or add files within the CAMIS directories. If you are adding SAS guidance store under sas folder, R guidance store under r folder, for "SAS vs R" comparison store under comp. Follow the naming convention of the files already stored in those folders.

7. Within R studio - Commit each change or new file added, and push to the repo from within R studio. Once you have completed the change you want to make, it is time for a pull request. Before we start though, it is good to check that your branch on github contains all the update you have done. If not you may need to push from Rstudio before moving onto the pull request.

![This is what it will look like if you still need to push](images/contributions/push.png)

8. Pull request in github - Back on your fork in github you will see that your repo is now ahead of the main CAMIS repository. The first thing you want to do is make sure there aren't any conflict that have arisen with the main repository, so you need to click 'Sync fork'.

![](images/contributions/make-pr.png)

If that is all good then you can create a pull request by clicking on 'Contribute' and then 'Open pull request'. This brings you to a page where you can explain your pull request if you like or you can just confirm you would like to go through with this pull request. The final step is to add a reviewer, please add *DrLynTaylor* and *statasaurus*. For more details about making pull requests see [create a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request).

9. Once your change is approved, and merged into the origin, you will be able to see your changes on CAMIS. If you have made a branch in your fork the branch will be deleted and you will need to create a new branch to add further contributions. NOTE: you can make the new branch called the same as the old one if you wish but ensure you select to overwrite the previous one.
Binary file added images/contributions/clone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/contributions/clone2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/contributions/forking.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/contributions/make-pr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/contributions/pr-review.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/contributions/push.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit aa0d5ff

Please sign in to comment.