|
| 1 | +# Contributing to Madick AI Chatbot |
| 2 | + |
| 3 | +First off, thank you for considering contributing to Madick AI Chatbot! It's people like you that make this project such a great tool. We welcome contributions from everyone, regardless of experience level. |
| 4 | + |
| 5 | +## 📋 Code of Conduct |
| 6 | + |
| 7 | +By participating in this project, you are expected to uphold our Code of Conduct: |
| 8 | + |
| 9 | +- Use welcoming and inclusive language |
| 10 | +- Be respectful of differing viewpoints and experiences |
| 11 | +- Gracefully accept constructive criticism |
| 12 | +- Focus on what is best for the community |
| 13 | +- Show empathy towards other community members |
| 14 | + |
| 15 | +## 🚀 Getting Started |
| 16 | + |
| 17 | +### Development Setup |
| 18 | + |
| 19 | +1. Fork the repository on GitHub |
| 20 | +2. Clone your fork locally: |
| 21 | + ```bash |
| 22 | + git clone https://github.com/your-username/madick-ai-chatbot.git |
| 23 | + cd madick-ai-chatbot |
| 24 | + ``` |
| 25 | +3. Create a virtual environment and activate it: |
| 26 | + ```bash |
| 27 | + python -m venv venv |
| 28 | + source venv/bin/activate # On Windows: venv\Scripts\activate |
| 29 | + ``` |
| 30 | +4. Install development dependencies: |
| 31 | + ```bash |
| 32 | + pip install -r requirements-dev.txt |
| 33 | + ``` |
| 34 | +5. Run the application in development mode: |
| 35 | + ```bash |
| 36 | + python main.py |
| 37 | + ``` |
| 38 | + |
| 39 | +### Environment Setup |
| 40 | + |
| 41 | +- Ensure you have Ollama installed: [ollama.ai](https://ollama.ai) |
| 42 | +- Pull at least one model for testing: `ollama pull llama3.2:1b` or another model |
| 43 | + |
| 44 | +## 🛠 How to Contribute |
| 45 | + |
| 46 | +### Reporting Bugs |
| 47 | + |
| 48 | +1. Check if the bug has already been reported in the [Issues](https://github.com/yourusername/madick-ai-chatbot/issues) |
| 49 | +2. If not, create a new issue with: |
| 50 | + - A clear title and description |
| 51 | + - As much relevant information as possible (OS, Python version, etc.) |
| 52 | + - Steps to reproduce the issue |
| 53 | + - Expected vs. actual behavior |
| 54 | + - Screenshots if applicable |
| 55 | + |
| 56 | +### Suggesting Enhancements |
| 57 | + |
| 58 | +1. Check if the enhancement has already been suggested |
| 59 | +2. Create a new issue with: |
| 60 | + - A clear title and description |
| 61 | + - Explanation of why this enhancement would be useful |
| 62 | + - Any relevant examples or mockups |
| 63 | + |
| 64 | +### Your First Code Contribution |
| 65 | + |
| 66 | +1. Find an issue to work on or create a new one |
| 67 | +2. Comment on the issue expressing your interest |
| 68 | +3. Create a branch in your fork with a descriptive name: |
| 69 | + ```bash |
| 70 | + git checkout -b feature/your-feature-name |
| 71 | + ``` |
| 72 | +4. Make your changes, following our code style guidelines |
| 73 | + |
| 74 | +### Pull Request Process |
| 75 | + |
| 76 | +1. Update the README.md or documentation with details of changes if needed |
| 77 | +2. Make sure your code passes all tests |
| 78 | +3. Submit a pull request to the main repository: |
| 79 | + - Use a clear and descriptive title |
| 80 | + - Reference the issue it addresses |
| 81 | + - Describe the changes in detail |
| 82 | + - Explain how to test the changes |
| 83 | + |
| 84 | +## 💻 Coding Guidelines |
| 85 | + |
| 86 | +### Python Style |
| 87 | + |
| 88 | +- Follow PEP 8 style guidelines |
| 89 | +- Use 4 spaces for indentation (no tabs) |
| 90 | +- Maximum line length of 100 characters |
| 91 | +- Use docstrings for all classes, methods, and functions |
| 92 | +- Use type hints where applicable |
| 93 | + |
| 94 | +### PyQt Conventions |
| 95 | + |
| 96 | +- UI files should be in the `ui/` directory |
| 97 | +- Connect signals and slots using PyQt's `connect()` method |
| 98 | +- Use Qt Designer for complex UI layouts when possible |
| 99 | + |
| 100 | +### Git Commit Messages |
| 101 | + |
| 102 | +- Use clear, concise messages in the imperative mood |
| 103 | +- Example: "Add voice input feature" instead of "Added voice input feature" |
| 104 | +- Reference issue numbers when applicable: "Fix crash on startup (#42)" |
| 105 | + |
| 106 | +## 🧪 Testing |
| 107 | + |
| 108 | +- Add tests for new features or bug fixes |
| 109 | +- Make sure all tests pass before submitting a PR: |
| 110 | + ```bash |
| 111 | + pytest |
| 112 | + ``` |
| 113 | +- Include both unit and integration tests when applicable |
| 114 | + |
| 115 | +## 📚 Documentation |
| 116 | + |
| 117 | +- Keep documentation up-to-date with code changes |
| 118 | +- Document all public APIs, classes, and functions |
| 119 | +- Add comments for complex logic |
| 120 | +- Update the README.md with any new features or changes to installation/usage |
| 121 | + |
| 122 | +## 📁 Project Structure |
| 123 | + |
| 124 | +- `main.py` - Application entry point |
| 125 | +- `chatbot.py` - Main application window and UI |
| 126 | +- `database.py` - SQLite database for conversation history |
| 127 | +- `settings_dialog.py` - Settings configuration dialog |
| 128 | +- `splash_screen.py` - Application splash screen |
| 129 | +- `icon_manager.py` - Icon management and fallback icons |
| 130 | +- `templates_manager.py` - Prompt template management |
| 131 | +- `themes.py` - Theme management |
| 132 | +- `welcome_screen.py` - First-run welcome wizard |
| 133 | +- `export_dialog.py` - Dialog for exporting conversations |
| 134 | +- `tests/` - Test directory |
| 135 | + |
| 136 | +## 🤝 Communication |
| 137 | + |
| 138 | +- Join our [Discord](https://discord.gg/your-invite-link) for discussions |
| 139 | +- Use GitHub Issues for bug reports and feature requests |
| 140 | +- Tag maintainers when you need specific attention |
| 141 | + |
| 142 | +## ⚙️ Development Workflow |
| 143 | + |
| 144 | +1. Create a new branch for each feature or bugfix |
| 145 | +2. Test your changes locally |
| 146 | +3. Submit a PR for review |
| 147 | +4. Address any requested changes |
| 148 | +5. Once approved, your changes will be merged |
| 149 | + |
| 150 | +Thank you for contributing to Madick AI Chatbot! Your efforts help make this project better for everyone. |
0 commit comments