Skip to content

Latest commit

 

History

History
143 lines (104 loc) · 3.36 KB

File metadata and controls

143 lines (104 loc) · 3.36 KB

Contributing to DeltaLLM

Thank you for your interest in contributing to DeltaLLM! This document provides guidelines for contributing to the project.

Getting Started

Prerequisites

  • Python 3.11+
  • Node.js 20+
  • PostgreSQL 15+
  • Redis 7+ (optional but recommended)
  • uv for Python dependency management

Setting Up Your Development Environment

  1. Fork and clone the repository

    git clone https://github.com/YOUR_USERNAME/deltallm.git
    cd deltallm
  2. Install Python dependencies

    uv sync --dev
  3. Install UI dependencies

    cd ui
    npm ci
    cd ..
  4. Set up environment variables

    export DATABASE_URL="postgresql://postgres:postgres@localhost:5432/deltallm"
    export DELTALLM_CONFIG_PATH=./config.yaml
    export DELTALLM_MASTER_KEY="$(python3 -c 'import secrets; print(\"sk-\" + secrets.token_hex(20) + \"A1\")')"
    export DELTALLM_SALT_KEY="$(openssl rand -hex 32)"
    export OPENAI_API_KEY="sk-your-openai-key"
  5. Create config and initialize the database

    cp config.example.yaml config.yaml
    uv run prisma generate --schema=./prisma/schema.prisma
    uv run prisma db push --schema=./prisma/schema.prisma
  6. Start the development servers

    Backend:

    uv run uvicorn src.main:app --host 0.0.0.0 --port 8000 --reload

    UI (in another terminal):

    cd ui
    npm run dev

See Local Development in the README for more details.

Development Workflow

  1. Create a branch for your changes

    git checkout -b feature/your-feature-name
  2. Make your changes and ensure they follow our code style

  3. Run tests to make sure nothing is broken

    uv run pytest
  4. Run the linter to check code style

    uv run ruff check .
  5. Commit your changes with a clear commit message

  6. Push to your fork and submit a pull request

Pull Request Guidelines

  • Describe what your PR does and why it's needed
  • Reference any related issues using Fixes #123 or Closes #123
  • Ensure tests pass before submitting
  • Keep changes focused — one feature or fix per PR
  • Update documentation if your changes affect usage

Code Style

  • We use Ruff for Python linting
  • Follow PEP 8 style guidelines
  • Write docstrings for public functions and classes
  • Keep functions focused and modular

Testing

  • Write tests for new features
  • Ensure existing tests pass
  • Use pytest for running tests
# Run all tests
uv run pytest

# Run with verbose output
uv run pytest -v

# Run specific test file
uv run pytest tests/test_specific.py

Reporting Issues

When reporting bugs, please include:

  • Clear description of the issue
  • Steps to reproduce the problem
  • Expected vs actual behavior
  • Environment details (OS, Python version, etc.)
  • Relevant logs or error messages

Questions?

License

By contributing to DeltaLLM, you agree that your contributions will be licensed under the MIT License.


Thank you for helping make DeltaLLM better! 🚀