-
Notifications
You must be signed in to change notification settings - Fork 192
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
Homogenize the output of verdi work list and verdi calculation list #1197
Homogenize the output of verdi work list and verdi calculation list #1197
Conversation
Quick question, how different the format is, now, for 'verdi calculation list'? Does it fit by default in 1 line? |
Depends on how wide your line is :) it is quite a bit wider than the default, that is true |
527716c
to
32d1e07
Compare
Hi @sphuber I just realised this didn't get approved. Can you copy-paste in a comment an example of the current output? I think it would be great if by default we can stay in 1 line if possible (80 chars), looking at the current output can help give suggestions (there should already be a mechanism to change the number of columns implemented, so if the user wants more columns he can do so). |
I will take a look at it later today hopefully and can give an example. My aim was to have |
Now that all Calculations are routed through the Process layer and therefore are guaranteed to share the same information through the process_state and finish_status attributes, we can update the verdi commands 'calculation list' and 'work' list to use the same labels, format and default order. This hopefully creates a more consistent and therefore more easy to understand output for the user. Unfortunately since the querying for JobCalculations is relatively hardcoded in AbstractJobCalculation class, I had to duplicate some of the logic to format the various data attributes in the two display commands. Ideally this would be abstracted but that would take a huge effort.
32d1e07
to
58c11eb
Compare
With the latest change and introduction of compound projections, this is the new default output for
and this for
|
58c11eb
to
a69a3fb
Compare
The default set of projections for `verdi calculation list` should not be wider than 80 columns roughly, otherwise the lines for people with default shell widths will just wrap. However, with the recent changes of homogenizing the spheres of WorkCalculations and JobCalculations through the process layer, we want to give `verdi work list` and `verdi calculation list` a similiar default output. In addition to the default projections of the former, the calculations also have the calculation and scheduler state which should remain there by default, but this would make the output to wide. The solution is to define compound projections: * state * job_state The first applies to both `work` and `calculation` and will show the tuple of `process_state` and `finish_status`. The second only applies to the `calculation list` and is the tuple of the old calculation state and the scheduler state.
a69a3fb
to
7c2d789
Compare
Fixes #1075
Now that all Calculations are routed through the Process layer and
therefore are guaranteed to share the same information through the
process_state and finish_status attributes, we can update the verdi
commands 'calculation list' and 'work' list to use the same labels,
format and default order. This hopefully creates a more consistent
and therefore more easy to understand output for the user.
Unfortunately since the querying for JobCalculations is relatively
hardcoded in AbstractJobCalculation class, I had to duplicate some
of the logic to format the various data attributes in the two
display commands. Ideally this would be abstracted but that would
take a huge effort.