Skip to content

Add new simplify command - #1661

Draft
rfbgo wants to merge 16 commits into
Ramble-Project:developfrom
rfbgo:simplify
Draft

Add new simplify command#1661
rfbgo wants to merge 16 commits into
Ramble-Project:developfrom
rfbgo:simplify

Conversation

@rfbgo

@rfbgo rfbgo commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@rfbgo
rfbgo marked this pull request as draft July 16, 2026 17:57

@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 introduces a new simplify command for the Ramble framework, designed to identify and optionally remove unused variables, inputs, executables, and compilers from definition files, as well as detect broken references. The review feedback highlights several areas for improvement, including replacing broad exception handling with specific exceptions to improve debugging, optimizing the instantiation of the Keywords class to avoid redundant work, and refactoring duplicated cache-resetting logic in the test suite into a reusable helper function.

Comment thread lib/ramble/ramble/cmd/simplify.py Outdated
Comment thread lib/ramble/ramble/cmd/simplify.py Outdated
Comment thread lib/ramble/ramble/cmd/simplify.py Outdated
Comment thread lib/ramble/ramble/cmd/simplify.py Outdated
Comment thread lib/ramble/ramble/test/cmd/simplify.py Outdated
@ramble-pr-bot

ramble-pr-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: 8d248b4

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.0683 2.0582 (0a577bf) 2.0848
test_large_template_expansion passed 1.5633 1.1988 (0a577bf) 1.2863
test_many_experiments passed 24.1712 24.7294 (0a577bf) 24.2245
test_many_objects_defaults passed 14.4084 14.6835 (0a577bf) 13.6401
test_matrix_filter_perf passed 1.1118 1.0650 (0a577bf) 1.0987

@codecov

codecov Bot commented Jul 16, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.56193% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 93.98%. Comparing base (8c2f07e) to head (8d248b4).
⚠️ Report is 17 commits behind head on develop.

Files with missing lines Patch % Lines
lib/ramble/ramble/test/cmd/simplify.py 93.84% 38 Missing ⚠️
lib/ramble/ramble/cmd/simplify.py 94.90% 33 Missing ⚠️
lib/ramble/ramble/repository.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1661      +/-   ##
===========================================
+ Coverage    93.94%   93.98%   +0.03%     
===========================================
  Files          367      370       +3     
  Lines        36605    37925    +1320     
===========================================
+ Hits         34389    35642    +1253     
- Misses        2216     2283      +67     

☔ 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.

@rfbgo
rfbgo force-pushed the simplify branch 5 times, most recently from 7d03ee3 to 86ca51f Compare July 20, 2026 22:21
@rfbgo
rfbgo marked this pull request as ready for review August 4, 2026 17:43
@rfbgo
rfbgo marked this pull request as draft August 12, 2026 14:23
rfbgo and others added 11 commits August 17, 2026 16:06
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
…mmand

- Wrap when() and default_args() yield calls in try/finally blocks to ensure
  contexts are cleanly popped even if directives raise exceptions. Add
  DirectiveMeta._reset_staging() and invoke it upon module load failures
  in repository.py to prevent condition leakage across object definitions.
- Consolidate repetitive template extraction and reference validation across
  executables, variables, environment variables, inputs, figures of merit,
  and success criteria into iter_object_template_strings(). Unify unreferenced
  item counting in count_unreferenced_items() and map directives with
  DIRECTIVE_CATEGORIES.
- Support refactoring and moving unused parent variables to inheriting subclasses.
@rfbgo
rfbgo force-pushed the simplify branch 2 times, most recently from ed9e3ad to 26caa5b Compare August 17, 2026 22:40
@rfbgo
rfbgo force-pushed the simplify branch 2 times, most recently from 6bb6959 to eeddb4c Compare August 19, 2026 16:14

@rfbgo rfbgo left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@dcoapp recheck

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