Skip to content

Commit bfc129e

Browse files
committed
Drafted first half of the tutorial
1 parent 6eec624 commit bfc129e

File tree

9 files changed

+283
-2
lines changed

9 files changed

+283
-2
lines changed

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
source 'https://rubygems.org'
2+
gem 'github-pages', group: :jekyll_plugins
3+
gem "just-the-docs"

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
# github-workshop
1+
---
2+
layout: default
3+
title: README
4+
nav_exclude: true
5+
published: false
6+
---
7+
8+
# GitHub for Collaborative Data Science & Engineering in Industry & Academia
9+
10+
## Steps that we need to deal with:
11+
12+
### Not in the tutorial
213

314
0. Everyone should sign up for a GitHub account (before the workshop)
415
1. 20 or so minutes of basics (Decide about what and who) "We don't make mistakes, just happy little accidents"
16+
17+
### In the tutorial (included)
18+
519
2. Split everyone in groups (tables)
620
3. Create a repository (one per table). It should have a README, LICENSE, description and gitignore.
721
4. Add collaborators
@@ -11,7 +25,11 @@
1125
8. Everyone create a branch to address their assigned issue
1226
9. Create a folder and file (come back to give them path instructions)
1327
10. Commit the new file
14-
11. Do a compare and open a pull request and link to issue in description
28+
11.1 Do a compare [and open a pull request and link to issue in description]
29+
30+
### In the tutorial (to be included)
31+
32+
11.2 [Do a compare] and open a pull request and link to issue in description
1533
11.b Checkpoint/timecheck (How many tables have a pull request)
1634
12. Assign a reviewer (The person who created the issue)
1735
13. The reviewer changes branches and learns "find/navigate"

_config.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
theme: just-the-docs
2+
3+
title: GitHub Collaborative Workshop
4+
5+
markdown: kramdown
6+
highlighter: rouge
7+
permalink: pretty
8+

index.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
layout: default
3+
title: Home
4+
nav_order: 1
5+
permalink: index
6+
---
7+
8+
# GitHub for Collaborative Data Science & Engineering in Industry & Academia
9+
10+
Welcome to our *collaborative* session on data science and engineering :wave:
11+
12+
This tutorial will walk you through:
13+
14+
* creating a GitHub repository
15+
* adding contributors to a GitHub repository -- this is a *collaborative* session, after all :grin:
16+
* creating files, editing and committing changes
17+
* opening and assigning issues
18+
* solving issues in a *collaborative* fashion via
19+
- branch managements
20+
- pull requests
21+
- code reviews
22+
23+
The tutorial will deal with the GitHub web interface, therefore there is no need to install anything on your machine, nor to type anything in the command line. We may address these in a more advanced session.
24+
25+
## Prerequisites
26+
27+
1. Your own laptop, with battery charged, a working web browser (Chrome, Firefox, ...), and a good internet connection
28+
2. A GitHub account. If you don't have one you can sign up here for free: [https://github.com/join](https://github.com/join)
29+
3. Friends. This is a *collaborative* session, don't forget that!
30+
- Please create a team of three/four people
31+
- Don't know anyone? There are no strangers here, only friends you haven't yet met.
32+
33+
34+
## Ready to start?
35+
36+
The tutorial is divided in five parts:
37+
38+
1. Setting up
39+
2. Working all on the same branch
40+
3. Creating and dealing with issue
41+
4. Working on your own branch
42+
5. Merging all together
43+
44+
But before delving into it, please remember: **be kind**.
45+
46+
47+

