Skip to content

Commit a795075

Browse files
authored
Course content minor updates, readme updates (#31)
* readme updates, migrate generate_slides.sh from shell course * some slide updates --------- Co-authored-by: Simeon Wong <dtxe@users.noreply.github.com>
1 parent c35b080 commit a795075

14 files changed

Lines changed: 124 additions & 75 deletions

File tree

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
.DS_Store
22
.vscode/
3-
/03_instructional_team/lessons/pdf/*
4-
/03_instructional_team/lessons/html/*
5-
/03_instructional_team/lessons/pptx/*
3+
/03_instructional_team/node_modules
-35.9 KB
Binary file not shown.
-611 KB
Binary file not shown.
-56.3 KB
Binary file not shown.
55.1 KB
Binary file not shown.

02_activities/assignments/git_assignment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ In this assignment, you will be learning more about `git` and `GitHub` by workin
1818
1919
> b. What is a _pull request_?
2020
21-
> c. How do I open up a _pull request_?
21+
> c. Describe the steps to open a _pull request_?
2222
23-
> d. Give me a step by step guide on how to add someone to your repository.
23+
> d. Describe the steps to add a collaborator to a repository (share write permissions)
2424
2525
> e. What is the difference between `git` and `GitHub`?
2626
@@ -50,7 +50,7 @@ Feel free to at any point (recommended after answering every 2 questions) to sta
5050
🚨 **Please review our [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md)** 🚨 for detailed instructions on how to format, branch, and submit your work. Following these guidelines is crucial for your submissions to be evaluated correctly.
5151

5252
### Submission Parameters:
53-
* Submission Due Date: `11:59 PM - 28/04/2024`
53+
* Submission Due Date: `2024-08-25 - 23:59`
5454
* The branch name for your repo should be: `assignment`
5555
* What to submit for this assignment:
5656
* The mentioned markdown file above (README.md) should be populated with what we have asked for and should be the only change in your pull request.

03_instructional_team/generate_slides.sh

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# CONFIGURATION
4-
folder_md="lessons/"
4+
folder_md="markdown_slides/"
55
folder_output="../01_materials/slides" # This will be used for both PDF and HTML
66

77
# Clear the screen for the splash screen
@@ -38,7 +38,7 @@ function show_help() {
3838
echo ""
3939
echo "Options:"
4040
echo " --html Generate slides in HTML format. This option"
41-
echo " processes all Markdown files in the 'lessons'"
41+
echo " processes all Markdown files in the 'markdown_slides'"
4242
echo " directory, outputting HTML files."
4343
echo ""
4444
echo " --pdf Generate slides in PDF format. Similar to --html,"
@@ -59,8 +59,8 @@ function show_help() {
5959
echo " $0 --pdf"
6060
echo ""
6161
echo "Note:"
62-
echo " Ensure Marp CLI is installed and accessible in your system's PATH."
63-
echo " The script processes Markdown (.md) files located in the 'lessons'"
62+
echo " Ensure Node.js is installed and npm is accessible in your system's PATH."
63+
echo " The script processes Markdown (.md) files located in the 'markdown_slides'"
6464
echo -e " directory, preserving filenames but changing extensions to .html or .pdf.\n\n"
6565
}
6666

@@ -71,11 +71,16 @@ if [ "$#" -lt 1 ]; then
7171
fi
7272

7373
# Check for Marp CLI installation
74-
if ! command -v marp &> /dev/null; then
75-
echo "- Error: Marp CLI is not installed. Please install Marp CLI to proceed."
74+
if ! command -v npx >/dev/null 2>&1; then
75+
echo "- Error: npx is not installed. Please install Node.js to proceed."
7676
exit 1
7777
fi
7878

79+
if ! npx marp --version >/dev/null 2>&1; then
80+
echo "- Marp CLI is not installed. Installing Marp CLI in this repository..."
81+
npm install --no-save @marp-team/marp-cli
82+
fi
83+
7984
# Defaults
8085
output_type=""
8186
theme_path=""
@@ -144,12 +149,12 @@ for markdown_file in $markdown_files; do
144149
# Generate HTML
145150
output_file+=".html"
146151
echo " - Generating HTML: $output_file"
147-
marp "$markdown_file" --output "$output_file" --html --allow-local-files ${theme_path:+--theme-set $theme_path} # &> /dev/null
152+
npx marp "$markdown_file" --output "$output_file" --html --allow-local-files ${theme_path:+--theme-set $theme_path} # &> /dev/null
148153
elif [ "$output_type" = "--pdf" ]; then
149154
# Generate PDF
150155
output_file+=".pdf"
151156
echo " - Generating PDF: $output_file"
152-
marp "$markdown_file" --output "$output_file" --pdf --allow-local-files --pdf-notes ${theme_path:+--theme-set $theme_path} # &> /dev/null
157+
npx marp "$markdown_file" --output "$output_file" --pdf --allow-local-files --pdf-notes ${theme_path:+--theme-set $theme_path} # &> /dev/null
153158
else
154159
# nahhh
155160
show_help

03_instructional_team/markdown_slides/01_git_installation.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
marp: true
3-
theme: dsi-certificates-theme
3+
style: |
4+
section {
5+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
6+
}
47
_class: invert
58
paginate: true
69
---

03_instructional_team/markdown_slides/02_git_version_control.md

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
marp: true
3-
theme: dsi-certificates-theme
3+
style: |
4+
section {
5+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
6+
}
47
_class: invert
58
paginate: true
69
---
@@ -13,6 +16,8 @@ $ echo "Data Sciences Institute"
1316

1417
---
1518
Prerequisites:
19+
- Git version ≥2.39
20+
- Git Credential Manager
1621
- GitHub account
1722

1823
---
@@ -31,43 +36,31 @@ References
3136
## `Version Control`
3237

3338
---
34-
##### What is Version Control?
35-
Version control is a system that records changes to a file or a set of files over time so that we can recall a specific version later. We may already do this by copying files to another directory to save past versions.While it is simple, it lacks flexibility and complexity.
39+
#### What is Version Control?
40+
Version control is a system:
41+
* that records changes to a file or a set of files over time
42+
* that enables recall a specific version
3643

37-
---
38-
Version Control Systems (VCS) can do a number of things and can be applied on nearly any type of file on our computers:
39-
- revert files to a previous state
40-
- revert entire project to a previous state
41-
- compare changes over time
42-
- see who modified something last
43-
- who introduced an issue and when
44-
- recover lost files
44+
We may already do this by copying files to another directory to save past versions. While it is simple, it lacks flexibility and complexity.
4545

4646
---
47-
##### Local Version Control Systems
48-
Local VCSs were developed to keep track of changes to our files by putting them in a version database.
49-
50-
![bg right contain](./pics/02_lvc.png)
51-
52-
---
53-
##### Centralized Version Control Systems
54-
Centralized VCSs (CVCS) were developed to enable collaboration with developers on other systems. CVCSs have a single server that contains all the versioned files.
55-
56-
![bg left contain](./pics/02_cvcs.png)
57-
58-
---
59-
CVCSs allow some level of transparency to others' work and give Administrators a level of control over what developers can and can't do.
60-
61-
Unfortunately, a single server means that if it ever goes down, all collaboration halts for however long that lasts for. Additionally, if backups haven't been kept, work could easily be lost.
47+
#### Why version control?
48+
Version Control Systems (VCS) can do a number of things and can be applied on nearly any type of file on our computers:
49+
* revert files to a previous state
50+
* revert entire project to a previous state
51+
* compare changes over time
52+
* see who modified something last
53+
* who introduced an issue and when
54+
* recover lost files
6255

6356
---
64-
##### Distributed Version Control Systems
65-
To handle the limitations of LVCSs and CVCSs, Distributed VCSs were created. This includes Git, Mercurial and Bazaar.
57+
#### Why specialized version control for software teams?
58+
* Robust software is documented as it is written
59+
* Log changes and reasoning for why changes are made
60+
* Working in teams requires code-specific version control
61+
* Changing one part of a code project can affect behaviour in seemingly unrelated features
62+
* In-progress state of one component can render the entire program temporarily unusable (e.g. syntax error)
6663

67-
Collaborators mirror the entire repsoitory, therefore if a server dies, any one of the collaborators' repositories can be copied back to the server to restore it.
68-
69-
---
70-
![w:560 center](./pics/02_dvcs.png)
7164

7265
---
7366

@@ -80,22 +73,25 @@ Questions?
8073
## `Git`
8174

8275
---
83-
##### Git Basics
84-
Git thinks of data in a very different way than other VCSs. Instead of storing a set of files and the changes over time, Git thinks of its data more like a set of snapshots of a mini file system.
76+
### Git Basics
77+
Git is the most common VCS in modern coding teams.
8578

86-
If files have not changed, Git does not store the file again, it links to the previous identical file already stored.
79+
##### Git is efficient with storage
80+
* Git stores snapshots of files in your project directory
81+
* If files have not changed, Git does not store the file again, it links to the previous identical file already stored.
8782

8883
---
89-
![w:1100 center](./pics/02_git_data.png)
84+
85+
![auto center](./pics/02_git_data.png)
9086

9187
---
92-
##### Local Operations
88+
##### Git can operate locally
9389
Most operations on Git only need local files and resources to operate. Git also keeps the entire history of our projects on our local disks meaning we can see changes made months ago without a remote server.
9490

9591
We also don't need to be connected to the server to get work done, rather we only need to be connected when we want to upload our work.
9692

9793
---
98-
##### Benefits
94+
##### Git assures integrity
9995
Git uses a check-summing mechanism called *SHA-1 hash* which is calculated based on the contents of a file or directory structure in Git. It looks somehting like this:
10096
```
10197
24b9da6552252987aa493b52f8696cd6d3b00393

03_instructional_team/markdown_slides/03_git_basics.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
---
22
marp: true
3-
theme: dsi-certificates-theme
3+
style: |
4+
section {
5+
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
6+
}
47
_class: invert
58
paginate: true
69
---
@@ -327,12 +330,17 @@ $ git remote show origin
327330
Here we can see the URL that we're fetching and pulling from, our remote branches, and configurations for git push (to the main branch or another).
328331

329332
---
330-
To send and retrieve work between our local and remote repositories, we have to authenticate a personal access token:
333+
To send and retrieve work between our local and remote repositories, we use Git Credential Manager.
331334

332-
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![w:350 left](./pics/03_settings.png) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;![w:340 right](./pics/03_developer.png)
335+
```console
336+
$ git credential-manager github login
337+
```
333338

334-
---
335-
![w:1150 center](./pics/03_personal_auth.png)
339+
To check our login status
340+
341+
```console
342+
$ git credential-manager github list
343+
```
336344

337345
---
338346

0 commit comments

Comments
 (0)