Skip to content

Commit 6b66fe4

Browse files
committed
Add subproject to top-level project build mechanism.
1 parent 3ee8dd1 commit 6b66fe4

File tree

5 files changed

+82
-3
lines changed

5 files changed

+82
-3
lines changed

eachdist.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ packages=
5050
opentelemetry-resource-detector-azure
5151
opentelemetry-sdk-extension-aws
5252
opentelemetry-propagator-aws-xray
53+
opentelemetry-instrumentation-google-genai
5354
opentelemetry-instrumentation-vertexai
5455
opentelemetry-instrumentation-openai-v2
5556
opentelemetry-instrumentation-test

instrumentation-genai/opentelemetry-instrumentation-google-genai/pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ classifiers = [
3737
"Programming Language :: Python :: 3.12"
3838
]
3939
dependencies = [
40-
"opentelemetry-api ~= 1.30.0",
41-
"opentelemetry-instrumentation ~= 0.51b0",
42-
"opentelemetry-semantic-conventions ~= 0.51b0"
40+
"opentelemetry-api >=1.30.0, <2",
41+
"opentelemetry-instrumentation >=0.51b0, <2",
42+
"opentelemetry-semantic-conventions >=0.51b0, <2"
4343
]
4444

4545
[project.optional-dependencies]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
16+
# This variant of the requirements aims to test the system using
17+
# the newest supported version of external depenendencies.
18+
19+
pytest==7.4.4
20+
pytest-asyncio==0.21.0
21+
pytest-vcr==1.0.2
22+
23+
google-auth ~= 2.38.0
24+
google-genai ~= 1.0.0
25+
opentelemetry-api ~= 1.30.0
26+
opentelemetry-sdk ~= 1.30.0
27+
opentelemetry-semantic-conventions ~= 0.51b0
28+
opentelemetry-instrumentation ~=0.51b0
29+
30+
# Install locally from the folder. This path is relative to the
31+
# root directory, given invocation from "tox" at root level.
32+
-e instrumentation-genai/opentelemetry-instrumentation-google-genai
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright The OpenTelemetry Authors
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# This variant of the requirements aims to test the system using
16+
# the oldest supported version of external depenendencies.
17+
18+
pytest==7.4.4
19+
pytest-asyncio==0.21.0
20+
pytest-vcr==1.0.2
21+
22+
google-auth==2.15.0
23+
google-genai==1.0.0
24+
opentelemetry-api==1.30.0
25+
opentelemetry-sdk==1.30.0
26+
opentelemetry-semantic-conventions==0.51b0
27+
opentelemetry-instrumentation==0.51b0
28+
29+
# Install locally from the folder. This path is relative to the
30+
# root directory, given invocation from "tox" at root level.
31+
-e instrumentation-genai/opentelemetry-instrumentation-google-genai

tox.ini

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ envlist =
1919
# pypy3-test-instrumentation-vertexai-{0,1}
2020
lint-instrumentation-vertexai
2121

22+
; instrumentation-google-genai
23+
py3{9, 10,11,12,13}-test-instrumentation-google-genai-{old-deps,recent-deps}
24+
# Disabling pypy3 as shapely does not have wheels and fails to compile
25+
# pypy3-test-instrumentation-google-genai-{0,1}
26+
lint-instrumentation-google-genai
27+
2228
; opentelemetry-resource-detector-container
2329
py3{8,9,10,11,12,13}-test-resource-detector-container
2430
pypy3-test-resource-detector-container
@@ -451,6 +457,11 @@ deps =
451457
vertexai-1: -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai/test-requirements-1.txt
452458
lint-instrumentation-vertexai: -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai/test-requirements-0.txt
453459

460+
google-genai-old-deps: -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/requirements.oldest.txt
461+
google-genai-recent-deps: {[testenv]test_deps}
462+
google-genai-recent-deps: -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/requirements.latest.txt
463+
lint-instrumentation-google-genai: -r {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests/requirements.latest.txt
464+
454465
asgi: {[testenv]test_deps}
455466
asgi: -r {toxinidir}/instrumentation/opentelemetry-instrumentation-asgi/test-requirements.txt
456467

@@ -814,6 +825,9 @@ commands =
814825
test-instrumentation-vertexai: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai/tests --vcr-record=none {posargs}
815826
lint-instrumentation-vertexai: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-vertexai"
816827

828+
test-instrumentation-google-genai: pytest {toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests -o pythonpath={toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai/tests --vcr-record=none {posargs}
829+
lint-instrumentation-google-genai: sh -c "cd instrumentation-genai && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-google-genai"
830+
817831
test-instrumentation-sio-pika: pytest {toxinidir}/instrumentation/opentelemetry-instrumentation-pika/tests {posargs}
818832
lint-instrumentation-sio-pika: sh -c "cd instrumentation && pylint --rcfile ../.pylintrc opentelemetry-instrumentation-pika"
819833

@@ -1024,5 +1038,6 @@ deps =
10241038
{toxinidir}/opentelemetry-instrumentation
10251039
{toxinidir}/util/opentelemetry-util-http
10261040
{toxinidir}/instrumentation-genai/opentelemetry-instrumentation-vertexai[instruments]
1041+
{toxinidir}/instrumentation-genai/opentelemetry-instrumentation-google-genai[instruments]
10271042
commands =
10281043
pyright

0 commit comments

Comments
 (0)