Automate browser based workflows with AI
Python aiapiautomationbrowserbrowser-automationcomputergptllmplaywrightpowerautomatepuppeteerpythonrpaseleniumvisionworkflow
ci: full speedup overhaul (concurrency, pytest-split sharding, parallel jobs, scoped pre-commit) (#5933)
Aaron Perez641f64a5d620
diff --git a/pyproject.toml b/pyproject.tomlindex dafaeac2a..855d845a0 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -190,6 +190,7 @@ dev = ["types-requests>=2.31.0.2,<3","pytest>=7.4.0,<8","pytest-asyncio>=0.21.1,<0.22",+ "pytest-split>=0.10.0,<1",# Needed by tests/unit/test_llm_handler_tracing.py which exercises the LLM# chokepoint's OTEL instrumentation. Cloud runtime also uses this via# cloud/observability/, but that ships via the `cloud` group's transitivediff --git a/tests/unit/conftest.py b/tests/unit/conftest.pyindex 5effb0103..1ca10d615 100644--- a/tests/unit/conftest.py+++ b/tests/unit/conftest.py@@ -1,9 +1,11 @@"""Shared pytest fixtures and setup for unit tests."""# -- begin speed up unit tests+import loggingfrom unittest.mock import AsyncMock, MagicMockimport pytest+import structlogfrom opentelemetry import trace as otel_tracefrom opentelemetry.sdk.trace import TracerProviderfrom opentelemetry.sdk.trace.export import SimpleSpanProcessor@@ -11,6 +13,12 @@ from opentelemetry.sdk.trace.export.in_memory_span_exporter import InMemorySpanEfrom tests.unit.force_stub_app import start_forge_stub_app+# Wire structlog through stdlib so caplog can capture log records in tests.+structlog.configure(+ wrapper_class=structlog.make_filtering_bound_logger(logging.INFO),+ logger_factory=structlog.stdlib.LoggerFactory(),+)+# NOTE(jdo): uncomment below to run tests faster, if you're targetting smth# that does not need the full app contextdiff --git a/uv.lock b/uv.lockindex b3a8e4a09..66592b02c 100644--- a/uv.lock+++ b/uv.lock@@ -4760,6 +4760,18 @@ wheels = [{ url = "https://files.pythonhosted.org/packages/9c/ce/1e4b53c213dce25d6e8b163697fbce2d43799d76fa08eea6ad270451c370/pytest_asyncio-0.21.2-py3-none-any.whl", hash = "sha256:ab664c88bb7998f711d8039cacd4884da6430886ae8bbd4eded552ed2004f16b", size = 13368, upload-time = "2024-04-29T13:23:23.126Z" },]+[[package]]+name = "pytest-split"+version = "0.11.0"+source = { registry = "https://pypi.org/simple" }+dependencies = [+ { name = "pytest" },+]+sdist = { url = "https://files.pythonhosted.org/packages/2f/16/8af4c5f2ceb3640bb1f78dfdf5c184556b10dfe9369feaaad7ff1c13f329/pytest_split-0.11.0.tar.gz", hash = "sha256:8ebdb29cc72cc962e8eb1ec07db1eeb98ab25e215ed8e3216f6b9fc7ce0ec2b5", size = 13421, upload-time = "2026-02-03T09:14:31.469Z" }+wheels = [+ { url = "https://files.pythonhosted.org/packages/ae/a1/d4423657caaa8be9b31e491592b49cebdcfd434d3e74512ce71f6ec39905/pytest_split-0.11.0-py3-none-any.whl", hash = "sha256:899d7c0f5730da91e2daf283860eb73b503259cb416851a65599368849c7f382", size = 11911, upload-time = "2026-02-03T09:14:33.708Z" },+]+[[package]]name = "python-box"version = "7.4.1"@@ -5685,6 +5697,7 @@ dev = [{ name = "pydevd-pycharm" },{ name = "pytest" },{ name = "pytest-asyncio" },+ { name = "pytest-split" },{ name = "python-pptx" },{ name = "ruff" },{ name = "twine" },@@ -5872,6 +5885,7 @@ dev = [{ name = "pydevd-pycharm", specifier = ">=233.6745.319,<234" },{ name = "pytest", specifier = ">=7.4.0,<8" },{ name = "pytest-asyncio", specifier = ">=0.21.1,<0.22" },+ { name = "pytest-split", specifier = ">=0.10.0,<1" },{ name = "python-pptx", specifier = ">=1.0.2" },{ name = "ruff", specifier = ">=0.15.12,<0.16" },{ name = "twine", specifier = ">=6.1.0,<7" },