Skip to content

Add utilities objects [AI]#1590

Open
douglasjacobsen wants to merge 3 commits into
GoogleCloudPlatform:developfrom
douglasjacobsen:utilities-objects
Open

Add utilities objects [AI]#1590
douglasjacobsen wants to merge 3 commits into
GoogleCloudPlatform:developfrom
douglasjacobsen:utilities-objects

Conversation

@douglasjacobsen

Copy link
Copy Markdown
Collaborator

This merge adds utilities as a new object type. Utilities represent external dependencies that experiments (or other objects) can require. These can include things like spack (package managers) or pdsh. A language, documentation, and tests are added to help developers create new utilities.

@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 the concept of external utilities (dependencies) to Ramble, adding a new UtilityBase class, a bootstrap pipeline, workspace commands, configuration schemas, and documentation. The review feedback highlights several critical issues that need to be addressed: directory name mismatches (bootstrapped_utilities vs. bootstrapped_tools) that affect archiving and deployment; logic bugs in UtilityBase that ignore conditional environment modifications; potential TypeErrors from unfiltered fetch arguments and unhashable lists in configuration tuples; inconsistent configuration option names; and the need for robust command parsing using shlex.split.

Comment thread lib/ramble/ramble/pipeline.py Outdated
Comment thread lib/ramble/ramble/pipeline.py Outdated
Comment thread lib/ramble/ramble/pipeline.py Outdated
Comment thread var/ramble/repos/builtin/base_classes/utility-base/base_class.py Outdated
Comment thread var/ramble/repos/builtin/base_classes/utility-base/base_class.py Outdated
Comment thread etc/ramble/defaults/config.yaml Outdated
Comment thread var/ramble/repos/builtin/base_classes/application-base/base_class.py Outdated
Comment thread var/ramble/repos/builtin/base_classes/utility-base/base_class.py Outdated
Comment thread lib/ramble/ramble/cmd/workspace.py
@ramble-pr-bot

ramble-pr-bot Bot commented May 28, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: 6788f25

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.9554 2.9922 (013099b) 2.9973
test_large_template_expansion passed 2.1223 2.1188 (013099b) 2.1363
test_many_experiments passed 32.4726 32.2892 (013099b) 33.2663
test_many_objects_defaults passed 18.9413 18.3797 (013099b) 18.4377
test_matrix_filter_perf passed 1.5916 1.5916 (013099b) 1.6218

@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.52863% with 86 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.93%. Comparing base (e9259e0) to head (8705a45).
⚠️ Report is 18 commits behind head on develop.

Files with missing lines Patch % Lines
...uiltin/base_classes/application-base/base_class.py 80.39% 30 Missing ⚠️
lib/ramble/ramble/language/utility_language.py 73.41% 21 Missing ⚠️
lib/ramble/ramble/cmd/workspace.py 80.35% 11 Missing ⚠️
lib/ramble/ramble/pipeline.py 56.25% 7 Missing ⚠️
.../ramble/ramble/test/test_application_base_fixes.py 90.56% 5 Missing ⚠️
lib/ramble/ramble/language/shared_language.py 80.00% 4 Missing ⚠️
.../ramble/ramble/test/test_application_base_happy.py 94.87% 2 Missing ⚠️
...os/builtin/base_classes/utility-base/base_class.py 98.82% 2 Missing ⚠️
lib/ramble/ramble/test/test_base_classes_extra.py 99.33% 1 Missing ⚠️
lib/ramble/ramble/test/test_utility_base_fixes.py 98.00% 1 Missing ⚠️
... and 2 more
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1590      +/-   ##
===========================================
- Coverage    92.95%   92.93%   -0.03%     
===========================================
  Files          344      357      +13     
  Lines        33258    34159     +901     
===========================================
+ Hits         30916    31744     +828     
- Misses        2342     2415      +73     

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

@douglasjacobsen douglasjacobsen force-pushed the utilities-objects branch 3 times, most recently from 7643893 to fce4051 Compare June 4, 2026 19:28
@douglasjacobsen douglasjacobsen force-pushed the utilities-objects branch 2 times, most recently from c3a2937 to ec3b0d5 Compare June 5, 2026 15:32
@douglasjacobsen

Copy link
Copy Markdown
Collaborator Author

/genini review

@douglasjacobsen douglasjacobsen marked this pull request as ready for review June 5, 2026 18:52
@rfbgo rfbgo requested a review from linsword13 June 10, 2026 16:17
This commit adds a new object type representing bootstrapped or required
external utilities. These can be dependencies that an experiment needs
to run on a certain system, or dependencies that Ramble should fetch as
part of setting up the experiments.

Other objects can require utilities, and when they do they are allowed
to specify minimum and maximum versions (or to pin the version at a
specific value).

A new pipeline is defined `ramble workspace bootstrap` which can be used
to bootstrap any utilities that would be bootstrapped. Bootstrapping
also happens as part of the setup pipeline.
Changes include:
- Updated Sphinx conf.py to auto-generate utility_list.html and base_utility_list.html.
- Added utilities.rst to the Basics section outlining how to configure utility bootstrapping.
- Added a Developer Guide detailing the UtilityBase API, env modifications, and declarative version checking.
- Added a tutorial for creating utility definitions from scratch.
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