Skip to content

Commit c6b5994

Browse files
Generate Misc tox entries via toxgen script (#3982)
- remove hardcoded entries for `loguru`, `trytond`, and `typer` from the tox template - remove them from the ignore list in `populate_tox.py` - run `populate_tox.py` to fill in entries for them - run `split_gh_tox_actions.py` to generate the CI yaml files so that they correspond to the new `tox.ini` Note that this effectively eliminates the `-latest` tests for the Misc group. The script doesn't generate any `-latest` tests since it always makes sure to add a pinned entry for the latest version. So in case all of the integrations in a single group are using the script, the whole `-latest` test category is removed. --------- Co-authored-by: Daniel Szoke <[email protected]>
1 parent 5a5a1cf commit c6b5994

File tree

6 files changed

+43
-143
lines changed

6 files changed

+43
-143
lines changed

.github/workflows/test-integrations-misc.yml

Lines changed: 0 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -22,82 +22,6 @@ env:
2222
CACHED_BUILD_PATHS: |
2323
${{ github.workspace }}/dist-serverless
2424
jobs:
25-
test-misc-latest:
26-
name: Misc (latest)
27-
timeout-minutes: 30
28-
runs-on: ${{ matrix.os }}
29-
strategy:
30-
fail-fast: false
31-
matrix:
32-
python-version: ["3.6","3.7","3.8","3.12","3.13"]
33-
# python3.6 reached EOL and is no longer being supported on
34-
# new versions of hosted runners on Github Actions
35-
# ubuntu-20.04 is the last version that supported python3.6
36-
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
37-
os: [ubuntu-20.04]
38-
steps:
39-
- uses: actions/[email protected]
40-
- uses: actions/setup-python@v5
41-
with:
42-
python-version: ${{ matrix.python-version }}
43-
allow-prereleases: true
44-
- name: Setup Test Env
45-
run: |
46-
pip install "coverage[toml]" tox
47-
- name: Erase coverage
48-
run: |
49-
coverage erase
50-
- name: Test loguru latest
51-
run: |
52-
set -x # print commands that are executed
53-
./scripts/runtox.sh "py${{ matrix.python-version }}-loguru-latest"
54-
- name: Test opentelemetry latest
55-
run: |
56-
set -x # print commands that are executed
57-
./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry-latest"
58-
- name: Test potel latest
59-
run: |
60-
set -x # print commands that are executed
61-
./scripts/runtox.sh "py${{ matrix.python-version }}-potel-latest"
62-
- name: Test pure_eval latest
63-
run: |
64-
set -x # print commands that are executed
65-
./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval-latest"
66-
- name: Test trytond latest
67-
run: |
68-
set -x # print commands that are executed
69-
./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest"
70-
- name: Test typer latest
71-
run: |
72-
set -x # print commands that are executed
73-
./scripts/runtox.sh "py${{ matrix.python-version }}-typer-latest"
74-
- name: Generate coverage XML (Python 3.6)
75-
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
76-
run: |
77-
export COVERAGE_RCFILE=.coveragerc36
78-
coverage combine .coverage-sentry-*
79-
coverage xml --ignore-errors
80-
- name: Generate coverage XML
81-
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
82-
run: |
83-
coverage combine .coverage-sentry-*
84-
coverage xml
85-
- name: Upload coverage to Codecov
86-
if: ${{ !cancelled() }}
87-
uses: codecov/[email protected]
88-
with:
89-
token: ${{ secrets.CODECOV_TOKEN }}
90-
files: coverage.xml
91-
# make sure no plugins alter our coverage reports
92-
plugin: noop
93-
verbose: true
94-
- name: Upload test results to Codecov
95-
if: ${{ !cancelled() }}
96-
uses: codecov/test-results-action@v1
97-
with:
98-
token: ${{ secrets.CODECOV_TOKEN }}
99-
files: .junitxml
100-
verbose: true
10125
test-misc-pinned:
10226
name: Misc (pinned)
10327
timeout-minutes: 30

scripts/populate_tox/config.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@
2626
"launchdarkly": {
2727
"package": "launchdarkly-server-sdk",
2828
},
29+
"loguru": {
30+
"package": "loguru",
31+
},
2932
"openfeature": {
3033
"package": "openfeature-sdk",
3134
},
@@ -41,6 +44,16 @@
4144
"*": ["httpx"],
4245
},
4346
},
47+
"trytond": {
48+
"package": "trytond",
49+
"deps": {
50+
"*": ["werkzeug"],
51+
"<=5.0": ["werkzeug<1.0"],
52+
},
53+
},
54+
"typer": {
55+
"package": "typer",
56+
},
4457
"unleash": {
4558
"package": "UnleashClient",
4659
},

