Skip to content

Contributing

We warmly welcome contributions!

How You Can Help

  • Add a plugin: Extend jax2onnx by writing a simple Python file in jax2onnx/plugins: a primitive or an example. The Plugin Quickstart walks through the process step-by-step.

  • Bug fixes & improvements: PRs and issues are always welcome on GitHub.

Getting Started

  1. Fork the repository and clone it locally.
  2. Install dependencies with Poetry:
    poetry install
    
  3. Install pre-commit hooks (essential for linting):
    poetry run pre-commit install
    

Development Workflow

Linting & Formatting

We use ruff (linting), black (formatting), and mypy (typing).

# Run all checks (recommended)
poetry run pre-commit run --all-files

# Or run individually
poetry run ruff check .
poetry run black .
poetry run mypy .

Running Tests

# Run all tests
poetry run pytest

# Run a specific test file
poetry run pytest tests/test_my_feature.py

Documentation

To preview documentation changes locally:

poetry run mkdocs serve

See the Plugin System documentation for details on adding new operators.