-
Notifications
You must be signed in to change notification settings - Fork 121
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
table_display.py example now uses tableformatter instead of tabulate #456
Conversation
Changed the table_display.py example to use the tableformatter module which resuls in nicer looking tables.
Codecov Report
@@ Coverage Diff @@
## master #456 +/- ##
=======================================
Coverage 90.18% 90.18%
=======================================
Files 10 10
Lines 2741 2741
=======================================
Hits 2472 2472
Misses 269 269
Continue to review full report at Codecov.
|
@anselor Please feel free to make any changes you would recommend. I'm just trying to demonstrate the basics of how to make a nice looking table within |
… the same table entries formatted as both an iterable of iterable as well as an iterable of objects.
… unicode capability - Mandarin, Urdu, and Turkish all seem to be working fine - But something is up with Hindi - the table/colum width calculation is messed up for Mumbai
I pushed some unicode updates to make the unicode features very obvious. Unfortunately, my improvements appear to have unearthed a bug in the |
I can see why it would return 9 instead of 5. It's probably assuming each of those Hindi characters renders at 2 characters wide. |
The Hindi discrepancy appears to occur on macOS but not Linux |
Changed to use Hindi name for Mumbai based on Google Translate instead of a Google search and the table width and underlying wide character width calculation appears to be working fine.
I switched to get the Hindi translation of Mumbai based on Google Translate instead of a Google search which gave a different result and the width is working correctly now. |
…matting the grid style
Also: - Improved some comments - Put the argparse args for selecting grid style in a mutually exclusive group
@anselor I added the ability to choose the grid style based on argparse arguments to the commands. I am now done with all of the changes I wanted to make to this. As long as you are happy with it, I think it is good to merge. If we can figure out how to auto-color text in a row red if the population density is crazy high, then that would be gravy - but that can be done later, probably after we make some minor API changes in |
- Set date for 0.9.2 release to today - Added comment about how we have improved the table_display.py example with the use of the new tableformatter module
Changed the table_display.py example to use the tableformatter module which resuls in nicer looking tables.
This closes #450