Closed yassinkhalifa closed 1 year ago
I totally agree that users don't really need the seconds part in time. If you want, I can just change that back to how it was before and just leave the decimal formatting line that I added (just modify it to be HH:MM which will be amended with seconds in srun_dict).
Sounds good to me.
That's done now!
Yeah, this is much better! I can work on that.
I added the suggested function parse_time and made it only return component #0 because we are always interested in the hours component (the first element) which simplified the check_time part as you indicated and changed the formatting of default_time to just a decimal '1' so that it aligns with the output of parse_time. Please take a look and let me know if I misinterpreted any of your instructions.
I went through all the requested changes and completed them. Please let me know if there is anything else I need to change.
@yassinkhalifa please merge this in when you are ready
It seems when entering the decimal value for the parameter "-t" or "--time" in crc-interactive it's formatted in the srun_dict as "{}:00" which makes it interpreted as "MM:SS" but if using the string format "01:00" and it's formatted in the srun_dict as "{}:00" then it's interpreted as "HH:MM:SS" which is the necessary format for "srun". I added a possible fix, please take a look and feel free to discard it and fix it in any other way because I am sure this is not the best way to fix it, I was just trying to expose where the error comes from.