From f6359d460eb058a141e6f6fe2c1aa164932b4861 Mon Sep 17 00:00:00 2001 From: Luke Payyapilli Date: Tue, 20 Jan 2026 09:16:16 -0500 Subject: [PATCH] chore: install livekit as optional extra in CI instead of dev dep --- .github/workflows/coverage.yaml | 2 +- .github/workflows/tests.yaml | 2 +- pyproject.toml | 1 - tests/test_livekit_transport.py | 18 ++++++++++++------ uv.lock | 2 -- 5 files changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml index 0dd30f9e5..faca8c03f 100644 --- a/.github/workflows/coverage.yaml +++ b/.github/workflows/coverage.yaml @@ -33,7 +33,7 @@ jobs: - name: Install dependencies run: | - uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain --extra websocket + uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain --extra livekit --extra websocket - name: Run tests with coverage run: | diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8e58845e4..459725da7 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -37,7 +37,7 @@ jobs: - name: Install dependencies run: | - uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain --extra websocket + uv sync --group dev --extra anthropic --extra aws --extra google --extra langchain --extra livekit --extra websocket - name: Test with pytest run: | diff --git a/pyproject.toml b/pyproject.toml index f86846de3..e99ab62bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -125,7 +125,6 @@ dev = [ "build~=1.2.2", "coverage~=7.9.1", "grpcio-tools~=1.67.1", - "livekit~=1.0.13", "pip-tools~=7.4.1", "pre-commit~=4.2.0", "pyright>=1.1.404,<1.2", diff --git a/tests/test_livekit_transport.py b/tests/test_livekit_transport.py index 1a6184d85..472d60cba 100644 --- a/tests/test_livekit_transport.py +++ b/tests/test_livekit_transport.py @@ -14,15 +14,21 @@ only starts when there is a consumer for the frames. import unittest from unittest.mock import AsyncMock, MagicMock, patch -from livekit import rtc +try: + from livekit import rtc -from pipecat.transports.livekit.transport import ( - LiveKitCallbacks, - LiveKitParams, - LiveKitTransportClient, -) + from pipecat.transports.livekit.transport import ( + LiveKitCallbacks, + LiveKitParams, + LiveKitTransportClient, + ) + + LIVEKIT_AVAILABLE = True +except ImportError: + LIVEKIT_AVAILABLE = False +@unittest.skipUnless(LIVEKIT_AVAILABLE, "livekit package not installed") class TestLiveKitVideoStreamMemoryLeak(unittest.IsolatedAsyncioTestCase): """Regression tests for video queue memory leak (#3116). diff --git a/uv.lock b/uv.lock index 374dd0576..2610e2df5 100644 --- a/uv.lock +++ b/uv.lock @@ -4462,7 +4462,6 @@ dev = [ { name = "build" }, { name = "coverage" }, { name = "grpcio-tools" }, - { name = "livekit" }, { name = "pip-tools" }, { name = "pre-commit" }, { name = "pyright" }, @@ -4601,7 +4600,6 @@ dev = [ { name = "build", specifier = "~=1.2.2" }, { name = "coverage", specifier = "~=7.9.1" }, { name = "grpcio-tools", specifier = "~=1.67.1" }, - { name = "livekit", specifier = "~=1.0.13" }, { name = "pip-tools", specifier = "~=7.4.1" }, { name = "pre-commit", specifier = "~=4.2.0" }, { name = "pyright", specifier = ">=1.1.404,<1.2" },