Skip to content

Use a script to populate parts of tox.ini #3920

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 79 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
f54a018
Use a script to populate parts of tox.ini
sentrivana Jan 13, 2025
9c829da
ignore everything for starters
sentrivana Jan 13, 2025
c365900
fix
sentrivana Jan 13, 2025
cb7a0aa
.
sentrivana Jan 13, 2025
51de6a2
add more min versions
sentrivana Jan 13, 2025
33e66b2
.
sentrivana Jan 13, 2025
153bae2
try ariadne
sentrivana Jan 13, 2025
d4d44b1
try aiohttp
sentrivana Jan 13, 2025
fbe73b8
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 13, 2025
6c2edd0
try anthropic
sentrivana Jan 13, 2025
7470a9b
.
sentrivana Jan 13, 2025
16a4ba2
?
sentrivana Jan 13, 2025
ec3d9cb
try arq
sentrivana Jan 13, 2025
04a2ab6
asyncpg
sentrivana Jan 13, 2025
b44f195
rename
sentrivana Jan 14, 2025
a1e7da7
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 14, 2025
8345859
lets see
sentrivana Jan 14, 2025
971d4ab
replicate py versions
sentrivana Jan 14, 2025
fe62214
.
sentrivana Jan 14, 2025
15fa2d2
beam
sentrivana Jan 14, 2025
e0e6b20
bottle
sentrivana Jan 14, 2025
e14f2c4
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 14, 2025
b8d29b3
try boto
sentrivana Jan 14, 2025
c6f1c65
celery
sentrivana Jan 14, 2025
97a7ae7
chalice
sentrivana Jan 16, 2025
875fa6e
clickhouse
sentrivana Jan 16, 2025
7ed6109
dramatiq
sentrivana Jan 16, 2025
5c05100
falcon
sentrivana Jan 16, 2025
267dc07
falcon fix
sentrivana Jan 16, 2025
5cff258
fastapi
sentrivana Jan 16, 2025
e392825
better py version picking
sentrivana Jan 16, 2025
30effcf
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 16, 2025
912c981
celery, flask
sentrivana Jan 16, 2025
7d45cc6
metata lol
sentrivana Jan 16, 2025
6d0ab22
lets try...
sentrivana Jan 16, 2025
f60018e
dramatiq v2
sentrivana Jan 16, 2025
c4dab11
add lower version for dramatiq
sentrivana Jan 16, 2025
1068830
huey
sentrivana Jan 16, 2025
67502e7
huggingface
sentrivana Jan 16, 2025
91ea137
whitespace
sentrivana Jan 16, 2025
fcfb731
gql, langchains
sentrivana Jan 16, 2025
37d0e25
launchdarkly, pyramid
sentrivana Jan 16, 2025
a96e1a4
pymongo
sentrivana Jan 16, 2025
ef0af89
quart, ray
sentrivana Jan 16, 2025
b37519b
try
sentrivana Jan 16, 2025
659d859
starlite, strawberry, redis_py_cluster
sentrivana Jan 16, 2025
f23c8be
unleash, typer
sentrivana Jan 16, 2025
e330704
.
sentrivana Jan 16, 2025
26638a5
fixes, hopefully
sentrivana Jan 16, 2025
bb4c84e
try
sentrivana Jan 16, 2025
beb2271
requests
sentrivana Jan 16, 2025
dca044e
tornado, sqlalchemy
sentrivana Jan 16, 2025
9f2ce18
fix
sentrivana Jan 17, 2025
9c45ece
loguru
sentrivana Jan 17, 2025
dd2a531
sanic, starlette
sentrivana Jan 17, 2025
6927592
try to fix starlette
sentrivana Jan 17, 2025
1ae16bf
graphene, spark
sentrivana Jan 17, 2025
6176ea5
grpc, openfeature, fix graphene
sentrivana Jan 17, 2025
b17e51d
.
sentrivana Jan 17, 2025
6ef2e19
aiohttp, trytond
sentrivana Jan 17, 2025
82b8a60
anthropic
sentrivana Jan 17, 2025
0adedc7
revert anthropic
sentrivana Jan 17, 2025
b0a0772
docs
sentrivana Jan 17, 2025
d7721ad
fail-on-changes
sentrivana Jan 17, 2025
057a1dc
readme
sentrivana Jan 17, 2025
5b9da4b
run split tox too
sentrivana Jan 17, 2025
10f96a7
trying something with httpx
sentrivana Jan 17, 2025
26fcd99
.
sentrivana Jan 17, 2025
ce869ec
.
sentrivana Jan 17, 2025
d9eead4
...
sentrivana Jan 17, 2025
e54e888
....
sentrivana Jan 17, 2025
8b11b74
.....?
sentrivana Jan 17, 2025
feca999
......
sentrivana Jan 17, 2025
975862c
fix path
sentrivana Jan 20, 2025
5524412
path fixes
sentrivana Jan 20, 2025
d6b4257
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 20, 2025
386d4ef
Merge branch 'master' into ivana/populate-tox-step-by-step
sentrivana Jan 20, 2025
0bf2a2b
merge master
sentrivana Jan 20, 2025
64ced2f
readme
sentrivana Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ jobs:
python-version: 3.12