scripts/populate_tox/populate_tox.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"langchain",
7979
"langchain_notiktoken",
8080
"litestar",
81-
"loguru",
8281
"openai",
8382
"openai_notiktoken",
8483
"pure_eval",
@@ -96,8 +95,6 @@
9695
"starlite",
9796
"sqlalchemy",
9897
"tornado",
99-
"trytond",
100-
"typer",
10198
}
10299

103100

scripts/populate_tox/tox.jinja

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ envlist =
169169
{py3.8,py3.11,py3.12}-litestar-v{2.12}
170170
{py3.8,py3.11,py3.12}-litestar-latest
171171

172-
# Loguru
173-
{py3.6,py3.11,py3.12}-loguru-v{0.5}
174-
{py3.6,py3.12,py3.13}-loguru-latest
175-
176172
# OpenAI
177173
{py3.9,py3.11,py3.12}-openai-v1.0
178174
{py3.9,py3.11,py3.12}-openai-v1.22
@@ -261,17 +257,6 @@ envlist =
261257
{py3.8,py3.11,py3.12}-tornado-v{6.2}
262258
{py3.8,py3.11,py3.12}-tornado-latest
263259

264-
# Trytond
265-
{py3.6}-trytond-v{4}
266-
{py3.6,py3.8}-trytond-v{5}
267-
{py3.6,py3.11}-trytond-v{6}
268-
{py3.8,py3.11,py3.12}-trytond-v{7}
269-
{py3.8,py3.12,py3.13}-trytond-latest
270-
271-
# Typer
272-
{py3.7,py3.12,py3.13}-typer-v{0.15}
273-
{py3.7,py3.12,py3.13}-typer-latest
274-
275260
# === Integrations - Auto-generated ===
276261
# These come from the populate_tox.py script. Eventually we should move all
277262
# integration tests there.
@@ -523,10 +508,6 @@ deps =
523508
litestar-v2.12: litestar~=2.12.0
524509
litestar-latest: litestar
525510
526-
# Loguru
527-
loguru-v0.5: loguru~=0.5.0
528-
loguru-latest: loguru
529-
530511
# OpenAI
531512
openai: pytest-asyncio
532513
openai-v1.0: openai~=1.0.0
@@ -679,19 +660,6 @@ deps =
679660
tornado-v6.2: tornado~=6.2.0
680661
tornado-latest: tornado
681662
682-
# Trytond
683-
trytond: werkzeug
684-
trytond-v4: werkzeug<1.0
685-
trytond-v4: trytond~=4.0
686-
trytond-v5: trytond~=5.0
687-
trytond-v6: trytond~=6.0
688-
trytond-v7: trytond~=7.0
689-
trytond-latest: trytond
690-
691-
# Typer
692-
typer-v0.15: typer~=0.15.0
693-
typer-latest: typer
694-
695663
# === Integrations - Auto-generated ===
696664
# These come from the populate_tox.py script. Eventually we should move all
697665
# integration tests there.

sentry_sdk/integrations/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ def iter_default_integrations(with_auto_enabling_integrations):
142142
"huggingface_hub": (0, 22),
143143
"langchain": (0, 0, 210),
144144
"launchdarkly": (9, 8, 0),
145+
"loguru": (0, 7, 0),
145146
"openai": (1, 0, 0),
146147
"openfeature": (0, 7, 1),
147148
"quart": (0, 16, 0),

tox.ini

Lines changed: 29 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,6 @@ envlist =
169169
{py3.8,py3.11,py3.12}-litestar-v{2.12}
170170
{py3.8,py3.11,py3.12}-litestar-latest
171171

