Skip to content

Commit e59730b

Browse files
chore: sync repo
1 parent 1a8652d commit e59730b

File tree

1,659 files changed

+75893
-100705
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,659 files changed

+75893
-100705
lines changed

.devcontainer/Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
ARG VARIANT="3.9"
2+
FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
3+
4+
USER vscode
5+
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
8+
9+
RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc

.devcontainer/devcontainer.json

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/debian
3+
{
4+
"name": "Debian",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
"context": ".."
8+
},
9+
10+
"postStartCommand": "rye sync --all-features",
11+
12+
"customizations": {
13+
"vscode": {
14+
"extensions": [
15+
"ms-python.python"
16+
],
17+
"settings": {
18+
"terminal.integrated.shell.linux": "/bin/bash",
19+
"python.pythonPath": ".venv/bin/python",
20+
"python.defaultInterpreterPath": ".venv/bin/python",
21+
"python.typeChecking": "basic",
22+
"terminal.integrated.env.linux": {
23+
"PATH": "/home/vscode/.rye/shims:${env:PATH}"
24+
}
25+
}
26+
}
27+
},
28+
"features": {
29+
"ghcr.io/devcontainers/features/node:1": {}
30+
}
31+
32+
// Features to add to the dev container. More info: https://containers.dev/features.
33+
// "features": {},
34+
35+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
36+
// "forwardPorts": [],
37+
38+
// Configure tool-specific properties.
39+
// "customizations": {},
40+
41+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
42+
// "remoteUser": "root"
43+
}

.fernignore

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

.github/workflows/ci.yml

Lines changed: 85 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,98 @@
1-
name: ci
1+
name: CI
2+
on:
3+
push:
4+
branches-ignore:
5+
- 'generated'
6+
- 'codegen/**'
7+
- 'integrated/**'
8+
- 'stl-preview-head/**'
9+
- 'stl-preview-base/**'
10+
pull_request:
11+
branches-ignore:
12+
- 'stl-preview-head/**'
13+
- 'stl-preview-base/**'
214

3-
on: [push]
415
jobs:
5-
compile:
6-
runs-on: ubuntu-latest
16+
lint:
17+
timeout-minutes: 10
18+
name: lint
19+
runs-on: ${{ github.repository == 'stainless-sdks/letta-sdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
20+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
721
steps:
8-
- name: Checkout repo
9-
uses: actions/checkout@v3
10-
- name: Set up python
11-
uses: actions/setup-python@v4
12-
with:
13-
python-version: 3.8
14-
- name: Bootstrap poetry
22+
- uses: actions/checkout@v4
23+
24+
- name: Install Rye
1525
run: |
16-
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
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'
31+
1732
- name: Install dependencies
18-
run: poetry install
19-
- name: Compile
20-
run: poetry run mypy .
21-
test:
22-
runs-on: ubuntu-latest
33+
run: rye sync --all-features
34+
35+
- name: Run lints
36+
run: ./scripts/lint
37+
38+
build:
39+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
40+
timeout-minutes: 10
41+
name: build
42+
permissions:
43+
contents: read
44+
id-token: write
45+
runs-on: ${{ github.repository == 'stainless-sdks/letta-sdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
2346
steps:
24-
- name: Checkout repo
25-
uses: actions/checkout@v3
26-
- name: Set up python
27-
uses: actions/setup-python@v4
28-
with:
29-
python-version: 3.8
30-
- name: Bootstrap poetry
47+
- uses: actions/checkout@v4
48+
49+
- name: Install Rye
3150
run: |
32-
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
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'
56+
3357
- name: Install dependencies
34-
run: poetry install
58+
run: rye sync --all-features
3559

36-
- name: Test
37-
run: poetry run pytest -rP . --ignore=tests/custom/test_client.py
60+
- name: Run build
61+
run: rye build
3862

39-
publish:
40-
needs: [compile, test]
41-
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
42-
runs-on: ubuntu-latest
43-
steps:
44-
- name: Checkout repo
45-
uses: actions/checkout@v3
46-
- name: Set up python
47-
uses: actions/setup-python@v4
63+
- name: Get GitHub OIDC Token
64+
if: github.repository == 'stainless-sdks/letta-sdk-python'
65+
id: github-oidc
66+
uses: actions/github-script@v6
4867
with:
49-
python-version: 3.8
50-
- name: Bootstrap poetry
51-
run: |
52-
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
53-
- name: Install dependencies
54-
run: poetry install
55-
- name: Publish to pypi
68+
script: core.setOutput('github_token', await core.getIDToken());
69+
70+
- name: Upload tarball
71+
if: github.repository == 'stainless-sdks/letta-sdk-python'
72+
env:
73+
URL: https://pkg.stainless.com/s
74+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
75+
SHA: ${{ github.sha }}
76+
run: ./scripts/utils/upload-artifact.sh
77+
78+
test:
79+
timeout-minutes: 10
80+
name: test
81+
runs-on: ${{ github.repository == 'stainless-sdks/letta-sdk-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
82+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
83+
steps:
84+
- uses: actions/checkout@v4
85+
86+
- name: Install Rye
5687
run: |
57-
poetry config repositories.remote https://upload.pypi.org/legacy/
58-
poetry --no-interaction -v publish --build --repository remote --username __token__ --password "$PYPI_TOKEN"
88+
curl -sSf https://rye.astral.sh/get | bash
89+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
5990
env:
60-
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
91+
RYE_VERSION: '0.44.0'
92+
RYE_INSTALL_OPTION: '--yes'
93+
94+
- name: Bootstrap
95+
run: ./scripts/bootstrap
96+
97+
- name: Run tests
98+
run: ./scripts/test

.github/workflows/tests.yml

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

.gitignore

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1-
.mypy_cache/
2-
.ruff_cache/
3-
__pycache__/
4-
dist/
5-
poetry.toml
1+
.prism.log
2+
_dev
3+
4+
__pycache__
5+
.mypy_cache
6+
7+
dist
8+
9+
.venv
10+
.idea
11+
12+
.env
13+
.envrc
14+
codegen.log
15+
Brewfile.lock.json

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.9.18

.stats.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
configured_endpoints: 184
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/letta-ai%2Fletta-sdk-283b44f5ec292919111e3328874d393d847d7340482adfa86cfee3dacb0d1331.yml
3+
openapi_spec_hash: 6ff17b6f249c5f4e88e6e833b47f39eb
4+
config_hash: 87bc28ecbcb22a1d9f2446fde7f03ed4

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.analysis.importFormat": "relative",
3+
}

Brewfile

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

0 commit comments

Comments
 (0)