diff --git a/.gitignore b/.gitignore index c21c80e..b27ba4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ .DS_Store .vscode/ -/03_instructional_team/lessons/pdf/* -/03_instructional_team/lessons/html/* -/03_instructional_team/lessons/pptx/* +/03_instructional_team/node_modules diff --git a/01_materials/slides/01_git_installation.pdf b/01_materials/slides/01_git_installation.pdf index 5520bbc..7ab2f22 100644 Binary files a/01_materials/slides/01_git_installation.pdf and b/01_materials/slides/01_git_installation.pdf differ diff --git a/01_materials/slides/02_git_version_control.pdf b/01_materials/slides/02_git_version_control.pdf index 4ccc078..3c8d5f3 100644 Binary files a/01_materials/slides/02_git_version_control.pdf and b/01_materials/slides/02_git_version_control.pdf differ diff --git a/01_materials/slides/03_git_basics.pdf b/01_materials/slides/03_git_basics.pdf index 0545426..0b23d77 100644 Binary files a/01_materials/slides/03_git_basics.pdf and b/01_materials/slides/03_git_basics.pdf differ diff --git a/01_materials/slides/04_optional_git_slide.pdf b/01_materials/slides/04_optional_git_slide.pdf index 8253614..055da1b 100644 Binary files a/01_materials/slides/04_optional_git_slide.pdf and b/01_materials/slides/04_optional_git_slide.pdf differ diff --git a/02_activities/assignments/git_assignment.md b/02_activities/assignments/git_assignment.md index 669f0c1..a2507de 100644 --- a/02_activities/assignments/git_assignment.md +++ b/02_activities/assignments/git_assignment.md @@ -18,9 +18,9 @@ In this assignment, you will be learning more about `git` and `GitHub` by workin > b. What is a _pull request_? - > c. How do I open up a _pull request_? + > c. Describe the steps to open a _pull request_? - > d. Give me a step by step guide on how to add someone to your repository. + > d. Describe the steps to add a collaborator to a repository (share write permissions) > e. What is the difference between `git` and `GitHub`? @@ -50,7 +50,7 @@ Feel free to at any point (recommended after answering every 2 questions) to sta 🚨 **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. ### Submission Parameters: -* Submission Due Date: `11:59 PM - 28/04/2024` +* Submission Due Date: `2024-08-25 - 23:59` * The branch name for your repo should be: `assignment` * What to submit for this assignment: * 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. diff --git a/03_instructional_team/generate_slides.sh b/03_instructional_team/generate_slides.sh index f5980fc..12c0199 100755 --- a/03_instructional_team/generate_slides.sh +++ b/03_instructional_team/generate_slides.sh @@ -1,7 +1,7 @@ #!/bin/bash # CONFIGURATION -folder_md="lessons/" +folder_md="markdown_slides/" folder_output="../01_materials/slides" # This will be used for both PDF and HTML # Clear the screen for the splash screen @@ -38,7 +38,7 @@ function show_help() { echo "" echo "Options:" echo " --html Generate slides in HTML format. This option" - echo " processes all Markdown files in the 'lessons'" + echo " processes all Markdown files in the 'markdown_slides'" echo " directory, outputting HTML files." echo "" echo " --pdf Generate slides in PDF format. Similar to --html," @@ -59,8 +59,8 @@ function show_help() { echo " $0 --pdf" echo "" echo "Note:" - echo " Ensure Marp CLI is installed and accessible in your system's PATH." - echo " The script processes Markdown (.md) files located in the 'lessons'" + echo " Ensure Node.js is installed and npm is accessible in your system's PATH." + echo " The script processes Markdown (.md) files located in the 'markdown_slides'" echo -e " directory, preserving filenames but changing extensions to .html or .pdf.\n\n" } @@ -71,11 +71,16 @@ if [ "$#" -lt 1 ]; then fi # Check for Marp CLI installation -if ! command -v marp &> /dev/null; then - echo "- Error: Marp CLI is not installed. Please install Marp CLI to proceed." +if ! command -v npx >/dev/null 2>&1; then + echo "- Error: npx is not installed. Please install Node.js to proceed." exit 1 fi +if ! npx marp --version >/dev/null 2>&1; then + echo "- Marp CLI is not installed. Installing Marp CLI in this repository..." + npm install --no-save @marp-team/marp-cli +fi + # Defaults output_type="" theme_path="" @@ -144,12 +149,12 @@ for markdown_file in $markdown_files; do # Generate HTML output_file+=".html" echo " - Generating HTML: $output_file" - marp "$markdown_file" --output "$output_file" --html --allow-local-files ${theme_path:+--theme-set $theme_path} # &> /dev/null + npx marp "$markdown_file" --output "$output_file" --html --allow-local-files ${theme_path:+--theme-set $theme_path} # &> /dev/null elif [ "$output_type" = "--pdf" ]; then # Generate PDF output_file+=".pdf" echo " - Generating PDF: $output_file" - marp "$markdown_file" --output "$output_file" --pdf --allow-local-files --pdf-notes ${theme_path:+--theme-set $theme_path} # &> /dev/null + npx marp "$markdown_file" --output "$output_file" --pdf --allow-local-files --pdf-notes ${theme_path:+--theme-set $theme_path} # &> /dev/null else # nahhh show_help diff --git a/03_instructional_team/markdown_slides/01_git_installation.md b/03_instructional_team/markdown_slides/01_git_installation.md index 409de05..bd98b6c 100644 --- a/03_instructional_team/markdown_slides/01_git_installation.md +++ b/03_instructional_team/markdown_slides/01_git_installation.md @@ -1,6 +1,9 @@ --- marp: true -theme: dsi-certificates-theme +style: | + section { + font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; + } _class: invert paginate: true --- diff --git a/03_instructional_team/markdown_slides/02_git_version_control.md b/03_instructional_team/markdown_slides/02_git_version_control.md index f7abf3f..ea67b94 100644 --- a/03_instructional_team/markdown_slides/02_git_version_control.md +++ b/03_instructional_team/markdown_slides/02_git_version_control.md @@ -1,6 +1,9 @@ --- marp: true -theme: dsi-certificates-theme +style: | + section { + font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; + } _class: invert paginate: true --- @@ -13,6 +16,8 @@ $ echo "Data Sciences Institute" --- Prerequisites: +- Git version ≥2.39 +- Git Credential Manager - GitHub account --- @@ -31,43 +36,31 @@ References ## `Version Control` --- -##### What is Version Control? -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. +#### What is Version Control? +Version control is a system: +* that records changes to a file or a set of files over time +* that enables recall a specific version ---- -Version Control Systems (VCS) can do a number of things and can be applied on nearly any type of file on our computers: -- revert files to a previous state -- revert entire project to a previous state -- compare changes over time -- see who modified something last -- who introduced an issue and when -- recover lost files +We may already do this by copying files to another directory to save past versions. While it is simple, it lacks flexibility and complexity. --- -##### Local Version Control Systems -Local VCSs were developed to keep track of changes to our files by putting them in a version database. - -![bg right contain](./pics/02_lvc.png) - ---- -##### Centralized Version Control Systems -Centralized VCSs (CVCS) were developed to enable collaboration with developers on other systems. CVCSs have a single server that contains all the versioned files. - -![bg left contain](./pics/02_cvcs.png) - ---- -CVCSs allow some level of transparency to others' work and give Administrators a level of control over what developers can and can't do. - -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. +#### Why version control? +Version Control Systems (VCS) can do a number of things and can be applied on nearly any type of file on our computers: +* revert files to a previous state +* revert entire project to a previous state +* compare changes over time +* see who modified something last +* who introduced an issue and when +* recover lost files --- -##### Distributed Version Control Systems -To handle the limitations of LVCSs and CVCSs, Distributed VCSs were created. This includes Git, Mercurial and Bazaar. +#### Why specialized version control for software teams? +* Robust software is documented as it is written + * Log changes and reasoning for why changes are made +* Working in teams requires code-specific version control + * Changing one part of a code project can affect behaviour in seemingly unrelated features + * In-progress state of one component can render the entire program temporarily unusable (e.g. syntax error) -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. - ---- -![w:560 center](./pics/02_dvcs.png) --- @@ -80,22 +73,25 @@ Questions? ## `Git` --- -##### Git Basics -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. +### Git Basics +Git is the most common VCS in modern coding teams. -If files have not changed, Git does not store the file again, it links to the previous identical file already stored. +##### Git is efficient with storage +* Git stores snapshots of files in your project directory +* If files have not changed, Git does not store the file again, it links to the previous identical file already stored. --- -![w:1100 center](./pics/02_git_data.png) + +![auto center](./pics/02_git_data.png) --- -##### Local Operations +##### Git can operate locally 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. 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. --- -##### Benefits +##### Git assures integrity 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: ``` 24b9da6552252987aa493b52f8696cd6d3b00393 diff --git a/03_instructional_team/markdown_slides/03_git_basics.md b/03_instructional_team/markdown_slides/03_git_basics.md index 95c2976..58a77d1 100644 --- a/03_instructional_team/markdown_slides/03_git_basics.md +++ b/03_instructional_team/markdown_slides/03_git_basics.md @@ -1,6 +1,9 @@ --- marp: true -theme: dsi-certificates-theme +style: | + section { + font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; + } _class: invert paginate: true --- @@ -327,12 +330,17 @@ $ git remote show origin 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). --- -To send and retrieve work between our local and remote repositories, we have to authenticate a personal access token: +To send and retrieve work between our local and remote repositories, we use Git Credential Manager. -               ![w:350 left](./pics/03_settings.png)           ![w:340 right](./pics/03_developer.png) +```console +$ git credential-manager github login +``` ---- -![w:1150 center](./pics/03_personal_auth.png) +To check our login status + +```console +$ git credential-manager github list +``` --- diff --git a/03_instructional_team/markdown_slides/04_optional_git_slide.md b/03_instructional_team/markdown_slides/04_optional_git_slide.md index 157409e..6a0cba5 100644 --- a/03_instructional_team/markdown_slides/04_optional_git_slide.md +++ b/03_instructional_team/markdown_slides/04_optional_git_slide.md @@ -1,6 +1,9 @@ --- marp: true -theme: dsi-certificates-theme +style: | + section { + font-family: Inter, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif; + } _class: invert paginate: true --- diff --git a/04_cohort_three/additional_resources/.keep b/04_this_cohort/additional_resources/.keep similarity index 100% rename from 04_cohort_three/additional_resources/.keep rename to 04_this_cohort/additional_resources/.keep diff --git a/04_cohort_three/live_code/.keep b/04_this_cohort/live_code/.keep similarity index 100% rename from 04_cohort_three/live_code/.keep rename to 04_this_cohort/live_code/.keep diff --git a/README.md b/README.md index d97e2c7..cb1e263 100644 --- a/README.md +++ b/README.md @@ -26,29 +26,37 @@ By the end of the module, participants will be able to: * Use Git to collaboratively save, restore, and update work through version control * Explain the difference between Git and GitHub -## Assignments +## Activities +This module has two types of activities. +1. Assignments are mandatory, and form part of your evaluation. +1. Homework is not assessed, but are provided to you for extra practice. We encourage you to check each other's homework solutions during Work Periods or ask a Learning Support! +### Assignments Participants should review the [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) for instructions on how to complete assignments in this module. +Assignments are typically due on the Sunday following the module's live learning session. 1. [Git Assignment](./02_activities/assignments/git_assignment.md) +### Homework +1. [Git Homework](./02_activities/homework/git_homework_1.md) + ## Contacts -**Questions can be submitted to the _#cohort-3-help_ channel on Slack** +**Questions can be submitted to the _#cohort-4-help_ channel on Slack** * Technical Facilitator: - * **Simeon Wong** (he/him) - simeonm.wong@utoronto.ca - - * Learning Support Staff: - * **Michaela Drouillard** (she/her) - michaela.drouillard@mail.utoronto.ca - * **Julia Gallucci** (she/her) - julia.gallucci@mail.utoronto.ca - * **Emma Teng** - e.teng@mail.utoronto.ca + * **Simeon Wong** (he/him) + simeonm.wong@utoronto.ca + +* Learning Support Staff: + * **Emma Teng** (she/her) + e.teng@mail.utoronto.ca + * **Sidra Bushra** (she/her) + contact.sidra.bushra@gmail.com + * **Pedram Asli** +   ## Delivery of the Learning Module @@ -88,8 +96,36 @@ Feel free to use the following as resources: - [Git vs GitHub: What's the difference?](https://www.youtube.com/watch?v=wpISo9TNjfU) ### How to get help - -![image](./steps_to_ask_for_help.png) +#### 1. Gather information about your problem +- Copy and paste your error message +- Copy and paste the code that caused the error, and the last few commands leading up to the error +- Write down what you are trying to accomplish with your code. Include both the specific action, and the bigger picture and context +- (optional) Take a screenshot of your entire workspace + +#### 2. Try searching the web for your error message +- Sometimes, the error has common solutions that can be easy to find! + - This will be faster than waiting for an answer +- If none of the solutions apply, consider asking a Generative AI tool + - Paste your code, the error message, and a description of your overall goals + +#### 3. Try asking in your cohort's Slack help channel +- Since we're all working through the same material, there's a good chance one of your peers has encountered the same error, or has already solved it +- Try searching in the DSI Certificates Slack help channel for whether a similar query has been posted +- If the question has not yet been answered, post your question! + - Describe your the overall goals, the context, and the specific details of what you were trying to accomplish + - Make sure to **copy and paste** your code, your error message + - Copying and pasting helps: + 1. your peers and teaching team quickly try out your code + 1. others to find your question in the future + +#### Great resources on how to ask good technical questions that get useful answers +- [Asking for Help - The Odin Project](https://www.theodinproject.com/lessons/foundations-asking-for-help) +- [How do I ask a good question? - Stack Overflow](https://stackoverflow.com/help/how-to-ask) +- [The XY problem: A question pitfall that won't get useful answers](https://xyproblem.info/) +- [How to create a minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example) + +#### Getting help: A summary +
@@ -101,7 +137,7 @@ Feel free to use the following as resources: ├── 01_materials ├── 02_activities ├── 03_instructional_team -├── 04_cohort_three +├── 04_this_cohort ├── .gitignore ├── LICENSE ├── README.md @@ -112,7 +148,7 @@ Feel free to use the following as resources: * **materials**: Module slides and interactive notebooks (.ipynb files) used during learning sessions. * **activities**: Contains graded assignments, exercises, and homework to practice concepts covered in the learning module. * **instructional_team**: Resources for the instructional team. -* **cohort_three**: Additional materials and resources for cohort three. +* **this_cohort**: Additional materials and resources for this cohort. * **.gitignore**: Files to exclude from this folder, specified by the Technical Facilitator * **LICENSE**: The license for this repository. * **README**: This file.