Skip to content

Commit baf815e

Browse files
author
martiki9
committed
Add contribution guide
1 parent fe861b7 commit baf815e

7 files changed

Lines changed: 118 additions & 80 deletions

File tree

README.md

Lines changed: 2 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# The use of Git in Statisical Programming
22

3-
🚧 This repository is under construction yet. 🚧
43

5-
It is intended to support the working group for the use of **Git in Statistical Programming**.
4+
This repository supports the working group for the use of **Git in Statistical Programming**.
65

76
If you are interested in joining, please go [here](https://advance.hub.phuse.global/wiki/spaces/WEL/pages/90472449/The+Use+of+Git+in+Statistical+Programming) to find out more!
87

@@ -37,75 +36,7 @@ You can get involved in one of the following ways
3736

3837
2.3 - You can propose a merge request via a fork if you see something that needs fixing
3938

39+
If you want to update content, please read this [contributors guide](https://phuse-org.github.io/git-in-statistical-programming/Contribute.html)
4040

41-
### 2.3. Using Git, to propose changes!
42-
43-
44-
<details>
45-
46-
<summary>2.3.1 About cloning, branching and pushing</summary>
47-
48-
Basic steps to get into this "Git world"
49-
50-
0- Ensure you have installed Git, and you use the terminal to go to your favorite directory.
51-
52-
1- Clone the repo from your terminal `git clone https://github.com/phuse-org/git-in-statistical-programming.git`
53-
54-
2- Create a branch with your username `git checkout -b yourname_dev` All the changes and contributions will be done here
55-
56-
3- once this is done, add changes to stage `git add .`
57-
58-
4- once this is done, commit the changes with a message `git commit -m " i did this change (your summary of the changes)"
59-
60-
5- finally push the changes! `git push origin yourname_dev`
61-
62-
6- if you go now to the repo https://github.com/phuse-org/git-in-statistical-programming.git you will see at the top a message saying your changes has been pushed into your named branch.
63-
64-
7- if you want your changes being in the "main" branch (default page), you have to create a merge request. (green button top right saying "compare & pull request")
65-
66-
67-
68-
💡NOTE: If you like to use your Chat GPT to teach you more about these steps, use it. No fear to break anything!
69-
💡NOTE2: There is a wonderful tutorial in [Coursera] (https://www.coursera.org/learn/making-data-science-work-for-clinical-reporting#modules) to practise on your own how to do these steps. Very easy and well explained (and you get a certification 🎓 at the end!)
70-
71-
</details>
72-
73-
74-
75-
<details>
76-
77-
<summary>2.3.2 About R</summary>
78-
79-
80-
This repository will be using quarto. To support this repository, there is an **renv lock** file which is currently bare bones.
81-
(This means we can keep traceability of the R packages we are using within this repo)
82-
83-
```R
84-
# reinstall environment packages
85-
renv::restore() # to install packages required
86-
87-
# if you made changes to the environment (installing new packages) you can save them by:
88-
renv::snapshot()
89-
90-
```
91-
92-
For the poster it would be nice to have some stats in a jupyter or Rmarkdown about issues around Git (or some charts explaining key points).
93-
To start with,
94-
95-
0 - after you have clones the repo in your laptop
96-
97-
1 - you are in your branch
98-
99-
```sh
100-
# in terminal, within your project directory
101-
#create your own git branch:
102-
git checkout -b yourname_dev
103-
# or switch to your branch
104-
git switch yourname_dev
105-
```
106-
107-
2- A folder called **"script_ideas"** will be the SANDBOX with your scripts/ collaborative scripts/pictures to get some charts/numbers around this topic (for the paper or poster, or to discuss in our meetings).
108-
109-
</details>
11041

11142

site/Contribute.qmd

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
---
2+
title: "Contributor Guide"
3+
page-layout: full
4+
toc: true
5+
6+
---
7+
8+
# Introduction
9+
10+
This short guide looks at how you can contribute to this project.
11+
12+
# Signing up
13+
14+
You do not need to join the working group to make contributions to this repository, but you are welcome to do so by [going here]([go here](https://advance.hub.phuse.global/wiki/spaces/WEL/pages/90472449/The+Use+of+Git+in+Statistical+Programming))
15+
16+
# Commenting on issues
17+
18+
[Issues](https://github.com/phuse-org/git-in-statistical-programming/issues) are available to anyone with a public Github account. You can simply comment or even open new issues if you have an opinion on a subject there.
19+
20+
You can also join in the more [wide ranging discussions](https://github.com/phuse-org/git-in-statistical-programming/discussions)
21+
22+
# Contributing
23+
24+
If you wish to get involved in the content produced by the working group, you can find out how to do so in this short guide.
25+
26+
## Signing up
27+
28+
If you wish to contribute content to the site you can either request to be added to the repository directly on [this issue](https://github.com/phuse-org/git-in-statistical-programming/issues/1), or [fork](https://github.com/phuse-org/git-in-statistical-programming/fork) the repository, make your changes and then request to merge your changes in
29+
30+
## Adding content
31+
32+
Typically the workflow we expect contributors to follow is
33+
34+
### 1. [Optional] Make an issue on the topic they wish to contribute on
35+
36+
This is only needed if there is not already an issue, so can be skipped otherwise!
37+
38+
### 2. Assign yourself to the issue
39+
40+
Assigning yourself to an issue makes it clear that you are working on this, and lets others know to work on another project. While individuals can work on the same issue, it will require direct collaboration and it is normally easy to work independenly.
41+
42+
![screenshot of assigning on an issue](assign.png)
43+
44+
### 3. Make a new branch to work on
45+
46+
If you are not familiar with branches, they are basically seperate working areas and allow you to work independently without impacting other users. Read [this guide](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) for more.
47+
48+
The new branch should be off of main, and should normally be made on Github. The naming convention is <issue number>-<description>
49+
50+
![screenshot of making a new branch](branch.png)
51+
52+
### 4. Start working!
53+
54+
How you work depends on your setup.
55+
56+
#### Working on github
57+
58+
If you don't want to deal with setup, you can edit files directly on Github.
59+
60+
When you switch to the branch you created, you can directly edit and make new files on github. This is the easiest way to work, but you will not be able to preview the websites you have created. If you wish to add images you will also need to upload them manually.
61+
62+
#### Working locally
63+
64+
Alternatively, you can [install Git](https://git-scm.com/install/) and [Quarto](https://quarto.org/docs/get-started/) locally.
65+
66+
Then you can clone the repository with the command (note, before doing so you will need to [set up ssh keys](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent))
67+
68+
`git clone git@github.com:phuse-org/git-in-statistical-programming.git`
69+
70+
Then switch to your branch
71+
72+
`cd <folder name>`
73+
74+
`git checkout <branch name>`
75+
76+
Once you have made changes you wish to get back on the website, you can use
77+
78+
`git add .`
79+
`git commit -m <A message describing what you did>`
80+
`git push`
81+
82+
to get the changes you've made on the website.
83+
84+
## Working with Quarto
85+
86+
This site is written in Quarto. There are some [great tutorials](https://quarto.org/docs/get-started/hello/rstudio.html) on the [Quarto website](https://quarto.org/).
87+
88+
In particular, there are two parts to this site
89+
90+
### Blog
91+
92+
The blog and website content is under /site. If you wish to make a new blog post go to /posts and make a new folder with the name of the blog post you want. You can copy the content in an existing folder to get you started in terms of needed formatting.
93+
94+
### White paper
95+
96+
The white paper content is under /white-paper. Each chapter is a seperate file in that folder. If you want to make a new chapter, you will need to make a new chapter, and then add that name to /white-paper/_quarto.yml, which will ensure that it appears on the main site.
97+
98+
### Rendering the site
99+
100+
If you want to render the site locally to preview it, you will need to do so in two parts
101+
102+
1) `quarto render site`
103+
2) `quarto render white-paper`
104+
105+
The content will automatically be created under /docs.
106+
107+
**NOTE**: /docs is gitignored on **purpose**. The content will be generated on Github, and does not need to be commited!
108+

site/assign.png

36.9 KB
Loading

site/assign.png:sec.endpointdlp

1.07 KB
Binary file not shown.

site/branch.png

17.2 KB
Loading

site/branch.png:sec.endpointdlp

622 Bytes
Binary file not shown.

site/index.qmd

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,23 @@ about:
44
image: phuselogo.png
55
template: solana
66
links:
7+
- text: Contribute
8+
href: Contribute.qmd
79
- icon: github
810
text: Github
911
href: https://github.com/phuse-org/git-in-statistical-programming
1012

1113
---
1214

13-
This blog contains posts from the PHUSE working group on The use of Git in Statistical Programming
15+
This is the website for the PHUSE working group on The use of Git in Statistical Programming.
1416

15-
# Meetings
17+
It includes a [blog](posts.qmd) and a draft for a [white paper](white-paper/index.html)
1618

17-
Meetings are happening bi-weekly every Friday
19+
# Meetings
1820

19-
# Goal
21+
Meetings are happening bi-weekly switching between Friday and Wednesday
2022

21-
- White paper about Git in pharma for statisticians : Guidelines
22-
- Poster for Europe PHUSE 2025
23+
# Contribute
2324

24-
# Content
25+
Want to contribute? Read [this guide](Contribute.qmd)
2526

26-
- [White Paper draft](white-paper/index.html)
27-
- [Blog posts](posts.qmd)

0 commit comments

Comments
 (0)