Skip to content

Commit c7f8bad

Browse files
authored
Merge pull request #161 from FalkorDB/copilot/move-project-from-poetry-to-uv
Migrate from Poetry to UV
2 parents 8403027 + 0d9898d commit c7f8bad

File tree

12 files changed

+3969
-6056
lines changed

12 files changed

+3969
-6056
lines changed

.github/dependabot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# package ecosystems to update and where the package manifests are located.
33
# Please see the documentation for all configuration options:
44
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
#
6+
# Note: This project uses UV for package management, but Dependabot uses the "pip"
7+
# ecosystem to read pyproject.toml (PEP 621 format) which is compatible with UV.
58

69

710
version: 2

.github/workflows/pypi-publish.yaml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,19 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v6
12-
- name: Build and publish to pypi
13-
uses: JRubics/poetry-publish@v2.1
12+
13+
- name: Set up Python
14+
uses: actions/setup-python@v6
1415
with:
15-
pypi_token: ${{ secrets.PYPI_API_TOKEN }}
16-
build_format: "sdist"
17-
ignore_dev_requirements: "yes"
16+
python-version: '3.11'
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v4
20+
21+
- name: Build package
22+
run: uv build
23+
24+
- name: Publish to PyPI
25+
env:
26+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
27+
run: uv publish

.github/workflows/sync-dependencies.yml

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

.github/workflows/test.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,11 @@ jobs:
3737
with:
3838
python-version: 3.11.0 # Update with desired Python version
3939

40-
- name: Cache Poetry virtualenv
41-
id: cache
42-
uses: actions/cache@v5
40+
- name: Install uv
41+
uses: astral-sh/setup-uv@v4
4342
with:
44-
path: ~/.poetry/virtualenvs
45-
key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}
46-
restore-keys: |
47-
${{ runner.os }}-poetry-
43+
enable-cache: true
44+
cache-dependency-glob: "uv.lock"
4845

4946
- id: "auth"
5047
uses: "google-github-actions/auth@v3"
@@ -56,13 +53,8 @@ jobs:
5653
with:
5754
version: ">= 363.0.0"
5855

59-
- name: Install Poetry
60-
if: steps.cache.outputs.cache-hit != true
61-
run: |
62-
curl -sSL https://install.python-poetry.org | python3 -
63-
6456
- name: Install dependencies
65-
run: poetry install --with test
57+
run: uv sync --extra test
6658

6759
- name: Wait for Ollama to be ready
6860
run: |
@@ -82,4 +74,4 @@ jobs:
8274
AZURE_API_VERSION: ${{ secrets.AZURE_API_VERSION }}
8375
AZURE_API_KEY: ${{ secrets.AZURE_API_KEY }}
8476
TEST_MODEL: ${{ matrix.model }} # Pass the model as an environment variable
85-
run: poetry run pytest
77+
run: uv run pytest

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ weaviate-data
1111
.deepeval_telemtry.txt
1212

1313
.claude
14+
15+
# Build artifacts
1416
dist/
17+
build/

.wordlist.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ Embeddings
4141
NLP
4242
graphrag
4343
gemini
44-
gpt
44+
gpt
45+
uv
46+
hatchling

CONTRIBUTING.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,16 @@ To set up **GraphRAG-SDK** for local development:
5252
cd GraphRAG-SDK
5353
```
5454

55-
2. Install the required dependencies:
55+
2. Install uv (if not already installed):
5656
```bash
57-
poetry install --extras "all"
57+
pip install uv
58+
# Or on macOS/Linux:
59+
# curl -LsSf https://astral.sh/uv/install.sh | sh
60+
```
61+
62+
3. Install the required dependencies:
63+
```bash
64+
uv sync --all-extras
5865
```
5966

6067
## Pull Request Guidelines
@@ -99,7 +106,7 @@ Testing is essential for ensuring code quality in **GraphRAG-SDK**. Before submi
99106
export REGION=${REGION}
100107
export OPENAI_API_KEY=${OPENAI_API_KEY}
101108
export GOOGLE_API_KEY=${GOOGLE_API_KEY}
102-
poetry run pytest
109+
uv run pytest
103110
```
104111

105112
## Thank You!

0 commit comments

Comments
 (0)