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

Closes #3664 -- diligently avoid partial argument matching #3676

Merged
merged 8 commits into from Jul 13, 2019

Conversation

MichaelChirico
Copy link
Member

#3664

Confirmed we're doing OK for attr with:

grep -r "\battr[(]" R | grep -v "exact=TRUE"

There's one call to attr that's not using exact = TRUE inside of .shallow, since it's actually being called as attr<- (didn't look so at first glance but it threw "too many arguments" error when I first tried).

A bunch of partial matches were being used in test.data.table(). With the commit here, test.data.table() runs fine using the options suggested by @vlulla.

Copy link
Member

@jangorecki jangorecki left a comment

Choose a reason for hiding this comment

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

generally looks good. Although we are losing tests for partial matching-ness. I seen quite commonly use of id instead of id.vars or fun instead of fun.aggregate. If in future we will add new argument that would break this partial matching, then tests would detect such "breaking change".

@MichaelChirico
Copy link
Member Author

i thought of that and convinced myself we didn't want such tests but maybe you're right. If so, though, we should create tests explicitly for that purpose. (and skip them if the warnPartialMatch options are set, I guess)

@codecov
Copy link

codecov bot commented Jul 3, 2019

Codecov Report

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

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3676   +/-   ##
=======================================
  Coverage   98.25%   98.25%           
=======================================
  Files          69       69           
  Lines       13084    13084           
=======================================
  Hits        12856    12856           
  Misses        228      228
Impacted Files Coverage Δ
R/test.data.table.R 100% <ø> (ø) ⬆️
R/print.data.table.R 95.37% <100%> (ø) ⬆️
R/fread.R 100% <100%> (ø) ⬆️
R/IDateTime.R 98.75% <100%> (ø) ⬆️
R/data.table.R 97.87% <100%> (ø) ⬆️
R/duplicated.R 100% <100%> (ø) ⬆️
R/setkey.R 98.7% <100%> (ø) ⬆️
R/foverlaps.R 98.1% <100%> (ø) ⬆️
R/fcast.R 99.4% <100%> (ø) ⬆️
R/frank.R 100% <100%> (ø) ⬆️
... and 3 more

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 c3b8b2f...ca9e4d2. Read the comment docs.

@vlulla
Copy link
Contributor

vlulla commented Jul 3, 2019

@MichaelChirico you did a thorough job of fixing lots of files! Great work! And, thank you!

@mattdowle mattdowle added this to the 1.12.4 milestone Jul 13, 2019
@mattdowle
Copy link
Member

mattdowle commented Jul 13, 2019

Very nice PR - thanks @vlulla and @MichaelChirico! I just did a minor tweak to the news item and turned these options on so the tests always run with them on, to avoid any future partial argument matching creeping back in. One reveal on nanotime: eddelbuettel/nanotime#49
Tweeted here: https://twitter.com/MattDowle/status/1149868351662903296

@mattdowle mattdowle merged commit 62efa26 into master Jul 13, 2019
@mattdowle mattdowle deleted the partial_matches branch July 13, 2019 02:15
mattdowle added a commit that referenced this pull request Jul 13, 2019
@MichaelChirico
Copy link
Member Author

great! I meant to suggest the same for turning on the option. onwards and upwards!

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

4 participants