Skip to content

Adjust gridtk list output to fit terminal width #13

@183amir

Description

@183amir

Issue:
When the job names, commands, or other column values in gridtk list are lengthy, the output table is difficult to read as it spans multiple lines, making the presentation cluttered and unclear. This can be frustrating when trying to quickly parse job-related information.

Suggested Improvement:
By default, we should implement a more user-friendly approach to formatting, such as limiting the width of selected columns (e.g., job-name, command) to fit within the current terminal window size or a fixed size of 80. Standard ellipses or truncation could be used to indicate when content is cut off. A flag or option can be provided for users to view the full output when needed.

This enhancement would improve readability without requiring users to resize their terminal or handling multiline, mixed-format outputs for each job.

Example output illustrating the problem:
In certain cases, long job names and commands can cause individual rows to break across multiple display lines:

job-id    slurm-id  nodes    state         job-name                       output                                       dependencies  command
--------  ----------  ------  -------------  ----------------------------  -----------------------------------------  -------------  ---------------------------------------------------------------------------------------------------------------------------------
     1      439883  hcne01  COMPLETED(0)    feat-ffhq-train-prune-1        logs/feat-ffhq-train-prune-1.439883.out    ...            gridtk submit --time 0-8 --- python -m face_benchmark.cli feature-extraction....                                                                                                               

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions