|
| 1 | +# Contributing to Database Updater |
| 2 | + |
| 3 | +Thank you for your interest in contributing to Database Updater! This document provides guidelines and information for contributors. |
| 4 | + |
| 5 | +## Code of Conduct |
| 6 | + |
| 7 | +By participating in this project, you agree to maintain a respectful and inclusive environment for all contributors. |
| 8 | + |
| 9 | +## How to Contribute |
| 10 | + |
| 11 | +### Reporting Bugs |
| 12 | + |
| 13 | +Before creating bug reports, please check existing issues to avoid duplicates. When creating a bug report, include: |
| 14 | + |
| 15 | +- **Clear title**: A brief, descriptive title |
| 16 | +- **Environment details**: Python version, OS, SQL Server version |
| 17 | +- **Steps to reproduce**: Detailed steps that led to the issue |
| 18 | +- **Expected behavior**: What you expected to happen |
| 19 | +- **Actual behavior**: What actually happened |
| 20 | +- **Error messages**: Full error messages or stack traces |
| 21 | +- **Additional context**: Screenshots, configuration files (without sensitive data) |
| 22 | + |
| 23 | +### Suggesting Enhancements |
| 24 | + |
| 25 | +Enhancement suggestions are welcome! Please include: |
| 26 | + |
| 27 | +- **Clear title**: Brief description of the enhancement |
| 28 | +- **Detailed description**: Explain the enhancement and its benefits |
| 29 | +- **Use cases**: Real-world scenarios where this would be helpful |
| 30 | +- **Implementation ideas**: If you have thoughts on how to implement it |
| 31 | + |
| 32 | +### Pull Requests |
| 33 | + |
| 34 | +1. **Fork the repository** and create your branch from `main` |
| 35 | +2. **Make your changes** following the coding standards below |
| 36 | +3. **Test your changes** thoroughly |
| 37 | +4. **Update documentation** if necessary |
| 38 | +5. **Commit your changes** with clear, descriptive messages |
| 39 | +6. **Submit a pull request** with a clear description |
| 40 | + |
| 41 | +## Development Setup |
| 42 | + |
| 43 | +1. Fork and clone the repository: |
| 44 | + ```bash |
| 45 | + git clone https://github.com/Aditya-Raj-Parashar/data-entry.git |
| 46 | + cd database-updater |
| 47 | + ``` |
| 48 | + |
| 49 | +2. Create a virtual environment: |
| 50 | + ```bash |
| 51 | + python -m venv venv |
| 52 | + source venv/bin/activate # On Windows: venv\Scripts\activate |
| 53 | + ``` |
| 54 | + |
| 55 | +3. Install dependencies: |
| 56 | + ```bash |
| 57 | + pip install -r requirements.txt |
| 58 | + ``` |
| 59 | + |
| 60 | +## Coding Standards |
| 61 | + |
| 62 | +### Python Style Guide |
| 63 | + |
| 64 | +- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) style guidelines |
| 65 | +- Use meaningful variable and function names |
| 66 | +- Add docstrings to functions and classes |
| 67 | +- Keep functions focused and small |
| 68 | +- Use type hints where appropriate |
| 69 | + |
| 70 | +### Code Organization |
| 71 | + |
| 72 | +- Keep the main logic in `database_updater.py` |
| 73 | +- Add utility functions to separate modules if needed |
| 74 | +- Include error handling for all database operations |
| 75 | +- Use logging instead of print statements for debugging |
| 76 | + |
| 77 | +### Documentation |
| 78 | + |
| 79 | +- Update README.md for new features |
| 80 | +- Add docstrings to new functions |
| 81 | +- Include inline comments for complex logic |
| 82 | +- Update requirements.txt if adding new dependencies |
| 83 | + |
| 84 | +## Testing |
| 85 | + |
| 86 | +Currently, the project uses basic import testing. When contributing: |
| 87 | + |
| 88 | +- Test your code with different CSV file formats |
| 89 | +- Test with different SQL Server configurations |
| 90 | +- Verify error handling works correctly |
| 91 | +- Test both Windows and SQL Server authentication methods |
| 92 | + |
| 93 | +## Git Workflow |
| 94 | + |
| 95 | +### Branching Strategy |
| 96 | + |
| 97 | +- `main`: Production-ready code |
| 98 | +- `develop`: Integration branch for features |
| 99 | +- `feature/feature-name`: New features |
| 100 | +- `bugfix/bug-name`: Bug fixes |
| 101 | +- `hotfix/issue-name`: Critical fixes |
| 102 | + |
| 103 | +### Commit Messages |
| 104 | + |
| 105 | +Use clear, descriptive commit messages: |
| 106 | + |
| 107 | +``` |
| 108 | +Add support for custom data types in CSV import |
| 109 | +
|
| 110 | +- Allow users to specify column data types |
| 111 | +- Add validation for supported SQL Server types |
| 112 | +- Update documentation with examples |
| 113 | +``` |
| 114 | + |
| 115 | +### Pull Request Process |
| 116 | + |
| 117 | +1. Ensure your code follows the style guidelines |
| 118 | +2. Update documentation as needed |
| 119 | +3. Test your changes thoroughly |
| 120 | +4. Write a clear PR description explaining: |
| 121 | + - What changes were made |
| 122 | + - Why they were made |
| 123 | + - How to test them |
| 124 | + - Any breaking changes |
| 125 | + |
| 126 | +## Questions? |
| 127 | + |
| 128 | +If you have questions about contributing: |
| 129 | + |
| 130 | +1. Check existing issues and discussions |
| 131 | +2. Create a new issue with the "question" label |
| 132 | +3. Be specific about what you need help with |
| 133 | + |
| 134 | +## Recognition |
| 135 | + |
| 136 | +Contributors will be recognized in the project documentation. Thank you for helping make Database Updater better! |
| 137 | + |
| 138 | +## License |
| 139 | + |
| 140 | +By contributing to Database Updater, you agree that your contributions will be licensed under the MIT License. |
0 commit comments