Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
6.9.0
Pre-Commit Checklist
MANDATORY: Check ALL items before every commit.
1. Task Validation
- Task is listed in
planning.md - All task dependencies are complete
- Prerequisites are verified
- Success criteria understood
2. Code Reading (Before Implementation)
- Used
grep_searchto find related code - Read existing function signatures with
read_file - Verified function return types
- Checked parameter names and types
- No assumptions made about signatures
3. Code Quality
- Run linter:
conda run -n ai_engg ruff check . --fix - Fix ALL errors (especially):
- Line length (88 character limit)
- Import order (stdlib β third-party β local)
- Unused imports
- Formatting issues
- Code tested and works
- Type hints added to new functions
- Docstrings added to new functions
4. Documentation
- Update
planning.mdif task complete (mark β ) - Commit message follows format:
type: brief summary - Commit is atomic (one logical change)
5. Git
-
git statuschecked - Only relevant files staged
- No debug files or
.pycincluded - No secrets or credentials
Common Commit Types
feat:- New featurefix:- Bug fixrefactor:- Code restructuringdocs:- Documentation onlytest:- Adding/updating testschore:- Maintenance tasks
Recent Mistakes to Avoid
- β Skipping task dependency check (did 2.3 before 2.2b)
- β Assuming function signatures (3 errors in train_with_mlflow.py)
- β Not running ruff (71 errors accumulated)
- β Committing without testing
Quick Commands
# Check code quality
conda run -n ai_engg ruff check . --fix
# Run specific test
conda run -n ai_engg python scripts/test_module.py
# Check git status
git status
# Stage and commit
git add <files>
git commit -m "type: message"
Remember: 30 seconds of reading prevents 5 minutes of debugging!