Skip to content

Commit d3f7ffe

Browse files
authored
chore: release 0.11.6 2 (#2779)
2 parents 9312dcc + ecc1c58 commit d3f7ffe

37 files changed

+677
-10194
lines changed

.github/workflows/code_style_checks.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: ["3.11", "3.12", "3.13"] # Adjust Python version matrix if needed
14+
python-version: ["3.11"] # Removed 3.12+ as minimal sets the standard. Adjust Python version matrix if needed
1515

1616
steps:
1717
- name: Checkout code
@@ -20,12 +20,21 @@ jobs:
2020
ref: ${{ github.head_ref }} # Checkout the PR branch
2121
fetch-depth: 0 # Fetch all history for all branches and tags
2222

23-
- name: "Setup Python, Poetry and Dependencies"
24-
uses: packetcoders/action-setup-cache-python-poetry@main
23+
- name: Set up python
24+
id: setup-python
25+
uses: actions/setup-python@v5
2526
with:
2627
python-version: ${{ matrix.python-version }}
27-
poetry-version: "2.1.3"
28-
install-args: "-E dev -E postgres -E external-tools -E tests" # Adjust as necessary
28+
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v6
31+
with:
32+
enable-cache: true
33+
activate-environment: true
34+
35+
- name: Install Dependencies
36+
run: |
37+
uv sync --extra dev --extra postgres --extra external-tools
2938
3039
- name: Validate PR Title
3140
if: github.event_name == 'pull_request'
@@ -41,10 +50,10 @@ jobs:
4150
continue-on-error: true
4251

4352
- name: Run isort
44-
run: poetry run isort --profile black --check-only --diff .
53+
run: uv run isort --profile black --check-only --diff .
4554

4655
- name: Run Black
47-
run: poetry run black --check .
56+
run: uv run black --check .
4857

4958
- name: Run Autoflake
50-
run: poetry run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .
59+
run: uv run autoflake --remove-all-unused-imports --remove-unused-variables --in-place --recursive --ignore-init-module-imports .

.github/workflows/docker-integration-tests.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,17 @@ jobs:
1313
steps:
1414
- name: Checkout
1515
uses: actions/checkout@v4
16-
- name: Python
16+
17+
- name: Set up python 3.11
18+
id: setup-python
1719
uses: actions/setup-python@v5
1820
with:
19-
python-version: '3.11'
21+
python-version: 3.11
22+
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v6
25+
with:
26+
enable-cache: true
2027

2128
- name: Set permissions for log directory
2229
run: |
@@ -34,12 +41,6 @@ jobs:
3441

3542
run: |
3643
docker compose -f dev-compose.yaml up --build -d
37-
#- name: "Setup Python, Poetry and Dependencies"
38-
# uses: packetcoders/[email protected]
39-
# with:
40-
# python-version: "3.11"
41-
# poetry-version: "1.8.2"
42-
# install-args: "--all-extras"
4344
4445
- name: Wait for service
4546
run: bash scripts/wait_for_service.sh http://localhost:8283 -- echo "Service is ready"
@@ -55,9 +56,8 @@ jobs:
5556
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
5657
PYTHONPATH: ${{ github.workspace }}:${{ env.PYTHONPATH }}
5758
run: |
58-
pipx install poetry==2.1.3
59-
poetry install -E dev -E postgres
60-
poetry run pytest -s tests/test_client.py
59+
uv sync --extra dev --extra postgres --extra sqlite
60+
uv run pytest -s tests/test_client.py
6161
6262
- name: Print docker logs if tests fail
6363
if: failure()

.github/workflows/migration-test.yml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,22 @@ jobs:
2626
- name: Checkout
2727
uses: actions/checkout@v4
2828
- run: psql -h localhost -U postgres -d postgres -c 'CREATE EXTENSION vector'
29-
- name: "Setup Python, Poetry and Dependencies"
30-
uses: packetcoders/action-setup-cache-python-poetry@main
29+
30+
- name: Set up python 3.11
31+
id: setup-python
32+
uses: actions/setup-python@v5
3133
with:
32-
python-version: "3.11"
33-
poetry-version: "1.8.2"
34-
install-args: "--all-extras"
34+
python-version: 3.11
35+
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v6
38+
with:
39+
enable-cache: true
40+
41+
- name: Install Dependencies
42+
run: |
43+
uv sync --all-extras
44+
3545
- name: Test alembic migration
3646
env:
3747
LETTA_PG_PORT: 5432
@@ -40,5 +50,5 @@ jobs:
4050
LETTA_PG_DB: postgres
4151
LETTA_PG_HOST: localhost
4252
run: |
43-
poetry run alembic upgrade head
44-
poetry run alembic check
53+
uv run alembic upgrade head
54+
uv run alembic check

.github/workflows/model-sweep.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ jobs:
6161
6262
- name: Install dependencies
6363
shell: bash
64-
run: poetry install --no-interaction --no-root ${{ inputs.install-args || '-E dev -E postgres -E external-tools -E tests -E cloud-tool-sandbox -E google' }}
64+
run: uv sync --extra dev --extra postgres --extra external-tools --extra cloud-tool-sandbox --extra google
6565
- name: Migrate database
6666
env:
6767
LETTA_PG_PORT: 5432
@@ -71,7 +71,7 @@ jobs:
7171
LETTA_PG_HOST: localhost
7272
run: |
7373
psql -h localhost -U postgres -d postgres -c 'CREATE EXTENSION vector'
74-
poetry run alembic upgrade head
74+
uv run alembic upgrade head
7575
7676
- name: Run integration tests
7777
# if any of the 1000+ test cases fail, pytest reports exit code 1 and won't procces/upload the results
@@ -94,7 +94,7 @@ jobs:
9494
DEEPSEEK_API_KEY: ${{ env.DEEPSEEK_API_KEY}}
9595
LETTA_USE_EXPERIMENTAL: 1
9696
run: |
97-
poetry run pytest \
97+
uv run pytest \
9898
-s -vv \
9999
.github/scripts/model-sweep/model_sweep.py \
100100
--json-report --json-report-file=.github/scripts/model-sweep/model_sweep_report.json --json-report-indent=4
@@ -103,7 +103,7 @@ jobs:
103103
continue-on-error: true
104104
# file path args to generate_model_sweep_markdown.py are relative to the script
105105
run: |
106-
poetry run python \
106+
uv run python \
107107
.github/scripts/model-sweep/generate_model_sweep_markdown.py \
108108
.github/scripts/model-sweep/model_sweep_report.json \
109109
.github/scripts/model-sweep/supported-models.mdx

.github/workflows/poetry-publish-nightly.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: poetry-publish-nightly
1+
name: uv-publish-nightly
22
on:
33
schedule:
44
- cron: '35 10 * * *' # 10:35am UTC, 2:35am PST, 5:35am EST
@@ -31,11 +31,17 @@ jobs:
3131
- name: Check out the repository
3232
uses: actions/checkout@v4
3333

34-
- name: "Setup Python, Poetry and Dependencies"
35-
uses: packetcoders/action-setup-cache-python-poetry@main
34+
- name: Set up python 3.12
35+
id: setup-python
36+
uses: actions/setup-python@v5
3637
with:
37-
python-version: "3.11"
38-
poetry-version: "1.7.1"
38+
python-version: 3.12
39+
40+
- name: Install uv
41+
uses: astral-sh/setup-uv@v6
42+
with:
43+
enable-cache: true
44+
activate-environment: true
3945

4046
- name: Set release version
4147
run: |
@@ -50,13 +56,10 @@ jobs:
5056
cat pyproject.toml
5157
cat letta/__init__.py
5258
53-
- name: Configure poetry
54-
env:
55-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN}}
56-
run: poetry config pypi-token.pypi "$PYPI_TOKEN"
57-
5859
- name: Build the Python package
59-
run: poetry build
60+
run: uv build
6061

