Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
24d0048
add terminology explainer to shell slides
dtxe Nov 15, 2024
ad5b639
update instructor contact on readme
dtxe Nov 18, 2024
7e0a1e6
Merge pull request #148 from dtxe/readme
danielrazavi Nov 18, 2024
01efb7c
Merge pull request #147 from dtxe/slides_update
danielrazavi Nov 18, 2024
d1f5d15
add assignment rawdata
dtxe Nov 19, 2024
737e414
Merge pull request #149 from dtxe/add_rawdata
dtxe Nov 19, 2024
cfb96e3
identify latest commit for merge check from branch name, instead of h…
dtxe Nov 19, 2024
bb87672
directly look for target sha in compare to main
dtxe Nov 19, 2024
e3436ed
Merge branch 'autograder'
dtxe Nov 19, 2024
a6f5efa
update URL for downloading autograder back to UofT-DSI
dtxe Nov 19, 2024
a98ea68
update assignment instructions
dtxe Nov 19, 2024
a6e9f00
update assignment due date
dtxe Nov 19, 2024
3276c3b
Merge pull request #146 from dtxe/autograder
danielrazavi Nov 19, 2024
5977a6b
switch to curl; wget not available in Git Bash
dtxe Nov 22, 2024
5ba63c3
Merge pull request #162 from dtxe/autograder
dtxe Nov 22, 2024
77a922a
Update assignment_instructions.md
moturuab Jan 6, 2025
b2e6074
Update README.md
moturuab Jan 6, 2025
288ec93
Merge pull request #214 from UofT-DSI/moturuab-patch-2
danielrazavi Jan 7, 2025
dab4a1f
Merge pull request #215 from UofT-DSI/moturuab-patch-3
danielrazavi Jan 7, 2025
f596429
Update README.md
moturuab Jan 8, 2025
173f1e1
Merge pull request #217 from UofT-DSI/moturuab-patch-3
danielrazavi Jan 8, 2025
4203d5d
Add image for GitHub Actions instructions in assignment documentation
danielrazavi Jan 17, 2025
fcdeed5
Un-ignore GitHub Actions image in .gitignore
danielrazavi Jan 17, 2025
acd1af3
Update README.md
moejennie Jan 29, 2025
444318b
Update README.md
moejennie Jan 29, 2025
b2c2c08
Update README.md
moejennie Jan 29, 2025
cb3581f
Remove reference to 'steps_to_ask_for_help.png' from README.md
danielrazavi Jan 30, 2025
80823b1
Merge branch 'main' of https://github.com/UofT-DSI/shell
dtxe Mar 20, 2025
cb6ede5
add additional practice homework problems
dtxe Mar 20, 2025
913ea1a
Homework html page
dtxe Mar 20, 2025
addbc21
update assignment instructions
dtxe Mar 20, 2025
42ceebc
Merge branch 'main' of https://github.com/dtxe/DSI_shell
dtxe Mar 20, 2025
9f93a7c
clarify prefilled template
dtxe Mar 20, 2025
d76414d
remove local css files, update problem rendering, add new problems
dtxe Mar 21, 2025
b464c20
add more prominent notice that homework is optional
dtxe Mar 21, 2025
4474719
bugfix: also highlight correct parsons selections in the right column
dtxe Mar 21, 2025
f0f80cd
move basic homework to web-based platform for clearer in-line solutions
dtxe Mar 21, 2025
6f734b1
make shell_basics easier to use in interactive format
dtxe Mar 23, 2025
3936ba4
improve solution formatting
dtxe Mar 23, 2025
065a514
clarify parsons problem drag source and targets
dtxe Mar 23, 2025
a80b024
revert left/right column order
dtxe Mar 23, 2025
4547472
Merge pull request #232 from dtxe/main
dtxe Mar 24, 2025
a6e20d1
add README for interactive problems
dtxe Mar 24, 2025
56aeab7
update assignment autograder: rename Q9 in output to Part 2 Q1
dtxe Mar 24, 2025
be11008
clarify homework solutions
dtxe Mar 25, 2025
f24ef77
make autograder Q8 less strict to accomodate other acceptable tactics
dtxe Mar 25, 2025
1efa829
fix question number formatting error
dtxe Mar 25, 2025
fd69c1b
print troubleshooting for which files are missing, make unzippping si…
dtxe Mar 25, 2025
b17c358
enable local debug mode for autograder that doesn't require all the g…
dtxe Mar 25, 2025
6bbf4ec
add back a check for Q8 on whether data/raw was listed instead of dat…
dtxe Mar 25, 2025
c26da8e
bugfixes for marking error state
dtxe Mar 25, 2025
4eb3a7a
bugfix: fix error when all are correct
dtxe Mar 25, 2025
b15f549
instead of commenting, approve or request changes
dtxe Mar 25, 2025
ab567af
bugfix: PR not working post instead of put
dtxe Mar 25, 2025
011bf01
3x autograder speedup by using uv run
dtxe Mar 25, 2025
d0a6986
update readme for C6 teaching team
dtxe Mar 26, 2025
fb42909
rename homework to practice problems, and update README
dtxe Mar 26, 2025
31d6680
remove mention of homework
dtxe Mar 26, 2025
7208d73
complete assignment grading instructions
dtxe Mar 26, 2025
37e2696
Merge pull request #234 from dtxe/main
RohanAlexander Mar 26, 2025
284ad41
add bash cheatsheet
dtxe Mar 26, 2025
b9ca76d
update readme: formatting
dtxe Mar 26, 2025
15501b2
autoclose assignment PRs
dtxe Mar 27, 2025
2aa25f1
rename workflows for clarity, don't run autograder on uoft-dsi repo. …
dtxe Mar 27, 2025
8b2f2d6
autograder: tweak question numbering for Part 2 clarity, fix 1.3
dtxe Mar 31, 2025
2cc53ee
Update 04_this_cohort/additional_resources/bash_commands_cheatsheet.md
dtxe Apr 1, 2025
81bfcda
Merge pull request #235 from dtxe/main
RohanAlexander Apr 1, 2025
d28b064
Merge branch 'main' of https://github.com/dtxe/DSI_shell
dtxe Apr 1, 2025
00f7882
Merge branch 'main' of https://github.com/UofT-DSI/shell
dtxe Apr 1, 2025
5c5ce34
move bash cheatsheet to main materials directory
dtxe Apr 1, 2025
17e355b
Merge pull request #236 from dtxe/main
RohanAlexander Apr 1, 2025
ab03b43
Specify PR title in PR template
postatum Apr 9, 2025
5b7fd64
incorrect repo comment and auto-close applies to all PRs that don't c…
dtxe Apr 14, 2025
01be2d6
update assignment to run in a new directory, clarify assigment instru…
dtxe Apr 14, 2025
3399236
further instructions updates
dtxe Apr 14, 2025
d7ea0a4
also check if the submitter is a contributor to the shell repo
dtxe Apr 14, 2025
436ce53
bugfix: set before declare
dtxe Apr 14, 2025
3069956
only run PR comment on open, no need to comment on every push
dtxe Apr 14, 2025
62b6676
only deploy github pages on the UofT-DSI repo, or on a designated git…
dtxe Apr 14, 2025
df978ac
restructure assignment instructions for clarity
dtxe Apr 22, 2025
09ffdf8
Merge pull request #239 from postatum/patch-1
danielrazavi May 2, 2025
f6fb16f
add mindmap
dtxe Jul 16, 2025
15e8550
add mindmap source docs
dtxe Jul 23, 2025
956bf39
Merge pull request #345 from dtxe/mindmap
dtxe Jul 23, 2025
415c966
Merge pull request #317 from dtxe/update_ghpages_deploy
dtxe Jul 23, 2025
459993e
Merge pull request #316 from dtxe/update_assignment
dtxe Jul 23, 2025
48c37f2
Merge pull request #315 from dtxe/aggressive-autoclose
dtxe Jul 23, 2025
2d339cc
readme updates
dtxe Jul 29, 2025
6fa9163
Merge pull request #348 from dtxe/main
dtxe Jul 29, 2025
5e322b3
add readme and disclaimer
dtxe Jul 30, 2025
457bf22
Merge pull request #349 from dtxe/main
dtxe Jul 30, 2025
9df3fff
add setup instructions to SETUP.md
danielrazavi Sep 12, 2025
26ed859
update .gitignore to include .venv and revise README.md for onboardin…
danielrazavi Sep 12, 2025
5faec72
Merge pull request #398 from UofT-DSI/move_to_uv
moejennie Sep 23, 2025
7cb87a3
prepping README for DC2
danielrazavi Sep 23, 2025
c36dd5d
tiny change
danielrazavi Sep 23, 2025
b91720e
Merge pull request #399 from UofT-DSI/updating_names
danielrazavi Sep 24, 2025
4872cac
Update bash_quick_reference.md
danielrazavi Sep 30, 2025
807bb36
Update assignment_instructions.md
danielrazavi Oct 1, 2025
aef521e
renamed a file
danielrazavi Oct 2, 2025
871d0a5
Update README.md
moejennie Oct 7, 2025
6bf9c91
Add new theme and logo for Unix slides; remove obsolete slides
danielrazavi Oct 9, 2025
67a6a90
Update Unix slides and replace DSI logo
danielrazavi Oct 14, 2025
7357a35
Update teaching team contact info, and misc updates for C8
dtxe Nov 3, 2025
7a0d963
Merge pull request #480 from dtxe/main
dtxe Nov 4, 2025
7a04830
Initial commit with raw data and refined Data
Jyoti2001 Nov 9, 2025
2ec65a1
added all assignment files
Jyoti2001 Nov 9, 2025
06a51cd
Merged remote branch 'assignment' into local branch to sync histories
Jyoti2001 Nov 9, 2025
9852785
Completed part 1 and set up data direcotry
Jyoti2001 Nov 9, 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
  •  
  •  
  •  
