Skip to content

Contributing

We welcome contributions to the OpenWebUI client library! This document provides guidelines and instructions for contributing.

Development Setup

  1. Clone the repository:
git clone https://github.com/bemade/openwebui-client.git
cd openwebui-client
  1. Create and activate a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  1. Install the package 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
  • mypy: For static type checking
  • flake8: For code style enforcement

You can run these tools using pre-commit:

pre-commit install  # Install the git hooks
pre-commit run --all-files  # Run on all files

Running Tests

Run the tests with pytest:

pytest

For tests with coverage:

pytest --cov=openwebui_client

Building Documentation

To build the documentation:

mkdocs build

The documentation will be available in the site directory.

Submitting Changes

  1. Create a branch for your changes:
git checkout -b feature-branch-name
  1. Make your changes and commit them:
git commit -m "Description of changes"
  1. Push your changes to your fork:
git push origin feature-branch-name
  1. Open a pull request against the main repository.