Spaces:
Sleeping
Sleeping
File size: 3,530 Bytes
69aa668 | 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 | # Contributing to AI Mirror
Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
---
## π€ How to Contribute
### Reporting Bugs
If you find a bug, please create an issue with:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Screenshots (if applicable)
- Environment details (OS, Python version, Node version)
### Suggesting Features
Feature suggestions are welcome! Please:
- Check if the feature already exists
- Describe the feature clearly
- Explain the use case
- Provide examples if possible
### Code Contributions
1. **Fork the Repository**
```bash
git clone https://github.com/yourusername/ai-mirror.git
cd ai-mirror
```
2. **Create a Branch**
```bash
git checkout -b feature/your-feature-name
```
3. **Make Changes**
- Follow existing code style
- Add comments for complex logic
- Update documentation if needed
4. **Test Your Changes**
- Test backend: Run all endpoints
- Test frontend: Check all pages
- Verify no breaking changes
5. **Commit Changes**
```bash
git add .
git commit -m "Add: Description of your changes"
```
6. **Push and Create PR**
```bash
git push origin feature/your-feature-name
```
Then create a Pull Request on GitHub.
---
## π Code Style Guidelines
### Python (Backend)
- Follow PEP 8 style guide
- Use type hints where possible
- Add docstrings to functions
- Keep functions focused and small
- Use meaningful variable names
Example:
```python
def detect_emotion(text: str) -> Dict[str, float]:
"""
Detect emotions from input text.
Args:
text: Input text to analyze
Returns:
Dictionary of emotion probabilities
"""
# Implementation
pass
```
### JavaScript/React (Frontend)
- Use functional components
- Follow React best practices
- Use meaningful component names
- Add PropTypes or TypeScript
- Keep components small and reusable
Example:
```jsx
const EmotionCard = ({ emotion, score }) => {
return (
<div className="emotion-card">
<h3>{emotion}</h3>
<p>{score}%</p>
</div>
)
}
```
---
## π§ͺ Testing
### Backend Tests
```bash
cd backend
pytest tests/
```
### Frontend Tests
```bash
cd frontend
npm test
```
---
## π Documentation
When adding features:
- Update README.md if needed
- Add comments in code
- Update API documentation
- Create examples if applicable
---
## π Code Review Process
All contributions go through code review:
1. Automated checks (linting, tests)
2. Manual review by maintainer
3. Feedback and iteration
4. Merge when approved
---
## π― Priority Areas
Current focus areas for contributions:
- [ ] Multi-language support
- [ ] Additional emotion models
- [ ] Performance optimizations
- [ ] Mobile responsiveness
- [ ] Accessibility improvements
- [ ] Test coverage
- [ ] Documentation
---
## π¬ Communication
- **Issues**: For bugs and features
- **Discussions**: For questions and ideas
- **Email**: zayeem.s.khateeb@gmail.com
---
## π Code of Conduct
- Be respectful and inclusive
- Provide constructive feedback
- Focus on the code, not the person
- Help others learn and grow
---
## π Recognition
Contributors will be:
- Listed in CONTRIBUTORS.md
- Mentioned in release notes
- Credited in documentation
---
## βοΈ Terms
By contributing, you agree that your contributions will be part of this open educational project.
---
Thank you for contributing!
|