Contributing

Bugs

File bugs as issues on GitHub. Check existing issues first to avoid duplicates.

Code

The source is licensed under the Apache 2 license. Fork the pythondotorg repository, create a branch, and open a pull request.

See Installing to set up your development environment.

Before submitting a PR

  1. Run the test suite and make sure it passes:

    make test
    
  2. Run the linter and formatter:

    make lint
    make fmt
    
  3. If you changed models, check for missing migrations:

    make migrations
    
  4. Write tests for any new or changed code.

  5. Keep pull requests focused — one issue or feature per PR is easier to review than a large PR that touches many parts of the system.

  6. Include a clear description of what your PR does and why.

CI checks

GitHub Actions runs on every push and pull request. It will:

  • Check for ungenerated migrations (makemigrations --check --dry-run)

  • Run the full test suite

  • Enforce a 75% minimum test coverage threshold

PRs that fail CI won’t be merged.

Code style

  • Follow PEP 8

  • Use make lint (ruff) to catch issues and make fmt (ruff) to auto-format