Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Python 3.10 or higher
- Git
# Clone the repository
git clone https://github.com/capiscio/capiscio-sdk-python.git
cd capiscio-sdk-python
# Create virtual environment
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install in development mode with dev dependencies
pip install -e ".[dev]"
# Verify installation
pytest --version
black --version
ruff --versiongit checkout -b feature/your-feature-name
# or
git checkout -b fix/your-bug-fix- Write clear, concise code
- Add type hints to all functions
- Follow existing code style
- Add docstrings to public APIs
# Run all tests
pytest
# Run with coverage
pytest --cov=capiscio_sdk --cov-report=html
# Run specific test file
pytest tests/unit/test_config.py# Format code
black .
# Lint code
ruff check .
# Type checking
mypy capiscio_sdkgit add .
git commit -m "feat: add new validator"
# or
git commit -m "fix: resolve rate limiting issue"Commit message format:
feat:- New featurefix:- Bug fixdocs:- Documentation changestest:- Test changesrefactor:- Code refactoringchore:- Maintenance tasks
git push origin feature/your-feature-nameThen create a Pull Request on GitHub.
- Follow PEP 8
- Use type hints
- Maximum line length: 100 characters
- Use Black for formatting
- Use Ruff for linting
- Write tests for all new features
- Maintain >80% code coverage
- Use pytest fixtures for common setup
- Mock external dependencies (HTTP, file system)
def test_feature_name():
"""Test description."""
# Arrange
config = SecurityConfig.production()
# Act
result = some_function(config)
# Assert
assert result.success- Add docstrings to all public classes and functions
- Update README.md if adding new features
- Add examples for new functionality
- Keep CHANGELOG.md updated
def validate_message(message: Message) -> ValidationResult:
"""Validate an A2A message.
Args:
message: The message to validate
Returns:
ValidationResult with success status and issues
Raises:
CapiscIOValidationError: If validation fails critically
"""- All tests pass
- Code is formatted (black)
- Code is linted (ruff)
- Type checking passes (mypy)
- Documentation is updated
- CHANGELOG.md is updated
Include:
- What does this PR do?
- Why is this change needed?
- How has it been tested?
- Any breaking changes?
Include:
- Python version
- Package version
- Minimal reproduction steps
- Expected vs actual behavior
- Error messages/stack traces
Include:
- Use case description
- Proposed API/interface
- Why this benefits users
- Alternatives considered
- Be respectful and inclusive
- Provide constructive feedback
- Help others learn
- Open a GitHub Discussion
- Check existing Issues
- Visit capisc.io
Thank you for contributing! 🎉