Skip to content

Commit

Permalink
Implement transformers pipeline tasks as an LLM plugin.
Browse files Browse the repository at this point in the history
Merge branch 'dev'
  • Loading branch information
rectalogic committed Oct 3, 2024
2 parents 910ee53 + 0bc4700 commit 65c373a
Show file tree
Hide file tree
Showing 15 changed files with 2,705 additions and 58 deletions.
37 changes: 11 additions & 26 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,44 +8,29 @@ permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e '.[test]'
- name: Run tests
run: |
python -m pytest
call-test:
uses: ./.github/workflows/test.yml
deploy:
runs-on: ubuntu-latest
needs: [test]
needs: [call-test]
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install setuptools wheel build
run: uv sync --all-extras --dev --python 3.12 --python-preference only-system
- name: Build
run: |
python -m build
uv build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
25 changes: 17 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push, pull_request]
on: [push, pull_request, workflow_call]

permissions:
contents: read
Expand All @@ -9,19 +9,28 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.12"]
marker: ["not llm", "llm0", "llm1", "llm2", "llm3"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v2
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Install Ubuntu packages
if: ${{ matrix.marker != 'not llm' }}
run: sudo apt install -y ffmpeg tesseract-ocr
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
pip install -e '.[test]'
run: uv sync --all-extras --dev --python ${{ matrix.python-version }} --python-preference only-system
- name: Run tests
run: |
python -m pytest
run: uv run pytest -m "${{ matrix.marker }}" tests
- name: Lint
if: ${{ matrix.marker == 'not llm' }}
run: uv run ruff check && uv run ruff format --check
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.12
Loading

0 comments on commit 65c373a

Please sign in to comment.