Thank you for your interest in contributing to DeepTutor! That menas a lot for our team!
You can join our discord community for further discussion: https://discord.gg/aka9p9EW
- Create a branch:
git checkout -b feature/your-feature - Make changes: Follow existing code style and conventions
- Test locally: Ensure your changes work correctly
- Commit: Pre-commit hooks will auto-format your code
- Push & PR: Open a pull request with a clear description
We use automated tools to maintain code quality:
- Ruff — Python linting & formatting (
pyproject.toml) - Prettier — Frontend formatting (
web/.prettierrc.json) - detect-secrets — Security scanning
This project uses pre-commit hooks to automatically format code and check for issues before commits.
Step 1: Install pre-commit
# Using pip
pip install pre-commit
# Or using conda
conda install -c conda-forge pre-commitStep 2: Install Git hooks
cd DeepTutor
pre-commit installStep 3: Run checks on all files
pre-commit run --all-filesCommon Commands
# Normal commit (hooks run automatically)
git commit -m "Your commit message"
# Manually check all files
pre-commit run --all-files
# Update hooks to latest versions
pre-commit autoupdate
# Skip hooks (not recommended, only for emergencies)
git commit --no-verify -m "Emergency fix"<type>: <short description>
[optional body]
[optional footer(s)]
Types: feat, fix, docs, style, refactor, test, chore
Examples:
feat: for a new feature. This typically corresponds to a MINOR version bump in Semantic Versioning.fix: for a bug fix. This typically corresponds to a PATCH version bump.chore: for routine tasks that do not modify source code or tests (e.g., updating build processes).docs: for documentation-only changes.style: for changes that do not affect the meaning of the code (e.g., whitespace, semicolons).refactor: for code changes that neither fix a bug nor add a feature.test: for adding missing tests or correcting existing tests.