* updated doc generation setup and some slight api enhancements * small fix in index
Python
This project uses poethepoet for task management and uv for dependency management.
Available Poe Tasks
Setup and Installation
Once uv is installed, and you do not yet have a virtual environment setup:
uv venv
and then you can run the following tasks:
uv sync --all-extras --dev
After this initial setup, you can use the following tasks to manage your development environment, it is adviced to use the following setup command since that also installs the pre-commit hooks.
setup
Set up the development environment with a virtual environment, install dependencies and pre-commit hooks:
uv run poe setup
# or with specific Python version
uv run poe setup --python 3.12
install
Install all dependencies including extras and dev dependencies, including updates:
uv run poe install
venv
Create a virtual environment with specified Python version or switch python version:
uv run poe venv
# or with specific Python version
uv run poe venv --python 3.12
pre-commit-install
Install pre-commit hooks:
uv run poe pre-commit-install
Code Quality and Formatting
Each of the following tasks are designed to run against both the main agent-framework package and the extension packages, ensuring consistent code quality across the project.
fmt (format)
Format code using ruff:
uv run poe fmt
lint
Run linting checks and fix issues:
uv run poe lint
pyright
Run Pyright type checking:
uv run poe pyright
mypy
Run MyPy type checking:
uv run poe mypy
Testing
test
Run unit tests with coverage:
uv run poe test
Documentation
docs-clean
Remove the docs build directory:
uv run poe docs-clean
docs-build
Build the documentation:
uv run poe docs-build
docs-serve
Serve documentation locally with auto-reload:
uv run poe docs-serve
docs-check
Build documentation and fail on warnings:
uv run poe docs-check
docs-check-examples
Check documentation examples for code correctness:
uv run poe docs-check-examples
Code Validation
markdown-code-lint
Lint markdown code blocks:
uv run poe markdown-code-lint
samples-code-check
Run type checking on samples:
uv run poe samples-code-check
Comprehensive Checks
check
Run all quality checks (format, lint, pyright, mypy, test, markdown lint, samples check):
uv run poe check
pre-commit-check
Run pre-commit specific checks (all of the above, excluding mypy):
uv run poe pre-commit-check
Building
build
Build the package:
uv run poe build
Pre-commit Hooks
You can also run all checks using pre-commit directly:
uv run pre-commit run -a