From 97daa62f3e7082601c54779107e34ab8b3b87458 Mon Sep 17 00:00:00 2001 From: gabriel Date: Sun, 5 Jul 2026 16:25:32 +0200 Subject: [PATCH] chore: move test dependencies from extra to dependency group MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit pytest & co. lived in the [project.optional-dependencies] test extra, so a plain `uv run pytest` did not install them and silently fell back to any pytest on PATH — running the tests against whatever opendisplay that interpreter could import instead of the current tree. As a dependency group included in dev, they are synced by default. No workflow changes needed: test.yml/lint.yml sync the dev group by default, and the test extra was never referenced by name. --- pyproject.toml | 15 ++++++++------- uv.lock | 40 ++++++++++++++++++++++++++-------------- 2 files changed, 34 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 10cdeaf..8e29112 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,13 +48,6 @@ nrf-ota = [ silabs-ota = [ "silabs-ble-ota>=0.1.0", ] -test = [ - "pytest>=9.0.2", - "pytest-asyncio>=1.3.0", - "pytest-cov>=7.0.0", - "pytest-xdist>=3.8.0", - "hypothesis>=6.148.8", -] [project.urls] Homepage = "https://opendisplay.org" @@ -123,4 +116,12 @@ dev = [ "ruff>=0.14.10", "prek>=0.3.4", "pylint>=4.0.5", + { include-group = "test" }, +] +test = [ + "pytest>=9.0.2", + "pytest-asyncio>=1.3.0", + "pytest-cov>=7.0.0", + "pytest-xdist>=3.8.0", + "hypothesis>=6.148.8", ] diff --git a/uv.lock b/uv.lock index a3b82e4..2e9e8fc 100644 --- a/uv.lock +++ b/uv.lock @@ -109,7 +109,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "aiooui" }, { name = "bleak" }, - { name = "dbus-fast" }, + { name = "dbus-fast", marker = "sys_platform == 'linux'" }, { name = "uart-devices" }, { name = "usb-devices" }, ] @@ -914,21 +914,26 @@ nrf-ota = [ silabs-ota = [ { name = "silabs-ble-ota" }, ] -test = [ - { name = "hypothesis" }, - { name = "pytest" }, - { name = "pytest-asyncio" }, - { name = "pytest-cov" }, - { name = "pytest-xdist" }, -] [package.dev-dependencies] dev = [ + { name = "hypothesis" }, { name = "mypy" }, { name = "prek" }, { name = "pylint" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "pytest-xdist" }, { name = "ruff" }, ] +test = [ + { name = "hypothesis" }, + { name = "pytest" }, + { name = "pytest-asyncio" }, + { name = "pytest-cov" }, + { name = "pytest-xdist" }, +] [package.metadata] requires-dist = [ @@ -936,26 +941,33 @@ requires-dist = [ { name = "bleak-retry-connector", specifier = ">=3.5.0" }, { name = "cryptography", specifier = ">=41.0.0" }, { name = "epaper-dithering", specifier = "==5.0.6" }, - { name = "hypothesis", marker = "extra == 'test'", specifier = ">=6.148.8" }, { name = "nrf-ota", marker = "extra == 'nrf-ota'", specifier = ">=0.4.0" }, { name = "numpy", specifier = ">=1.24.0,!=2.4.0" }, { name = "pillow", specifier = ">=10.0.0" }, - { name = "pytest", marker = "extra == 'test'", specifier = ">=9.0.2" }, - { name = "pytest-asyncio", marker = "extra == 'test'", specifier = ">=1.3.0" }, - { name = "pytest-cov", marker = "extra == 'test'", specifier = ">=7.0.0" }, - { name = "pytest-xdist", marker = "extra == 'test'", specifier = ">=3.8.0" }, { name = "rich", marker = "extra == 'cli'", specifier = ">=13.0.0" }, { name = "silabs-ble-ota", marker = "extra == 'silabs-ota'", specifier = ">=0.1.0" }, ] -provides-extras = ["cli", "nrf-ota", "silabs-ota", "test"] +provides-extras = ["cli", "nrf-ota", "silabs-ota"] [package.metadata.requires-dev] dev = [ + { name = "hypothesis", specifier = ">=6.148.8" }, { name = "mypy", specifier = ">=1.19.1" }, { name = "prek", specifier = ">=0.3.4" }, { name = "pylint", specifier = ">=4.0.5" }, + { name = "pytest", specifier = ">=9.0.2" }, + { name = "pytest-asyncio", specifier = ">=1.3.0" }, + { name = "pytest-cov", specifier = ">=7.0.0" }, + { name = "pytest-xdist", specifier = ">=3.8.0" }, { name = "ruff", specifier = ">=0.14.10" }, ] +test = [ + { name = "hypothesis", specifier = ">=6.148.8" }, + { name = "pytest", specifier = ">=9.0.2" }, + { name = "pytest-asyncio", specifier = ">=1.3.0" }, + { name = "pytest-cov", specifier = ">=7.0.0" }, + { name = "pytest-xdist", specifier = ">=3.8.0" }, +] [[package]] name = "pycparser"