Skip to content

Commit 96c8be2

Browse files
authored
Include analytics protobuf (#130)
1 parent 1408fd2 commit 96c8be2

File tree

14 files changed

+540
-64
lines changed

14 files changed

+540
-64
lines changed

.github/workflows/build-api.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ name: Build API
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- livekit-api/**
9+
tags:
10+
- "api-v*.*.*"
711
pull_request:
12+
branches:
13+
- main
814
paths:
915
- livekit-api/**
1016
workflow_dispatch:
@@ -60,7 +66,6 @@ jobs:
6066
needs: [publish]
6167
uses: ./.github/workflows/build-docs.yml
6268
with:
63-
package_dir: 'livekit-api'
64-
docs_entrypoint: 'livekit-api/livekit/api'
69+
package_dir: "livekit-api"
70+
docs_entrypoint: "livekit-api/livekit/api"
6571
secrets: inherit
66-

.github/workflows/build-protocol.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ name: Build Protocol
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- livekit-protocol/**
9+
tags:
10+
- "protocol-v*.*.*"
711
pull_request:
12+
branches:
13+
- main
814
paths:
915
- livekit-protocol/**
1016
workflow_dispatch:
@@ -60,7 +66,6 @@ jobs:
6066
needs: [publish]
6167
uses: ./.github/workflows/build-docs.yml
6268
with:
63-
package_dir: 'livekit-protocol'
64-
docs_entrypoint: 'livekit-protocol/livekit/protocol'
69+
package_dir: "livekit-protocol"
70+
docs_entrypoint: "livekit-protocol/livekit/protocol"
6571
secrets: inherit
66-

.github/workflows/build-rtc.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ name: Build RTC
22

33
on:
44
push:
5+
branches:
6+
- main
57
paths:
68
- livekit-rtc/**
9+
tags:
10+
- "rtc-v*.*.*"
711
pull_request:
12+
branches:
13+
- main
814
paths:
915
- livekit-rtc/**
1016
workflow_dispatch:
@@ -95,6 +101,6 @@ jobs:
95101
needs: [publish]
96102
uses: ./.github/workflows/build-docs.yml
97103
with:
98-
package_dir: 'livekit-rtc'
99-
docs_entrypoint: 'livekit-rtc/livekit/rtc'
104+
package_dir: "livekit-rtc"
105+
docs_entrypoint: "livekit-rtc/livekit/rtc"
100106
secrets: inherit

.github/workflows/tests.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@ name: Tests
22

33
on:
44
push:
5+
branches:
6+
- main
57
pull_request:
8+
branches:
9+
- main
610
workflow_dispatch:
711

812
jobs:
913
tests:
10-
name: Run tests
14+
name: Run tests
1115
runs-on: ubuntu-latest
1216
steps:
1317
- uses: actions/checkout@v3
@@ -19,4 +23,3 @@ jobs:
1923
run: |
2024
pip3 install pytest ./livekit-protocol ./livekit-api ./livekit-rtc
2125
pytest . --ignore=livekit-rtc/rust-sks
22-

livekit-protocol/generate_proto.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
API_PROTOCOL=./protocol
2020
API_OUT_PYTHON=./livekit/protocol
21-
21+
2222
protoc \
2323
-I=$API_PROTOCOL \
2424
--python_out=$API_OUT_PYTHON \
@@ -28,7 +28,8 @@ protoc \
2828
$API_PROTOCOL/livekit_webhook.proto \
2929
$API_PROTOCOL/livekit_ingress.proto \
3030
$API_PROTOCOL/livekit_models.proto \
31-
$API_PROTOCOL/livekit_agent.proto
31+
$API_PROTOCOL/livekit_agent.proto \
32+
$API_PROTOCOL/livekit_analytics.proto
3233

3334

3435
touch -a "$API_OUT_PYTHON/__init__.py"
@@ -54,7 +55,9 @@ mv "$API_OUT_PYTHON/livekit_models_pb2.py" "$API_OUT_PYTHON/models.py"
5455
mv "$API_OUT_PYTHON/livekit_models_pb2.pyi" "$API_OUT_PYTHON/models.pyi"
5556
mv "$API_OUT_PYTHON/livekit_agent_pb2.py" "$API_OUT_PYTHON/agent.py"
5657
mv "$API_OUT_PYTHON/livekit_agent_pb2.pyi" "$API_OUT_PYTHON/agent.pyi"
58+
mv "$API_OUT_PYTHON/livekit_analytics_pb2.py" "$API_OUT_PYTHON/analytics.py"
59+
mv "$API_OUT_PYTHON/livekit_analytics_pb2.pyi" "$API_OUT_PYTHON/analytics.pyi"
5760

58-
perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_pb2))|from . $1|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi
61+
perl -i -pe 's|^(import (livekit_egress_pb2\|livekit_room_pb2\|livekit_webhook_pb2\|livekit_ingress_pb2\|livekit_models_pb2\|livekit_agent_pb2\|livekit_analytics_pb2))|from . $1|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi
5962

6063
perl -i -pe 's|livekit_(\w+)_pb2|${1}|g' "$API_OUT_PYTHON"/*.py "$API_OUT_PYTHON"/*.pyi
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
from . import agent
2+
from . import analytics
23
from . import egress
34
from . import ingress
45
from . import models
56
from . import room
67
from . import webhook
78
from .version import __version__
8-

livekit-protocol/livekit/protocol/agent.py

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

livekit-protocol/livekit/protocol/analytics.py

Lines changed: 50 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)