172-
# Loguru
173-
{py3.6,py3.11,py3.12}-loguru-v{0.5}
174-
{py3.6,py3.12,py3.13}-loguru-latest
175-
176172
# OpenAI
177173
{py3.9,py3.11,py3.12}-openai-v1.0
178174
{py3.9,py3.11,py3.12}-openai-v1.22
@@ -261,17 +257,6 @@ envlist =
261257
{py3.8,py3.11,py3.12}-tornado-v{6.2}
262258
{py3.8,py3.11,py3.12}-tornado-latest
263259

264-
# Trytond
265-
{py3.6}-trytond-v{4}
266-
{py3.6,py3.8}-trytond-v{5}
267-
{py3.6,py3.11}-trytond-v{6}
268-
{py3.8,py3.11,py3.12}-trytond-v{7}
269-
{py3.8,py3.12,py3.13}-trytond-latest
270-
271-
# Typer
272-
{py3.7,py3.12,py3.13}-typer-v{0.15}
273-
{py3.7,py3.12,py3.13}-typer-latest
274-
275260
# === Integrations - Auto-generated ===
276261
# These come from the populate_tox.py script. Eventually we should move all
277262
# integration tests there.
@@ -308,6 +293,19 @@ envlist =
308293
{py3.9,py3.12,py3.13}-strawberry-v0.260.1
309294

310295

296+
# ~~~ Misc ~~~
297+
{py3.6,py3.12,py3.13}-loguru-v0.7.3
298+
299+
{py3.6}-trytond-v4.6.9
300+
{py3.6}-trytond-v4.8.18
301+
{py3.6,py3.7,py3.8}-trytond-v5.8.16
302+
{py3.8,py3.10,py3.11}-trytond-v6.8.17
303+
{py3.8,py3.11,py3.12}-trytond-v7.0.9
304+
{py3.8,py3.11,py3.12}-trytond-v7.4.5
305+
306+
{py3.7,py3.11,py3.12}-typer-v0.15.1
307+
308+
311309

312310
[testenv]
313311
deps =
@@ -545,10 +543,6 @@ deps =
545543
litestar-v2.12: litestar~=2.12.0
546544
litestar-latest: litestar
547545

548-
# Loguru
549-
loguru-v0.5: loguru~=0.5.0
550-
loguru-latest: loguru
551-
552546
# OpenAI
553547
openai: pytest-asyncio
554548
openai-v1.0: openai~=1.0.0
@@ -701,19 +695,6 @@ deps =
701695
tornado-v6.2: tornado~=6.2.0
702696
tornado-latest: tornado
703697

704-
# Trytond
705-
trytond: werkzeug
706-
trytond-v4: werkzeug<1.0
707-
trytond-v4: trytond~=4.0
708-
trytond-v5: trytond~=5.0
709-
trytond-v6: trytond~=6.0
710-
trytond-v7: trytond~=7.0
711-
trytond-latest: trytond
712-
713-
# Typer
714-
typer-v0.15: typer~=0.15.0
715-
typer-latest: typer
716-
717698
# === Integrations - Auto-generated ===
718699
# These come from the populate_tox.py script. Eventually we should move all
719700
# integration tests there.
@@ -760,6 +741,22 @@ deps =
760741
strawberry: httpx
761742

762743

744+
# ~~~ Misc ~~~
745+
loguru-v0.7.3: loguru==0.7.3
746+
747+
trytond-v4.6.9: trytond==4.6.9
748+
trytond-v4.8.18: trytond==4.8.18
749+
trytond-v5.8.16: trytond==5.8.16
750+
trytond-v6.8.17: trytond==6.8.17
751+
trytond-v7.0.9: trytond==7.0.9
752+
trytond-v7.4.5: trytond==7.4.5
753+
trytond: werkzeug
754+
trytond-v4.6.9: werkzeug<1.0
755+
trytond-v4.8.18: werkzeug<1.0
756+
757+
typer-v0.15.1: typer==0.15.1
758+
759+
763760

764761
setenv =
765762
PYTHONDONTWRITEBYTECODE=1

0 commit comments

Comments
 (0)