Skip to content

Latest commit

 

History

History
127 lines (91 loc) · 2.5 KB

File metadata and controls

127 lines (91 loc) · 2.5 KB

Contributing to Valkey RAG Cache

Thank you for your interest in contributing! This document provides guidelines for contributing to the Valkey RAG Cache reference architecture.

Ways to Contribute

  • Bug Reports: Open an issue describing the bug
  • Feature Requests: Open an issue describing the feature
  • Code: Submit a pull request with your changes
  • Documentation: Improve or fix documentation
  • Examples: Add new examples in any language

Development Setup

Prerequisites

  • Docker or Podman
  • Python 3.11+
  • Node.js 18+
  • Go 1.21+

Local Development

# Clone the repository
git clone https://github.com/your-org/valkey-rag-cache.git
cd valkey-rag-cache

# Start Valkey
cd deployment/docker
docker-compose up -d valkey-stack

# Run Python examples
cd examples/python/semantic-cache
pip install -r requirements.txt
python main.py

# Run TypeScript examples
cd examples/typescript/semantic-cache
npm install
npm run dev

# Run Go examples
cd examples/go/semantic-cache
go run main.go

Pull Request Process

  1. Fork the repository
  2. Create a branch for your changes
  3. Make your changes following the code style guidelines
  4. Test your changes thoroughly
  5. Update documentation if needed
  6. Submit a pull request

Commit Messages

Follow conventional commits format:

type(scope): description

[optional body]

[optional footer]

Types: feat, fix, docs, style, refactor, test, chore

Examples:

feat(python): add hybrid search example
fix(cache): handle connection timeout gracefully
docs(cookbook): add cache invalidation guide

Code Style

Python

  • Follow PEP 8
  • Use type hints
  • Include docstrings for public functions
  • Run black and ruff before committing

TypeScript

  • Use strict TypeScript
  • Follow ESLint rules
  • Include JSDoc comments

Go

  • Run gofmt and go vet
  • Follow standard Go conventions
  • Include package documentation

Testing

Before submitting a PR:

# Python
cd examples/python/semantic-cache
pytest

# TypeScript
cd examples/typescript/semantic-cache
npm test

# Go
cd examples/go/semantic-cache
go test ./...

Documentation

  • Update README if adding new features
  • Add cookbook entries for new patterns
  • Include code comments for complex logic
  • Keep examples runnable and tested

Questions?

Open a discussion or issue if you have questions about contributing.

License

By contributing, you agree that your contributions will be licensed under the Apache 2.0 License.