Skip to content

Latest commit

 

History

History
79 lines (60 loc) · 1.53 KB

contributing.md

File metadata and controls

79 lines (60 loc) · 1.53 KB

Contributing Guide

Development Setup

  1. Clone the repository:
git clone https://github.com/HaiyangLi/lion-service.git
cd lion-service
  1. Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Install development dependencies:
uv pip install -e ".[dev]"

Development Workflow

  1. Create a feature branch:
git checkout -b feature/your-feature
  1. Make changes and run tests:
pytest --asyncio-mode=auto
  1. Format code:
black .
isort .

Code Style

  • Use black for formatting
  • Use isort for import sorting
  • Follow PEP 8 guidelines
  • Add docstrings for public functions and classes

Testing

  • Write tests for new features
  • Maintain test coverage
  • Use pytest fixtures for common test setups
  • Test async functions with pytest-asyncio

Pull Request Process

  1. Update documentation for new features
  2. Add tests for new functionality
  3. Ensure CI passes
  4. Request review from maintainers

Release Process

  1. Update version in:

    • pyproject.toml
    • lion_service/version.py
  2. Create release notes

  3. Tag release in git

  4. CI will automatically publish to PyPI

Project Structure

lion_service/
├── __init__.py          # Package exports
├── imodel.py            # Main interface
├── service.py           # Base service class
├── rate_limiter.py      # Rate limiting
├── token_calculator.py  # Token counting
└── service_util.py      # Utilities