Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd color/formatting to output of print methods #124
Comments
|
sounds good to me. not sure how it works - we should do it if possible |
|
Cool, I made a few things bold already. Its really easy, but I don't know if it will introduce edge case problems |
|
cool to see the colors |
|
Nice! I think the colors will help with these complex print methods. Feel free to change the specific styles here: Lines 357 to 413 in a7ac6b3 I am still not sure about the best styles to use for each part |
|
I'm not sure what's best either. maybe they have best practices docs somehwere? |
|
I searched for best practices after you suggested it and did not find any. Currently, my strategy is to copy the |
|
okay. i guess if can't indent the table, just a newline or two to set it off visually? |
|
That would work. Although I can get them to indent without color using : Lines 37 to 47 in cac27b1 I then was trying to add some color back, but I doubt it would be worth the trouble to completely replicate the color. I mostly just want the taxon IDs highlighted. I managed to highlight the taxon ID column name, so thats something at least. |
|
It would be especially cool if only valid taxon IDs were colored as taxon IDs so people can tell quickly which datasets are mapped to taxa and if there is anything wrong with the IDs (e.g. a taxonless data after filtering with |
|
valid in what sense? |
|
All should be either an ID in the edge list / |
|
ah, okay, yeah, seems like it'd be fast enough |
|
Ok cool |
|
Seems to be working now. Things now only get the "taxon ID" green font if the are all valid taxon ids. If there is a "taxon_id" column, but there are invalid ids, then the column header gets an angry red color. |
@sckott, what do you think of adding color/formatting to the output of print methods using the
crayonpackage? Do have any experience with this? Do you know of potential problems with consoles that do not understand the color codes?I was trying to figure out how the
tibbles are color coded now, but I don't see that code in thetibblepackage even though it importscrayon.