Skip to content

Commit

Permalink
Fix lint error and add GitHub workflow for Python client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
openhands-agent committed Jan 2, 2025
1 parent 8f6cb54 commit 1a5cc9a
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/python-client-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Python Client Tests

on:
push:
paths:
- 'clients/python/**'
- '.github/workflows/python-client-tests.yml'
pull_request:
paths:
- 'clients/python/**'
- '.github/workflows/python-client-tests.yml'

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v4

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

- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
working-directory: ./clients/python
run: |
poetry install
- name: Run tests
working-directory: ./clients/python
run: |
poetry run pytest tests/test_local_inference.py -v
2 changes: 1 addition & 1 deletion moondream/torch/image_crops.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import numpy as np
import torch

from typing import TypedDict, Union
from typing import TypedDict
from PIL import Image


Expand Down

0 comments on commit 1a5cc9a

Please sign in to comment.