11# Contributing
22
3- Thank you for your interest in contributing to DeepTutor! 🎉
3+ Thank you for your interest in contributing to DeepTutor! That means a lot for our team! 🎉
44
5- We welcome contributions from the community! To ensure code quality and consistency, please follow the guidelines below .
5+ You can join our [ Discord community] ( https://discord.gg/aka9p9EW ) for further discussion .
66
77## Ways to Contribute
88
@@ -11,6 +11,15 @@ We welcome contributions from the community! To ensure code quality and consiste
1111- 📖 ** Improve docs** — Fix typos, add examples
1212- 🔧 ** Submit PRs** — Code contributions welcome!
1313
14+ ## 🔄 Pull Request Process
15+
16+ 1 . ** Create a branch** : ` git checkout -b feature/your-feature `
17+ 2 . ** Make changes** : Follow existing code style and conventions
18+ 3 . ** Test locally** : Ensure your changes work correctly
19+ 4 . ** Run pre-commit** : ` pre-commit run --all-files ` ⚠️ ** Required before PR!**
20+ 5 . ** Commit** : Pre-commit hooks will auto-format your code
21+ 6 . ** Push & PR** : Open a pull request with a clear description
22+
1423## Development Setup
1524
1625### 1. Fork and Clone
@@ -56,7 +65,9 @@ pre-commit install
5665pre-commit run --all-files
5766```
5867
59- ## Code Quality Tools
68+ > After installing Git hooks, they will run ** automatically** on every commit — no need to remember!
69+
70+ ## 🛠️ Code Quality Tools
6071
6172We use automated tools to maintain code quality:
6273
@@ -66,7 +77,11 @@ We use automated tools to maintain code quality:
6677| ** Prettier** | Frontend code formatting | ` web/.prettierrc.json ` |
6778| ** detect-secrets** | Security check | ` .secrets.baseline ` |
6879
69- > ** Note** : The project uses ** Ruff format** instead of Black to avoid formatting conflicts.
80+ ::: warning IMPORTANT
81+ ** Before submitting a PR, you MUST run:** ` pre-commit run --all-files `
82+
83+ CI will automatically check this and ** reject PRs** that fail pre-commit checks.
84+ :::
7085
7186Every time you run ` git commit ` , pre-commit hooks will automatically:
7287- Format Python code with Ruff
@@ -75,21 +90,15 @@ Every time you run `git commit`, pre-commit hooks will automatically:
7590- Validate YAML/JSON files
7691- Detect potential security issues
7792
78- ## Pull Request Process
79-
80- 1 . ** Create Branch** : ` git checkout -b feature/amazing-feature `
81- 2 . ** Make Changes** : Write your code following the project's style
82- 3 . ** Test** : Ensure your changes work correctly
83- 4 . ** Commit** : Pre-commit hooks will automatically format your code
84- 5 . ** Push and PR** : Push to your fork and create a Pull Request
93+ > ** Note** : The project uses ** Ruff format** instead of Black to avoid formatting conflicts.
8594
86- ### Common Commands
95+ ## Common Commands
8796
8897``` bash
89- # Normal commit (hooks run automatically)
98+ # Normal commit (hooks run automatically if installed )
9099git commit -m " Your commit message"
91100
92- # Manually check all files
101+ # Manually check all files (do this before pushing!)
93102pre-commit run --all-files
94103
95104# Update hooks to latest versions
@@ -99,15 +108,26 @@ pre-commit autoupdate
99108git commit --no-verify -m " Emergency fix"
100109```
101110
102- ## Contribution Guidelines
111+ ## 📋 Commit Message Format
112+
113+ ```
114+ <type>: <short description>
115+
116+ [optional body]
117+
118+ [optional footer(s)]
119+ ```
120+
121+ ** Types** : ` feat ` , ` fix ` , ` docs ` , ` style ` , ` refactor ` , ` test ` , ` chore `
103122
104- 1 . ** Fork and Clone** : Fork the repository and clone your fork
105- 2 . ** Create Branch** : Create a feature branch from ` main `
106- 3 . ** Install Pre-commit** : Follow the setup steps above
107- 4 . ** Make Changes** : Write your code following the project's style
108- 5 . ** Test** : Ensure your changes work correctly
109- 6 . ** Commit** : Pre-commit hooks will automatically format your code
110- 7 . ** Push and PR** : Push to your fork and create a Pull Request
123+ ** Examples** :
124+ - ` feat ` : for a new feature (MINOR version bump)
125+ - ` fix ` : for a bug fix (PATCH version bump)
126+ - ` docs ` : for documentation-only changes
127+ - ` style ` : for formatting changes (whitespace, semicolons)
128+ - ` refactor ` : for code changes that neither fix a bug nor add a feature
129+ - ` test ` : for adding or correcting tests
130+ - ` chore ` : for routine tasks (build processes, dependencies)
111131
112132## Reporting Issues
113133
@@ -122,8 +142,9 @@ Please be respectful and inclusive. We're building a welcoming community for lea
122142## Questions?
123143
124144- Open a [ GitHub Discussion] ( https://github.com/HKUDS/DeepTutor/discussions )
145+ - Join our [ Discord Community] ( https://discord.gg/aka9p9EW )
125146- Check existing issues for similar questions
126147
127148---
128149
129- ❤️ Thank you for helping make DeepTutor better!
150+ ### Let's build a tutoring system for the whole community TOGETHER! 🚀
0 commit comments