Skip to content

Commit

Permalink
Update Imports from Blanket to Selective Import for Improved Code Mai…
Browse files Browse the repository at this point in the history
…ntainability (#5988)

* Changed blanket imports to selective imports

* removed quotes

* alphabetize

* removed time from imports

* Update test.data.table.R

* added name to Authors@R

---------

Co-authored-by: nitish jha <nitishjha@nitishs-MacBook-Air.local>
Co-authored-by: Michael Chirico <michaelchirico4@gmail.com>
  • Loading branch information
3 people authored Mar 8, 2024
1 parent e2ce90a commit a8a595f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -82,5 +82,6 @@ Authors@R: c(
person("Josh","O'Brien", role="ctb"),
person("Dereck","de Mezquita", role="ctb"),
person("Michael","Czekanski", role="ctb"),
person("Dmitry", "Shemetov", role="ctb")
person("Dmitry", "Shemetov", role="ctb"),
person("Nitish", "Jha", role="ctb")
)
6 changes: 3 additions & 3 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
useDynLib("data_table", .registration=TRUE)

## For S4-ization
import(methods)
importFrom(methods, "S3Part<-", slotNames)
exportClasses(data.table, IDate, ITime)
##

Expand Down Expand Up @@ -130,11 +130,11 @@ S3method(melt, default)
# and many packges on CRAN call dcast.data.table() and/or melt.data.table() directly. See #3082.
export(melt.data.table, dcast.data.table)

import(utils)
importFrom(utils, capture.output, contrib.url, download.file, flush.console, getS3method, head, packageVersion, tail, untar, unzip)
export(update_dev_pkg)
S3method(tail, data.table)
S3method(head, data.table)
import(stats)
importFrom(stats, as.formula, na.omit, setNames, terms)
S3method(na.omit, data.table)

S3method(as.data.table, xts)
Expand Down
2 changes: 1 addition & 1 deletion R/test.data.table.R
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ test.data.table = function(script="tests.Rraw", verbose=FALSE, pkg=".", silent=F
}

# There aren't any errors, so we can use up 11 lines for the timings table
nTest = RSS = NULL # to avoid 'no visible binding' note
time = nTest = RSS = NULL # to avoid 'no visible binding' note
timings = env$timings[nTest>0]
if (!memtest) {
ans = head(timings[if (dev) -1L else TRUE][order(-time)], 10L)[,RSS:=NULL] # exclude id 1 in dev as that includes JIT
Expand Down

0 comments on commit a8a595f

Please sign in to comment.