[Enhancement]: Support mapping "yes"
/"no"
to Python boolean values
#22
Labels
Good first issue
An issue that does not require domain-specific knowledge to solve.
Type: Enhancement
Proposes a new feature to be added to the project.
Slurm configuration format uses "yes"/"no" to represent boolean values, similar to how older versions of YAML did. However, working with the 'Slurmy' boolean values in Python is not straight forward as they are treated as strings when parsed in from Slurm configuration files. To evaluate whether that values are boolean, you must use string operations rather than boolean operations.
This isn't ideal as this isn't a
True
/False
evaluation.config.constrain_ram_space
can be set to anything here, not just the opposite of"yes"
which is"no"
:The editor won't catch this which will eventually result in borking Slurm.
We should support mapping these values to Python booleans. It should be too difficult as all you need to do is just add a callback in the
callback
module that just converts the Slurm boolens back and forth:The text was updated successfully, but these errors were encountered: