Closed jan-janssen closed 1 month ago
The changes involve refactoring the BasisQueueAdapter
class in pysqa/utils/basic.py
by removing several internal utility methods and replacing them with direct calls to new functions in pysqa/utils/validate.py
. This restructuring maintains the original functionality while enhancing the clarity and modularity of the code. Additionally, corresponding updates were made to the test files to reflect these changes, ensuring that tests now utilize the new utility functions instead of the removed methods.
Files | Change Summary |
---|---|
pysqa/utils/basic.py |
Removed internal utility methods from BasisQueueAdapter and replaced them with calls to functions in pysqa/utils/validate.py . |
pysqa/utils/validate.py |
Introduced new utility functions for value validation and memory specification processing, including value_error_if_none , value_in_range , _is_memory_string , and _memory_spec_string_to_value . |
tests/test_basic.py |
Updated test cases to replace calls to removed methods with new utility functions, ensuring assertions remain consistent. |
tests/test_sge.py |
Refactored tests to call the new value_in_range function directly instead of the private method from BasisQueueAdapter , updating assertions accordingly. |
sequenceDiagram
participant A as User
participant B as BasisQueueAdapter
participant C as ValidateFunctions
A->>B: Call check_queue_parameters()
B->>C: Call value_error_if_none(value)
C-->>B: Return validation result
B->>C: Call value_in_range(value, min, max)
C-->>B: Return range check result
B-->>A: Return final result
🐇 In the code where rabbits hop,
Functions flourish, never stop.
Old methods fade, new paths we trace,
Validation shines in its rightful place.
With every change, we dance and play,
Hopping forward, come what may! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Refactor
Tests