2 changes: 2 additions & 0 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 Down
18 changes: 8 additions & 10 deletions .github/workflows/autograder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,18 @@ on:
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')
if: startsWith(github.head_ref, 'assignment') && github.repository_owner != 'UofT-DSI'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r 03_instructional_team/autograder/requirements.txt
- uses: astral-sh/setup-uv@v5
- name: Setup working directory for script
run: |
UUID=$(uuidgen)
Expand All @@ -38,5 +36,5 @@ jobs:
REPO_BRANCH: ${{ github.event.pull_request.head.ref }}
WORKING_DIR: /tmp/${{ env.UUID }}
run: |
wget -O /tmp/autograder.py https://github.com/dtxe/DSI_shell/raw/refs/heads/autograder/03_instructional_team/autograder/autograder.py
python /tmp/autograder.py
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
76 changes: 64 additions & 12 deletions .github/workflows/automatic_pr_comment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,76 @@ name: UofT-DSI Main Repository PR Workflow

on:
pull_request_target:
types: [opened, synchronize]
types: [opened, reopened]

jobs:
comment:
handle-pr:
if: github.repository_owner == 'UofT-DSI'
runs-on: ubuntu-latest
steps:
- name: Comment on PR
- name: Handle PR based on branch and author
uses: actions/github-script@v6
with:
script: |
const issue_number = context.payload.pull_request.number;
const pr = context.payload.pull_request;
const branchName = pr.head.ref;
const issue_number = pr.number;
const repo = context.repo;
const commentBody = `Hello, thank you for your contribution. If you are a participant, please close this pull request and open it in your own forked repository instead of here. Please read the instructions on your onboarding [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) more carefully. If you are not a participant, please give us up to 72 hours to review your PR. Alternatively, you can reach out to us directly to expedite the review process.`;
// Check if the PR is made to a repo in the UofT-DSI organization
github.rest.issues.createComment({
owner: repo.owner,
repo: repo.repo,
issue_number: issue_number,
body: commentBody
});
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ package.json

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

.venv
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.
84 changes: 84 additions & 0 deletions 01_materials/bash_quick_reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
# Bash Commands Reference

## 📋 Commands Overview

```bash
$ echo Rachael
Rachael

$ 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 modified 01_materials/slides/optional_unix_slides.pdf
Binary file not shown.
Binary file modified 01_materials/slides/unix_slides.pdf
Binary file not shown.
12 changes: 9 additions & 3 deletions 02_activities/assignments/assignment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,20 @@ set -x
# project name and a brief description of the project.
# Then it unzips the raw data provided by the client.

if [ -d newproject ]; then
echo "Recreating the newproject directory"
rm -rf newproject
fi
mkdir newproject
cd newproject

mkdir analysis output
touch README.md
touch analysis/main.py

# download client data
wget -O rawdata.zip https://github.com/UofT-DSI/shell/raw/refs/heads/main/02_activities/assignments/rawdata.zip
unzip rawdata.zip
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
Expand All @@ -37,7 +44,6 @@ unzip rawdata.zip
# 8. Create a file named ./data/inventory.txt that lists all the files in the subfolders of ./data/processed



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

echo "Project setup is complete!"
Loading