-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add validate backend fucntion #341
Conversation
for more information, see https://pre-commit.ci
WalkthroughThe changes involve updating the backend validation mechanism in the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant Scheduler
participant InputCheck
User->>Scheduler: create_executor(backend, flux_installed, slurm_installed)
Scheduler->>InputCheck: validate_backend(backend, flux_installed, slurm_installed)
InputCheck-->>Scheduler: Validated backend
Scheduler-->>User: Executor created
Poem
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? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- pympipool/scheduler/init.py (3 hunks)
- pympipool/shared/inputcheck.py (1 hunks)
- tests/test_shared_input_check.py (2 hunks)
Additional comments not posted (5)
tests/test_shared_input_check.py (2)
13-13
: Import ofvalidate_backend
is correct and aligns with the changes in the function's name and usage.
40-42
: The test case update forvalidate_backend
correctly reflects the changes in the function's signature and parameters.pympipool/shared/inputcheck.py (1)
70-85
: The implementation ofvalidate_backend
correctly handles the new parametersflux_installed
andslurm_installed
. The function now supports more explicit backend validation based on the installation status of Flux and SLURM.pympipool/scheduler/__init__.py (2)
16-16
: Import ofvalidate_backend
andvalidate_number_of_cores
is correct and necessary for the updatedcreate_executor
function.
90-92
: The update increate_executor
to usevalidate_backend
with the new parametersflux_installed
andslurm_installed
is correctly implemented. This change ensures that the backend is validated more robustly based on the system's configuration.
Summary by CodeRabbit
New Features
validate_backend
function, enhancing flexibility and clarity.Refactor
create_executor
function to utilize the newvalidate_backend
function for backend validation.Tests
validate_backend
function and its additional parameters.