Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
pip install --upgrade pip
pip --version
pip install build setuptools wheel
pip install -r requirements.txt
pip install -r requirements_CI.txt
chmod +x ./*.sh

# needed for bb_create e2e test
Expand Down
9 changes: 8 additions & 1 deletion install-dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@
# fail on any error
set -e

python -m pip install -r requirements.txt
# if running on the CI server, we want to install the dependencies from requirements_CI.txt instead of requirements.txt
if [ "$CI" = "true" ]; then
echo "Running on CI server, installing dependencies from requirements_CI.txt"
python -m pip install -r requirements_CI.txt
else
echo "Running locally, installing dependencies from requirements.txt"
python -m pip install -r requirements.txt
fi

./build.sh
python -m pip install --editable .
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ dependencies = [
# WebRTC dependencies
"aiohttp",
"aiohttp_cors",
# 1.11.0 currently fails to build on CI
"aiortc==1.10.1",
"aiortc",
"build",
"cachetools",
"flask-cors",
Expand Down
28 changes: 2 additions & 26 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,6 @@
# these are build dependencies for basic_bot itself

build
cachetools
flake8
mkdocs
mkdocs-material
mypy
opencv-stubs
pydoc-markdown
pytest
setuptools>=57.0

# types
types-Flask-Cors
types-jsonschema
types-psutil
types-PyYAML
types-requests

# Runtime dependencies needed for mypy type checking
-r requirements_base.txt
aiortc>=1.11.0
aiohttp
aiohttp_cors
aiortc==1.10.1
av
numpy
Pillow
websocket-client
websockets==10.4

4 changes: 4 additions & 0 deletions requirements_CI.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-r requirements_base.txt
aiortc==1.10.1
aiohttp
aiohttp_cors
26 changes: 26 additions & 0 deletions requirements_base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# these are build dependencies for basic_bot itself

build
cachetools
flake8
mkdocs
mkdocs-material
mypy
opencv-stubs
pydoc-markdown
pytest
setuptools>=57.0

# types
types-Flask-Cors
types-jsonschema
types-psutil
types-PyYAML
types-requests

# Runtime dependencies needed for mypy type checking
numpy
Pillow
websocket-client
websockets==10.4

6 changes: 5 additions & 1 deletion src/basic_bot/commons/webrtc_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,11 @@ async def respond_to_ice_candidate(self, request: web.Request) -> web.Response:
try:
await pc.addIceCandidate(self.create_RTCIceCandidate(candidate))
log.debug(f"Added ICE candidate for client_id={client_id}")
return web.Response(status=200, text="ICE candidate added")
return web.Response(
status=200,
content_type="application/json",
text=json.dumps({"text": "ICE candidate added"}),
)
except Exception as e:
log.error(f"Error adding ICE candidate for client_id={client_id}: {e}")
return web.Response(status=500, text="Failed to add ICE candidate")
Expand Down