Skip to content

Declare the CLI direct Click dependency - #678

Open
Dcastroro wants to merge 1 commit into
treeverse:mainfrom
Dcastroro:fix/declare-cli-click
Open

Dcastroro wants to merge 1 commit into
treeverse:mainfrom
Dcastroro:fix/declare-cli-click

Conversation

@Dcastroro

@Dcastroro Dcastroro commented Oct 26, 2026 •

Copy link
Copy Markdown

The benchmark workflow for #673 fails while importing the unchanged base: tests/benchmarks/test_checkout.py imports dvc_data.cli, which directly imports click, but the cli extra only declares Typer. Current Typer no longer installs external Click.

Declare the existing direct dependency as click>=8 in the CLI extra. This extracts the one-line packaging prerequisite already carried by #673 so it can reach the target branch independently and unblock base-branch benchmark collection. Refs #671. The Typer-native version-reporting change discussed in closed #672 remains separate.

Validation on 56af66a plus this one-line change:

  • A fresh Windows/Python 3.14.3 [tests,cli] environment with Typer 0.27.3 reproduces ModuleNotFoundError: No module named 'click' during benchmark collection before the change. Reinstalling the changed package installs Click and collection succeeds.
  • Linux/WSL nox -s tests-3.12: 191 passed, 32 existing skips.
  • Linux/WSL nox -s lint: all repository hooks and mypy pass.
  • Linux/WSL nox -s bench on Python 3.14.2: 3 passed, 220 existing skips; the existing copy, symlink and hardlink benchmarks execute successfully. Reflink is unsupported on this filesystem. Run from a temporary Linux filesystem checkout of the exact commit to avoid shared-drive benchmark overhead.
  • Linux/WSL nox -s build: wheel/sdist builds and Twine checks pass.
  • Hosted Codecov checks pass. The new PR's benchmark jobs reproduce the unchanged-base failure, as expected; all 18 hosted Python 3.9–3.14 / Ubuntu, macOS and Windows test jobs and the aggregate test check pass. Hosted pre-commit and both Codecov checks also pass.
  • Native Windows benchmark execution reaches the tests but encounters file-lock/cleanup permission errors. A clean Windows benchmark run is not claimed.

The hosted benchmark workflow still evaluates the old base and will remain blocked until this prerequisite is merged upstream. Prepared and tested with OpenAI Codex assistance.

@github-project-automation github-project-automation Bot moved this to Backlog in DVC Oct 26, 2026
@codecov

codecov Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.82%. Comparing base (e38c8c2) to head (31541f3).
⚠️ Report is 72 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #678      +/-   ##
==========================================
+ Coverage   72.42%   73.82%   +1.40%     
==========================================
  Files          67       65       -2     
  Lines        5132     5357     +225     
  Branches      605      622      +17     
==========================================
+ Hits         3717     3955     +238     
+ Misses       1227     1209      -18     
- Partials      188      193       +5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dcastroro
Dcastroro marked this pull request as ready for review October 26, 2026 11:25
Copilot AI balanced review requested due to automatic review settings October 26, 2026 11:26

Copilot AI 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.

🟢 Approval recommended

The one-line change correctly declares an already-used direct dependency, matching the confirmed click import and usage in cli.py.

No open issues 🎉

What changed in this PR

This PR declares the CLI extra's existing direct dependency on Click. src/dvc_data/cli.py imports click directly (line 16) and calls click.version_option() (line 569), but the cli optional-dependency extra previously only listed Typer. Since current Typer no longer installs external Click as a transitive dependency, fresh dvc-data[cli] installs and the base-branch benchmark collection fail with ModuleNotFoundError: No module named 'click'. Adding click>=8 makes the already-used dependency explicit.

Changes:

  • Add click>=8 to the cli optional-dependencies group in pyproject.toml.
File Description
pyproject.toml Declares click>=8 under the cli extra to match the direct click import/usage in cli.py; the all extra inherits it via dvc-data[cli].

The change is accurate: the direct Click usage is confirmed, >=8 is consistent with click.version_option() (available in Click 8.x), and the constraint aligns with the existing minimal pinning style of the extras. No issues were found.

Review effort: Balanced

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants