Skip to content

build: PEP 735 dep group for dev tooling (closes #328 dev portion) - #333

Merged
robotrocketscience merged 2 commits into
mainfrom
build/issue-328-pep735-deps
May 1, 2026
Merged

build: PEP 735 dep group for dev tooling (closes #328 dev portion)#333
robotrocketscience merged 2 commits into
mainfrom
build/issue-328-pep735-deps

Conversation

@robotrocketscience

@robotrocketscience robotrocketscience commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Closes the dev portion of #328: moves pytest, pytest-timeout, pyright from [project.optional-dependencies.dev] into [dependency-groups.dev] (PEP 735), drops their DEP002 deptry ignores, and updates CI workflows (ci.yml, mutation.yml, publish.yml) to install via --group dev instead of --extra dev.

Why

deptry was flagging dev tooling as DEP002 (declared-but-not-imported) because optional extras count as "project dependencies" from deptry's perspective. PEP 735 dependency groups don't, so the ignores can go.

Bench portion deferred

#328 also asked to move nltk/tiktoken/datasets/huggingface_hub to a [dependency-groups.bench] group. Skipped: pip install -e ".[benchmarks]" is a documented contract (benchmarks/README.md), and PEP 735 dep groups are not publishable extras. Their DEP002 ignores stay; comment in [tool.deptry.per_rule_ignores] now explains why. Filed as a comment on #328 — the issue stays open or gets rescoped.

Verification

  • uv lock regenerated.
  • uv sync --frozen --group dev --extra archive installs cleanly.
  • uvx deptry src (CI invocation) → "Success! No dependency issues found."
  • Full pytest suite: 1982 passed, 18 skipped.

Closes #328 (dev portion).

Summary by Sourcery

Move development tooling dependencies to a PEP 735 dependency group and update CI to install from that group instead of an optional extra.

Enhancements:

  • Reorganize dev tooling dependencies (pytest, pytest-timeout, pyright) from project optional extras into a PEP 735 [dependency-groups.dev] group.
  • Clarify deptry DEP002 ignore configuration to document why benchmark extras remain and are not imported from the main src package.

CI:

  • Update CI workflows to install development dependencies via uv sync --group dev instead of --extra dev.

Move pytest, pytest-timeout, pyright from `[project.optional-dependencies.dev]`
into `[dependency-groups.dev]`. Drops them from deptry DEP002 ignores —
PEP 735 dep groups are not project dependencies, so deptry no longer flags
them as declared-but-not-imported.

Bench extras (nltk, tiktoken, datasets, huggingface_hub) stay in
`[project.optional-dependencies.benchmarks]` because
`pip install -e .[benchmarks]` is a documented contract
(benchmarks/README.md). Their DEP002 ignores remain.

Closes #328 (dev portion). Bench portion is intentionally deferred: the
publishable extras contract precludes moving those into a dep group.

Refs #325.
Followup to the deps reorg in the previous commit. The `dev`
optional-extras block is gone; CI installs dev tooling via
`--group dev` instead of `--extra dev`.

Refs #328.
@sourcery-ai

sourcery-ai Bot commented May 1, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Migrates dev test/tooling dependencies from an optional dependency extra to a PEP 735 dependency group and updates deptry configuration and CI workflows to use the new dev group-based install strategy.

File-Level Changes

Change Details Files
Move dev tooling deps from optional extras to PEP 735 dependency group and adjust deptry ignores accordingly.
  • Remove pytest, pytest-timeout, and pyright from [project.optional-dependencies.dev].
  • Add pytest, pytest-timeout, and pyright to [dependency-groups.dev].
  • Narrow DEP002 deptry ignores to only benchmarks-related packages and expand the comment to explain why the benchmarks extra remains and why those ignores are still needed.
pyproject.toml
Update CI workflows to install dev dependencies via dependency groups instead of extras.
  • Change uv sync invocations in CI, mutation testing, and publish workflows from --extra dev to --group dev while preserving the archive extra.
  • Ensure all workflows that run pytest still install the dev tooling via the new dependency group.
.github/workflows/ci.yml
.github/workflows/mutation.yml
.github/workflows/publish.yml
Regenerate uv.lock to reflect the dependency group reorganization.
  • Update lockfile metadata to align with moving dev tooling dependencies into [dependency-groups.dev].
uv.lock

Assessment against linked issues

Issue Objective Addressed Explanation
#328 Reorganize development tooling dependencies (pytest, pytest-timeout, pyright) from [project.optional-dependencies] into a PEP 735 [dependency-groups.dev] group, update CI to install via this group, and remove their DEP002 deptry ignores.
#328 Reorganize benchmark-only dependencies (nltk, tiktoken, datasets, huggingface_hub) into a dedicated benchmark grouping as described (e.g. [project.optional-dependencies.bench]) and remove their DEP002 deptry ignores so deptry no longer ignores them. The PR explicitly defers the benchmark-related changes: it leaves nltk, tiktoken, datasets, and huggingface_hub in the DEP002 ignore list and does not move them into a new benchmark dependency grouping, documenting that this part of the issue is skipped.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented May 1, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@robotrocketscience has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 57 minutes and 27 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d37f55a7-33ed-4662-964e-de41e01c07c9

📥 Commits

Reviewing files that changed from the base of the PR and between 1531a8e and cbbbcf5.

⛔ Files ignored due to path filters (1)
  • uv.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (4)
  • .github/workflows/ci.yml
  • .github/workflows/mutation.yml
  • .github/workflows/publish.yml
  • pyproject.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch build/issue-328-pep735-deps

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 57 minutes and 27 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

@robotrocketscience robotrocketscience added the author-Kulili PR coordination mutex label May 1, 2026

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@robotrocketscience

Copy link
Copy Markdown
Owner Author

[claim:review:Gylf:2026-05-01T15:51:20Z]

@robotrocketscience
robotrocketscience merged commit cbbbcf5 into main May 1, 2026
18 of 24 checks passed
@robotrocketscience
robotrocketscience deleted the build/issue-328-pep735-deps branch May 1, 2026 15:53
@robotrocketscience

Copy link
Copy Markdown
Owner Author

[release:review:Gylf:2026-05-01T15:53:34Z]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author-Kulili PR coordination mutex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

build: reorganize dev/bench deps into PEP 735 groups

1 participant