- Clone the repository:
git clone https://github.com/HaiyangLi/lion-service.git
cd lion-service
- Install uv:
curl -LsSf https://astral.sh/uv/install.sh | sh
- Install development dependencies:
uv pip install -e ".[dev]"
- Create a feature branch:
git checkout -b feature/your-feature
- Make changes and run tests:
pytest --asyncio-mode=auto
- Format code:
black .
isort .
- Use black for formatting
- Use isort for import sorting
- Follow PEP 8 guidelines
- Add docstrings for public functions and classes
- Write tests for new features
- Maintain test coverage
- Use pytest fixtures for common test setups
- Test async functions with pytest-asyncio
- Update documentation for new features
- Add tests for new functionality
- Ensure CI passes
- Request review from maintainers
-
Update version in:
- pyproject.toml
- lion_service/version.py
-
Create release notes
-
Tag release in git
-
CI will automatically publish to PyPI
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