File size: 5,865 Bytes
e9cd410
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# 🀝 Contributing to NoteSnap

Thank you for your interest in contributing to NoteSnap! This document provides guidelines and information for contributors.

## πŸ“‹ Table of Contents

- [Code of Conduct](#code-of-conduct)
- [Getting Started](#getting-started)
- [Development Setup](#development-setup)
- [Making Changes](#making-changes)
- [Submitting Changes](#submitting-changes)
- [Style Guidelines](#style-guidelines)
- [Testing](#testing)
- [Documentation](#documentation)

## πŸ“œ Code of Conduct

This project and everyone participating in it is governed by our commitment to creating a welcoming and inclusive environment. Please be respectful and constructive in all interactions.

## πŸš€ Getting Started

### Prerequisites

- Python 3.8 or higher
- Git
- Docker (optional but recommended)
- Basic knowledge of Python, Streamlit, and AI/ML concepts

### Fork and Clone

1. Fork the repository on GitHub
2. Clone your fork locally:
   ```bash
   git clone https://github.com/YOUR-USERNAME/NoteSnap.git
   cd NoteSnap
   ```

## πŸ› οΈ Development Setup

### Local Development

1. **Create a virtual environment:**
   ```bash
   python -m venv venv
   source venv/bin/activate  # On Windows: venv\Scripts\activate
   ```

2. **Install dependencies:**
   ```bash
   pip install -r requirements.txt
   ```

3. **Run the application:**
   ```bash
   streamlit run app.py
   ```

### Docker Development

1. **Build and run with Docker:**
   ```bash
   ./docker-dev.sh
   ```

2. **Or use Docker Compose:**
   ```bash
   docker-compose -f docker-compose.dev.yml up
   ```

## πŸ”„ Making Changes

### Branch Naming

Use descriptive branch names:
- `feature/add-new-model-support`
- `bugfix/fix-pdf-processing-error`
- `docs/update-installation-guide`
- `refactor/improve-error-handling`

### Commit Messages

Follow conventional commit format:
```
type(scope): description

[optional body]

[optional footer]
```

Examples:
- `feat(summarizer): add support for T5 model`
- `fix(pdf): resolve text extraction encoding issue`
- `docs(readme): update installation instructions`

## πŸ“€ Submitting Changes

### Pull Request Process

1. **Create a feature branch:**
   ```bash
   git checkout -b feature/your-feature-name
   ```

2. **Make your changes and commit:**
   ```bash
   git add .
   git commit -m "feat: add your feature description"
   ```

3. **Push to your fork:**
   ```bash
   git push origin feature/your-feature-name
   ```

4. **Create a Pull Request** on GitHub with:
   - Clear title and description
   - Reference to related issues
   - Screenshots if applicable
   - Test results

### Pull Request Requirements

- [ ] Code follows project style guidelines
- [ ] All tests pass
- [ ] Documentation updated if needed
- [ ] No breaking changes (or clearly documented)
- [ ] Self-review completed

## 🎨 Style Guidelines

### Python Code Style

- Follow PEP 8
- Use meaningful variable and function names
- Add docstrings for functions and classes
- Keep functions focused and small
- Use type hints where appropriate

### Example:
```python
def process_pdf_file(uploaded_file: UploadedFile) -> Optional[str]:
    """
    Extract text content from uploaded PDF file.
    
    Args:
        uploaded_file: Streamlit uploaded file object
        
    Returns:
        str: Extracted text content or None if extraction fails
    """
    # Implementation here
    pass
```

### File Organization

- Keep modules focused on single responsibilities
- Use clear directory structure
- Add `__init__.py` files for packages
- Group related functionality together

## πŸ§ͺ Testing

### Running Tests

```bash
# Basic functionality tests
python test_basic.py

# Docker tests
./docker-test.sh

# Manual testing checklist
# - PDF upload and processing
# - Text input and summarization
# - Different AI models
# - Error handling scenarios
```

### Writing Tests

- Add tests for new features
- Test edge cases and error conditions
- Use descriptive test names
- Keep tests independent and isolated

## πŸ“š Documentation

### Code Documentation

- Add docstrings to all functions and classes
- Include type hints
- Comment complex logic
- Update README.md for new features

### User Documentation

- Update usage instructions
- Add examples for new features
- Include troubleshooting information
- Keep Docker documentation current

## πŸ› Reporting Issues

When reporting bugs:

1. Use the bug report template
2. Include environment details
3. Provide steps to reproduce
4. Add relevant logs and screenshots
5. Check for existing similar issues

## πŸ’‘ Suggesting Features

When suggesting features:

1. Use the feature request template
2. Explain the use case and motivation
3. Consider implementation complexity
4. Provide mockups or examples if helpful

## 🏷️ Issue Labels

- `bug` - Something isn't working
- `enhancement` - New feature or request
- `documentation` - Improvements or additions to docs
- `good first issue` - Good for newcomers
- `help wanted` - Extra attention is needed
- `question` - Further information is requested

## 🎯 Areas for Contribution

### High Priority
- Bug fixes and stability improvements
- Performance optimizations
- Better error handling
- Documentation improvements

### Medium Priority
- New AI model integrations
- UI/UX enhancements
- Additional file format support
- Internationalization

### Low Priority
- Code refactoring
- Additional testing
- Development tooling
- CI/CD improvements

## πŸ“ž Getting Help

- πŸ’¬ [GitHub Discussions](https://github.com/PRATEEK-260/NoteSnap/discussions)
- πŸ› [Issues](https://github.com/PRATEEK-260/NoteSnap/issues)

## πŸ™ Recognition

Contributors will be:
- Listed in the README.md
- Mentioned in release notes
- Given credit in commit messages
- Invited to be maintainers (for significant contributions)

---

Thank you for contributing to NoteSnap! πŸŽ‰