Contributing
We welcome contributions to redback-jax! This guide will help you get started.
Development Setup
Fork the repository on GitHub
Clone your fork locally:
git clone https://github.com/your-username/redback-jax.git
cd redback-jax
Install in development mode:
pip install -e .[dev]
Install pre-commit hooks:
pre-commit install
Running Tests
Run the test suite:
pytest
Run tests with coverage:
pytest --cov=redback_jax
Code Style
We use several tools to maintain code quality:
Black: Code formatting
isort: Import sorting
flake8: Linting
Format code:
black redback_jax tests
isort redback_jax tests
Check code style:
flake8 redback_jax tests
Documentation
Build documentation locally:
cd docs
make html
The documentation will be available in docs/_build/html/index.html.
Submitting Changes
Create a new branch for your feature:
git checkout -b feature-name
Make your changes and add tests
Ensure all tests pass and code style is correct
Commit your changes with a clear message
Push to your fork and submit a pull request
Guidelines
Write tests for new functionality
Follow existing code style and conventions
Update documentation as needed
Keep commits focused and atomic
Write clear commit messages