forked from MIT-Emerging-Talent/ET6-practice-code-review
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into test-readme
- Loading branch information
Showing
14 changed files
with
550 additions
and
12 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
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,75 @@ | ||
<!-- this template is for inspiration, feel free to change it however you like! --> | ||
|
||
# Retrospective: Group 18 - Collaborative Work Activity | ||
|
||
## Stop Doing | ||
|
||
- **Inefficient Coordination:** Stop relying on informal communication | ||
methods that cause misunderstandings or delays. | ||
|
||
- **Overloading Tasks:** Avoid taking on excessive responsibilities | ||
without proper delegation or prioritization. | ||
|
||
- **Passive Participation:** Stop being a silent participant in discussions; | ||
ensure to actively contribute to conversations. | ||
|
||
## Continue Doing | ||
|
||
- **Effective Teamwork:** Continue fostering collaboration by sharing ideas | ||
openly and respecting diverse perspectives. | ||
|
||
- **Timely Updates:** Maintain a habit of providing timely progress updates | ||
to keep the team aligned. | ||
|
||
- **Using Tools:** Keep leveraging collaborative tools | ||
(e.g., shared documents, project management software) to enhance productivity. | ||
|
||
## Start Doing | ||
|
||
- **Structured Planning:** Begin creating more detailed action plans with | ||
clear milestones and deadlines. | ||
|
||
- **Feedback Loops:** Start implementing regular feedback sessions to | ||
evaluate progress and address challenges early. | ||
|
||
- **Skill Development:** Focus on improving specific skills related | ||
to collaborative work and presentation to contribute more effectively. | ||
|
||
## Lessons Learned | ||
|
||
- Effective communication is crucial to avoid duplication of efforts and ensure alignment. | ||
|
||
- Clear roles and responsibilities significantly enhance team productivity. | ||
|
||
- Flexibility in strategy allows for better adaptation to unforeseen challenges. | ||
|
||
- Regular check-ins help maintain momentum and ensure accountability. | ||
|
||
______________________________________________________________________ | ||
|
||
## Strategy vs. Board | ||
|
||
### What parts of your plan went as expected? | ||
|
||
- Collaboration tools were effectively utilized to | ||
share resources and coordinate tasks. | ||
|
||
- The team successfully met initial deadlines for project deliverables. | ||
|
||
- Team members demonstrated a willingness to support each other when challenges arose. | ||
|
||
### What parts of your plan did not work out? | ||
|
||
- Some tasks were delayed due to unclear task ownership. | ||
|
||
- Miscommunication led to redundant efforts in certain areas. | ||
|
||
- Time zone differences caused occasional scheduling conflicts. | ||
|
||
### Did you need to add things that weren't in your strategy? | ||
|
||
- Yes, we added weekly synchronization meetings to | ||
address miscommunications and ensure alignment. | ||
|
||
- Included additional training sessions for team members to | ||
improve tool usage efficiency. |
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,9 @@ | ||
# 📝 Cheat Sheets That We Can Use | ||
|
||
## 🚀 These cheat sheets will cover Python and VS Code | ||
|
||
- 🔧 [**VS Code Cheat Sheet**](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf) | ||
— Boost your productivity with essential shortcuts. 🚀 | ||
|
||
- 🐍 [**Python Cheat Sheet**](https://kieranholland.com/best-python-cheat-sheet/) | ||
— Quickly reference key Python concepts and syntax. ✏️ |
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,34 @@ | ||
# 🚀 How to create and link an issue to a pull request | ||
|
||
## 📝 How to Create an Issue | ||
|
||
1. Go to the **Issues** tab. 🐛 | ||
2. Click on **New Issue** ➕. | ||
3. Fill out the issue template with all relevant details. 📋 | ||
4. Assign labels 🏷️ and add it to the project board 📌. | ||
|
||
--- | ||
|
||
## 🔗 Linking an Issue to a Pull Request | ||
|
||
1. Create a branch for your changes. 🌱 | ||
2. Make the necessary edits. ✏️ | ||
3. Open a Pull Request (PR) 🛠️: | ||
- Use `Fixes #<issue_number>` in the description to close the issue automatically | ||
on merge. ✅ | ||
- For example: | ||
|
||
```markdown | ||
Fixes #123 | ||
``` | ||
|
||
--- | ||
|
||
### Link the issue manually if needed | ||
|
||
- Go to the **Linked Issues** section in the PR. | ||
- Search for the issue and add it. 🔗 | ||
|
||
## 📣 Need Help? | ||
|
||
If you're stuck, don't hesitate to reach out! 🆘 |
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,134 @@ | ||
# 🚀 Guide: Installing and Running Ruff, Black, Pylint, and MarkdownLint in VS Code | ||
|
||
This guide will help you set up and use Ruff, Black, Pylint, and MarkdownLint in | ||
Visual Studio Code (VS Code) to maintain clean and consistent code and Markdown | ||
files and pass all the CI checks. | ||
|
||
--- | ||
|
||
## 🛠️ Prerequisites | ||
|
||
Before starting, ensure the following are installed on your system: | ||
|
||
- [Python](https://www.python.org/) | ||
- [VS Code](https://code.visualstudio.com/) | ||
- [Node.js](https://nodejs.org/) (for MarkdownLint) | ||
|
||
--- | ||
|
||
## 🔧 Install Extensions in VS Code | ||
|
||
1. Open VS Code. | ||
2. Go to the Extensions Marketplace (`Ctrl+Shift+X` or `Cmd+Shift+X` on Mac). | ||
3. Install the following extensions: | ||
- **Python** (by Microsoft) | ||
- **MarkdownLint** (by David Anson) | ||
|
||
--- | ||
|
||
## ⚙️ Setting Up Ruff, Black, and Pylint | ||
|
||
### 1️⃣ Install Ruff | ||
|
||
Ruff is a fast Python linter and formatter. | ||
|
||
```bash | ||
pip install ruff | ||
``` | ||
|
||
To integrate Ruff with VS Code: | ||
|
||
1. Open the VS Code settings (`Ctrl+,` or `Cmd+,` on Mac). | ||
2. Search for `Python › Linting: Enabled` and ensure it is checked. | ||
|
||
### 2️⃣ Install Black | ||
|
||
Black is a Python code formatter. | ||
|
||
```bash | ||
pip install black | ||
``` | ||
|
||
To use Black in VS Code: | ||
|
||
1. Go to the VS Code settings. | ||
2. Search for `Python › Formatting: Provider` and set it to `black`. | ||
|
||
### 3️⃣ Install Pylint | ||
|
||
Pylint is a Python linter that checks for errors and enforces a coding standard. | ||
|
||
```bash | ||
pip install pylint | ||
``` | ||
|
||
Enable Pylint in VS Code: | ||
|
||
1. Open the VS Code settings. | ||
2. Search for `Python › Linting: Pylint Enabled` and ensure it is checked. | ||
|
||
--- | ||
|
||
## 📜 Setting Up MarkdownLint | ||
|
||
MarkdownLint checks for style and consistency issues in Markdown files. | ||
|
||
### Install MarkdownLint | ||
|
||
1. Use npm to install MarkdownLint globally: | ||
|
||
```bash | ||
npm install -g markdownlint-cli | ||
``` | ||
|
||
### Run MarkdownLint | ||
|
||
- **From the command line**: | ||
|
||
```bash | ||
markdownlint yourfile.md | ||
``` | ||
|
||
- **In VS Code**: | ||
MarkdownLint will automatically highlight issues in your `.md` files as you | ||
edit them. | ||
|
||
--- | ||
|
||
## ▶️ Running the Tools | ||
|
||
### Run Ruff, Black, and Pylint for Python Files | ||
|
||
1. **Ruff**: | ||
|
||
```bash | ||
ruff path/to/your/code | ||
``` | ||
|
||
2. **Black**: | ||
|
||
```bash | ||
black path/to/your/code | ||
``` | ||
|
||
3. **Pylint**: | ||
|
||
```bash | ||
pylint path/to/your/code | ||
``` | ||
|
||
### Run MarkdownLint for Markdown Files | ||
|
||
1. **MarkdownLint**: | ||
|
||
```bash | ||
markdownlint path/to/your/file.md | ||
``` | ||
|
||
--- | ||
|
||
## 🎉 You're All Set | ||
|
||
You are now ready to use Ruff, Black, Pylint, and MarkdownLint in VS Code to | ||
ensure your code and documentation are clean, consistent, and professional. | ||
Happy coding! 🚀 |
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,47 @@ | ||
""" | ||
A module for calculating the area of a circle. | ||
Module contents: | ||
- area_of_circle: calculates the area of a circle given its radius. | ||
Created on 01 04 2025 | ||
@author: Raghad | ||
""" | ||
|
||
import math | ||
|
||
|
||
# Define a function to calculate the area of a circle. | ||
def area_of_circle(radius: float) -> float: | ||
"""Calculate the area of a circle given its radius. | ||
Parameters: | ||
radius: float, the radius of the circle | ||
Returns -> float: area of the circle | ||
Raises: | ||
ValueError: if the radius is negative | ||
Examples: | ||
>>> area_of_circle(5) | ||
78.53981633974483 | ||
>>> area_of_circle(0) | ||
0.0 | ||
>>> area_of_circle(3.5) | ||
38.48451000647496 | ||
""" | ||
# Raise an error if the radius is negative. | ||
if radius < 0: | ||
raise ValueError("Radius cannot be negative") | ||
|
||
# Calculate and return the area using the formula: area = π * r^2 | ||
return math.pi * radius**2 | ||
|
||
|
||
# Entry point for script execution | ||
if __name__ == "__main__": | ||
# Example usage: Calculate the area of a circle with a radius of 5. | ||
radius = 5 | ||
area = area_of_circle(radius) | ||
print("Area of the circle:", area) |
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
Oops, something went wrong.