martius-lab / cluster_utils

https://cluster-utils.readthedocs.io/stable/
Other
12 stars 0 forks source link

Refactor sacct output parsing and add unit test #96

Closed luator closed 6 months ago

luator commented 6 months ago

Move the parsing of the output of sacct to a separate function, so it can be unit-tested.

I also found out that by adding -X I can limit the output to only the cumulative statistics of each job, omitting the intermediate results (*.batch, etc.) which were skipped in the parsing anyway.

Note: I started this as I initially thought parsing of the sacct output would need to get more complex in order to address #87, so I wanted to be able to add unit tests. It turned out that there is a better, much easier fix for that issue but I think testability of the parsing is good to have anyway, so I'm still submitting this PR.

luator commented 6 months ago

Sorry, just found an issue, I'll let you know when it is fixed.