- run: |
pip install -e .
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

General question (not related to this PR): Have we thought about using uv pip here? In my experience, it is much faster than pip

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #3920 (comment), we can consider this, but not in this PR.

pip install -r scripts/populate_tox/requirements.txt
pip install -r scripts/split_tox_gh_actions/requirements.txt
python scripts/populate_tox/populate_tox.py --fail-on-changes
python scripts/split_tox_gh_actions/split_tox_gh_actions.py --fail-on-changes

build_lambda_layer:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.9","3.11","3.12","3.13"]
python-version: ["3.7","3.9","3.11","3.12"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing 3.13 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #3920 (comment) (also for the other CI YAML changes)

# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-dbs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
64 changes: 0 additions & 64 deletions .github/workflows/test-integrations-flags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,70 +22,6 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-flags-latest:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please explain why we need to delete these lines (and the lines in the other files)? It is unclear to me from the PR description.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explanation here: #3974 (comment)

Basically, the script doesn't generate a -latest target anymore, just pinned versions. This is fine since it always makes sure to include the latest version out there. So if we run this script often enough (which is the plan), it effectively substitutes the -latest category.

name: Flags (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test launchdarkly latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-launchdarkly-latest"
- name: Test openfeature latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-openfeature-latest"
- name: Test unleash latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-unleash-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugin: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
test-flags-pinned:
name: Flags (pinned)
timeout-minutes: 30
Expand Down
70 changes: 1 addition & 69 deletions .github/workflows/test-integrations-graphql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,82 +22,14 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-graphql-latest:
name: GraphQL (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.8","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test ariadne latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-ariadne-latest"
- name: Test gql latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-gql-latest"
- name: Test graphene latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-graphene-latest"
- name: Test strawberry latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-strawberry-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugin: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
test-graphql-pinned:
name: GraphQL (pinned)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.7","3.8","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/test-integrations-misc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,82 +22,6 @@ env:
CACHED_BUILD_PATHS: |
${{ github.workspace }}/dist-serverless
jobs:
test-misc-latest:
name: Misc (latest)
timeout-minutes: 30
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
# see https://github.com/actions/setup-python/issues/544#issuecomment-1332535877
os: [ubuntu-20.04]
steps:
- uses: actions/[email protected]
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Setup Test Env
run: |
pip install "coverage[toml]" tox
- name: Erase coverage
run: |
coverage erase
- name: Test loguru latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-loguru-latest"
- name: Test opentelemetry latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-opentelemetry-latest"
- name: Test potel latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-potel-latest"
- name: Test pure_eval latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-pure_eval-latest"
- name: Test trytond latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-trytond-latest"
- name: Test typer latest
run: |
set -x # print commands that are executed
./scripts/runtox.sh "py${{ matrix.python-version }}-typer-latest"
- name: Generate coverage XML (Python 3.6)
if: ${{ !cancelled() && matrix.python-version == '3.6' }}
run: |
export COVERAGE_RCFILE=.coveragerc36
coverage combine .coverage-sentry-*
coverage xml --ignore-errors
- name: Generate coverage XML
if: ${{ !cancelled() && matrix.python-version != '3.6' }}
run: |
coverage combine .coverage-sentry-*
coverage xml
- name: Upload coverage to Codecov
if: ${{ !cancelled() }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
# make sure no plugins alter our coverage reports
plugin: noop
verbose: true
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: .junitxml
verbose: true
test-misc-pinned:
name: Misc (pinned)
timeout-minutes: 30
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-network.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.9","3.12","3.13"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we removing 3.8 and 3.11?

# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.10","3.11","3.12","3.13"]
python-version: ["3.7","3.8","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-integrations-web-1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-integrations-web-2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.8","3.9","3.11","3.12","3.13"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we remove versions here, but add them later in the file?

# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.6","3.7","3.8","3.9","3.11","3.12","3.13"]
python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12","3.13"]
# python3.6 reached EOL and is no longer being supported on
# new versions of hosted runners on Github Actions
# ubuntu-20.04 is the last version that supported python3.6
Expand Down
17 changes: 17 additions & 0 deletions scripts/generate-test-files.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/sh

# This script generates tox.ini and CI YAML files in one go.

set -xe

cd "$(dirname "$0")"

python -m venv .venv
. .venv/bin/activate

pip install -e ..
pip install -r populate_tox/requirements.txt
pip install -r split_tox_gh_actions/requirements.txt
Comment on lines +12 to +14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same general idea of using uv pip instead of pip (just wondering if it is possible)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It probably is possible but would be a bit of a larger overhaul. I think @antonpirker was already looking into switching to uv and was also happy about the performance. So this is something we can definitely consider.


python populate_tox/populate_tox.py
python split_tox_gh_actions/split_tox_gh_actions.py
Loading
Loading