Thank you for considering contributing to altissimo-customerio! This guide will help you get started.
- Python 3.11+
- Poetry 2.0+
# Clone the repository
git clone https://github.com/altissimo-hq/customerio-python.git
cd customerio-python
# Install all dependencies (including dev and all optional extras)
poetry sync
# Install pre-commit hooks
poetry run pre-commit install
# Verify everything works
poetry run pytest
poetry run ruff check .
poetry run ruff format --check .# Run all tests
poetry run pytest
# Run with coverage
poetry run pytest --cov=altissimo --cov-report=term-missing
# Run a specific test file
poetry run pytest tests/test_client.py
# Run a specific test
poetry run pytest tests/test_client.py::TestSendEmail::test_send_email_success# Check for lint errors
poetry run ruff check .
# Auto-fix lint errors
poetry run ruff check --fix .
# Check formatting
poetry run ruff format --check .
# Auto-format
poetry run ruff format .Pre-commit hooks run automatically on git commit. To run them manually:
poetry run pre-commit run --all-files- Type hints: All public APIs must have complete type annotations
- Docstrings: All public classes and methods must have docstrings
- Tests: All new features must include tests; aim for >90% coverage
- Linting: Code must pass
ruff checkandruff formatwith the project's configuration
altissimo.customerio
├── client.py # CustomerIOClient with lazy SDK initialization
├── exceptions.py # Exception hierarchy
├── models.py # EmailAddress, SendResult dataclasses
└── py.typed # PEP 561 marker
- Lazy imports — the
customerioSDK is imported only when needed - Consistent return types — all send methods return
SendResult - No side effects — constructing a client does not make network calls
- Optional dependency — the package works without
customerioinstalled (fails gracefully with a helpful message)
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Make your changes with tests
- Ensure all checks pass (
poetry run pytest && poetry run ruff check .) - Commit with a descriptive message
- Push to your fork and open a Pull Request
By contributing, you agree that your contributions will be licensed under the Apache License 2.0.