Skip to content

deduplicate CLI subcommands, parser setup, and repo commands - #1737

Open
rfbgo wants to merge 2 commits into
GoogleCloudPlatform:developfrom
rfbgo:cli_dedup
Open

deduplicate CLI subcommands, parser setup, and repo commands#1737
rfbgo wants to merge 2 commits into
GoogleCloudPlatform:developfrom
rfbgo:cli_dedup

Conversation

@rfbgo

@rfbgo rfbgo commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors subcommand parser setup across multiple command modules (including data, deployment, and workspace) by extracting common setup logic into a new helper function, setup_subcommands_from_prefix, in ramble/cmd/common/__init__.py. It also extracts repository addition and removal configuration logic in repo.py into helper functions, and adds unit tests for the new common functions. Feedback on these changes suggests removing the redundant explicit import of the builtins module and referencing standard built-in types like list and tuple directly rather than prefixing them with builtins..

Comment thread lib/ramble/ramble/cmd/common/__init__.py Outdated
Comment thread lib/ramble/ramble/cmd/common/__init__.py Outdated
Comment thread lib/ramble/ramble/cmd/common/__init__.py Outdated
@ramble-pr-bot

ramble-pr-bot Bot commented Aug 21, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: b7de116

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.1534 2.1404 (a5553af) 2.0915
test_large_template_expansion passed 1.2318 1.2326 (a5553af) 1.2055
test_many_experiments passed 25.3303 25.5650 (a5553af) 24.3481
test_many_objects_defaults passed 13.8398 14.0516 (a5553af) 13.6431
test_matrix_filter_perf passed 1.1702 1.1342 (a5553af) 1.0928

@codecov

codecov Bot commented Aug 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.29126% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 94.03%. Comparing base (a5553af) to head (b7de116).

Files with missing lines Patch % Lines
lib/ramble/ramble/cmd/repo.py 79.48% 8 Missing ⚠️
lib/ramble/ramble/test/cmd/common.py 94.11% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1737   +/-   ##
========================================
  Coverage    94.02%   94.03%           
========================================
  Files          367      368    +1     
  Lines        36933    36910   -23     
========================================
- Hits         34728    34710   -18     
+ Misses        2205     2200    -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.

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.

1 participant