Skip to content
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

Pillar support #43

Merged
merged 22 commits into from Sep 15, 2017
Merged

Pillar support #43

merged 22 commits into from Sep 15, 2017

Conversation

@krlmlr
Copy link
Member

@krlmlr krlmlr commented Sep 4, 2017

@krlmlr krlmlr requested a review from hadley Sep 4, 2017
@hadley
hadley approved these changes Sep 5, 2017
Copy link
Member

@hadley hadley left a comment

Output looks good. Do you need a test to confirm that very large times only have sigfigs highlighted in h component?

@@ -0,0 +1,44 @@
cf_data.hms <- function(x, ...) {

This comment has been minimized.

@hadley

hadley Sep 5, 2017
Member

I think you need a comment here along the lines of "dynamically exported; see zzz.R

This comment has been minimized.

@krlmlr

krlmlr Sep 7, 2017
Author Member

Done.

@krlmlr
Copy link
Member Author

@krlmlr krlmlr commented Sep 7, 2017

Added a test for hms with 1000 hours.

@hadley
Copy link
Member

@hadley hadley commented Sep 7, 2017

Looks good and NA placement is much better.

krlmlr added 8 commits Sep 12, 2017
@codecov
Copy link

@codecov codecov bot commented Sep 12, 2017

Codecov Report

Merging #43 into master will increase coverage by 0.56%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #43      +/-   ##
=========================================
+ Coverage   98.63%   99.2%   +0.56%     
=========================================
  Files           6       7       +1     
  Lines          73     125      +52     
=========================================
+ Hits           72     124      +52     
  Misses          1       1
Impacted Files Coverage Δ
R/format.R 100% <100%> (ø) ⬆️
R/colformat.R 100% <100%> (ø)
R/arith.R 100% <100%> (ø) ⬆️
R/hms.R 97.36% <100%> (+0.07%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f4eaa3...24521de. Read the comment docs.

@krlmlr krlmlr changed the title Colformat support Pillar support Sep 12, 2017
@krlmlr krlmlr merged commit 217be6d into master Sep 15, 2017
6 checks passed
6 checks passed
codecov/patch 100% of diff hit (target 98.63%)
Details
codecov/project 99.2% (+0.56%) compared to 8f4eaa3
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@krlmlr krlmlr mentioned this pull request Sep 15, 2017
@krlmlr krlmlr deleted the f-colformat branch Oct 25, 2017
krlmlr added a commit that referenced this pull request Nov 16, 2017
- `hms()` now works correctly if all four components (days, hours, minutes, seconds) are passed (#49).
- Values with durations of over 10000 hours are now printed correctly (#48).
- `c()` now returns a hms (#41, @qgeissmann).
- Pillar support (#43).
krlmlr added a commit that referenced this pull request Nov 23, 2017
Breaking changes
----------------

- `as.hms.POSIXt()` now defaults to the current time zone, the previous default was `"UTC"` and can be restored by calling `pkgconfig::set_config("hms::default_tz", "UTC")`.

New features
------------

- Pillar support, will display `hms` columns in tibbles in color on terminals
  that support it (#43).
- New `round_hms()` and `trunc_hms()` for rounding or truncating to a given multiple of seconds (#31).
- New `parse_hms()` and `parse_hm()` to parse strings in "HH:MM:SS" and "HH:MM" formats (#30).
- `as.hms.POSIXt()` gains `tz` argument, default `"UTC"` (#28).
- `as.hms.character()` and `parse_hms()` accept fractional seconds (#33).

Bug fixes
---------

- `hms()` now works correctly if all four components (days, hours, minutes, seconds) are passed (#49).
- `hms()` creates a zero-length object of class `hms` that prints as `"hms()"`.
- `hms(integer())` and `as.hms(integer())` both work and are identical to `hms()`.
- Values with durations of over 10000 hours are now printed correctly (#48).
- `c()` now returns a hms (#41, @qgeissmann).

Documentation and error messages
--------------------------------

- Fix and enhance examples in `?hms`.
- Documentation is in Markdown format now.
- Improved error message if calling `hms()` with a character argument (#29).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.