Skip to content

Lemonade SDK Contribution Guide

Hello and welcome to the project! πŸŽ‰

We're thrilled that you're considering contributing to the project. This project is a collaborative effort and we welcome contributors from everyone.

Before you start, please take a few moments to read through these guidelines. They are designed to make the contribution process easy and effective for everyone involved. Also take a look at the code organization for a bird's eye view of the repository.

The guidelines document is organized as the following sections:

πŸ‹ Contributing a Lemonade Server Demo

Lemonade Server Demos aim to be reproducible in under 10 minutes, require no code changes to the app you're integrating, and use an app supporting the OpenAI API with a configurable base URL.

Please see AI Toolkit ReadMe for an example Markdown contribution.

  • To Submit your example, open a pull request in the GitHub repo with the following:
  • Add your .md file in the Server apps folder.
  • Assign your PR to the maintainers

We’re excited to see what you build! If you’re unsure about your idea or need help unblocking an integration, feel free to reach out via GitHub Issues or email.

Contributing to the overall framework

If you wish to contribute to any other part of the repository such as examples or reporting, please open an issue with the following details.

  1. Title: A concise, descriptive title that summarizes the contribution.
  2. Tags/Labels: Add any relevant tags or labels such as 'enhancement', 'good first issue', or 'help wanted'
  3. Proposal: Detailed description of what you propose to contribute. For new examples, describe what they will demonstrate, the technology or tools they'll use, and how they'll be structured.

Issues

Please file any bugs or feature requests you have as an Issue and we will take a look.

Pull Requests

Contribute code by creating a pull request (PR). Your PR will be reviewed by one of the repo maintainers.

Please have a discussion with the team before making major changes. The best way to start such a discussion is to file an Issue and seek a response from one of the repo maintainers.

Testing

Tests are defined in tests/ and run automatically on each PR, as defined in our testing action. This action performs both linting and unit testing and must succeed before code can be merged.

We don't have any fancy testing framework set up yet. If you want to run tests locally: - Activate a conda environment that has lemonade-sdk (this package) installed. - Run conda install pylint if you haven't already (other pylint installs will give you a lot of import warnings). - Run pylint src --rcfile .pylintrc from the repo root. - Run python *.py for each test script in test/.

Versioning

We use semantic versioning, as described in versioning.md.

PyPI Release Process

Lemonade SDK is provided as a package on PyPI, the Python Package Index, as lemonade-sdk. The release process for pushing an updated package to PyPI is mostly automated, however (by design), there are a few manual steps.

  1. Make sure the version number in version.py has a higher value than the current PyPI package.
    • Note: if you don't take care of this, PyPI will reject the updated package and you will need to start over from Step 1 of this guide.
    • If you are unsure what to set the version number to, consult versioning.md.
  2. Make sure all of the changes you want to release have been merged to main.
  3. Go to the Lemonade SDK GitHub front page and click "Releases" in the side bar.
  4. At the top of the page, click "Draft a new release".
  5. Click "Choose a tag" (near the top of the page) and write v (lowercase), followed by the contents of the string in version.py.
  6. For example, if version.py contains __version__ = "4.0.5", the string is 4.0.5 and you should write v4.0.5 into the text box.
  7. Click the "+Create new tag:... on publish" button that appears under the next box.
  8. Click "Generate release notes" (near the top of the page). Modify as necessary. Make sure to give credit where credit is due!
  9. Click "Publish release" (green button near the bottom of the page). This will start the release automations, in the form of a Publish Distributions to PyPI Action.
  10. Note: if you forgot the "v" in the "Choose a tag" step, this Action will not run.
  11. Wait for the Action launched by the prior step to complete. Go to the lemonade-sdk PyPI page and spam refresh. You should see the version number update.
  12. Note: pip install lemonade-sdk may not find the new update for a few more minutes.