Skip to content

Commit b9ecdde

Browse files
committed
feat: switch to uv as dependency manager
1 parent ddd2a8f commit b9ecdde

40 files changed

+826
-937
lines changed

.github/workflows/ci.yaml

Lines changed: 53 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,26 @@ jobs:
88
lint:
99
runs-on: ubuntu-latest
1010
steps:
11-
- uses: actions/checkout@v4
12-
11+
- uses: actions/checkout@v5
12+
- name: Set up Python
13+
uses: actions/setup-python@v6
14+
with:
15+
python-version: "3.12"
16+
- name: Install uv
17+
uses: astral-sh/setup-uv@v6
18+
with:
19+
enable-cache: true
20+
- name: Install the project
21+
run: uv sync --locked --all-extras --dev
1322
- name: Set up Nodejs
14-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@v6
1524
with:
16-
node-version: "20"
25+
node-version: "24"
1726
cache: "npm"
1827
cache-dependency-path: package-lock.json
19-
2028
- name: Install node dependencies
2129
run: npm ci
2230

23-
- name: Set up Python with PDM
24-
uses: pdm-project/setup-pdm@v3
25-
with:
26-
python-version: "3.11"
27-
28-
- name: Install Python dependencies
29-
run: pdm sync -d
30-
3131
- name: Lint
3232
run: npx nx run-many --target=lint
3333

@@ -59,44 +59,52 @@ jobs:
5959
SFTKIT_TEST_DB_DBNAME: "sftkit_test"
6060
SFTKIT_TEST_DB_PASSWORD: "password"
6161
steps:
62-
- uses: actions/checkout@v4
63-
62+
- uses: actions/checkout@v5
63+
- name: Set up Python
64+
uses: actions/setup-python@v6
65+
with:
66+
python-version: ${{ matrix.python-version }}
67+
- name: Install uv
68+
uses: astral-sh/setup-uv@v6
69+
with:
70+
enable-cache: true
71+
- name: Install the project
72+
run: uv sync --locked --all-extras --dev
6473
- name: Set up Nodejs
65-
uses: actions/setup-node@v4
74+
uses: actions/setup-node@v6
6675
with:
67-
node-version: "20"
76+
node-version: "24"
6877
cache: "npm"
6978
cache-dependency-path: package-lock.json
70-
7179
- name: Install node dependencies
7280
run: npm ci
7381

74-
- name: Set up Python with PDM
75-
uses: pdm-project/setup-pdm@v3
76-
with:
77-
python-version: ${{ matrix.python-version }}
78-
79-
- name: Install Python dependencies
80-
run: pdm sync -d
81-
8282
- name: Test
8383
run: npx nx run-many --target=test --projects=tag:lang:python
8484

8585
test-js:
8686
runs-on: ubuntu-latest
8787
strategy:
8888
matrix:
89-
node-version: [ 20 ]
89+
node-version: [ 24 ]
9090
steps:
91-
- uses: actions/checkout@v4
92-
91+
- uses: actions/checkout@v5
92+
- name: Set up Python
93+
uses: actions/setup-python@v6
94+
with:
95+
python-version: "3.12"
96+
- name: Install uv
97+
uses: astral-sh/setup-uv@v6
98+
with:
99+
enable-cache: true
100+
- name: Install the project
101+
run: uv sync --locked --all-extras --dev
93102
- name: Set up Nodejs
94-
uses: actions/setup-node@v4
103+
uses: actions/setup-node@v6
95104
with:
96-
node-version: ${{ matrix.node-version}}
105+
node-version: ${{ matrix.node-version }}
97106
cache: "npm"
98107
cache-dependency-path: package-lock.json
99-
100108
- name: Install node dependencies
101109
run: npm ci
102110

@@ -106,25 +114,25 @@ jobs:
106114
build:
107115
runs-on: ubuntu-latest
108116
steps:
109-
- uses: actions/checkout@v4
110-
117+
- uses: actions/checkout@v5
118+
- name: Set up Python
119+
uses: actions/setup-python@v6
120+
with:
121+
python-version: "3.12"
122+
- name: Install uv
123+
uses: astral-sh/setup-uv@v6
124+
with:
125+
enable-cache: true
126+
- name: Install the project
127+
run: uv sync --locked --all-extras --dev
111128
- name: Set up Nodejs
112-
uses: actions/setup-node@v4
129+
uses: actions/setup-node@v6
113130
with:
114-
node-version: "20"
131+
node-version: 24
115132
cache: "npm"
116133
cache-dependency-path: package-lock.json
117-
118134
- name: Install node dependencies
119135
run: npm ci
120136

121-
- name: Set up Python with PDM
122-
uses: pdm-project/setup-pdm@v3
123-
with:
124-
python-version: "3.11"
125-
126-
- name: Install Python dependencies
127-
run: pdm sync -d
128-
129137
- name: Build
130138
run: npx nx run-many --target=build

.github/workflows/publish.yaml

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,33 +10,27 @@ jobs:
1010
contents: read
1111
id-token: write
1212
steps:
13-
- uses: actions/checkout@v4
13+
- uses: actions/checkout@v5
14+
- name: Set up Python
15+
uses: actions/setup-python@v6
1416
with:
15-
fetch-depth: 0
16-
17+
python-version: "3.12"
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
enable-cache: true
22+
- name: Install the project
23+
run: uv sync --locked --all-extras --dev
1724
- name: Set up Nodejs
18-
uses: actions/setup-node@v4
25+
uses: actions/setup-node@v6
1926
with:
20-
node-version: "20"
27+
node-version: 24
2128
cache: "npm"
2229
cache-dependency-path: package-lock.json
23-
registry-url: 'https://registry.npmjs.org'
24-
25-
- name: Install node dependencies
26-
run: npm ci
27-
28-
- name: Set up Python with PDM
29-
uses: pdm-project/setup-pdm@v3
30-
with:
31-
python-version: "3.11"
32-
33-
- name: Install Python dependencies
34-
run: pdm sync -d
3530

3631
- name: Publish
3732
run: '[[ ${{ github.ref_name }} =~ ^(.*)-[0-9]+\.[0-9]+\.[0-9]+$ ]] && export PROJECT="${BASH_REMATCH[1]}" && npx nx release publish --projects $PROJECT --verbose'
3833
shell: bash
3934
env:
40-
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}
4135
NPM_CONFIG_PROVENANCE: true
4236
NPM_CONFIG_ACCESS: public

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ coverage.xml
3636
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
3737
__pypackages__/
3838

39-
# PDM
40-
.pdm-python
41-
.pdm-build
39+
# uv
4240
.venv
4341

4442
# mypy

.vscode/settings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"python.testing.unittestEnabled": false,
3+
"python.testing.pytestEnabled": true
4+
}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ Then install node dependencies via
1818
npm install
1919
```
2020

21-
To start hacking on the python parts simply use [pdm](https://pdm-project.org) to install all dependencies.
21+
To start hacking on the python parts simply use [uv](https://docs.astral.sh/uv) to install all dependencies.
2222

2323
```bash
24-
pdm install
24+
uv sync
2525
```
2626

2727
### Packages in this repo

0 commit comments

Comments
 (0)