-
Notifications
You must be signed in to change notification settings - Fork 38
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
Formatting of decimal columns #7
Conversation
- add acceptance test - `show_output_in_terminal()` - import rlang - simplify output for tests
- split into functions - `style_num()` gains `subtle` argument - also mark lhs and dot as insignificant if lhs is zero
BTW I think only collaborators can request reviews. I've added you since you're likely to want to contribute other stuff. |
|
||
structure( | ||
list( | ||
neg = format_neg(neg), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably call these format methods at print time, rather than creation. But that might imply a more significant refactoring than you want to do here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was thinking about storing the decomposition (neg, lhs, rhs, exp) in an object. The changes here are a step towards this idea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that case, do you want to merge this, and then I'll review those changes in another PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, if you're okay with the acceptance tests (second screenshot).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah looks good. Although might be worth a test with some negatives as well?
Do you prefer merging or squashing for this repo? |
Added colored output of test results to Travis: https://travis-ci.org/krlmlr/colformat/builds/237694396#L1304 Could you please enable Travis for the main repo? |
Ooops. I prefer squashing in general, unless you've already carefully rebase to make a clean history. Travis is now on. |
Thanks. Squashing would be a tad easier if this was the default option. |
Acceptance tests
Refactoring, and grey out insignificant leading zeros
@hadley: Could you please review (and enable reviews)?