Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions .github/workflows/bindings_python_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: astral-sh/setup-uv@v6
with:
version: "0.9.3"
enable-cache: true
- name: Install tools
run: |
pip install ruff
uv tool install ruff
- name: Check format
working-directory: "bindings/python"
run: |
ruff format . --diff
uvx ruff format . --diff
- name: Check style
working-directory: "bindings/python"
run: |
ruff check .
uvx ruff check .

test:
runs-on: ${{ matrix.os }}
Expand All @@ -86,15 +90,15 @@ jobs:
working-directory: "bindings/python"
command: build
args: --out dist --sdist
- name: Install uv
shell: bash
run: |
python -m pip install uv==0.9.3
- uses: astral-sh/setup-uv@v6
with:
version: "0.9.3"
enable-cache: true
- name: Sync dependencies
working-directory: "bindings/python"
shell: bash
run: |
uv sync --group dev --no-install-project
make install
- name: Install built wheel
working-directory: "bindings/python"
shell: bash
Expand All @@ -104,4 +108,4 @@ jobs:
working-directory: "bindings/python"
shell: bash
run: |
uv run --group dev --no-sync pytest
make test
26 changes: 26 additions & 0 deletions bindings/python/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.


install:
uv sync --group dev --no-install-project

build:
uv run maturin develop

test:
uv run --no-sync pytest
6 changes: 3 additions & 3 deletions bindings/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ pip install uv==0.9.3
Set up the development environment:

```shell
uv sync --group dev
make install
```

## Build

```shell
uv run --group dev maturin develop
make build
```

## Test

```shell
uv run --group dev pytest
make test
```
Loading