Skip to content

Commit

Permalink
Use poetry (#9)
Browse files Browse the repository at this point in the history
* Add events to exports

* test poetry

* betterproto beta

* non interactive docker

* test deps

* wip

* Fix CI

* Use cimg image. (#11)

* Use cimg image.

* Remove unused

* Installing libs unnecessary

* fix-readme-example

* Fix poetry requirement

* Update docstring
  • Loading branch information
roznawsk authored Oct 4, 2023
1 parent 7749bdb commit 201750f
Show file tree
Hide file tree
Showing 10 changed files with 1,074 additions and 57 deletions.
23 changes: 10 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
version: 2.1

orbs:
python: circleci/python@2.1.1

executors:
machine_executor_amd64:
machine:
image: ubuntu-2204:2022.04.2
environment:
architecture: "amd64"
platform: "linux/amd64"

machine_executor_amd64:
machine:
image: ubuntu-2204:2022.04.2
environment:
architecture: "amd64"
platform: "linux/amd64"

jobs:
lint:
executor: python/default
docker:
- image: cimg/python:3.8
steps:
- checkout
- run:
name: Install python dependencies
command: pip install -r dev-requirements.txt
name: Install project dependencies
command: poetry install --no-ansi
- run:
name: Lint
command: ./pylint.sh
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,11 @@ Then define handlers for incoming messages
```python
@notifier.on_server_notification
def handle_notification(server_notification):
print(f'Received a notification: {notification}')
print(f'Received a notification: {server_notification}')

@notifier.on_metrics
def handle_metrics(metrics_report):
print(f'Received WebRTC metrics: {metrics_report.metrics}')
print(f'Received WebRTC metrics: {metrics_report}')
```

After that you can start the notifier
Expand Down
12 changes: 0 additions & 12 deletions dev-requirements.txt

This file was deleted.

7 changes: 5 additions & 2 deletions docker-compose-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,11 @@ services:
- network

test:
image: python:3.8-alpine3.18
command: sh -c "cd app/ && pip install -r dev-requirements.txt && pytest -s"
image: cimg/python:3.8
command: sh -c "cd /app && \
poetry config virtualenvs.in-project false && \
poetry install --no-ansi && \
poetry run pytest -s"
environment:
DOCKER_TEST: "TRUE"
volumes:
Expand Down
4 changes: 4 additions & 0 deletions jellyfish/_room_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ def create_room(
Returns a tuple (`jellyfish_address`, `Room`) - the address of the Jellyfish
in which the room has been created and the created `Room`
The returned address may be different from the current `RoomApi` instance.
In such case, a new `RoomApi` instance has to be created using the returned address
in order to interact with the room.
'''
room_config = RoomConfig(maxPeers=max_peers, videoCodec=video_codec)
resp = self._room_api.create_room(room_config)
Expand Down
127 changes: 127 additions & 0 deletions jellyfish/events/_protos/jellyfish/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 201750f

Please sign in to comment.