Thank you for your interest in contributing to AgentAssay. This document describes the development setup, code standards, and contribution process.
- Python 3.10 or later
- Git
# Clone the repository
git clone https://github.com/qualixar/agentassay.git
cd agentassay
# Create a virtual environment
python -m venv .venv
source .venv/bin/activate # macOS/Linux
# .venv\Scripts\activate # Windows
# Install in development mode with all dev dependencies
pip install -e ".[dev]"# Run the test suite
python -m pytest tests/ -v --tb=short
# Run linting
ruff check src/ tests/
# Run type checking
mypy src/agentassay/AgentAssay uses ruff for linting and formatting.
# Lint
ruff check src/ tests/
# Auto-fix lint issues
ruff check --fix src/ tests/
# Format
ruff format src/ tests/Configuration is in pyproject.toml:
- Target: Python 3.10
- Line length: 100 characters
- Enabled rules: E, F, I, N, W, UP
AgentAssay uses mypy for static type analysis.
mypy src/agentassay/All public functions must include type annotations. Use from __future__ import annotations at the top of every module.
- Use NumPy-style docstrings for all public classes, methods, and functions.
- Include
Parameters,Returns, andRaisessections where applicable. - Provide at least one usage example for non-trivial functions.
# Full suite
python -m pytest tests/ -v --tb=short
# Specific test file
python -m pytest tests/test_core_models.py -v
# Run with coverage
python -m pytest tests/ --cov=agentassay --cov-report=term-missing
# Skip slow tests
python -m pytest tests/ -m "not slow"- Every new feature or bug fix must include tests.
- Test files go in
tests/and must be namedtest_*.py. - Use descriptive test function names:
test_verdict_is_inconclusive_when_ci_straddles_threshold. - For statistical tests, use deterministic seeds or fixed data to ensure reproducibility.
- Aim for 100% branch coverage on new code.
Before submitting a PR, ensure:
- All existing tests pass (
python -m pytest tests/ -q) - No lint errors (
ruff check src/ tests/) - No type errors (
mypy src/agentassay/) - New code has corresponding tests
- Check existing issues and PRs to avoid duplicate work.
- For significant changes, open an issue first to discuss the approach.
- Fork the repository and create a feature branch from
main.
feat/description-- New featuresfix/description-- Bug fixesdocs/description-- Documentation changestest/description-- Test additions or improvementsrefactor/description-- Code restructuring without behavior changes
- Keep PRs focused. One logical change per PR.
- Write a clear PR description explaining what changed and why.
- Ensure all CI checks pass.
- Update the CHANGELOG.md if your change affects users.
- Request review from a maintainer.
- All PRs require at least one approval.
- Address review feedback promptly or explain why you disagree.
- Squash commits into logical units before merge.
- Use the GitHub issue templates for bugs and feature requests.
- Include reproduction steps for bugs.
- Include the output of
agentassay --versionandpython --version.
By contributing to AgentAssay, you agree that your contributions will be licensed under the Apache-2.0 License.