Conversation
|
re-pushed, fix spelling and linting issues found by CI. Edit: oops another time, isort fail. |
|
doh! i wonder if this is even solvable within the framework of how we do output formats. I suppose in some worst case it could loop through all potential outputs, see what the longest emoji length is, then adjust field width .... ugh |
|
Yeah, that's my worry as well. I guess we do already loop through all outputs to check for empty fields to handle |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5179 +/- ##
==========================================
- Coverage 83.15% 83.15% -0.01%
==========================================
Files 455 455
Lines 78035 78050 +15
==========================================
+ Hits 64890 64899 +9
- Misses 13145 13151 +6
🚀 New features to boost your workflow:
|
|
After working on #7053, I was like "hey, would '+:' help work on this old emoji output PR?" (it wasn't around when I first wrote it) Had to do some small tweaks, but it seems good!
The only gotcha is use of the Edit: oh it just occurred to me the STATUS emoji is not lined up correctly in the above picture. It's b/c this PR is not rebased on PR #7053. The width has not been corrected for the header. I temporarily widened the width for this next screenshot.
Edit2: Ok, nevermind, I rebased this on #7053. It's probably necessary for this to all look good.
Edit3: ugh, i guess the python dependency isn't in the images, so all CI fails |
5e1ea38 to
ca0deb3
Compare
Problem: The expandable width prefix ("+:") assumes all output
characters are 1 character width in size. This may not always be
the case, such as with several of the emoji output options.
Use wcswidth() instead of len() for calculating output width.
Problem: Python does not take into account wide characters
(i.e. emojis) when attempting to do output alignment. So when
outputting wide characters in flux-jobs, the output can be poor
due to the characters have different output widths.
Solution: Add a new W presentation type that can adjust formatting
of the form "(<|>)N", e.g. {id.emoji:>12W}. The output width will
be adjusted given the number of wide characters that exist in the
string.
Problem: The W presentation type is not documented in flux-jobs(1) Add paragraph covering it.
Problem: The cute format in flux-jobs is not cute enough!
Solution: Update the format to use id.emoji over id.f58. Utilize
the expandable width prefix ("+:") and "W" presentation type to
get output to align more nicely.
Problem: There is no coveragage for id.emoji and the W presentation type. Add some coverage in t2800-jobs-cmd.t.




Problem:
flux-jobs(1)cute output does not throw enough emojis in your face.Solution: Update
flux-jobscuteformat to useid.emojioverid.f58. Support newWpresentation adjuster to make the output prettier.