AAnvio
Contributing

Pull Requests

What a pull request needs before it can merge — tests, docs, description, and CI checks.

3 min read

Anvio's contributing guide (docs/22-contributing.md) lists five steps for contributing, and pull requests are where all five come together:

  1. Fork and branch from main
  2. Follow existing code style
  3. Add tests for new features
  4. Update docs for architectural changes
  5. Open a PR with a description and test plan

No PR template file

The repository does not currently ship a .github/PULL_REQUEST_TEMPLATE.md or a .github/PULL_REQUEST_TEMPLATE/ directory. Use the checklist on this page as the de facto template until one exists.

What CI checks on every PR

Every pull request against main triggers the CI GitHub Actions workflow (.github/workflows/ci.yml), which runs four jobs:

JobCommandNotes
lintpnpm lintturbo run lint across all packages
typecheckpnpm typecheckturbo run typecheck across all packages
testpnpm build then pnpm testRuns with live postgres:16-alpine, redis:7-alpine, and nats:2.10-alpine service containers
buildpnpm buildDepends on lint, typecheck, and test all passing first

The test job sets DATABASE_URL, REDIS_URL, NATS_URL, JWT_SECRET, and a placeholder ANTHROPIC_API_KEY=test-key so PostgreSQL/Redis/NATS-backed tests run against real services rather than being skipped. Run the same commands locally before pushing:

pnpm install
pnpm build
pnpm lint
pnpm typecheck
pnpm test

If your change touches a phase integration suite, also run:

pnpm test:integration

Before you open a PR

  • Tests — add unit tests for new logic; add or extend an integration test under tests/integration if you're touching a cross-package flow (the codebase's own history is full of test(pXX): … commits accompanying each feature).
  • Docs — if the change is architectural (new package, new CLI command, new provider, new config schema), update the relevant file under docs/ (e.g. a new NN-topic.md, or an update to an existing one) in the same PR. docs/22-contributing.md calls this out explicitly as a requirement, not a suggestion.
  • Changelog — for user-visible changes, add an entry under ## [Unreleased] in CHANGELOG.md (see Changelog for the format). Maintainers move it under a versioned heading at release time.
  • Style — run pnpm format (Prettier) and make sure pnpm lint is clean; see Coding Style for the exact rules.
  • Scope — keep the PR to one logical change. Split unrelated fixes into separate PRs so they can be reviewed and reverted independently.

Writing the description

Since there's no enforced template, structure your PR description as:

  1. What — one or two sentences on the change.
  2. Why — the problem being solved or the doc/roadmap item being closed.
  3. Test plan — how you verified it: which commands you ran (pnpm test, pnpm test:integration, manual anvio invocations), and what you observed.

A description without a test plan is the most common reason a PR gets sent back for more detail — docs/22-contributing.md treats "description and test plan" as a single required deliverable, not two optional ones.

Licensing

Anvio is MIT licensed (see LICENSE). By opening a PR you agree your contribution is provided under the same license.

Edit on GitHub

Last updated on

On this page