diff --git a/scripts/populate_tox/README.md b/scripts/populate_tox/README.md index 68e72a8ca7..9bdb3567b8 100644 --- a/scripts/populate_tox/README.md +++ b/scripts/populate_tox/README.md @@ -207,5 +207,4 @@ picked (this doesn't count towards `num_versions`). "Defining constraints" section for the format. 3. Add the integration to one of the groups in the `GROUPS` dictionary in `scripts/split_tox_gh_actions/split_tox_gh_actions.py`. -4. Add the `TESTPATH` for the test suite in `tox.jinja`'s `setenv` section. -5. Run `scripts/generate-test-files.sh` and commit the changes. +4. Run `scripts/generate-test-files.sh` and commit the changes. diff --git a/scripts/populate_tox/populate_tox.py b/scripts/populate_tox/populate_tox.py index f13fa6d002..4bb4d78231 100644 --- a/scripts/populate_tox/populate_tox.py +++ b/scripts/populate_tox/populate_tox.py @@ -513,7 +513,11 @@ def _render_dependencies(integration: str, releases: list[Version]) -> list[str] def write_tox_file(packages: dict) -> None: template = ENV.get_template("tox.jinja") - context = {"groups": {}} + context = { + "groups": {}, + "testpaths": [], + } + for group, integrations in packages.items(): context["groups"][group] = [] for integration in integrations: @@ -528,6 +532,14 @@ def write_tox_file(packages: dict) -> None: ), } ) + context["testpaths"].append( + ( + integration["name"], + f"tests/integrations/{integration['integration_name']}", + ) + ) + + context["testpaths"].sort() rendered = template.render(context) @@ -759,6 +771,10 @@ def main(fail_on_changes: bool = False) -> None: "package": package, "extra": extra, "releases": test_releases, + "integration_name": TEST_SUITE_CONFIG[integration].get( + "integration_name" + ) + or integration, } ) diff --git a/scripts/populate_tox/releases.jsonl b/scripts/populate_tox/releases.jsonl index 96eb2da8e0..c68fe87734 100644 --- a/scripts/populate_tox/releases.jsonl +++ b/scripts/populate_tox/releases.jsonl @@ -46,7 +46,7 @@ {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7"], "name": "boto3", "requires_python": "", "version": "1.12.49", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.6", "version": "1.20.54", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">= 3.7", "version": "1.28.85", "yanked": false}} -{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.37", "yanked": false}} +{"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.14", "Programming Language :: Python :: 3.9"], "name": "boto3", "requires_python": ">=3.9", "version": "1.40.38", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.5", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": "", "version": "0.12.25", "yanked": false}} {"info": {"classifiers": ["Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Internet :: WWW/HTTP :: Dynamic Content :: CGI Tools/Libraries", "Topic :: Internet :: WWW/HTTP :: HTTP Servers", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware", "Topic :: Internet :: WWW/HTTP :: WSGI :: Server", "Topic :: Software Development :: Libraries :: Application Frameworks"], "name": "bottle", "requires_python": null, "version": "0.13.4", "yanked": false}} {"info": {"classifiers": ["Development Status :: 5 - Production/Stable", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Object Brokering", "Topic :: System :: Distributed Computing"], "name": "celery", "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*", "version": "4.4.7", "yanked": false}} diff --git a/scripts/populate_tox/tox.jinja b/scripts/populate_tox/tox.jinja index 039b93c42e..39d2406b84 100755 --- a/scripts/populate_tox/tox.jinja +++ b/scripts/populate_tox/tox.jinja @@ -136,69 +136,22 @@ setenv = django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings spark-v{3.0.3,3.5.6}: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64 + # TESTPATH definitions for test suites not managed by toxgen common: TESTPATH=tests gevent: TESTPATH=tests - aiohttp: TESTPATH=tests/integrations/aiohttp - anthropic: TESTPATH=tests/integrations/anthropic - ariadne: TESTPATH=tests/integrations/ariadne - arq: TESTPATH=tests/integrations/arq asgi: TESTPATH=tests/integrations/asgi - asyncpg: TESTPATH=tests/integrations/asyncpg aws_lambda: TESTPATH=tests/integrations/aws_lambda - beam: TESTPATH=tests/integrations/beam - boto3: TESTPATH=tests/integrations/boto3 - bottle: TESTPATH=tests/integrations/bottle - celery: TESTPATH=tests/integrations/celery - chalice: TESTPATH=tests/integrations/chalice - clickhouse_driver: TESTPATH=tests/integrations/clickhouse_driver - cohere: TESTPATH=tests/integrations/cohere cloud_resource_context: TESTPATH=tests/integrations/cloud_resource_context - django: TESTPATH=tests/integrations/django - dramatiq: TESTPATH=tests/integrations/dramatiq - falcon: TESTPATH=tests/integrations/falcon - fastapi: TESTPATH=tests/integrations/fastapi - flask: TESTPATH=tests/integrations/flask gcp: TESTPATH=tests/integrations/gcp - gql: TESTPATH=tests/integrations/gql - graphene: TESTPATH=tests/integrations/graphene - grpc: TESTPATH=tests/integrations/grpc - httpx: TESTPATH=tests/integrations/httpx - huey: TESTPATH=tests/integrations/huey - huggingface_hub: TESTPATH=tests/integrations/huggingface_hub - langchain-base: TESTPATH=tests/integrations/langchain - langchain-notiktoken: TESTPATH=tests/integrations/langchain - langgraph: TESTPATH=tests/integrations/langgraph - launchdarkly: TESTPATH=tests/integrations/launchdarkly - litestar: TESTPATH=tests/integrations/litestar - loguru: TESTPATH=tests/integrations/loguru - openai-base: TESTPATH=tests/integrations/openai - openai-notiktoken: TESTPATH=tests/integrations/openai - openai_agents: TESTPATH=tests/integrations/openai_agents - openfeature: TESTPATH=tests/integrations/openfeature opentelemetry: TESTPATH=tests/integrations/opentelemetry potel: TESTPATH=tests/integrations/opentelemetry - pure_eval: TESTPATH=tests/integrations/pure_eval - pymongo: TESTPATH=tests/integrations/pymongo - pyramid: TESTPATH=tests/integrations/pyramid - quart: TESTPATH=tests/integrations/quart - ray: TESTPATH=tests/integrations/ray - redis: TESTPATH=tests/integrations/redis - redis_py_cluster_legacy: TESTPATH=tests/integrations/redis_py_cluster_legacy - requests: TESTPATH=tests/integrations/requests - rq: TESTPATH=tests/integrations/rq - sanic: TESTPATH=tests/integrations/sanic - spark: TESTPATH=tests/integrations/spark - sqlalchemy: TESTPATH=tests/integrations/sqlalchemy - starlette: TESTPATH=tests/integrations/starlette - starlite: TESTPATH=tests/integrations/starlite - statsig: TESTPATH=tests/integrations/statsig - strawberry: TESTPATH=tests/integrations/strawberry - tornado: TESTPATH=tests/integrations/tornado - trytond: TESTPATH=tests/integrations/trytond - typer: TESTPATH=tests/integrations/typer - unleash: TESTPATH=tests/integrations/unleash socket: TESTPATH=tests/integrations/socket + # These TESTPATH definitions are auto-generated by toxgen + {% for integration, testpath in testpaths %} + {{ integration }}: TESTPATH={{ testpath }} + {% endfor %} + passenv = SENTRY_PYTHON_TEST_POSTGRES_HOST SENTRY_PYTHON_TEST_POSTGRES_USER diff --git a/tox.ini b/tox.ini index 8e4c6e5a36..b993397389 100644 --- a/tox.ini +++ b/tox.ini @@ -91,7 +91,7 @@ envlist = {py3.6,py3.7}-boto3-v1.12.49 {py3.6,py3.9,py3.10}-boto3-v1.20.54 {py3.7,py3.11,py3.12}-boto3-v1.28.85 - {py3.9,py3.12,py3.13}-boto3-v1.40.37 + {py3.9,py3.12,py3.13}-boto3-v1.40.38 {py3.6,py3.7,py3.8}-chalice-v1.16.0 {py3.9,py3.12,py3.13}-chalice-v1.32.0 @@ -396,7 +396,7 @@ deps = boto3-v1.12.49: boto3==1.12.49 boto3-v1.20.54: boto3==1.20.54 boto3-v1.28.85: boto3==1.28.85 - boto3-v1.40.37: boto3==1.40.37 + boto3-v1.40.38: boto3==1.40.38 {py3.7,py3.8}-boto3: urllib3<2.0.0 chalice-v1.16.0: chalice==1.16.0 @@ -713,15 +713,23 @@ setenv = django: DJANGO_SETTINGS_MODULE=tests.integrations.django.myapp.settings spark-v{3.0.3,3.5.6}: JAVA_HOME=/usr/lib/jvm/temurin-11-jdk-amd64 + # TESTPATH definitions for test suites not managed by toxgen common: TESTPATH=tests gevent: TESTPATH=tests + asgi: TESTPATH=tests/integrations/asgi + aws_lambda: TESTPATH=tests/integrations/aws_lambda + cloud_resource_context: TESTPATH=tests/integrations/cloud_resource_context + gcp: TESTPATH=tests/integrations/gcp + opentelemetry: TESTPATH=tests/integrations/opentelemetry + potel: TESTPATH=tests/integrations/opentelemetry + socket: TESTPATH=tests/integrations/socket + + # These TESTPATH definitions are auto-generated by toxgen aiohttp: TESTPATH=tests/integrations/aiohttp anthropic: TESTPATH=tests/integrations/anthropic ariadne: TESTPATH=tests/integrations/ariadne arq: TESTPATH=tests/integrations/arq - asgi: TESTPATH=tests/integrations/asgi asyncpg: TESTPATH=tests/integrations/asyncpg - aws_lambda: TESTPATH=tests/integrations/aws_lambda beam: TESTPATH=tests/integrations/beam boto3: TESTPATH=tests/integrations/boto3 bottle: TESTPATH=tests/integrations/bottle @@ -729,13 +737,11 @@ setenv = chalice: TESTPATH=tests/integrations/chalice clickhouse_driver: TESTPATH=tests/integrations/clickhouse_driver cohere: TESTPATH=tests/integrations/cohere - cloud_resource_context: TESTPATH=tests/integrations/cloud_resource_context django: TESTPATH=tests/integrations/django dramatiq: TESTPATH=tests/integrations/dramatiq falcon: TESTPATH=tests/integrations/falcon - fastapi: TESTPATH=tests/integrations/fastapi + fastapi: TESTPATH=tests/integrations/fastapi flask: TESTPATH=tests/integrations/flask - gcp: TESTPATH=tests/integrations/gcp gql: TESTPATH=tests/integrations/gql graphene: TESTPATH=tests/integrations/graphene grpc: TESTPATH=tests/integrations/grpc @@ -744,7 +750,7 @@ setenv = huggingface_hub: TESTPATH=tests/integrations/huggingface_hub langchain-base: TESTPATH=tests/integrations/langchain langchain-notiktoken: TESTPATH=tests/integrations/langchain - langgraph: TESTPATH=tests/integrations/langgraph + langgraph: TESTPATH=tests/integrations/langgraph launchdarkly: TESTPATH=tests/integrations/launchdarkly litestar: TESTPATH=tests/integrations/litestar loguru: TESTPATH=tests/integrations/loguru @@ -752,8 +758,6 @@ setenv = openai-notiktoken: TESTPATH=tests/integrations/openai openai_agents: TESTPATH=tests/integrations/openai_agents openfeature: TESTPATH=tests/integrations/openfeature - opentelemetry: TESTPATH=tests/integrations/opentelemetry - potel: TESTPATH=tests/integrations/opentelemetry pure_eval: TESTPATH=tests/integrations/pure_eval pymongo: TESTPATH=tests/integrations/pymongo pyramid: TESTPATH=tests/integrations/pyramid @@ -774,7 +778,6 @@ setenv = trytond: TESTPATH=tests/integrations/trytond typer: TESTPATH=tests/integrations/typer unleash: TESTPATH=tests/integrations/unleash - socket: TESTPATH=tests/integrations/socket passenv = SENTRY_PYTHON_TEST_POSTGRES_HOST