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 September 4, 2017 21:13
Copy link
Member

@hadley hadley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

R/colformat.R Outdated
@@ -0,0 +1,44 @@
cf_data.hms <- function(x, ...) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@krlmlr
Copy link
Member Author

krlmlr commented Sep 7, 2017

Added a test for hms with 1000 hours.

@hadley
Copy link
Member

hadley commented Sep 7, 2017

Looks good and NA placement is much better.

@codecov
Copy link

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
@krlmlr krlmlr mentioned this pull request Sep 15, 2017
Closed
@krlmlr krlmlr deleted the f-colformat branch October 25, 2017 08:15
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).
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants