|
| 1 | +# Contributing to taskprovision |
| 2 | + |
| 3 | +Thank you for your interest in contributing to taskprovision! We appreciate your time and effort in helping us improve this project. |
| 4 | + |
| 5 | +## 📋 Table of Contents |
| 6 | + |
| 7 | +- [Code of Conduct](#code-of-conduct) |
| 8 | +- [Getting Started](#-getting-started) |
| 9 | +- [Development Setup](#-development-setup) |
| 10 | +- [Making Changes](#-making-changes) |
| 11 | +- [Pull Request Process](#-pull-request-process) |
| 12 | +- [Code Style](#-code-style) |
| 13 | +- [Testing](#-testing) |
| 14 | +- [Documentation](#-documentation) |
| 15 | +- [Reporting Issues](#-reporting-issues) |
| 16 | +- [Feature Requests](#-feature-requests) |
| 17 | +- [License](#-license) |
| 18 | + |
| 19 | +## Code of Conduct |
| 20 | + |
| 21 | +This project and everyone participating in it is governed by our [Code of Conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. |
| 22 | + |
| 23 | +## 🚀 Getting Started |
| 24 | + |
| 25 | +1. **Fork** the repository on GitHub |
| 26 | +2. **Clone** your fork locally |
| 27 | +3. Create a new **branch** for your changes |
| 28 | +4. Make your changes and **commit** them |
| 29 | +5. **Push** your changes to your fork |
| 30 | +6. Open a **Pull Request** |
| 31 | + |
| 32 | +## 💻 Development Setup |
| 33 | + |
| 34 | +### Prerequisites |
| 35 | + |
| 36 | +- Python 3.8+ |
| 37 | +- [Poetry](https://python-poetry.org/docs/#installation) for dependency management |
| 38 | +- [Pre-commit](https://pre-commit.com/) for git hooks |
| 39 | +- [Ollama](https://ollama.ai/) with Mistral:7b model |
| 40 | + |
| 41 | +### Setup Steps |
| 42 | + |
| 43 | +1. Clone the repository: |
| 44 | + ```bash |
| 45 | + git clone https://github.com/yourusername/python.git |
| 46 | + cd python |
| 47 | + ``` |
| 48 | + |
| 49 | +2. Install dependencies: |
| 50 | + ```bash |
| 51 | + poetry install |
| 52 | + ``` |
| 53 | + |
| 54 | +3. Install pre-commit hooks: |
| 55 | + ```bash |
| 56 | + pre-commit install |
| 57 | + ``` |
| 58 | + |
| 59 | +4. Run tests: |
| 60 | + ```bash |
| 61 | + poetry run pytest |
| 62 | + ``` |
| 63 | + |
| 64 | +## ✨ Making Changes |
| 65 | + |
| 66 | +1. Create a new branch: |
| 67 | + ```bash |
| 68 | + git checkout -b feature/your-feature-name |
| 69 | + # or |
| 70 | + git checkout -b bugfix/description-of-fix |
| 71 | + ``` |
| 72 | + |
| 73 | +2. Make your changes following the code style guidelines |
| 74 | + |
| 75 | +3. Run tests and linters: |
| 76 | + ```bash |
| 77 | + poetry run pre-commit run --all-files |
| 78 | + poetry run pytest |
| 79 | + ``` |
| 80 | + |
| 81 | +4. Commit your changes with a descriptive message: |
| 82 | + ```bash |
| 83 | + git commit -m "feat: add new feature" |
| 84 | + # or |
| 85 | + git commit -m "fix: resolve issue with xyz" |
| 86 | + ``` |
| 87 | + |
| 88 | +## 🔄 Pull Request Process |
| 89 | + |
| 90 | +1. Ensure your fork is up to date with the main branch |
| 91 | +2. Rebase your feature branch on top of the main branch |
| 92 | +3. Push your changes to your fork |
| 93 | +4. Open a Pull Request with a clear title and description |
| 94 | +5. Reference any related issues |
| 95 | +6. Ensure all CI checks pass |
| 96 | +7. Request reviews from maintainers |
| 97 | + |
| 98 | +## 🎨 Code Style |
| 99 | + |
| 100 | +- Follow [PEP 8](https://www.python.org/dev/peps/pep-0008/) |
| 101 | +- Use type hints for all function signatures |
| 102 | +- Keep functions small and focused |
| 103 | +- Write docstrings for all public functions and classes |
| 104 | +- Use meaningful variable and function names |
| 105 | + |
| 106 | +## 🧪 Testing |
| 107 | + |
| 108 | +- Write tests for all new features and bug fixes |
| 109 | +- Maintain at least 80% test coverage |
| 110 | +- Use descriptive test function names |
| 111 | +- Test edge cases and error conditions |
| 112 | + |
| 113 | +### Running Tests |
| 114 | + |
| 115 | +```bash |
| 116 | +# Run all tests |
| 117 | +poetry run pytest |
| 118 | + |
| 119 | +# Run tests with coverage report |
| 120 | +poetry run pytest --cov=taskprovision --cov-report=term-missing |
| 121 | + |
| 122 | +# Run a specific test file |
| 123 | +poetry run pytest tests/test_module.py |
| 124 | +``` |
| 125 | + |
| 126 | +## 📚 Documentation |
| 127 | + |
| 128 | +- Update documentation for all new features |
| 129 | +- Follow the existing documentation style |
| 130 | +- Add examples where helpful |
| 131 | +- Ensure all public APIs are documented |
| 132 | + |
| 133 | +### Building Documentation |
| 134 | + |
| 135 | +```bash |
| 136 | +# Install documentation dependencies |
| 137 | +poetry install --with docs |
| 138 | + |
| 139 | +# Build documentation |
| 140 | +poetry run mkdocs build |
| 141 | + |
| 142 | +# Serve documentation locally |
| 143 | +poetry run mkdocs serve |
| 144 | +``` |
| 145 | + |
| 146 | +## 🐛 Reporting Issues |
| 147 | + |
| 148 | +When reporting issues, please include: |
| 149 | + |
| 150 | +1. A clear, descriptive title |
| 151 | +2. Steps to reproduce the issue |
| 152 | +3. Expected behavior |
| 153 | +4. Actual behavior |
| 154 | +5. Environment details (OS, Python version, etc.) |
| 155 | +6. Any relevant error messages or logs |
| 156 | + |
| 157 | +## 💡 Feature Requests |
| 158 | + |
| 159 | +We welcome feature requests! Please: |
| 160 | + |
| 161 | +1. Check if a similar feature already exists |
| 162 | +2. Explain why this feature would be valuable |
| 163 | +3. Provide examples of how it would be used |
| 164 | +4. Consider contributing a pull request |
| 165 | + |
| 166 | +## 📄 License |
| 167 | + |
| 168 | +By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE). |
| 169 | + |
| 170 | +## 🙏 Thank You! |
| 171 | + |
| 172 | +Your contributions help make taskprovision better for everyone. Thank you for being part of our community! |
0 commit comments