Contributing

We welcome contributions to JAX-HDC! This guide will help you get started.

Development Setup

  1. Fork the repository

  2. Clone your fork:

git clone https://github.com/yourusername/jax-hdc.git
cd jax-hdc
  1. Create a virtual environment:

python -m venv env
source env/bin/activate  # On Windows: env\Scripts\activate
  1. Install in development mode:

pip install -e ".[dev]"

Code Style

We use the following tools to maintain code quality:

  • Black for code formatting

  • isort for import sorting

  • flake8 for linting

  • mypy for type checking

Run these tools before submitting a pull request:

black .
isort .
flake8
mypy jax_hdc

Testing

Run tests with:

pytest

Submitting Changes

  1. Create a new branch for your feature

  2. Make your changes

  3. Add tests for new functionality

  4. Ensure all tests pass

  5. Submit a pull request

Documentation

Documentation is built using Sphinx. To build the docs locally:

cd docs
make html