6162
- name: Publish the package to PyPI
62-
run: poetry publish
63+
env:
64+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
65+
run: uv publish
Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: poetry-publish
1+
name: uv-publish
22
on:
33
release:
44
types: [published]
@@ -13,20 +13,23 @@ jobs:
1313
- name: Check out the repository
1414
uses: actions/checkout@v4
1515

16-
- name: "Setup Python, Poetry and Dependencies"
17-
uses: packetcoders/action-setup-cache-python-poetry@main
16+
- name: Set up python 3.12
17+
id: setup-python
18+
uses: actions/setup-python@v5
1819
with:
19-
python-version: "3.11"
20-
poetry-version: "1.7.1"
20+
python-version: 3.12
2121

22-
- name: Configure poetry
23-
env:
24-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
25-
run: |
26-
poetry config pypi-token.pypi "$PYPI_TOKEN"
22+
- name: Install uv
23+
uses: astral-sh/setup-uv@v6
24+
with:
25+
enable-cache: true
26+
activate-environment: true
27+
cache-dependency-glob: "uv.lock"
2728

2829
- name: Build the Python package
29-
run: poetry build
30+
run: uv build
3031

3132
- name: Publish the package to PyPI
32-
run: poetry publish
33+
env:
34+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
35+
run: uv publish

