Skip to content

Commit cdce6e7

Browse files
committed
Use vcrpy to record tests to avoid relying on real requests;
Add litellm tests to GitHub workflow.
1 parent 3ba75d5 commit cdce6e7

34 files changed

Lines changed: 33592 additions & 7 deletions

File tree

.github/workflows/loongsuite_lint_0.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,3 +146,22 @@ jobs:
146146
- name: Run tests
147147
run: tox -c tox-loongsuite.ini -e lint-util-genai
148148

149+
lint-loongsuite-instrumentation-litellm:
150+
name: LoongSuite loongsuite-instrumentation-litellm
151+
runs-on: ubuntu-latest
152+
timeout-minutes: 30
153+
steps:
154+
- name: Checkout repo @ SHA - ${{ github.sha }}
155+
uses: actions/checkout@v4
156+
157+
- name: Set up Python 3.13
158+
uses: actions/setup-python@v5
159+
with:
160+
python-version: "3.13"
161+
162+
- name: Install tox
163+
run: pip install tox-uv
164+
165+
- name: Run tests
166+
run: tox -c tox-loongsuite.ini -e lint-loongsuite-instrumentation-litellm
167+

.github/workflows/loongsuite_test_0.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,3 +1001,79 @@ jobs:
10011001
- name: Run tests
10021002
run: tox -c tox-loongsuite.ini -e pypy3-test-util-genai -- -ra
10031003

1004+
py310-test-loongsuite-instrumentation-litellm_ubuntu-latest:
1005+
name: LoongSuite loongsuite-instrumentation-litellm 3.10 Ubuntu
1006+
runs-on: ubuntu-latest
1007+
timeout-minutes: 30
1008+
steps:
1009+
- name: Checkout repo @ SHA - ${{ github.sha }}
1010+
uses: actions/checkout@v4
1011+
1012+
- name: Set up Python 3.10
1013+
uses: actions/setup-python@v5
1014+
with:
1015+
python-version: "3.10"
1016+
1017+
- name: Install tox
1018+
run: pip install tox-uv
1019+
1020+
- name: Run tests
1021+
run: tox -c tox-loongsuite.ini -e py310-test-loongsuite-instrumentation-litellm -- -ra
1022+
1023+
py311-test-loongsuite-instrumentation-litellm_ubuntu-latest:
1024+
name: LoongSuite loongsuite-instrumentation-litellm 3.11 Ubuntu
1025+
runs-on: ubuntu-latest
1026+
timeout-minutes: 30
1027+
steps:
1028+
- name: Checkout repo @ SHA - ${{ github.sha }}
1029+
uses: actions/checkout@v4
1030+
1031+
- name: Set up Python 3.11
1032+
uses: actions/setup-python@v5
1033+
with:
1034+
python-version: "3.11"
1035+
1036+
- name: Install tox
1037+
run: pip install tox-uv
1038+
1039+
- name: Run tests
1040+
run: tox -c tox-loongsuite.ini -e py311-test-loongsuite-instrumentation-litellm -- -ra
1041+
1042+
py312-test-loongsuite-instrumentation-litellm_ubuntu-latest:
1043+
name: LoongSuite loongsuite-instrumentation-litellm 3.12 Ubuntu
1044+
runs-on: ubuntu-latest
1045+
timeout-minutes: 30
1046+
steps:
1047+
- name: Checkout repo @ SHA - ${{ github.sha }}
1048+
uses: actions/checkout@v4
1049+
1050+
- name: Set up Python 3.12
1051+
uses: actions/setup-python@v5
1052+
with:
1053+
python-version: "3.12"
1054+
1055+
- name: Install tox
1056+
run: pip install tox-uv
1057+
1058+
- name: Run tests
1059+
run: tox -c tox-loongsuite.ini -e py312-test-loongsuite-instrumentation-litellm -- -ra
1060+
1061+
py313-test-loongsuite-instrumentation-litellm_ubuntu-latest:
1062+
name: LoongSuite loongsuite-instrumentation-litellm 3.13 Ubuntu
1063+
runs-on: ubuntu-latest
1064+
timeout-minutes: 30
1065+
steps:
1066+
- name: Checkout repo @ SHA - ${{ github.sha }}
1067+
uses: actions/checkout@v4
1068+
1069+
- name: Set up Python 3.13
1070+
uses: actions/setup-python@v5
1071+
with:
1072+
python-version: "3.13"
1073+
1074+
- name: Install tox
1075+
run: pip install tox-uv
1076+
1077+
- name: Run tests
1078+
run: tox -c tox-loongsuite.ini -e py313-test-loongsuite-instrumentation-litellm -- -ra
1079+

instrumentation-loongsuite/loongsuite-instrumentation-litellm/pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dynamic = ["version"]
88
description = "OpenTelemetry LiteLLM instrumentation"
99
readme = "README.rst"
1010
license = "Apache-2.0"
11-
requires-python = ">=3.8"
11+
requires-python = ">=3.10"
1212
authors = [
1313
{ name = "OpenTelemetry Authors", email = "cncf-opentelemetry-contributors@lists.cncf.io" },
1414
]
@@ -18,8 +18,6 @@ classifiers = [
1818
"License :: OSI Approved :: Apache Software License",
1919
"Programming Language :: Python",
2020
"Programming Language :: Python :: 3",
21-
"Programming Language :: Python :: 3.8",
22-
"Programming Language :: Python :: 3.9",
2321
"Programming Language :: Python :: 3.10",
2422
"Programming Language :: Python :: 3.11",
2523
"Programming Language :: Python :: 3.12",

instrumentation-loongsuite/loongsuite-instrumentation-litellm/test-requirements.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@ litellm>=1.0.0
22
pytest
33
pytest-asyncio
44
openai
5-
-e aliyun-semantic-conventions
5+
opentelemetry-test-utils
6+
vcrpy
7+
pytest-recording
68
-e util/opentelemetry-util-http
7-
-e instrumentation/opentelemetry-instrumentation-litellm
9+
-e util/opentelemetry-util-genai
10+
-e instrumentation-loongsuite/loongsuite-instrumentation-litellm
811

instrumentation-loongsuite/loongsuite-instrumentation-litellm/tests/cassettes/TestEmbedding.test_async_embedding.yaml

Lines changed: 1328 additions & 0 deletions
Large diffs are not rendered by default.

instrumentation-loongsuite/loongsuite-instrumentation-litellm/tests/cassettes/TestEmbedding.test_embedding_empty_input.yaml

Lines changed: 1240 additions & 0 deletions
Large diffs are not rendered by default.

instrumentation-loongsuite/loongsuite-instrumentation-litellm/tests/cassettes/TestEmbedding.test_embedding_with_different_models.yaml

Lines changed: 1253 additions & 0 deletions
Large diffs are not rendered by default.

instrumentation-loongsuite/loongsuite-instrumentation-litellm/tests/cassettes/TestEmbedding.test_sync_embedding_multiple_texts.yaml

Lines changed: 1270 additions & 0 deletions
Large diffs are not rendered by default.

instrumentation-loongsuite/loongsuite-instrumentation-litellm/tests/cassettes/TestEmbedding.test_sync_embedding_single_text.yaml

Lines changed: 1253 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)