File size: 5,133 Bytes
5369733 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# Contributing to CleanCity Agent
Thank you for your interest in contributing to CleanCity Agent! π
## π― Project Vision
CleanCity Agent aims to make environmental action accessible through AI-powered trash detection and cleanup planning. We welcome contributions that align with this mission.
## π Quick Start
1. **Fork the repository**
2. **Clone your fork:**
```bash
git clone https://github.com/YOUR_USERNAME/CleanCity-Agent.git
cd CleanCity-Agent
```
3. **Create a virtual environment:**
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
4. **Install dependencies:**
```bash
pip install -r requirements.txt
```
5. **Create a branch:**
```bash
git checkout -b feature/your-feature-name
```
## π Development Guidelines
### Code Style
- Follow **PEP 8** Python style guide
- Use **type hints** for function parameters and returns
- Add **docstrings** to all functions and classes
- Keep functions small and focused (single responsibility)
### Testing Your Changes
Before submitting a PR:
1. **Test the Gradio app:**
```bash
python app.py
```
2. **Test the MCP server:**
```bash
python mcp_server.py
```
3. **Verify all tabs work:**
- Analysis tab
- History tab
- Impact & Examples tab
- Chat tab
4. **Test with different LLM providers:**
- Set `LLM_PROVIDER=offline` (default)
- Test with real API keys if available
### Commit Messages
Use clear, descriptive commit messages:
```
β
Good:
- "Add GPS auto-detection feature"
- "Fix model path resolution for deployed environments"
- "Improve error handling in trash detection"
β Bad:
- "Update stuff"
- "Fix bug"
- "WIP"
```
## π¨ Areas for Contribution
### High Priority
- **Real YOLOv8 Model Integration** - Replace mock detector with trained model
- **Mobile Responsiveness** - Improve UI for smartphones
- **Multilingual Support** - Add i18n for global reach
- **Performance Optimization** - Faster image processing
- **Accessibility** - ARIA labels, keyboard navigation, screen reader support
### Feature Ideas
- **Gamification** - Points/badges for cleanup reporting
- **Community Features** - Team cleanup coordination
- **Advanced Analytics** - Trend analysis, predictive hotspots
- **Integration with City Services** - API for municipal waste management
- **Offline Mode Enhancement** - PWA with offline detection
### Documentation
- Additional usage examples
- Tutorial videos
- API documentation improvements
- Translation of docs to other languages
## π Reporting Bugs
Found a bug? Help us fix it!
1. **Check existing issues** to avoid duplicates
2. **Create a new issue** with:
- Clear title describing the problem
- Steps to reproduce
- Expected vs. actual behavior
- Screenshots if applicable
- Your environment (OS, Python version, browser)
**Template:**
```markdown
## Bug Description
[What went wrong?]
## Steps to Reproduce
1. Go to...
2. Click on...
3. See error...
## Expected Behavior
[What should happen?]
## Actual Behavior
[What actually happens?]
## Environment
- OS: [e.g., Windows 11, macOS 14]
- Python: [e.g., 3.11.5]
- Browser: [e.g., Chrome 120]
```
## π‘ Feature Requests
Have an idea? We'd love to hear it!
1. **Open an issue** with the `enhancement` label
2. **Describe the feature:**
- What problem does it solve?
- Who would benefit?
- How should it work?
3. **Optional:** Include mockups, diagrams, or code sketches
## π Pull Request Process
1. **Ensure your code works** (see Testing section above)
2. **Update documentation** if you changed functionality
3. **Update README.md** if you added features
4. **Create a pull request:**
- Descriptive title
- Summary of changes
- Link to related issues
- Screenshots if UI changed
### PR Checklist
- [ ] Code follows PEP 8 style
- [ ] Added type hints
- [ ] Added/updated docstrings
- [ ] Tested locally (app runs without errors)
- [ ] Updated relevant documentation
- [ ] No sensitive data (API keys, passwords) committed
## π Code of Conduct
### Our Pledge
We are committed to providing a welcoming and inclusive environment for everyone.
### Expected Behavior
- **Be respectful** and considerate in all interactions
- **Be constructive** when giving feedback
- **Be patient** with newcomers
- **Focus on the mission** - cleaner cities and environmental action
### Unacceptable Behavior
- Harassment, discrimination, or personal attacks
- Trolling or inflammatory comments
- Spam or self-promotion unrelated to the project
**Violations:** Contact project maintainers. Violators may be banned.
## π Recognition
Contributors will be:
- Listed in README acknowledgments
- Credited in release notes
- Given proper attribution in commits
## β Questions?
- **GitHub Issues:** For bugs and features
- **Discussions:** For questions and ideas
- **Email:** [Contact project maintainer if email available]
---
**Thank you for helping make CleanCity Agent better! π±**
Your contributions help communities worldwide take action against litter and pollution.
|