From db8e9f703dcd8c66bbcf7f002e74df818b6267e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 20 Jan 2025 08:49:30 -0800 Subject: [PATCH 1/2] github: remove test-requirements.txt --- .github/workflows/tests.yaml | 9 +++++---- README.md | 8 +++++++- pyproject.toml | 2 +- test-requirements.txt | 29 ----------------------------- 4 files changed, 13 insertions(+), 35 deletions(-) delete mode 100644 test-requirements.txt diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index b806efad4..eb9329a03 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -30,9 +30,9 @@ jobs: - name: Cache virtual environment uses: actions/cache@v3 with: - # We are hashing dev-requirements.txt and test-requirements.txt which - # contain all dependencies needed to run the tests. - key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('test-requirements.txt') }} + # We are hashing dev-requirements.txt and pyproject.toml which contain + # all dependencies needed to run the tests. + key: venv-${{ runner.os }}-${{ steps.setup_python.outputs.python-version}}-${{ hashFiles('dev-requirements.txt') }}-${{ hashFiles('pyproject.toml') }} path: .venv - name: Install system packages id: install_system_packages @@ -45,7 +45,8 @@ jobs: run: | source .venv/bin/activate python -m pip install --upgrade pip - pip install -r dev-requirements.txt -r test-requirements.txt + pip install -r dev-requirements.txt + pip install ".[all]" - name: Test with pytest run: | source .venv/bin/activate diff --git a/README.md b/README.md index 52c6f831b..537a49214 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,13 @@ pip install "path_to_this_repo[option,...]" ### Running tests -From the root directory, run: +Make sure you have all the dependencies installed: + +```shell +pip install --editable ".[all]" +``` + +Then, from the root directory, run: ```shell pytest --doctest-modules --ignore-glob="*to_be_updated*" --ignore-glob=*pipeline_source* src tests diff --git a/pyproject.toml b/pyproject.toml index 38bf6d902..4660bca19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,7 +28,7 @@ dependencies = [ "loguru~=0.7.3", "Markdown~=3.7", "numpy~=1.26.4", - "Pillow~=11.1.0", + "Pillow~=10.4.0", "protobuf~=5.29.3", "pydantic~=2.10.5", "pyloudnorm~=0.1.1", diff --git a/test-requirements.txt b/test-requirements.txt deleted file mode 100644 index f974121b0..000000000 --- a/test-requirements.txt +++ /dev/null @@ -1,29 +0,0 @@ -aiohttp~=3.10.3 -anthropic~=0.30.0 -azure-cognitiveservices-speech~=1.40.0 -boto3~=1.35.27 -daily-python~=0.11.0 -deepgram-sdk~=3.5.0 -fal-client~=0.4.1 -fastapi~=0.115.0 -faster-whisper~=1.0.3 -google-cloud-texttospeech~=2.21.1 -google-generativeai~=0.8.3 -langchain~=0.2.14 -livekit~=0.13.1 -lmnt~=1.1.4 -loguru~=0.7.2 -numpy~=1.26.4 -openai~=1.37.2 -openpipe~=4.24.0 -Pillow~=10.4.0 -pyaudio~=0.2.14 -pydantic~=2.8.2 -pyloudnorm~=0.1.1 -pyht~=0.1.4 -python-dotenv~=1.0.1 -resampy~=0.4.3 -silero-vad~=5.1 -together~=1.2.7 -transformers~=4.44.0 -websockets~=13.1 From 0d400ae4a57e02984d880a62e1483259e719ad9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleix=20Conchillo=20Flaqu=C3=A9?= Date: Mon, 20 Jan 2025 14:29:34 -0800 Subject: [PATCH 2/2] pyproject: add "all" dependency --- pyproject.toml | 46 +++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 4660bca19..31efc0110 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -40,6 +40,50 @@ Source = "https://github.com/pipecat-ai/pipecat" Website = "https://pipecat.ai" [project.optional-dependencies] +# Update this list if you add a new service. +all = [ + "pipecat-ai[anthropic]", + "pipecat-ai[assemblyai]", + "pipecat-ai[aws]", + "pipecat-ai[azure]", + "pipecat-ai[canonical]", + "pipecat-ai[cartesia]", + "pipecat-ai[cerebras]", + "pipecat-ai[deepseek]", + "pipecat-ai[daily]", + "pipecat-ai[deepgram]", + "pipecat-ai[elevenlabs]", + "pipecat-ai[fal]", + "pipecat-ai[fish]", + "pipecat-ai[gladia]", + "pipecat-ai[google]", + "pipecat-ai[grok]", + "pipecat-ai[groq]", + # GStreamer might require system libraries, so we leave that to the user. + # "pipecat-ai[gstreamer]", + "pipecat-ai[fireworks]", + # Krisp requires an external SDK, so we leave that to the user. + # "pipecat-ai[krisp]", + "pipecat-ai[koala]", + "pipecat-ai[langchain]", + "pipecat-ai[livekit]", + "pipecat-ai[local]", + "pipecat-ai[lmnt]", + "pipecat-ai[moondream]", + "pipecat-ai[nim]", + "pipecat-ai[noisereduce]", + "pipecat-ai[openai]", + "pipecat-ai[openpipe]", + "pipecat-ai[openrouter]", + "pipecat-ai[playht]", + "pipecat-ai[riva]", + "pipecat-ai[silero]", + "pipecat-ai[simli]", + "pipecat-ai[soundfile]", + "pipecat-ai[together]", + "pipecat-ai[websocket]", + "pipecat-ai[whisper]" +] anthropic = [ "anthropic~=0.39.0" ] assemblyai = [ "assemblyai~=0.36.0" ] aws = [ "boto3~=1.35.99" ] @@ -70,6 +114,7 @@ nim = [ "openai~=1.59.6" ] noisereduce = [ "noisereduce~=3.0.3" ] openai = [ "openai~=1.59.6", "websockets~=13.1", "python-deepcompare~=2.1.0" ] openpipe = [ "openpipe~=4.43.0" ] +openrouter = [ "openai~=1.59.6" ] playht = [ "pyht~=0.1.6", "websockets~=13.1" ] riva = [ "nvidia-riva-client~=2.18.0" ] silero = [ "onnxruntime~=1.20.1" ] @@ -78,7 +123,6 @@ soundfile = [ "soundfile~=0.13.0" ] together = [ "openai~=1.59.6" ] websocket = [ "websockets~=13.1", "fastapi~=0.115.6" ] whisper = [ "faster-whisper~=1.1.1" ] -openrouter = [ "openai~=1.59.6" ] [tool.setuptools.packages.find] # All the following settings are optional: