Repository navigation
Declare direct dependencies flagged by ty missing-direct-dependency - #955
Sun Haoran (haoranpb) merged 4 commits into
Conversation
Code Coverage OverviewLanguages: Python Python / code-coverage/pytestThe overall line coverage in commit 29e8f9c in the Show a line coverage summary of the most impacted files.
Updated |
246af9f to
b5f4e86
Compare
b5f4e86 to
7b7f206
Compare
7b7f206 to
0a54de6
Compare
0136bab to
9d1637d
Compare
9d1637d to
2ff848d
Compare
There was a problem hiding this comment.
🟡 Changes recommended
The development-container setup still omits --all-extras, unintentionally dropping previously installed red-team dependencies.
1 open finding
What changed in this PR
Declares direct dependencies required by strict ty checks and converts red-team tooling into an optional extra.
Changes:
- Adds direct
packagingandrichdependencies. - Moves red-team dependencies to an optional extra.
- Updates installation workflows, CLI messaging, tests, and documentation.
| File | Description |
|---|---|
pyproject.toml |
Updates dependency declarations. |
uv.lock |
Reflects manifest changes. |
.github/actions/setup-python-uv/action.yml |
Adds full groups/extras installation. |
.github/workflows/CI.yml |
Enables full installation in CI. |
.github/workflows/copilot-setup-steps.yml |
Enables full Copilot setup. |
src/bcbench/cli.py |
Renames red-team availability handling. |
src/bcbench/commands/redteam.py |
Updates installation guidance. |
tests/test_cli_commands.py |
Updates helper tests. |
tests/test_redteam.py |
Updates extra terminology. |
CONTRIBUTING.md |
Documents extras installation. |
.env.sample |
Updates red-team setup guidance. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Add rich and packaging to project dependencies and move the redteam dependency group to an optional extra, since package code may only import project dependencies or extras. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 70c54f79-d7a0-4cde-baf2-e53dfff3deb4
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
3ce9441 to
ae3697c
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The manifest, lockfile, workflows, tests, and user-facing instructions consistently implement the dependency changes.
0 open findings
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

What
Fix ty
missing-direct-dependency. Package code may only importproject.dependenciesor extras, so this PR touches manifests (unavoidable for this rule):packagingandrichtoproject.dependencies(previously only transitive).redteamfrom a dependency group to[project.optional-dependencies]. Install withuv sync --extra redteam; CI's setup-python-uv action now uses--all-groups --all-extras..env.sampleand tests accordingly.uv.lock: only thebcbenchstanza changes.Part of the stack that makes ty strict (
all = "error") across the whole uv workspace. Each PR fixes one rule in Python code only; the config change lands in #956.