.github/workflows/send-message-integration-tests.yaml

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -100,35 +100,25 @@ jobs:
100100
uses: actions/setup-python@v5
101101
with:
102102
python-version: 3.12
103-
- name: Load cached Poetry Binary
104-
id: cached-poetry-binary
105-
uses: actions/cache@v4
106-
with:
107-
path: ~/.local
108-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-1.8.3
109-
- name: Install Poetry
110-
uses: snok/install-poetry@v1
103+
- name: Install uv
104+
uses: astral-sh/setup-uv@v4
111105
with:
112-
version: 1.8.3
113-
virtualenvs-create: true
114-
virtualenvs-in-project: true
106+
version: "latest"
115107
- name: Load cached venv
116-
id: cached-poetry-dependencies
108+
id: cached-uv-dependencies
117109
uses: actions/cache@v4
118110
with:
119111
path: .venv
120-
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}${{ inputs.install-args || '-E dev -E postgres -E external-tools -E tests -E cloud-tool-sandbox' }}
121-
# Restore cache with this prefix if not exact match with key
122-
# Note cache-hit returns false in this case, so the below step will run
112+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/uv.lock') }}
123113
restore-keys: |
124114
venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-
125115
- name: Install dependencies
126-
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
116+
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
127117
shell: bash
128-
run: poetry install --no-interaction --no-root ${{ inputs.install-args || '-E dev -E postgres -E external-tools -E tests -E cloud-tool-sandbox -E google' }}
129-
- name: Install letta packages via Poetry
118+
run: uv sync --extra dev --extra postgres --extra external-tools --extra cloud-tool-sandbox --extra google
119+
- name: Install letta packages
130120
run: |
131-
poetry run pip install --upgrade letta-client letta
121+
uv run pip install --upgrade letta-client letta
132122
- name: Migrate database
133123
env:
134124
LETTA_PG_PORT: 5432
@@ -138,7 +128,7 @@ jobs:
138128
LETTA_PG_HOST: localhost
139129
run: |
140130
psql -h localhost -U postgres -d postgres -c 'CREATE EXTENSION vector'
141-
poetry run alembic upgrade head
131+
uv run alembic upgrade head
142132
- name: Run integration tests for ${{ matrix.config_file }}
143133
env:
144134
LLM_CONFIG_FILE: ${{ matrix.config_file }}
@@ -161,7 +151,7 @@ jobs:
161151
GOOGLE_CLOUD_LOCATION: ${{ secrets.GOOGLE_CLOUD_LOCATION }}
162152
LETTA_GEMINI_FORCE_MINIMUM_THINKING_BUDGET: true
163153
run: |
164-
poetry run pytest \
154+
uv run pytest \
165155
-s -vv \
166156
tests/integration_test_send_message.py \
167157
--maxfail=1 --durations=10

.github/workflows/warn_poetry_updates.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Check Poetry Dependencies Changes
1+
name: Check uv Dependencies Changes
22

33
on:
44
pull_request:
55
paths:
6-
- 'poetry.lock'
6+
- 'uv.lock'
77
- 'pyproject.toml'
88

99
jobs:
10-
check-poetry-changes:
10+
check-uv-changes:
1111
runs-on: ubuntu-latest
1212
permissions:
1313
pull-requests: write
@@ -17,13 +17,13 @@ jobs:
1717
with:
1818
fetch-depth: 0
1919

20-
- name: Check for poetry.lock changes
21-
id: check-poetry-lock
20+
- name: Check for uv.lock changes
21+
id: check-uv-lock
2222
run: |
23-
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -q "poetry.lock"; then
24-
echo "poetry_lock_changed=true" >> $GITHUB_OUTPUT
23+
if git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep -q "uv.lock"; then
24+
echo "uv_lock_changed=true" >> $GITHUB_OUTPUT
2525
else
26-
echo "poetry_lock_changed=false" >> $GITHUB_OUTPUT
26+
echo "uv_lock_changed=false" >> $GITHUB_OUTPUT
2727
fi
2828
2929
- name: Check for pyproject.toml changes
@@ -36,19 +36,19 @@ jobs:
3636
fi
3737
3838
- name: Create PR comment
39-
if: steps.check-poetry-lock.outputs.poetry_lock_changed == 'true' || steps.check-pyproject.outputs.pyproject_changed == 'true'
39+
if: steps.check-uv-lock.outputs.uv_lock_changed == 'true' || steps.check-pyproject.outputs.pyproject_changed == 'true'
4040
uses: actions/github-script@v7
4141
with:
4242
script: |
43-
const poetryLockChanged = ${{ steps.check-poetry-lock.outputs.poetry_lock_changed }};
43+
const uvLockChanged = ${{ steps.check-uv-lock.outputs.uv_lock_changed }};
4444
const pyprojectChanged = ${{ steps.check-pyproject.outputs.pyproject_changed }};
4545
4646
let message = '📦 Dependencies Alert:\n\n';
4747
48-
if (poetryLockChanged && pyprojectChanged) {
49-
message += '- Both `poetry.lock` and `pyproject.toml` have been modified\n';
50-
} else if (poetryLockChanged) {
51-
message += '- `poetry.lock` has been modified\n';
48+
if (uvLockChanged && pyprojectChanged) {
49+
message += '- Both `uv.lock` and `pyproject.toml` have been modified\n';
50+
} else if (uvLockChanged) {
51+
message += '- `uv.lock` has been modified\n';
5252
} else if (pyprojectChanged) {
5353
message += '- `pyproject.toml` has been modified\n';
5454
}

0 commit comments

Comments
 (0)