Toolbox is a Python library containing functionality which is shared across multiple pipelines.
This pipeline collects risks from AI and classifies them according to a taxonomy. It also includes functionality for evaluating the pipeline against ground-truth, as well as web apps for reviewing the pipeline's output.
For Python dependencies, make sure you have
uv installed. Then
run this command from the root of the repository:
uv sync --all-packagesMake a copy of the example file:
cp -n .env.example .envThen fill in the required environment variables in the new .env file.
Run this command once to configure git hooks to automatically run checks before committing and pushing changes.
git config core.hooksPath hooks/To simplify collaboration, committing and pushing to main are not allowed. Instead, developers must work on branches and merge their changes into the main branch using pull request.
If you are new to branches and pull requests, here is a good tutorial. Your friendly neighborhood AI assistant will also happily walk you through the process.
There are several tools for helping to promote code correctness and consistency. The pre-commit hook runs some of these automatically during each commit.
Run these commands from the root directory of the repository.
# Automatically reformat all files
uv run ruff format
# Run linter, fixing issues that can be fixed automatically
uv run ruff check --fix
# Run type checker
uv run basedpyright
# Run unit tests
uv run pytest
# Run all the checks together
uv run ruff format && uv run ruff check --fix && uv run basedpyright && uv run pytestSee each app's README for details on its particular checks.
Here are general guidelines for new projects.
uvfor dependency management, using a single workspace for all projectsrufffor formatting and lintingbasedpyrightfor type checkingpytestfor tests
- TypeScript in strict mode
npmfor package managemnt and scriptsbiomefor formatting and lintingvitestfor tests- Cloudflare for hosting