Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
350f600
Updating the Pull Request templates to remove mention of adding Learn…
danielrazavi May 1, 2024
69b335e
Adding in Cohort three folder.
danielrazavi May 3, 2024
d7d8dae
Update README.md
curtissfnorman May 3, 2024
d67a95b
Making live_code snake cased.
danielrazavi May 3, 2024
6ff4a56
Update README.md
curtissfnorman May 7, 2024
aeb3db5
Update README.md
curtissfnorman May 7, 2024
7fe8a46
file system update
danielrazavi Jun 4, 2024
4fda727
updated the readme.md
danielrazavi Jun 4, 2024
9c14a52
Workflow added for automated comments.
danielrazavi Jul 8, 2024
57d55bb
Updating workflow
danielrazavi Jul 15, 2024
f01a18e
ignore node_modules dependencies folder for slide generation
dtxe Aug 13, 2024
d66e50c
Update materials for Cohort 4, improve slide generation workflow
dtxe Aug 13, 2024
9fe5c81
update asking questions help flow
dtxe Aug 13, 2024
a48d96f
revert renaming markdown_slides => lessons, update generate_slides.sh…
dtxe Aug 13, 2024
d635496
remove unused theme css file
dtxe Aug 13, 2024
8fbcb24
revert help flowchart, small misc changes
dtxe Aug 13, 2024
7acb6a7
add man, cat, misc small changes
dtxe Aug 13, 2024
5a92749
old conflict resolved
Dmytro-Bonislavskyi Nov 8, 2025
64d75f3
autograder fix paths bug
dtxe Aug 14, 2024
93b4e40
remove PR comment for now
dtxe Aug 14, 2024
0b4d371
autograder bugfix
dtxe Aug 14, 2024
8a8e98d
autograder fixes
dtxe Aug 14, 2024
dab9487
try posting comment from python autograder
dtxe Aug 14, 2024
8c5e22d
add requests module
dtxe Aug 14, 2024
7de28e1
autograder status should be ok if all tests ran successfully, regardl…
dtxe Aug 14, 2024
4848242
use absolute path for checks
dtxe Aug 14, 2024
28f54ff
updated working autograder for this script: look for touch command in…
dtxe Aug 15, 2024
e20fef0
autograder action: now runs on any branch beginning with assignment i…
dtxe Aug 15, 2024
71ad615
edge case bugfix q2
dtxe Aug 15, 2024
d50c183
move repo owner check earlier, so it doesn't appear in list of action…
dtxe Aug 15, 2024
4ba0813
1update assignment instructions for C4, update dsi repo pr action name
dtxe Aug 15, 2024
131b8a7
rename instructions file for clarity
dtxe Aug 16, 2024
821bdaa
update instructor details in readme, rename cohort_three to this_cohort
dtxe Aug 17, 2024
2f42e74
instructions and readme updates
dtxe Aug 17, 2024
ae6ba91
add bash redirect
dtxe Aug 18, 2024
5a4ef0d
readme update LS
dtxe Aug 20, 2024
b4a7ac9
clarify assignment, remove confusing instructions from homework, upda…
dtxe Aug 21, 2024
9b86476
clean output files from folder before running assignment script
dtxe Aug 21, 2024
305ed47
update assignment instructions, update autograder q8 check
dtxe Aug 22, 2024
c714076
autograder q8 hotfix
dtxe Aug 22, 2024
c5f643e
update instructor contact on readme
dtxe Nov 18, 2024
811698c
add terminology explainer to shell slides
dtxe Nov 15, 2024
5a82175
add assignment rawdata
dtxe Nov 19, 2024
4616489
update assignment to combine git/shell with new autograder
dtxe Nov 19, 2024
ffc58be
identify latest commit for merge check from branch name, instead of h…
dtxe Nov 19, 2024
64d12d8
directly look for target sha in compare to main
dtxe Nov 19, 2024
4a4f23f
update URL for downloading autograder back to UofT-DSI
dtxe Nov 19, 2024
e165968
update assignment instructions
dtxe Nov 19, 2024
79a04eb
update assignment due date
dtxe Nov 19, 2024
1c379ef
switch to curl; wget not available in Git Bash
dtxe Nov 22, 2024
d03945a
Update assignment_instructions.md
moturuab Jan 6, 2025
39684f4
Update README.md
moturuab Jan 6, 2025
1f0da7b
Update README.md
moturuab Jan 8, 2025
de7bd05
Add image for GitHub Actions instructions in assignment documentation
danielrazavi Jan 17, 2025
0fb3b49
Un-ignore GitHub Actions image in .gitignore
danielrazavi Jan 17, 2025
6beac62
Update README.md
moejennie Jan 29, 2025
b2e7afe
Update README.md
moejennie Jan 29, 2025
01b73c1
Update README.md
moejennie Jan 29, 2025
5c0a82f
Remove reference to 'steps_to_ask_for_help.png' from README.md
danielrazavi Jan 30, 2025
dbdf8d3
add additional practice homework problems
dtxe Mar 20, 2025
5c63b2c
update assignment instructions
dtxe Mar 20, 2025
44c3487
Homework html page
dtxe Mar 20, 2025
3aa9d58
clarify prefilled template
dtxe Mar 20, 2025
7bbd343
remove local css files, update problem rendering, add new problems
dtxe Mar 21, 2025
862980a
add more prominent notice that homework is optional
dtxe Mar 21, 2025
77254f0
bugfix: also highlight correct parsons selections in the right column
dtxe Mar 21, 2025
c6b7545
1move basic homework to web-based platform for clearer in-line solutions
dtxe Mar 21, 2025
c8133cd
make shell_basics easier to use in interactive format
dtxe Mar 23, 2025
0671075
improve solution formatting
dtxe Mar 23, 2025
dfce0b0
clarify parsons problem drag source and targets
dtxe Mar 23, 2025
bb1a5ef
revert left/right column order
dtxe Mar 23, 2025
f949460
add README for interactive problems
dtxe Mar 24, 2025
82c44a7
update assignment autograder: rename Q9 in output to Part 2 Q1
dtxe Mar 24, 2025
a4e5f85
clarify homework solutions
dtxe Mar 25, 2025
56dc594
make autograder Q8 less strict to accomodate other acceptable tactics
dtxe Mar 25, 2025
5729398
fix question number formatting error
dtxe Mar 25, 2025
c616ebe
print troubleshooting for which files are missing, make unzippping si…
dtxe Mar 25, 2025
c5e2d5c
enable local debug mode for autograder that doesn't require all the g…
dtxe Mar 25, 2025
1675d22
add back a check for Q8 on whether data/raw was listed instead of dat…
dtxe Mar 25, 2025
c4fc1d2
bugfixes for marking error state
dtxe Mar 25, 2025
aa95ffc
bugfix: fix error when all are correct
dtxe Mar 25, 2025
7e0decc
instead of commenting, approve or request changes
dtxe Mar 25, 2025
bd37b17
bugfix: PR not working post instead of put
dtxe Mar 25, 2025
177c6dc
3x autograder speedup by using uv run
dtxe Mar 25, 2025
6bb5640
update readme for C6 teaching team
dtxe Mar 26, 2025
8f2b114
1rename homework to practice problems, and update README
dtxe Mar 26, 2025
de1b4be
remove mention of homework
dtxe Mar 26, 2025
b9dfa54
complete assignment grading instructions
dtxe Mar 26, 2025
df83228
add bash cheatsheet
dtxe Mar 26, 2025
281bd42
update readme: formatting
dtxe Mar 26, 2025
77bfd11
autoclose assignment PRs
dtxe Mar 27, 2025
4ae2801
rename workflows for clarity, don't run autograder on uoft-dsi repo. …
dtxe Mar 27, 2025
79b6ddc
autograder: tweak question numbering for Part 2 clarity, fix 1.3
dtxe Mar 31, 2025
d70b08e
Update 04_this_cohort/additional_resources/bash_commands_cheatsheet.md
dtxe Apr 1, 2025
650284a
move bash cheatsheet to main materials directory
dtxe Apr 1, 2025
9a5ecbf
Specify PR title in PR template
postatum Apr 9, 2025
7671ad2
add mindmap
dtxe Jul 16, 2025
9cfcc63
add mindmap source docs
dtxe Jul 23, 2025
c8d110e
only deploy github pages on the UofT-DSI repo, or on a designated git…
dtxe Apr 14, 2025
bb5b74f
update assignment to run in a new directory, clarify assigment instru…
dtxe Apr 14, 2025
d3c514d
further instructions updates
dtxe Apr 14, 2025
1c8b79d
restructure assignment instructions for clarity
dtxe Apr 22, 2025
e64c68e
incorrect repo comment and auto-close applies to all PRs that don't c…
dtxe Apr 14, 2025
ff4f350
also check if the submitter is a contributor to the shell repo
dtxe Apr 14, 2025
9da41a5
bugfix: set before declare
dtxe Apr 14, 2025
c09fbe3
only run PR comment on open, no need to comment on every push
dtxe Apr 14, 2025
30ff891
readme updates
dtxe Jul 29, 2025
d218d61
add readme and disclaimer
dtxe Jul 30, 2025
628208d
Testing Olgas solution
Dmytro-Bonislavskyi Nov 8, 2025
3fd9fd8
Testing Olgas solution
Dmytro-Bonislavskyi Nov 8, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 2 additions & 3 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<!-- PULL REQUEST TITLE: UofT-DSI | <Module Name> - Assignment <assignment number>-->

