-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from AccelerationConsortium/update-module-4-docs
Update software dev 9 docs
- Loading branch information
Showing
9 changed files
with
1,954 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,217 @@ | ||
(4.1-github-deep-dive)= | ||
# 🧩 4.1 GitHub Deep Dive Into Github | ||
|
||
```{contents} | ||
:depth: 3 | ||
``` | ||
|
||
## 🔰 Tutorial | ||
|
||
In this module, you will learn advanced GitHub features and collaborative workflows. By the end of this module, you'll be able to: | ||
|
||
1. Work with GitHub Issues | ||
2. Create and manage Pull Requests | ||
3. Collaborate effectively with other developers | ||
4. Use branches for feature development | ||
5. Resolve merge conflicts | ||
6. Utilize GitHub for project management | ||
|
||
### GitHub Issues | ||
|
||
GitHub Issues are a great way to track tasks, enhancements, and bugs for your projects. | ||
|
||
#### Steps to create an issue: | ||
1. Navigate to the main page of the repository. | ||
2. Click on the "Issues" tab. | ||
3. Click the "New issue" button. | ||
4. Enter a title and description for your issue. | ||
5. Assign labels, milestones, and assignees if needed. | ||
6. Click "Submit new issue". | ||
|
||
#### Example: | ||
```markdown | ||
Title: Add user authentication feature | ||
|
||
Description: | ||
We need to implement user authentication for our web application. This should include: | ||
- User registration | ||
- Login/Logout functionality | ||
- Password reset option | ||
|
||
Please use JWT for token-based authentication. | ||
``` | ||
|
||
**Documentation**: [About Issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues) | ||
|
||
### Pull Requests | ||
|
||
Pull Requests (PRs) let you tell others about changes you've pushed to a branch in a repository on GitHub. | ||
|
||
#### Steps to create a Pull Request: | ||
1. Create a new branch and make your changes. | ||
2. Push the branch to GitHub. | ||
3. Navigate to the main page of the repository. | ||
4. Click "Pull requests" and then "New pull request". | ||
5. Select your branch to compare with the base branch. | ||
6. Enter a title and description for your PR. | ||
7. Click "Create pull request". | ||
|
||
#### Example PR Description: | ||
```markdown | ||
## Description | ||
This PR implements user authentication using JWT. | ||
|
||
## Changes | ||
- Added user registration endpoint | ||
- Implemented login/logout functionality | ||
- Created password reset feature | ||
|
||
## Testing | ||
- All new endpoints have been tested manually | ||
- Added unit tests for authentication functions | ||
|
||
Please review and let me know if any changes are needed. | ||
``` | ||
|
||
**Documentation**: [About Pull Requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests) | ||
|
||
### Collaborative Coding | ||
|
||
Collaborative coding on GitHub involves working with others on the same project, often simultaneously. | ||
|
||
#### Best Practices: | ||
1. Communicate clearly in issues and pull requests. | ||
2. Use descriptive commit messages. | ||
3. Review others' code thoroughly and provide constructive feedback. | ||
4. Keep pull requests focused and small when possible. | ||
|
||
#### Example of a Good Commit Message: | ||
``` | ||
Add password strength checker to registration form | ||
- Implement zxcvbn library for password strength calculation | ||
- Display strength meter below password field | ||
- Show suggestions for stronger passwords | ||
``` | ||
|
||
**Video Tutorial**: [Collaborative Coding with GitHub](https://www.youtube.com/watch?v=MnUd31TvBoU) | ||
|
||
### Branches | ||
|
||
Branches allow you to develop features, fix bugs, or safely experiment with new ideas in a contained area of your repository. | ||
|
||
#### Steps to create a new branch: | ||
1. Open your terminal. | ||
2. Navigate to your repository. | ||
3. Create and switch to a new branch: | ||
|
||
```bash | ||
git checkout -b feature/user-authentication | ||
``` | ||
|
||
4. Make your changes and commit them: | ||
|
||
```bash | ||
git add . | ||
git commit -m "Implement user registration" | ||
``` | ||
|
||
5. Push the branch to GitHub: | ||
|
||
```bash | ||
git push -u origin feature/user-authentication | ||
``` | ||
|
||
**Documentation**: [About Branches](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches) | ||
|
||
### Merge Conflicts | ||
|
||
Merge conflicts occur when competing changes are made to the same line of a file, or when one person edits a file and another person deletes the same file. | ||
|
||
#### Steps to resolve a merge conflict: | ||
1. Open the conflicting file in your text editor. | ||
2. Look for the conflict markers: `<<<<<<<`, `=======`, and `>>>>>>>`. | ||
3. Decide which changes to keep. | ||
4. Remove the conflict markers. | ||
5. Add your changes and commit: | ||
|
||
```bash | ||
git add . | ||
git commit -m "Resolve merge conflict in user authentication" | ||
``` | ||
|
||
#### Example of a Merge Conflict: | ||
|
||
``` | ||
<<<<<<< HEAD | ||
def authenticate_user(username, password): | ||
# Implementation using bcrypt | ||
======= | ||
def authenticate_user(username, password): | ||
# Implementation using argon2 | ||
>>>>>>> feature/improve-authentication | ||
``` | ||
|
||
**Video Tutorial**: [Resolving Merge Conflicts in GitHub](https://www.youtube.com/watch?v=xNVM5UxlFSA) | ||
|
||
### Project Management | ||
|
||
GitHub provides tools for project management, including project boards, milestones, and labels. | ||
|
||
#### Steps to create a new project: | ||
1. On GitHub, navigate to the main page of your repository. | ||
2. Click on the "Projects" tab. | ||
3. Click "New project". | ||
4. Choose a project template or start from scratch. | ||
5. Name your project and add a description. | ||
6. Click "Create project". | ||
|
||
#### Example Project Setup: | ||
1. Create a new project named "Web Application Development". | ||
2. Add columns: "To Do", "In Progress", "Review", and "Done". | ||
3. Create issues for different features and add them to the "To Do" column. | ||
4. Assign team members to issues and move them to "In Progress" when work begins. | ||
|
||
**Documentation**: [About Project Boards](https://docs.github.com/en/issues/organizing-your-work-with-project-boards/managing-project-boards/about-project-boards) | ||
|
||
### Additional Resources | ||
|
||
- [GitHub Skills](https://skills.github.com/) | ||
- [GitHub Guides](https://guides.github.com/) | ||
- [Pro Git Book](https://git-scm.com/book/en/v2) | ||
|
||
## 🚀 Quiz | ||
|
||
::::{tab-set} | ||
:sync-group: category | ||
|
||
:::{tab-item} W 2024 | ||
:sync: w2024 | ||
|
||
::: | ||
|
||
:::{tab-item} Sp/Su 2024 | ||
:sync: sp2024 | ||
|
||
https://q.utoronto.ca/courses/370070/assignments/1393622?display=full_width | ||
::: | ||
|
||
:::: | ||
|
||
## 📄 Assignment | ||
|
||
::::{tab-set} | ||
:sync-group: category | ||
|
||
:::{tab-item} W 2024 | ||
:sync: w2024 | ||
|
||
::: | ||
|
||
:::{tab-item} Sp/Su 2024 | ||
:sync: sp2024 | ||
|
||
https://q.utoronto.ca/courses/370070/assignments/1393619?display=full_width | ||
::: | ||
|
||
:::: |
Oops, something went wrong.