Skip to content

Fix an inversed logic in NamespaceTrie - #1744

Open
linsword13 wants to merge 1 commit into
Ramble-Project:developfrom
linsword13:trie-fix
Open

Fix an inversed logic in NamespaceTrie#1744
linsword13 wants to merge 1 commit into
Ramble-Project:developfrom
linsword13:trie-fix

Conversation

@linsword13

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 fixes the logic of the is_leaf method in lib/ramble/ramble/util/naming.py to correctly return whether a namespace has no children, and updates the corresponding unit tests in lib/ramble/ramble/test/namespace_trie.py to verify this behavior. The review feedback suggests simplifying the return statement not bool(self._subspaces) to the more idiomatic not self._subspaces in accordance with PEP 8.

Comment thread lib/ramble/ramble/util/naming.py Outdated
@ramble-pr-bot

ramble-pr-bot Bot commented Aug 25, 2026

Copy link
Copy Markdown

Ramble Performance Test Metrics

Results produced with commit: 5eaea10

Test Name Outcome Duration (s) Most Recent Run (s) Last 5 Avg (s)
test_analyze_large_file passed 2.0499 2.1057 (279e771) 2.0811
test_large_template_expansion passed 1.1704 1.1903 (279e771) 1.1715
test_many_experiments passed 23.3293 23.4966 (279e771) 23.2766
test_many_objects_defaults passed 12.0781 12.3570 (279e771) 12.2878
test_matrix_filter_perf passed 1.0124 1.0507 (279e771) 1.0456

@codecov

codecov Bot commented Aug 25, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.05%. Comparing base (279e771) to head (5eaea10).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1744   +/-   ##
========================================
  Coverage    94.04%   94.05%           
========================================
  Files          370      370           
  Lines        37331    37339    +8     
========================================
+ Hits         35109    35118    +9     
+ Misses        2222     2221    -1     

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

@linsword13

Copy link
Copy Markdown
Collaborator Author

/gemini review

@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 corrects the logic of the is_leaf method in lib/ramble/ramble/util/naming.py to return True when a namespace has no children by changing the return statement from bool(self._subspaces) to not self._subspaces. It also updates the unit tests in lib/ramble/ramble/test/namespace_trie.py to assert the correct behavior of is_leaf across different scenarios. There are no review comments, so I have no feedback to provide.

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