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

tz= to tzstr= to avoid partial argument match #49

Merged
merged 1 commit into from
Jul 13, 2019
Merged

tz= to tzstr= to avoid partial argument match #49

merged 1 commit into from
Jul 13, 2019

Conversation

mattdowle
Copy link
Contributor

Hi Dirk,
In data.table we now run tests with R's warnPartialMatchArgs turned on. This revealed this one line in nanotime since we have tests of nanotime with data.table.

> options(warnPartialMatchArgs=TRUE)
> nanotime("2016-09-28T15:30:00.000000070Z")
[1] "2016-09-28T15:30:00.000000070+00:00"
Warning message:
In RcppCCTZ::parseDouble(x, fmt = format, tz = tz) :
  partial argument match of 'tz' to 'tzstr'

It came up because a user wished to turn on this option for their own code in production to be strict themselves. But then internal code of data.table was caught by it too. So now we turn it on in tests, and stopped relying on partial argument match ourselves in internal data.table code. It's a nice improvement and caught a few things. I didn't know about this option before actually.
Hope you enjoyed Toulouse.
Best, Matt

Hi Dirk,
In data.table we now run tests with R's `warnPartialMatchArgs` turned on, . This revealed this one line in nanotime since we have tests of nanotime with data.table.
```
> options(warnPartialMatchArgs=TRUE)
> nanotime("2016-09-28T15:30:00.000000070Z")
[1] "2016-09-28T15:30:00.000000070+00:00"
Warning message:
In RcppCCTZ::parseDouble(x, fmt = format, tz = tz) :
  partial argument match of 'tz' to 'tzstr'
```
It came up because a user wished to turn on this option for their own code in production to be strict themselves. But then internal code of data.table was caught by it too. So now we turn it on in tests, and stopped relying on partial argument match ourselves in internal data.table code. It's a nice improvement and caught a few things. I didn't know about this option before actually.
Hope you enjoyed Toulouse.
Best, Matt
@codecov
Copy link

codecov bot commented Jul 13, 2019

Codecov Report

Merging #49 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #49   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           1      1           
  Lines          93     93           
=====================================
  Hits           93     93
Impacted Files Coverage Δ
R/nanotime.R 100% <100%> (ø) ⬆️

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 8f23453...02c65cd. Read the comment docs.

@eddelbuettel
Copy link
Owner

Saw the tweet about the NEWS item, and sorry for this -- and thanks for the PR. Will fold it in. Greetings from Toulouse airport. Saw Jens here too, we missed you once more.

@eddelbuettel eddelbuettel merged commit a387945 into eddelbuettel:master Jul 13, 2019
@eddelbuettel
Copy link
Owner

Thanks again. Now merged, given that I am home.

@mattdowle mattdowle deleted the patch-1 branch July 17, 2019 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants