Skip to content

Commit e87dc30

Browse files
committed
Migrate from rye to uv for dependency management
Rye is deprecated in favor of uv (its successor from the same maintainers). Replace all rye usage with uv equivalents: - pyproject.toml: [tool.rye] → [tool.uv], merge dev-dependencies into [dependency-groups] dev, remove [tool.rye.scripts] - Shell scripts: rye run → uv run with inlined commands - CI workflows: rye install → astral-sh/setup-uv@v5 action - Dev container: install uv instead of rye - Brewfile: brew "uv" - Delete requirements.lock and requirements-dev.lock (replaced by uv.lock) - Update all docs, AI assistant configs, and cursor rules
1 parent b1f5ff8 commit e87dc30

File tree

24 files changed

+400
-957
lines changed

24 files changed

+400
-957
lines changed

.claude/settings.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"allow": [
44
"WebSearch",
55
"WebFetch(domain:docs.temporal.io)",
6-
"Bash(rye run pytest:*)",
7-
"Bash(rye run lint:*)",
8-
"Bash(rye run typecheck:*)",
9-
"Bash(rye run sync:*)",
10-
"Bash(rye run build:*)"
6+
"Bash(uv run pytest:*)",
7+
"Bash(uv run ruff:*)",
8+
"Bash(uv run pyright:*)",
9+
"Bash(uv sync:*)",
10+
"Bash(uv build:*)"
1111
],
1212
"deny": [],
1313
"ask": []
1414
}
15-
}
15+
}

.cursor/rules/00_repo_tooling.mdc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ globs: "**/*"
44
alwaysApply: true
55
---
66

7-
Use Rye for Python dependency management and workflows. Prefer these commands:
7+
Use uv for Python dependency management and workflows. Prefer these commands:
88

9-
- Setup env: `./scripts/bootstrap` or `rye sync --all-features` [[Use Rye in this repo]]
10-
- Run tests: `rye run pytest` or `./scripts/test`
11-
- Run a specific test: `rye run pytest path/to/test_file.py::TestClass::test_method -v`
12-
- Format: `rye run format` or `./scripts/format`
13-
- Lint: `rye run lint` or `./scripts/lint`
14-
- Type check: `rye run typecheck` (runs pyright and mypy)
15-
- Build: `rye build`
9+
- Setup env: `./scripts/bootstrap` or `uv sync --all-groups`
10+
- Run tests: `uv run pytest` or `./scripts/test`
11+
- Run a specific test: `uv run pytest path/to/test_file.py::TestClass::test_method -v`
12+
- Format: `uv run ruff format` or `./scripts/format`
13+
- Lint: `uv run ruff check .` or `./scripts/lint`
14+
- Type check: `uv run pyright`
15+
- Build: `uv build`
1616

1717
Environment requirements:
1818

@@ -21,4 +21,4 @@ Environment requirements:
2121

2222
Notes:
2323

24-
- Only use `uv` inside of tutorial folders which have their own virtualenv (managed by a tutorial specific pyproject.toml inside the relevant tutorial folder). Otherwise use rye at the top level.
24+
- Tutorial folders have their own virtualenv (managed by a tutorial specific pyproject.toml inside the relevant tutorial folder). Use `uv run` within those folders.

.cursor/rules/05_permissions_and_tools.mdc

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ When invoking external tools or the terminal, follow these constraints:
88

99
- Web search is allowed when needed for docs and references
1010
- Prefer fetching docs from `docs.temporal.io` when researching Temporal topics
11-
- Allowed bash commands should go through Rye workflows:
12-
- `rye run pytest:*`
13-
- `rye run lint:*`
14-
- `rye run typecheck:*`
15-
- `rye run sync:*`
16-
- `rye run build:*`
11+
- Allowed bash commands should go through uv workflows:
12+
- `uv run pytest`
13+
- `uv run ruff check .`
14+
- `uv run pyright`
15+
- `uv sync`
16+
- `uv build`
1717

18-
Default to Rye; only use other tools when explicitly required by the codebase.
18+
Default to uv; only use other tools when explicitly required by the codebase.

.cursor/rules/50_tests_and_mocking.mdc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ alwaysApply: true
66

77
Testing:
88

9-
- Run tests with `rye run pytest` or `./scripts/test`
10-
- To run a specific test: `rye run pytest path/to/test_file.py::TestClass::test_method -v`
9+
- Run tests with `uv run pytest` or `./scripts/test`
10+
- To run a specific test: `uv run pytest path/to/test_file.py::TestClass::test_method -v`
1111
- A mock server is automatically started for tests on port 4010
1212

1313
When writing tests:

.cursor/rules/60_style_lint_typecheck.mdc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ alwaysApply: true
66

77
Standards:
88

9-
- Format code via `rye run format` or `./scripts/format`
10-
- Lint via `rye run lint` or `./scripts/lint`
11-
- Type check via `rye run typecheck` (pyright + mypy)
9+
- Format code via `uv run ruff format` or `./scripts/format`
10+
- Lint via `uv run ruff check .` or `./scripts/lint`
11+
- Type check via `uv run pyright`
1212

1313
Guidance:
1414

.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
33

44
USER vscode
55

6-
RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash
7-
ENV PATH=/home/vscode/.rye/shims:$PATH
6+
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
87

98
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,18 @@
77
"context": ".."
88
},
99

10-
"postStartCommand": "rye sync --all-features",
10+
"postStartCommand": "uv sync --all-groups",
1111

1212
"customizations": {
1313
"vscode": {
1414
"extensions": [
1515
"ms-python.python"
1616
],
17-
"settings": {
17+
"settings": {
1818
"terminal.integrated.shell.linux": "/bin/bash",
1919
"python.pythonPath": ".venv/bin/python",
2020
"python.defaultInterpreterPath": ".venv/bin/python",
21-
"python.typeChecking": "basic",
22-
"terminal.integrated.env.linux": {
23-
"PATH": "/home/vscode/.rye/shims:${env:PATH}"
24-
}
21+
"python.typeChecking": "basic"
2522
}
2623
}
2724
},

.github/workflows/ci.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,11 @@ jobs:
2121
steps:
2222
- uses: actions/checkout@v6
2323

24-
- name: Install Rye
25-
run: |
26-
curl -sSf https://rye.astral.sh/get | bash
27-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
28-
env:
29-
RYE_VERSION: '0.44.0'
30-
RYE_INSTALL_OPTION: '--yes'
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v5
3126

3227
- name: Install dependencies
33-
run: rye sync --all-features
28+
run: uv sync --all-groups
3429

3530
- name: Run lints
3631
run: ./scripts/lint
@@ -46,19 +41,14 @@ jobs:
4641
steps:
4742
- uses: actions/checkout@v6
4843

49-
- name: Install Rye
50-
run: |
51-
curl -sSf https://rye.astral.sh/get | bash
52-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
53-
env:
54-
RYE_VERSION: '0.44.0'
55-
RYE_INSTALL_OPTION: '--yes'
44+
- name: Install uv
45+
uses: astral-sh/setup-uv@v5
5646

5747
- name: Install dependencies
58-
run: rye sync --all-features
48+
run: uv sync --all-groups
5949

6050
- name: Run build
61-
run: rye build
51+
run: uv build
6252

6353
- name: Get GitHub OIDC Token
6454
if: github.repository == 'stainless-sdks/agentex-sdk-python'
@@ -83,13 +73,8 @@ jobs:
8373
steps:
8474
- uses: actions/checkout@v6
8575

86-
- name: Install Rye
87-
run: |
88-
curl -sSf https://rye.astral.sh/get | bash
89-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
90-
env:
91-
RYE_VERSION: '0.44.0'
92-
RYE_INSTALL_OPTION: '--yes'
76+
- name: Install uv
77+
uses: astral-sh/setup-uv@v5
9378

9479
- name: Bootstrap
9580
run: ./scripts/bootstrap

.github/workflows/publish-pypi.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@ jobs:
1616
steps:
1717
- uses: actions/checkout@v6
1818

19-
- name: Install Rye
20-
run: |
21-
curl -sSf https://rye.astral.sh/get | bash
22-
echo "$HOME/.rye/shims" >> $GITHUB_PATH
23-
env:
24-
RYE_VERSION: "0.44.0"
25-
RYE_INSTALL_OPTION: "--yes"
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v5
2621

2722
- name: Publish to PyPI
2823
run: |

Brewfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
brew "rye"
2-
1+
brew "uv"

0 commit comments

Comments
 (0)