First off, thank you for considering contributing to PilottAI! This document provides guidelines and instructions for contributing to the project.
This project and everyone participating in it is governed by our Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to conduct@pilottai.com.
-
Fork and Clone
git clone https://github.com/yourusername/pilottai-tools.git cd pilottai-tools -
Set Up Python Environment
# Create a virtual environment python -m venv venv knowledge venv/bin/activate # On Windows: venv\Scripts\activate # Install dependencies pip install poetry poetry install
-
Install Pre-commit Hooks
pre-commit install
pilott/
├── core/ # Core framework components
├── agents/ # Agent implementations
├── memory/ # Memory management
├── orchestration/ # System orchestration
├── tools/ # Tool integrations
├── utils/ # Utility functions
└── tests/ # Test suite
- Create branches from
mainfor all changes - Use meaningful branch names following this pattern:
feature/descriptionfor new featuresfix/descriptionfor bug fixesdocs/descriptionfor documentation changesrefactor/descriptionfor code refactoring
git checkout -b feature/your-feature-name- Make focused, incremental changes
- Follow the coding standards
- Update tests and documentation as needed
- Commit regularly with clear messages:
git commit -m "feat: add new agent capability"
git commit -m "fix: resolve memory leak in task router"-
Run Tests
poetry run pytest
-
Test Coverage
poetry run pytest --cov=pilottai-tools tests/
-
Type Checking
poetry run mypy pilottai-tools
- Update relevant documentation in the
docs/directory - Add docstrings to new functions and classes
- Include usage examples for new features
-
Before Submitting
- Ensure all tests pass
- Check code coverage
- Run linting and type checking
- Update documentation
- Rebase on latest main
-
PR Template
- Fill out the PR template completely
- Link related issues
- Describe your changes thoroughly
- Include screenshots for UI changes
-
Review Process
- At least one maintainer review is required
- Address review comments promptly
- Keep PR scope focused
- Follow PEP 8 guidelines
- Use type hints for all functions
- Maximum line length: 88 characters
- Use descriptive variable names
# Good Example
async def process_task(task: Task) -> TaskResult:
"""Process a task and return its result.
Args:
task: The task to process
Returns:
TaskResult: The result of task processing
"""
try:
result = await self._execute_task_steps(task)
return TaskResult(success=True, output=result)
except Exception as e:
return TaskResult(success=False, error=str(e))- Write unit tests for all new functionality
- Maintain test coverage above 90%
- Use meaningful test names and descriptions
async def test_task_processing_success():
"""Test successful task processing with valid input."""
task = Task(description="test task")
result = await agent.process_task(task)
assert result.success
assert result.output is not None- Join our Discord
- Follow us on Twitter
- Subscribe to our newsletter
- Check our documentation
- Ask in our Discord
- Open a discussion
Thank you for contributing to PilottAI! 🚀