Skip to content

Commit 371aa01

Browse files
authored
Merge branch 'main' into fix/litellm-example
2 parents e1f3a6a + aa524e9 commit 371aa01

File tree

417 files changed

+54759
-3522
lines changed

Some content is hidden

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

417 files changed

+54759
-3522
lines changed

.github/workflows/issues.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ jobs:
1515
days-before-issue-stale: 7
1616
days-before-issue-close: 3
1717
stale-issue-label: "stale"
18+
exempt-issue-labels: "skip-stale"
1819
stale-issue-message: "This issue is stale because it has been open for 7 days with no activity."
1920
close-issue-message: "This issue was closed because it has been inactive for 3 days since being marked as stale."
2021
any-of-issue-labels: 'question,needs-more-info'
2122
days-before-pr-stale: 10
2223
days-before-pr-close: 7
2324
stale-pr-label: "stale"
24-
exempt-issue-labels: "skip-stale"
25+
exempt-pr-labels: "skip-stale"
2526
stale-pr-message: "This PR is stale because it has been open for 10 days with no activity."
2627
close-pr-message: "This PR was closed because it has been inactive for 7 days since being marked as stale."
2728
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
enable-cache: true
2323
- name: Install dependencies
2424
run: make sync
25+
- name: Verify formatting
26+
run: make format-check
2527
- name: Run lint
2628
run: make lint
2729

@@ -41,6 +43,15 @@ jobs:
4143

4244
tests:
4345
runs-on: ubuntu-latest
46+
strategy:
47+
fail-fast: false
48+
matrix:
49+
python-version:
50+
- "3.10"
51+
- "3.11"
52+
- "3.12"
53+
- "3.13"
54+
- "3.14"
4455
env:
4556
OPENAI_API_KEY: fake-for-tests
4657
steps:
@@ -50,6 +61,7 @@ jobs:
5061
uses: astral-sh/setup-uv@v5
5162
with:
5263
enable-cache: true
64+
python-version: ${{ matrix.python-version }}
5365
- name: Install dependencies
5466
run: make sync
5567
- name: Run tests with coverage
@@ -71,7 +83,7 @@ jobs:
7183
- name: Build docs
7284
run: make build-docs
7385

74-
old_versions:
86+
old_version_tests:
7587
runs-on: ubuntu-latest
7688
env:
7789
OPENAI_API_KEY: fake-for-tests

.github/workflows/update-docs.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: "Update Translated Docs"
2+
3+
# This GitHub Actions job automates the process of updating all translated document pages. Please note the following:
4+
# 1. The translation results may vary each time; some differences in detail are expected.
5+
# 2. When you add a new page to the left-hand menu, **make sure to manually update mkdocs.yml** to include the new item.
6+
# 3. If you switch to a different LLM (for example, from o3 to a newer model), be sure to conduct thorough testing before making the switch.
7+
8+
# To add more languages, you will update the following:
9+
# 1. Add '!docs/{lang}/**' to `on.push.paths` in this file
10+
# 2. Update mkdocs.yml to have the new language
11+
# 3. Update docs/scripts/translate_docs.py to have the new language
12+
13+
on:
14+
push:
15+
branches:
16+
- main
17+
paths:
18+
- 'docs/**'
19+
- mkdocs.yml
20+
- '!docs/ja/**'
21+
- '!docs/ko/**'
22+
- '!docs/zh/**'
23+
24+
permissions:
25+
contents: write
26+
pull-requests: write
27+
28+
jobs:
29+
update-docs:
30+
if: "!contains(github.event.head_commit.message, 'Update all translated document pages')"
31+
name: Build and Push Translated Docs
32+
runs-on: ubuntu-latest
33+
timeout-minutes: 20
34+
env:
35+
PROD_OPENAI_API_KEY: ${{ secrets.PROD_OPENAI_API_KEY }}
36+
steps:
37+
- name: Checkout repository
38+
uses: actions/checkout@v3
39+
with:
40+
fetch-depth: 0
41+
- name: Setup uv
42+
uses: astral-sh/setup-uv@v5
43+
with:
44+
enable-cache: true
45+
- name: Install dependencies
46+
run: make sync
47+
- name: Build full docs
48+
run: make build-full-docs
49+
50+
- name: Commit changes
51+
id: commit
52+
run: |
53+
git config user.name "github-actions[bot]"
54+
git config user.email "github-actions[bot]@users.noreply.github.com"
55+
git add docs/
56+
if [ -n "$(git status --porcelain)" ]; then
57+
git commit -m "Update all translated document pages"
58+
echo "committed=true" >> "$GITHUB_OUTPUT"
59+
else
60+
echo "No changes to commit"
61+
echo "committed=false" >> "$GITHUB_OUTPUT"
62+
fi
63+
64+
- name: Create Pull Request
65+
if: steps.commit.outputs.committed == 'true'
66+
uses: peter-evans/create-pull-request@v6
67+
with:
68+
commit-message: "Update all translated document pages"
69+
title: "Update all translated document pages"
70+
body: |
71+
Automated update of translated documentation.
72+
73+
Triggered by commit: [${{ github.event.head_commit.id }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.event.head_commit.id }}).
74+
Message: `${{ github.event.head_commit.message }}`
75+
branch: update-translated-docs-${{ github.run_id }}
76+
delete-branch: true

.gitignore

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ celerybeat.pid
100100
*.sage.py
101101

102102
# Environments
103-
.env
103+
.python-version
104+
.env*
104105
.venv
106+
.venv*
105107
env/
106108
venv/
107109
ENV/
@@ -143,3 +145,6 @@ cython_debug/
143145
# PyPI configuration file
144146
.pypirc
145147
.aider*
148+
149+
# Redis database files
150+
dump.rdb

.vscode/launch.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Python Debugger: Python File",
9+
"type": "debugpy",
10+
"request": "launch",
11+
"program": "${file}"
12+
}
13+
]
14+
}

Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@ format:
77
uv run ruff format
88
uv run ruff check --fix
99

10+
.PHONY: format-check
11+
format-check:
12+
uv run ruff format --check
13+
1014
.PHONY: lint
1115
lint:
1216
uv run ruff check
1317

1418
.PHONY: mypy
1519
mypy:
16-
uv run mypy .
20+
uv run mypy . --exclude site
1721

1822
.PHONY: tests
1923
tests:
@@ -35,11 +39,13 @@ snapshots-create:
3539
uv run pytest --inline-snapshot=create
3640

3741
.PHONY: old_version_tests
38-
old_version_tests:
42+
old_version_tests:
43+
UV_PROJECT_ENVIRONMENT=.venv_39 uv sync --python 3.9 --all-extras --all-packages --group dev
3944
UV_PROJECT_ENVIRONMENT=.venv_39 uv run --python 3.9 -m pytest
4045

4146
.PHONY: build-docs
4247
build-docs:
48+
uv run docs/scripts/generate_ref_files.py
4349
uv run mkdocs build
4450

4551
.PHONY: build-full-docs
@@ -55,5 +61,5 @@ serve-docs:
5561
deploy-docs:
5662
uv run mkdocs gh-deploy --force --verbose
5763

58-
59-
64+
.PHONY: check
65+
check: format-check lint mypy tests

0 commit comments

Comments
 (0)