lemonade

Lemonade SDK Contribution Guide

The Lemonade SDK project welcomes contributions from everyone!

See code organization for an overview of the repository.

Collaborate with Your App

Lemonade Server integrates quickly with most OpenAI-compatible LLM apps.

You can:

Guides should:

SDK Contributions

To contribute code or examples, first open an Issue with:

One of the maintainers will get back to you ASAP with guidance.

Issues

Use Issues to report bugs or suggest features.

A maintainer will apply one of these labels to indicate the status:

Pull Requests

Submit a PR to contribute code. Maintainers:

Discuss major changes via an Issue first.

Code Formatting

We require that all Python files in this repo adhere to black formatting. This is enforced with a black check in CI workflows.

Running Black formatting

The easiest way to ensure proper formatting is to enable the black formatter in VSCode with format-on-save:

  1. Install the Python extension: Install the Python extension for VSCode if you haven’t already.

  2. Set black as the default formatter:
    • Open VSCode settings (Ctrl/Cmd + ,)
    • Search for “Formatter”
    • Set the Python default formatter to “black”
  3. Enable format-on-save:
    • In VSCode settings, search for “format on save”
    • Check the “Format On Save” option

This will automatically format your code according to black standards whenever you save a file.

Alternative Setup

You can also install black directly and run it manually:

# Install black (if not already installed)
pip install black

# Run black formatter on your file
black your_file.py

Linting

We use linting tools to maintain code quality and catch potential issues. The project uses standard Python linting tools that are automatically run in CI.

Running Linters Locally

To run linting checks locally before submitting a PR:

# Install linting dependencies (if not already installed)
pip install pylint

# Run pylint from the root of the repo
pylint src/lemonade --rcfile .pylintrc --disable E0401

This will show linting warnings and errors in your terminal.

Testing

Tests are run automatically on each PR. These include:

To run tests locally, use the commands in .github/workflows/.

Versioning

We follow Semantic Versioning.