## What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)

## What did you learn from the changes you have made?
Expand All @@ -10,8 +12,5 @@

## A reference to a related issue in your repository (if applicable)

## @mentions of the person or team responsible for reviewing proposed changes (At least 2 people)
-

## Checklist
- [ ] I can confirm that my changes are working as intended
40 changes: 40 additions & 0 deletions .github/workflows/autograder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Assignment autograder
on:
pull_request:
branches:
- main
types: [opened, synchronize, reopened]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
autograder:
name: Assignment autograder
if: startsWith(github.head_ref, 'assignment') && github.repository_owner != 'UofT-DSI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- name: Setup working directory for script
run: |
UUID=$(uuidgen)
echo "UUID=$UUID" >> $GITHUB_ENV
mkdir /tmp/$UUID
cp $GITHUB_WORKSPACE/02_activities/assignments/assignment.sh /tmp/$UUID
- name: Run assignment script
run: |
bash -c "bash assignment.sh 2>&1 | tee /tmp/${{ env.UUID }}_output.txt"
working-directory: /tmp/${{ env.UUID }}
- name: Grade responses
id: grade
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.event.repository.name }}
PR_NUMBER: ${{ github.event.pull_request.number }}
REPO_BRANCH: ${{ github.event.pull_request.head.ref }}
WORKING_DIR: /tmp/${{ env.UUID }}
run: |
wget -O /tmp/autograder.py https://github.com/UofT-DSI/shell/raw/refs/heads/main/03_instructional_team/autograder/autograder.py
uv run --python 3.12 --with pandas,tabulate,requests /tmp/autograder.py
77 changes: 77 additions & 0 deletions .github/workflows/automatic_pr_comment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: UofT-DSI Main Repository PR Workflow

