diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8a8cee62..345778bfe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,5 +27,5 @@ jobs: python-version: ${{ matrix.python-version }} enable-cache: true cache-dependency-glob: "uv.lock" - - run: uv sync --frozen --extra dev --extra archive + - run: uv sync --frozen --group dev --extra archive - run: uv run pytest tests/ -q diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 4dcb4bc53..4f6e1ac5f 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -26,7 +26,7 @@ jobs: with: enable-cache: true cache-dependency-glob: "uv.lock" - - run: uv sync --frozen --extra dev --extra archive + - run: uv sync --frozen --group dev --extra archive - name: Install mutmut run: uv pip install mutmut - name: Run mutation tests diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6f40062b5..26a5e8ce3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -22,7 +22,7 @@ jobs: with: fetch-depth: 0 # full history so --generate-notes can diff against the prior tag - uses: astral-sh/setup-uv@v5 - - run: uv sync --frozen --extra dev --extra archive + - run: uv sync --frozen --group dev --extra archive - run: uv run pytest tests/ -q - run: uv build - uses: actions/attest-build-provenance@v1 diff --git a/pyproject.toml b/pyproject.toml index 3515d6db6..25625e96b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,11 +63,6 @@ aelf-search-tool-hook = "aelfrice.hook_search_tool:main" aelf-session-start-hook = "aelfrice.hook:main_session_start" [project.optional-dependencies] -dev = [ - "pytest>=8.0", - "pytest-timeout>=2.3", - "pyright>=1.1.409", -] mcp = [ "fastmcp>=0.2.0", ] @@ -129,13 +124,11 @@ reportMissingTypeStubs = false known_first_party = ["aelfrice", "benchmarks"] [tool.deptry.per_rule_ignores] -# DEP002: declared but not imported by src/. These are dev/test/bench-only -# but live in [project.dependencies] for now; reorganizing into PEP 735 -# groups is tracked as a follow-up issue. +# DEP002: declared in `[project.optional-dependencies.benchmarks]` extras +# but not imported by src/aelfrice. They are imported only by +# `benchmarks/` adapters; the extras stay because `pip install +# -e ".[benchmarks]"` is a documented contract (benchmarks/README.md). DEP002 = [ - "pytest", - "pytest-timeout", - "pyright", "nltk", "tiktoken", "datasets", @@ -150,5 +143,7 @@ DEP003 = ["tomli"] [dependency-groups] dev = [ + "pytest>=8.0", + "pytest-timeout>=2.3", "pyright>=1.1.409", ] diff --git a/uv.lock b/uv.lock index a375a5d50..0f3aa8e2d 100644 --- a/uv.lock +++ b/uv.lock @@ -29,11 +29,6 @@ benchmarks = [ { name = "nltk" }, { name = "tiktoken" }, ] -dev = [ - { name = "pyright" }, - { name = "pytest" }, - { name = "pytest-timeout" }, -] mcp = [ { name = "fastmcp" }, ] @@ -44,6 +39,8 @@ onboard-llm = [ [package.dev-dependencies] dev = [ { name = "pyright" }, + { name = "pytest" }, + { name = "pytest-timeout" }, ] [package.metadata] @@ -55,16 +52,17 @@ requires-dist = [ { name = "huggingface-hub", marker = "extra == 'benchmarks'", specifier = ">=0.20" }, { name = "nltk", marker = "extra == 'benchmarks'", specifier = ">=3.9" }, { name = "numpy", specifier = ">=2.0" }, - { name = "pyright", marker = "extra == 'dev'", specifier = ">=1.1.409" }, - { name = "pytest", marker = "extra == 'dev'", specifier = ">=8.0" }, - { name = "pytest-timeout", marker = "extra == 'dev'", specifier = ">=2.3" }, { name = "scipy", specifier = ">=1.11" }, { name = "tiktoken", marker = "extra == 'benchmarks'", specifier = ">=0.7" }, ] -provides-extras = ["dev", "mcp", "onboard-llm", "archive", "benchmarks"] +provides-extras = ["mcp", "onboard-llm", "archive", "benchmarks"] [package.metadata.requires-dev] -dev = [{ name = "pyright", specifier = ">=1.1.409" }] +dev = [ + { name = "pyright", specifier = ">=1.1.409" }, + { name = "pytest", specifier = ">=8.0" }, + { name = "pytest-timeout", specifier = ">=2.3" }, +] [[package]] name = "aiofile"