-
Notifications
You must be signed in to change notification settings - Fork 13
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
MT-60: Add a step to check the disk-quota
in mila code
#53
Conversation
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
Signed-off-by: Fabrice Normandin <[email protected]>
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.
It would be nice to have this partly tested but I think we'll soon do another round to add tests anyway
milatools/cli/commands.py
Outdated
max_files, | ||
) = last_line_parts.split("|") | ||
used_gb = float(used_gb.removesuffix("GiB").strip()) | ||
max_gb = float(max_gb.removesuffix("GiB").strip()) |
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.
str.removesuffix()
has been added in python 3.9 I believe which is higher than the minimum stated in the pyproject.toml
. Are we ok with bumping the minimal version to 3.9? I personally don't have any objections as mila tools is not likely to become a python packages dependency in any project.
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.
Fixed in 1b6a509
Turns out I don't have a test for this, I got mixed up with #54 |
Signed-off-by: Fabrice Normandin <[email protected]>
(not sure why or how it got removed in the first place tbh) Signed-off-by: Fabrice Normandin <[email protected]>
Merging, we'll add tests later |
Checks the disk usage before allocating a job.