on:
pull_request_target:
types: [opened, reopened]

jobs:
handle-pr:
if: github.repository_owner == 'UofT-DSI'
runs-on: ubuntu-latest
steps:
- name: Handle PR based on branch and author
uses: actions/github-script@v6
with:
script: |
const pr = context.payload.pull_request;
const branchName = pr.head.ref;
const issue_number = pr.number;
const repo = context.repo;
const sender = context.payload.sender.login;

let isMember = false;
let isContributor = false;

// Check if user is a member of the org
try {
const membership = await github.rest.orgs.getMembershipForUser({
org: repo.owner,
username: sender
});
isMember = membership && membership.status === "active";
} catch (error) {
// If not a member, GitHub API throws a 404
isMember = false;
}

// Check if user is a contributor to the repo
try {
const contributors = await github.paginate(
github.rest.repos.listContributors,
{
owner: repo.owner,
repo: repo.repo,
anon: false
}
);
isContributor = contributors.some(contributor => contributor.login === sender);
} catch (error) {
isContributor = false;
}

if ((!isMember && !isContributor) || branchName.startsWith('assignment')) {
const commentBody = `This pull request was made to the wrong repository. If you are a participant, please close it and open it in your own fork instead. Refer to the [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) for detailed instructions.`;

await github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: issue_number,
body: commentBody
});

await github.rest.pulls.update({
owner: repo.owner,
repo: repo.repo,
pull_number: issue_number,
state: "closed"
});
} else {
const commentBody = `Thanks for your contribution! 🎉\n\nPlease remember to tag or request a review from the DSI team. Give us up to 72 hours to review your pull request. We appreciate your patience and efforts.`;

await github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: issue_number,
body: commentBody
});
}
43 changes: 43 additions & 0 deletions .github/workflows/deploy_github_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Simple workflow for deploying static content to GitHub Pages
name: Deploy static content to Pages