issues.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
layout: default
3+
title: Creating and dealing with issue
4+
nav_order: 4
5+
permalink: /issues
6+
---
7+
8+
# Creating and dealing with issues
9+
10+
---
11+
**Learning goals**
12+
13+
* Creating an issue
14+
* Addressing an issue
15+
16+
---
17+
18+
19+
# Step 1. Creating an issue
20+
21+
* Click on the `Issue` tab, on the top of the page. This page lists all the issues, which are used to track todos, bugs, feature requests, and whatever you think fit. When you are opening an issue on a public repo, please look for a code of conduct, or for a bug reporting check list and comply with them :relaxed:
22+
* Click on the `New issue` green button on the right of the page.
23+
* You are a team, therefore it is good to get to know one another a bit. Therefore, your *feature requests* will be asking (personal?) questions to other team members
24+
* Think of a question and use it as a title. Be creative, or use one of the questions below
25+
* How the other team member should address the question? Describe it in the comment. Look at the examples below but please, no poem, the deal is to learn how to collaborate via GitHub, not to win the Pulitzer :stuck_out_tongue:
26+
27+
| Question | Description |
28+
|:---|:---|
29+
| What is your favourite food? | Can you list the main ingredients? How often do you eat it? Can you cook it? |
30+
| Where were you born? | Please, tell me how does it look! |
31+
| What is your background? | I can see that you joined the AIClub, so you may be keen on AI, data science and the likes, but what did you study? |
32+
| What do you do? | I can see that you joined the AIClub, so you may be keen on AI, data science and the likes, but what do you do to survive? |
33+
| Why did you join this workshop? | Please, explain me how proficient (if any) you are with GitHub and what you are expecting from this workshop |
34+
35+
* Click on the `Submit new issue` green button.
36+
* Step 1 completed. Your issue has been assigned a tracking number (gotten how the numbering works?)
37+
38+
39+
# Step 2. Assigning an issue
40+
41+
* Once everyone has completed step 1, click again on the `Issue` tab. Now you should be able to see all the questions (hope that there are not too many duplicates!)
42+
* To avoid having everyone dealing with the same question, **quickly** decide who is going to answer what :sweat_smile:
43+
* Select the question you like and click on it
44+
* On the right menu, you will see a `Assignees No one — assign yourself`. Click on it and then on your name.
45+
* Great, you just committed to answer the question :nerd_face:
46+
* Write a nice comment explaining that you are dealing with the issue right now. It is nice knowing that an issue has been assigned to someone, but it is even better knowing that someone is actually working on it!
47+
* Click on the `Comment` green button.
48+
* Note the grey `Close and comment` beside: this is a great one to click on, we will do it later :grin:
49+
* Step 2 completed!
50+
51+
52+
# Step 3. Checking whether all issues have been assigned
53+
54+
* Once everyone has completed step 2, click again on the `Issue` tab. Now you should be able to see all the questions and who is dealing with them!
55+
* Step 3 completed. This was easy, wasn't it?
56+
57+

