-
Notifications
You must be signed in to change notification settings - Fork 142
fix(slurm): make get_slurm_options astype optional and preserve default type. #4267
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
Conversation
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.
Pull Request Overview
This PR fixes a nodelist parsing issue in the SLURM integration by making type conversion in get_slurm_options more flexible. The changes address issue #4266 by modifying the get_value helper function to preserve default value types and handle string values appropriately.
Key Changes:
- Made
astypeparameter optional (defaulting toNoneinstead ofint) - Added logic to infer type from
defaultparameter whenastypeis not specified - Explicitly passed
astype=strforSLURM_NODELISTto ensure string handling
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (33.33%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #4267 +/- ##
==========================================
- Coverage 91.32% 91.30% -0.03%
==========================================
Files 193 193
Lines 15720 15725 +5
==========================================
+ Hits 14357 14358 +1
- Misses 1363 1367 +4 🚀 New features to boost your workflow:
|
|
@pyansys-ci-bot LGTM |
pyansys-ci-bot
left a comment
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.
…n falling back to str
…lt type. (#4267) * fix(slurm): make get_slurm_options astype optional and preserve default type. * chore: adding changelog file 4267.fixed.md [dependabot-skip] * fix(slurm): allow non-integer SLURM option values by trying float then falling back to str --------- Co-authored-by: pyansys-ci-bot <[email protected]>
…lt type. (#4267) * fix(slurm): make get_slurm_options astype optional and preserve default type. * chore: adding changelog file 4267.fixed.md [dependabot-skip] * fix(slurm): allow non-integer SLURM option values by trying float then falling back to str --------- Co-authored-by: pyansys-ci-bot <[email protected]>
…lt type. (#4267) * fix(slurm): make get_slurm_options astype optional and preserve default type. * chore: adding changelog file 4267.fixed.md [dependabot-skip] * fix(slurm): allow non-integer SLURM option values by trying float then falling back to str --------- Co-authored-by: pyansys-ci-bot <[email protected]>
…lt type. (#4267) * fix(slurm): make get_slurm_options astype optional and preserve default type. * chore: adding changelog file 4267.fixed.md [dependabot-skip] * fix(slurm): allow non-integer SLURM option values by trying float then falling back to str --------- Co-authored-by: pyansys-ci-bot <[email protected]>
…lt type. (#4267) * fix(slurm): make get_slurm_options astype optional and preserve default type. * chore: adding changelog file 4267.fixed.md [dependabot-skip] * fix(slurm): allow non-integer SLURM option values by trying float then falling back to str --------- Co-authored-by: pyansys-ci-bot <[email protected]>

Description
Fix
nodelistparsing issue. Setting default to None inget_value.Issue linked
Close #4266
Close #4232
Checklist
draftif it is not ready to be reviewed yet.feat: adding new MAPDL command)