Skip to content

Make cli non-optional#572

Merged
bsquizz merged 1 commit into
masterfrom
cli_not_optional
May 14, 2026
Merged

Make cli non-optional#572
bsquizz merged 1 commit into
masterfrom
cli_not_optional

Conversation

@bsquizz
Copy link
Copy Markdown
Contributor

@bsquizz bsquizz commented May 14, 2026

Right now if you want the cli, you need to run pip install crc-bonfire[cli], which is an introduced bug.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Summary by CodeRabbit

  • Chores
    • Removed CLI optional dependencies group
    • Added new library optional dependencies group

Walkthrough

The pyproject.toml file is restructured to remove the cli optional-dependencies group (containing packages like app-common-python, click, gql[requests], ocviapy, requests, and others) and introduce a new empty lib optional-dependencies group. The mcp, test, and top-level scripts sections remain intact.

Changes

Optional Dependency Groups Restructuring

Layer / File(s) Summary
CLI to lib dependency group migration
pyproject.toml
The [project.optional-dependencies] cli group containing CLI-specific packages (app-common-python, cached_property, click, gql[requests], ocviapy, requests, and related packages) is removed and replaced with an empty [project.optional-dependencies] lib = [] group. Existing mcp and test groups and [project.scripts] remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: moving CLI from optional to required dependencies by removing the [project.optional-dependencies] cli group.
Description check ✅ Passed The description is directly related to the changeset, explaining that making the CLI non-optional fixes a bug where users had to install it separately via extras.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cli_not_optional

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

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
pyproject.toml (1)

35-36: ⚡ Quick win

Remove unreachable backport dependencies from core requirements.

Given requires-python = ">=3.10" (Line 11), the environment markers for importlib-metadata; python_version<'3.8' and importlib-resources; python_version<'3.9' can never be true. The codebase conditionally imports these modules based on runtime version checks, but for Python 3.10+ the standard library versions are always used. These entries should be removed.

Proposed patch
 dependencies = [
     "PyYAML",
     "kubernetes>=29.0.0",
     "jinja2>=3.1.0",
@@
     "click>=7.1.2",
     "gql[requests]>=3.5.0",
-    "importlib-metadata; python_version<'3.8'",
-    "importlib-resources; python_version<'3.9'",
     "junitparser",
     "multidict",
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@pyproject.toml` around lines 35 - 36, Remove the unreachable backport
dependencies from the core requirements in pyproject.toml: because
requires-python = ">=3.10", delete the entries "importlib-metadata;
python_version<'3.8'" and "importlib-resources; python_version<'3.9'"; ensure
any conditional runtime imports remain but do not reference these backport
markers in the core dependencies list so the packaging metadata matches the
declared Python minimum.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@pyproject.toml`:
- Around line 35-36: Remove the unreachable backport dependencies from the core
requirements in pyproject.toml: because requires-python = ">=3.10", delete the
entries "importlib-metadata; python_version<'3.8'" and "importlib-resources;
python_version<'3.9'"; ensure any conditional runtime imports remain but do not
reference these backport markers in the core dependencies list so the packaging
metadata matches the declared Python minimum.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Enterprise

Run ID: f3ebabea-5590-418c-b2ad-2bc65f7bfea9

📥 Commits

Reviewing files that changed from the base of the PR and between 13e2356 and d3f9383.

📒 Files selected for processing (1)
  • pyproject.toml

Copy link
Copy Markdown
Contributor

@mjholder mjholder left a comment

Choose a reason for hiding this comment

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

LGTM

@bsquizz bsquizz merged commit 5caad7e into master May 14, 2026
12 checks passed
@JGiola JGiola deleted the cli_not_optional branch May 15, 2026 09:27
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.

2 participants