Skip to the content.

Contributing to Purpose

We love your input! We want to make contributing to Purpose as easy and transparent as possible, whether it’s:

Development Process

We use GitHub to host code, to track issues and feature requests, as well as accept pull requests.

  1. Fork the repo and create your branch from main.
  2. If you’ve added code that should be tested, add tests.
  3. If you’ve changed APIs, update the documentation.
  4. Ensure the test suite passes.
  5. Make sure your code lints.
  6. Issue that pull request!

Pull Request Process

  1. Update the README.md with details of changes to the interface, if applicable.
  2. Update the documentation with any new features or changes.
  3. The PR will be merged once you have the sign-off of at least one other developer.

Any Contributions You Make Will Be Under the Software License

In short, when you submit code changes, your submissions are understood to be under the same LICENSE that covers the project. Feel free to contact the maintainers if that’s a concern.

Report Bugs Using GitHub’s Issue Tracker

We use GitHub issues to track public bugs. Report a bug by opening a new issue; it’s that easy!

Write Bug Reports with Detail, Background, and Sample Code

Great Bug Reports tend to have:

Use a Consistent Coding Style

License

By contributing, you agree that your contributions will be licensed under its MIT License.

References

This document was adapted from the open-source contribution guidelines for Facebook’s Draft.

Development Setup

  1. Clone the repository:
    1
    2
    
    git clone https://github.com/yourusername/purpose.git
    cd purpose
    
  2. Create a virtual environment:
    1
    2
    
    python -m venv .venv
    source .venv/bin/activate  # On Windows, use `.venv\Scripts\activate`
    
  3. Install development dependencies:
    1
    
    pip install -r requirements-dev.txt
    
  4. Install pre-commit hooks:
    1
    
    pre-commit install
    

Running Tests

1
pytest tests/

Code Quality Checks

Before submitting a PR, please run:

1
2
3
4
5
6
7
8
9
10
11
# Format code
black .

# Check style
flake8

# Type checking
mypy .

# Run tests
pytest

Documentation

We use Jekyll for our documentation. To preview documentation locally:

  1. Install Ruby and Bundler
  2. Run:
    1
    2
    3
    
    cd docs
    bundle install
    bundle exec jekyll serve
    

Getting Help

If you need help with contributing:

  1. Check the documentation
  2. Join our community discussions
  3. Ask questions in GitHub issues
  4. Contact the maintainers

Thank you for contributing to Purpose!