Fix an inversed logic in NamespaceTrie - #1744
Conversation
There was a problem hiding this comment.
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.
Ramble Performance Test MetricsResults produced with commit: 5eaea10
|
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
|
/gemini review |
There was a problem hiding this comment.
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.
No description provided.