Thank you for your interest in contributing! This document provides guidelines for contributing to the project.
- Code of Conduct
- Getting Started
- Development Setup
- Making Changes
- Testing
- Submitting Changes
- Style Guide
- Reporting Issues
This project adheres to a Code of Conduct. By participating, you are expected to uphold this code.
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/basic-open-agent-tools.git cd basic-open-agent-tools - Add upstream remote:
git remote add upstream https://github.com/Open-Agent-Tools/basic-open-agent-tools.git
- Python 3.9 or higher
- pip or uv for package management
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install development dependencies:
pip install -e ".[dev]" -
Install pre-commit hooks (optional but recommended):
pre-commit install
-
Create a new branch for your changes:
git checkout -b feature/your-feature-name
-
Make your changes following the Style Guide
-
Write or update tests for your changes
-
Run tests to ensure everything works:
pytest
-
Run linters and formatters:
ruff check . ruff format . mypy src/
# Run all tests
pytest
# Run with coverage
pytest --cov=src/basic_open_agent_tools
# Run specific test file
pytest tests/test_specific.py
# Run specific test
pytest tests/test_specific.py::test_function_name- Unit tests go in
tests/directory - Mirror the source structure in
src/basic_open_agent_tools/ - Use descriptive test names:
test_<function>_<scenario>_<expected_result>
- Test both success and failure cases
- Use fixtures for common test data
- Mock external dependencies
- Aim for high coverage but focus on meaningful tests
- Tests pass locally
- Code follows style guide (ruff, mypy)
- Documentation is updated (if applicable)
- CHANGELOG.md is updated (if applicable)
- Commit messages are clear and descriptive
-
Push your changes to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
-
Fill out the PR template with:
- Clear description of changes
- Related issue numbers
- Testing performed
- Breaking changes (if any)
-
Wait for review:
- Address reviewer feedback
- Keep PR up to date with main branch
- Be patient and respectful
type(scope): brief description
Longer description if needed, explaining:
- Why the change is necessary
- How it addresses the issue
- Any side effects or considerations
Fixes #123
Types:
feat: New featurefix: Bug fixdocs: Documentation changesstyle: Code style changes (formatting)refactor: Code refactoringtest: Test changeschore: Build, dependencies, tooling
- Line length: 88 characters (enforced by ruff)
- Type hints: Use type hints for all function parameters and return values
- Docstrings: Use Google-style docstrings
Example:
def example_function(param: str, skip_confirm: bool) -> str:
"""Brief one-line description.
Longer description if needed.
Args:
param: Description of param
skip_confirm: If True, skip confirmation prompts
Returns:
Description of return value
Raises:
ValueError: When param is invalid
"""
pass- One class per file (exceptions for small helper classes)
- Group imports: stdlib, third-party, local
- Keep functions focused and small
- Use meaningful variable names
- Update README.md for user-facing changes
- Update module-level READMEs in src/
- Add inline comments for complex logic
- Keep docs up to date with code changes
Use the Bug Report template and include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- Environment details (OS, Python version)
- Error messages and stack traces
Use the Feature Request template and include:
- Clear description of the feature
- Use case and motivation
- Proposed API or interface
- Alternatives considered
Do not open public issues for security vulnerabilities. Instead:
- Use GitHub Security Advisories
- Or email the maintainers directly
- See SECURITY.md for details
- Open a Discussion for questions
- Check existing issues and discussions first
- Be respectful and patient
By contributing, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing to Basic Open Agent Tools! 🎉