Skip to content

Commit 6aeb099

Browse files
committed
Migrated to uv
1 parent 2beef1a commit 6aeb099

File tree

10 files changed

+1948
-378
lines changed

10 files changed

+1948
-378
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -46,23 +46,17 @@ jobs:
4646
strategy:
4747
fail-fast: false # Do not stop when any job fails
4848
matrix:
49-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
49+
python-version: ["3.10", "3.11", "3.12", "3.13"]
5050
steps:
5151
- name: Checkout code
5252
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
5353
with:
5454
fetch-depth: 0
5555

56-
- name: Set up python
57-
id: setup-python
58-
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5
59-
with:
60-
python-version: "${{ matrix.python-version }}"
61-
62-
- name: Set up Rye
63-
uses: eifinger/setup-rye@v4
56+
- name: Install uv and set the python version
57+
uses: astral-sh/setup-uv@v5
6458
with:
65-
version: "latest"
59+
python-version: ${{ matrix.python-version }}
6660

6761
- name: Install deps & build base images
6862
run: make setup

.github/workflows/create-release.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,12 @@ jobs:
4444
- name: Edit pyproject.toml
4545
run: sed -i 's/^\(version *= *\).*$/\1"${{ env.VERSION_NUMBER }}"/' pyproject.toml
4646

47-
- name: Setup Rye
48-
uses: eifinger/setup-rye@v4
49-
with:
50-
version: "latest"
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v5
5149

5250
- name: Install dependencies
5351
run: |
54-
rye sync
55-
rye install
52+
make setup
5653
5754
- name: Configure git
5855
run: |
@@ -74,7 +71,7 @@ jobs:
7471
# build .tar.gz sdist tarball
7572
- name: Build source distribution tarball
7673
run: |
77-
rye build
74+
uv build
7875
7976
- name: Create Github Release
8077
id: github-release
@@ -88,4 +85,4 @@ jobs:
8885
dist/giskard_lmutils-*.whl
8986
9087
- name: Push to Pipy
91-
run: rye publish --username "${{ secrets.PIPY_USERNAME }}" --password "${{ secrets.PIPY_PASSWORD }} --yes"
88+
run: uv publish --username "${{ secrets.PIPY_USERNAME }}" --password "${{ secrets.PIPY_PASSWORD }}"

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12.4
1+
3.13

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ help: ## Display commands help
55
.PHONY:
66

77
setup: ## Install dependencies
8-
rye sync --all-features
8+
uv sync --all-extras
99
.PHONY: setup
1010

1111
format: ## Format code
12-
rye run black src tests
13-
rye run isort src tests --profile black
12+
uv run -- black src tests
13+
uv run -- isort src tests --profile black
1414
.PHONY: format
1515

1616
check_format: ## Check format
17-
rye run black --check src tests
18-
rye run isort --check src tests --profile black
17+
uv run -- black --check src tests
18+
uv run -- isort --check src tests --profile black
1919
.PHONY: check_format
2020

2121
check_linting: ## Check linting
22-
rye run ruff check src tests
22+
uv run -- ruff check src tests
2323
.PHONY: check_linting
2424

2525
test: ## Run tests
26-
rye run pytest tests
26+
uv run -- pytest tests
2727
.PHONY: test

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ This will install the required dependencies (`torch` and `transformers`) for run
3131

3232
### Development Installation
3333

34-
1. Install python, Rye and make
34+
1. Install python, [UV](https://github.com/astral-sh/uv) and make
3535
2. Clone this repository
3636
3. Setup the virtual environment using `make setup`
3737

pyproject.toml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
"litellm>=1.59.3",
1212
]
1313
readme = "README.md"
14-
requires-python = ">= 3.9, <3.14"
14+
requires-python = ">= 3.10, <3.14"
1515

1616
[project.optional-dependencies]
1717
local-embedding = [
@@ -23,18 +23,17 @@ local-embedding = [
2323
requires = ["hatchling"]
2424
build-backend = "hatchling.build"
2525

26-
[tool.rye]
27-
managed = true
28-
dev-dependencies = [
29-
"pytest>=8.3.5",
30-
"pytest-asyncio>=0.25.2",
31-
"black>=25.1.0",
32-
"isort>=6.0.1",
33-
"ruff>=0.11.5",
34-
]
35-
3626
[tool.hatch.metadata]
3727
allow-direct-references = true
3828

3929
[tool.hatch.build.targets.wheel]
4030
packages = ["src/giskard_lmutils"]
31+
32+
[dependency-groups]
33+
dev = [
34+
"black>=25.1.0",
35+
"isort>=6.0.1",
36+
"pytest>=8.3.5",
37+
"pytest-asyncio>=0.26.0",
38+
"ruff>=0.11.5",
39+
]

requirements-dev.lock

Lines changed: 0 additions & 174 deletions
This file was deleted.

0 commit comments

Comments
 (0)