on:
push:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
if: |
(github.repository == 'UofT-DSI/shell' && github.ref == 'refs/heads/main') ||
(github.repository != 'UofT-DSI/shell' && github.ref == 'refs/heads/githubpages')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './03_instructional_team/githubpages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
19 changes: 17 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,19 @@
.DS_Store
.vscode/
./04_instructional_team/lessons/pdf/*
./04_instructional_team/lessons/html/*
03_instructional_team/lessons/pdf/*
03_instructional_team/lessons/html/*

# local node modules
node_modules/
package-lock.json
package.json

### Running the assignment script unzips a large number of files into the tree
# Ignore all files in shell/02_activities/assignments/
02_activities/assignments/*

# Un-ignore the specific files
!02_activities/assignments/assignment.sh
!02_activities/assignments/github_actions.png
!02_activities/assignments/assignment_instructions.md

4 changes: 4 additions & 0 deletions 01_materials/ShellGitMindmap.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
87 changes: 87 additions & 0 deletions 01_materials/bash_quick_reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Bash Commands Reference

## 📋 Commands Overview

```bash
$ echo Rachael
Rachael

$ conda activate dsi_participant
(dsi_participant)

$ date
Tue, Nov 19, 2024 6:28:10PM

$ asdkfjhgoipwhr
Command not found

$ man ls
# Opens the manual for `ls`
# To exit, press 'q'

$ help
# Lists available shell commands
```

---

## 📁 File & Directory Navigation

| Command | Description |
|------------------------|------------------------------------------------------------|
| `pwd` | Show current working directory |
| `ls` | List folders & files in the working directory |
| `cd` | Move to home directory |
| `cd Desktop` | Move into Desktop directory |
| `cd <path>` | Move into a specific path |
| `cd ..` | Move one level up (parent directory) |

---

## 🛠 File & Directory Management

| Command | Description |
|-------------------------------------|-----------------------------------------------------|
| `mkdir <dir_name>` | Make new directories |
| `touch <file_name>` | Create a file |
| `rm <directory_name>` | Remove a directory |
| `rm <file_name>` | Remove a file |
| `cp <source> <destination>` | Copy file from source to destination |
| `cp <dir_source>/* <dir_dest>` | Copy all files from source dir to destination dir |
| `mv <file1> <file2>` | Rename/move file1 to file2 |
| `cat <file_name>` | Display content of the file |
| `echo "text" > file.txt` | Replace content in file with text |
| `echo "text" >> file.txt` | Append text to file |

---

## ✏️ Editing Files

| Command | Description |
|--------------------|------------------------------------|
| `nano <file_name>` | Open file in nano text editor |
| `code <file_name>` | Open file in VS Code |

---

## 🧰 Useful Options

| Option | Description |
|--------|-----------------------------------------------------------|
| `-i` | Prompt before overwriting an existing file |
| `-r` | Recursively copy directories and their contents |
| `-v` | Show informative messages during operations |
| `-f` | Force action (overrides `-i` if both are used together) |

---

## 🔧 Hash-bang (Shebang)

Place this at the top of every Bash script to indicate which shell to use:

```bash
#!/bin/bash
```

---

Binary file added 01_materials/slides/optional_unix_slides.pdf
Binary file not shown.
Binary file added 01_materials/slides/unix_slides.pdf
Binary file not shown.
Binary file removed 01_slides/optional_unix_slides.pdf
Binary file not shown.
Binary file removed 01_slides/unix_slides.pdf
Binary file not shown.
54 changes: 54 additions & 0 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
#!/bin/bash
set -x

############################################
# DSI CONSULTING INC. Project setup script #
############################################
# This script creates standard analysis and output directories
# for a new project. It also creates a README file with the
# project name and a brief description of the project.
# Then it unzips the raw data provided by the client.

if [ -d newproject ]; then
echo "Directory 'newproject' already exists. Please remove it before running this script."
exit 1
fi
mkdir newproject
cd newproject

mkdir analysis output
touch README.md
echo "# Project Name: DSI Consulting Inc." > README.md
touch analysis/main.py

# download client data
curl -Lo rawdata.zip https://github.com/UofT-DSI/shell/raw/refs/heads/main/02_activities/assignments/rawdata.zip
unzip -q rawdata.zip

###########################################
# Complete assignment here

# 1. Create a directory named data
mkdir data

# 2. Move the ./rawdata directory to ./data/raw
mv ./rawdata ./data/raw
# 3. List the contents of the ./data/raw directory
ls -la ./data/raw
# 4. In ./data/processed, create the following directories: server_logs, user_logs, and event_logs
mkdir -p ./data/processed/{server_logs,user_logs,event_logs}
# 5. Copy all server log files (files with "server" in the name AND a .log extension) from ./data/raw to ./data/processed/server_logs
$ cp ./raw/*server*.log ./processed/server_logs/
# 6. Repeat the above step for user logs and event logs
cp ./raw/*user*.log ./processed/user_logs/
cp ./raw/*event*.log ./processed/event_logs/
# 7. For user privacy, remove all files containing IP addresses (files with "ipaddr" in the filename) from ./data/raw and ./data/processed/user_logs
ls ./raw/*ipaddr*
ls ./processed/user_logs/*ipaddr*

# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed
find ./processed -type f > ./inventory.txt

###########################################

echo "Project setup is complete!"
Loading