Skip to content

Commit

Permalink
Merge branch 'main' into chris/fix-coverage-checks
Browse files Browse the repository at this point in the history
  • Loading branch information
gregorybchris authored Sep 12, 2024
2 parents a465d6c + a81f2c0 commit 3537327
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/legacy_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
- "3.11"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -38,7 +38,6 @@ jobs:
shell: bash
run: |
pip install poetry
if [ -d /poetryenvs ]; then rm -rf ~/poetryenvs; fi
poetry config virtualenvs.path ~/poetryenvs
poetry install
Expand Down Expand Up @@ -66,13 +65,13 @@ jobs:
poetry run pytest tests/custom/_legacy --cov=hume --cov-report=html --cov-report=xml --cov-branch -m "(not service) and (not microphone)"
- name: Upload HTML Coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: hume-unit-coverage-html
path: hume/htmlcov

- name: Upload XML Coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: hume-unit-coverage-xml
path: hume/coverage.xml
Expand All @@ -93,10 +92,10 @@ jobs:
- "3.10"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -110,7 +109,6 @@ jobs:
shell: bash
run: |
pip install poetry
if [ -d /poetryenvs ]; then rm -rf ~/poetryenvs; fi
poetry config virtualenvs.path ~/poetryenvs
poetry install
Expand All @@ -124,13 +122,13 @@ jobs:
poetry run pytest tests/custom/_legacy --cov=hume --cov-report=html --cov-report=xml --cov-branch -m service
- name: Upload HTML Coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: hume-service-coverage-html
path: hume/htmlcov

- name: Upload XML Coverage
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: hume-service-coverage-xml
path: hume/coverage.xml
Expand All @@ -149,10 +147,10 @@ jobs:
- "3.10"

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Python ${{ matrix.python-version }} Setup
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down
2 changes: 1 addition & 1 deletion src/hume/empathic_voice/chat/socket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def __init__(

async def __aiter__(self):
async for message in self.websocket:
yield message
yield parse_obj_as(SubscribeEvent, json.loads(message)) # type: ignore

async def _send(self, data: typing.Any) -> None:
if isinstance(data, dict):
Expand Down
2 changes: 1 addition & 1 deletion src/hume/expression_measurement/stream/socket_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(

async def __aiter__(self):
async for message in self.websocket:
yield message
yield parse_obj_as(SubscribeEvent, json.loads(message)) # type: ignore

# TODO: we can likely coerce the right response model within the union here, if we're
# assuming request-response pattern and 1:1 mapping between request and response types
Expand Down

0 comments on commit 3537327

Please sign in to comment.