own-branch.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
layout: default
3+
title: Working on your own branch
4+
nav_order: 4
5+
permalink: /own-branch
6+
---
7+
8+
# Working on your own branch
9+
10+
---
11+
**Learning goals**
12+
13+
* Forking a repository
14+
* Creating branches
15+
* Creating files, and committing changes
16+
* Comparing branches
17+
18+
---
19+
20+
21+
## Step 1. Forking the repository
22+
23+
* This step should be done by everyone apart the repo owner
24+
* Click on the `Fork` button on the top right of the page. This will create a copy of the repository on your own GitHub account (see that the name of the repository is now *your username/repo name*?)
25+
* Step 1 completed. For this part of the tutorial, we will work on this copy of the repo and no longer on the original one (apart, again, the repo owner, who will work on the original repo)
26+
27+
## Step 2. Creating a branch
28+
29+
* Note a button `Branch: master` on the top-right of the repo main page, above the list of files. So far we have used only one branch (`master`) but it is now time to get a branch on our own!
30+
* Click on the button, and when asked to find or create a branch, type your name
31+
* A `Create branch: your name` button will appear, click on it
32+
* Congratulation you create your own branch :tada:
33+
* Note the button `Branch` again: now no longer report `master` but it has your new branch name: you create and checked it out at the same time!
34+
* Step 2 completed. Time of doing some *serious* job here!
35+
36+
## Step 3. Creating and committing a new file
37+
38+
* Remember we created this branch to deal with an issue we self-assigned? Time to address it!
39+
* Click on the button `Create new file`, just below the *number of releases*
40+
* Name your file
41+
* Answer the question you have self-assigned. Write a few lines (so we can have some material to work on in the next steps) but remember that the goal is not to win the Costa Book Awards :stuck_out_tongue:
42+
* Commit with a message/description as done before. Are you in the correct branch, the one with your name?
43+
* Step 3 completed. Will your literary efforts be enough?
44+
45+
## Step 4. Comparing branches
46+
47+
* After step 3, your branch will be one commit ahead of `master. Can you see it?
48+
* Click on the `Compare` button.
49+
* You will land in a page highligthing all the differences between the `master` and your own branch.
50+
* Does everything look good? Everything there?
51+
* Step 4 completed. Time to move on and push these changes to the original repo.
52+
53+
54+
55+

pull-request.md

Whitespace-only changes.

same-branch.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
---
2+
layout: default
3+
title: Working all on the same branch
4+
nav_order: 3
5+
permalink: /same-branch
6+
---
7+
8+
9+
# Working all on the same branch
10+
11+
---
12+
**Learning goals**
13+
14+
* Editing files and committing changes
15+
* Understanding basic issues underlining collaborations
16+
17+
---
18+
19+
20+
## Step 1: Editing a file and committing changes
21+
22+
* The work carried on on our repo will be a collaborative one, therefore all the members of the team need to be acknowledged. On the main repo's page, along with the stats we described before (numbers of commits, branches, ...), you will see the list of files included in the repo (now README and license), the commit message(s) (more later), and when the commit(s) have been done. Just below there is the README page content, which now just reports the repo's name and description. What better place to list all the contributors?
23+
* Press the pencil on the left of the `README.md` box
24+
* In a new line, immediately below the repo's description, add your name
25+
* On the bottom of the page include a commit message (you can use the suggested *Update README.md* or be more precise) and an optional extended description (what did you do?). Detailed commits are always highly appreciated, as the person that made them :wink:
26+
* We will commit directly to the master branch (no action needed, but note the option of creating another branch)
27+
* Click on the `Commit changes` green button
28+
* Step 1 completed. Not too hard, right?
29+
30+
## Step 2: Observing the results
31+
32+
* Wait for everyone to have completed step 1
33+
* Refresh the main repo page
34+
* Is your name still immediately below the repo's description?
35+
* What has happened? What can possibly go wrong in a real world scenario? Discuss with your team members
36+
* Also, how many commits there are now?
37+
* Step 2 completed. Let's move to a more organised (and less dangerous) way to collaborate
38+
39+
40+

setting-up.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
layout: default
3+
title: Setting Up
4+
nav_order: 2
5+
permalink: /setting-up
6+
---
7+
8+
# Setting up
9+
10+
---
11+
**Learning goals**
12+
13+
* Initialise a GitHub repository
14+
* Adding contributors, and accepting invitation to contribute
15+
16+
---
17+
18+
19+
20+
## Step 1: Initialising a repository
21+
22+
* You will collaborate on a single repository, therefore you will need to create **one and only** one: choose one person in your team to do so (but watch out what they are doing)
23+
* The *chosen one* should now go to their GitHub page (`https://github.com/loginname`) and click on the `Repository` tab, on the top of the page. This page lists all your repository -- it may already include some :nerd_face:
24+
* Click on the `New` green button on the top right
25+
* Your repository will need a name: agree on one! If you are having a creative block, names like *"github-collaborative-workshop"*, or *"AIClub-githib-workshop"* will be amazing, trust us :sweat_smile:
26+
* Your repository will also need a description: why not *"A collaborative repo"*?
27+
* Your repository can be *public* (everyone can access it) or *private* (only you and your collaborators will be able to access it). Since early 2019, GitHub allows an unlimited number of private repositories, but don't be shy -- and think of all the good you get from open access code. Time to give some love back?
28+
* GitHub allows initialising a repository with a README file. Please, do so
29+
* GitHub allows generating a `.gitignore` (which lists all the files that should not be included on a repo) and a `licence` file. Let's ignore the former but let's include the latter (quite a list, isn't it?)
30+
* Click on the `Create repository` green button
31+
* Step 1 completed. Give each other a high five :raised_hands:
32+
33+
## Step 2: Adding contributors
34+
35+
* You landed on your repo main page. Under the repo name & description there is a summary of its *status*:
36+
* number of commits: 1, the *Initial commit* you triggered when pressing the `Create repository` button
37+
* number of branches: 1, the so-called `master` branch
38+
* number of releases: 0, we need some time
39+
* number of collaborators: 1, the repo's owner, time to change this :two_women_holding_hands: :couple: :two_men_holding_hands:
40+
* The repo's owner should now click on the `Setting` tab, on the top of the page
41+
* On the left menu, click on `Collaborators` (you may be asked to type your password)
42+
* Add the other members of the team, one by one, using their GitHub username or email
43+
* Step 2 completed. Time for everyone to roll up their sleeves :muscle:
44+
45+
46+
## Step 3: Accepting an invitation to contribute
47+
48+
* All the member of the team should receive an email inviting them to collaborate. Please accept: the more, the merrier!
49+
* Step 3 completed. Ready for the real work? From now on, everyone has do to their homework, so no more looking at the *chosen one*!
50+
51+
52+
53+

0 commit comments

Comments
 (0)