We welcome contributions to the Kailash Python SDK! This guide will help you get started.
Fork the Repository
Visit GitHub and fork the repository.
Clone Your Fork
git clone https://github.com/YOUR_USERNAME/kailash-py.git cd kailash-pySet Up Development Environment
# Install uv package manager curl -LsSf https://astral.sh/uv/install.sh | sh # Sync dependencies uv sync # Install pre-commit hooks pre-commit install
Create a Feature Branch
git checkout -b feature/your-feature-name
Make Your Changes
- Write clean, documented code
- Follow the existing code style
- Add tests for new functionality
- Update documentation as needed
Run Tests
uv run pytest uv run pytest --cov=kailash
Check Code Quality
# Run all pre-commit hooks pre-commit run --all-files # Or run individually black src/ tests/ isort src/ tests/ ruff check src/ tests/
Commit Your Changes
git add . git commit -m "feat: add new feature"
Follow conventional commit format: -
feat:for new features -fix:for bug fixes -docs:for documentation -test:for tests -refactor:for refactoringPush and Create Pull Request
git push origin feature/your-feature-name
Then create a pull request on GitHub.
- Python Style: Follow PEP 8
- Line Length: 88 characters (Black default)
- Imports: Use isort for organizing
- Type Hints: Always use type annotations
- Docstrings: Use Google style docstrings
- Write tests for all new functionality
- Maintain test coverage above 80%
- Use pytest for all tests
- Mock external dependencies
- Test both success and error cases
- Update docstrings for new/modified code
- Update API documentation if needed
- Add examples for new features
- Update README if necessary
- Ensure all tests pass
- Update documentation
- Add entry to CHANGELOG.md
- Request review from maintainers
- Address review feedback
- Squash commits if requested
- Be respectful and inclusive
- Follow the Code of Conduct
- Help others in issues and discussions
- Share your use cases and feedback
- Questions: Open a GitHub issue
- Discussions: Use GitHub Discussions
- Security: Email security@terrene.foundation
Thank you for contributing to Kailash Python SDK!