build: move pytest/pytest-cov/pytest-mock from runtime deps to dev group (#29)

These three packages were declared in [project].dependencies, which forced every consumer that ran `pip install google-colab-cli` to also install the entire pytest test framework plus its transitive deps (coverage, iniconfig, pluggy) -- ~2.5MB of test machinery that user code never imports. The correct semantic for test dependencies is [dependency-groups].dev (PEP 735), which `uv sync` populates by default for contributors but is NOT advertised in the published wheel's metadata as a runtime requirement. Concrete impact measured by installing the resulting wheel into a fresh py3.13 venv (`uv pip install dist/*.whl`): Before: 57 packages, 200 MB site-packages After: 51 packages, 197 MB site-packages Gone: pytest, pytest-cov, pytest-mock, coverage, iniconfig, pluggy Beyond size, removing pytest from runtime deps stops dependency scanners (pipdeptree, pip-audit, dependabot, snyk) from treating pytest version pins as user-facing constraints -- previously, any downstream environment that pinned pytest 8.x for plugin compat would conflict with our floor of pytest>=9.0.2 even though no user code imports pytest. Verified: - `uv sync` + `uv run pytest tests/` -> 201 passed (dev group still installs everything contributors need) - `uv run ruff check .` -> clean - Built wheel + installed into fresh venv: no pytest/coverage/pluggy in site-packages, `colab version` works, `colab url` works (verifies #27 fragment fix is intact in the install path).

Tyler committed May 27, 2026 at 11:15 UTC 9d5f7f8e88eae409afcd204da7d6a48d229937e6
2 files changed +12 -10
pyproject.toml
+3 -3
@@ -14,9 +14,6 @@ dependencies = [
14 "prompt-toolkit>=3.0.52",
15 "pydantic>=2.12.5",
16 "pygments>=2.19.2",
17 - "pytest>=9.0.2",
18 - "pytest-cov>=7.0.0",
19 - "pytest-mock>=3.15.1",
17 "requests>=2.32.5",
18 "rich>=14.3.3",
19 "typer>=0.24.1",
@@ -48,5 +45,8 @@ jupyter-kernel-client = { git = "https://github.com/googlecolab/jupyter-kernel-c
45
46 [dependency-groups]
47 dev = [
48 + "pytest>=9.0.2",
49 + "pytest-cov>=7.0.0",
50 + "pytest-mock>=3.15.1",
51 "ruff>=0.15.6",
52 ]
uv.lock
+9 -7
@@ -315,9 +315,6 @@ dependencies = [
315 { name = "prompt-toolkit" },
316 { name = "pydantic" },
317 { name = "pygments" },
318 - { name = "pytest" },
319 - { name = "pytest-cov" },
320 - { name = "pytest-mock" },
318 { name = "requests" },
319 { name = "rich" },
320 { name = "typer" },
@@ -327,6 +324,9 @@ dependencies = [
324
325 [package.dev-dependencies]
326 dev = [
327 + { name = "pytest" },
328 + { name = "pytest-cov" },
329 + { name = "pytest-mock" },
330 { name = "ruff" },
331 ]
332
@@ -341,9 +341,6 @@ requires-dist = [
341 { name = "prompt-toolkit", specifier = ">=3.0.52" },
342 { name = "pydantic", specifier = ">=2.12.5" },
343 { name = "pygments", specifier = ">=2.19.2" },
344 - { name = "pytest", specifier = ">=9.0.2" },
345 - { name = "pytest-cov", specifier = ">=7.0.0" },
346 - { name = "pytest-mock", specifier = ">=3.15.1" },
344 { name = "requests", specifier = ">=2.32.5" },
345 { name = "rich", specifier = ">=14.3.3" },
346 { name = "typer", specifier = ">=0.24.1" },
@@ -352,7 +349,12 @@ requires-dist = [
349 ]
350
351 [package.metadata.requires-dev]
355 -dev = [{ name = "ruff", specifier = ">=0.15.6" }]
352 +dev = [
353 + { name = "pytest", specifier = ">=9.0.2" },
354 + { name = "pytest-cov", specifier = ">=7.0.0" },
355 + { name = "pytest-mock", specifier = ">=3.15.1" },
356 + { name = "ruff", specifier = ">=0.15.6" },
357 +]
358
359 [[package]]
360 name = "idna"