chore(ml): uv (#16725)

* poetry to uv

* update ci

* remove caching

* add typeshed to dev

* no need for `--non-interactive`

* move backends to extras

* oopsie

* update ci
This commit is contained in:
Mert
2025-03-09 22:30:16 -04:00
committed by GitHub
parent 573d9a7733
commit 6da77600e5
8 changed files with 2748 additions and 3834 deletions

View File

@@ -41,8 +41,8 @@ jobs:
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Install Poetry
run: pipx install poetry
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Bump version
run: misc/release/pump-version.sh -s "${{ inputs.serverBump }}" -m "${{ inputs.mobileBump }}"
@@ -74,7 +74,7 @@ jobs:
with:
app-id: ${{ secrets.PUSH_O_MATIC_APP_ID }}
private-key: ${{ secrets.PUSH_O_MATIC_APP_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:

View File

@@ -380,27 +380,28 @@ jobs:
working-directory: ./machine-learning
steps:
- uses: actions/checkout@v4
- name: Install poetry
run: pipx install poetry
- name: Install uv
uses: astral-sh/setup-uv@v5
- uses: actions/setup-python@v5
with:
python-version: 3.11
cache: 'poetry'
# TODO: add caching when supported (https://github.com/actions/setup-python/pull/818)
# with:
# python-version: 3.11
# cache: 'uv'
- name: Install dependencies
run: |
poetry install --with dev --with cpu
uv sync --extra cpu
- name: Lint with ruff
run: |
poetry run ruff check --output-format=github app export
uv run ruff check --output-format=github app export
- name: Check black formatting
run: |
poetry run black --check app export
uv run black --check app export
- name: Run mypy type checking
run: |
poetry run mypy --install-types --non-interactive --strict app/
uv run mypy --strict app/
- name: Run tests and coverage
run: |
poetry run pytest app --cov=app --cov-report term-missing
uv run pytest app --cov=app --cov-report term-missing
shellcheck:
name: ShellCheck