👍 First off, thanks for taking the time to contribute! 🎉
- Code of Conduct
- Development Setup
- Development Process
- Pull Request Process
- Coding Standards
- Testing Guidelines
- Documentation
- CLI Development
This project and everyone participating in it are governed by our Code of Conduct. By participating, you are expected to uphold this code.
-
Fork the repository
-
Clone your fork:
git clone https://github.com/superagenticai/agenspy.git cd agenspy -
Set up your development environment:
# Create and activate 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]" # Install pre-commit hooks pip install pre-commit pre-commit install
-
Verify your setup:
agenspy --help
-
Create a feature branch:
git checkout -b feature/your-feature-name
-
Make your changes following our coding standards
-
Run checks before committing:
# Format code black . # Lint code ruff check . # Type checking mypy . # Run tests pytest
-
Commit your changes using conventional commits:
git commit -m "feat: add new feature" # or git commit -m "fix: resolve issue with protocol handling"
- Update the README.md with details of changes if applicable
- Update the documentation in the
docs/directory - Add tests for any new functionality
- Ensure all tests pass
- Update CHANGELOG.md following the Keep a Changelog format
- Submit a pull request to the main repository
We maintain high code quality using these tools:
Additional guidelines:
- Follow PEP 8 style guide
- Maximum line length is 120 characters
- Use type hints for all function arguments and return values
- Write docstrings for all public methods and classes
- Keep functions focused and concise
- Write unit tests for all new features
- Tests should be placed in the
tests/directory - Use
pytestfor testing - Maintain test coverage above 80%
- Use pytest fixtures for reusable test components
- Name tests descriptively following
test_<what>_<expected>pattern
Agenspy includes a CLI tool called agenspy. When making changes to the CLI:
- Keep commands and options consistent with existing patterns
- Add comprehensive help text for all commands
- Update the CLI documentation in
docs/cli.md - Test CLI commands thoroughly
- Update docstrings for any new/modified code
- Follow Google style docstrings
- Include code examples in docstrings
- Update the
docs/directory for any new features - Add examples to the
examples/directory if applicable
Example docstring:
def process_agent(self, input_data: Dict[str, Any]) -> AgentResponse:
"""Process input data through the agent pipeline.
Args:
input_data: Dictionary containing input data for processing
Returns:
AgentResponse: The processed agent response
Example:
>>> agent = Agent()
>>> response = agent.process_agent({"query": "Hello"})
>>> print(response.text)
"""- Update version in
pyproject.toml - Update
CHANGELOG.md - Create a new release on GitHub
- GitHub Actions will automatically publish to PyPI
- Open an issue for bugs or feature requests
- Check our documentation
- Join our community discussions
By contributing to Agenspy, you agree that your contributions will be licensed under the MIT License.