Skip to content

Commit

Permalink
Reduce dependencies (#984)
Browse files Browse the repository at this point in the history
* removing packages that I don't think get used anywhere. and removing references to fst and spss files

* Update documentation

* Update authors in description

* [check-spelling] Update metadata

Update for https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/10469297653/attempts/1
Accepted in #984 (comment)

Signed-off-by: check-spelling-bot <[email protected]>
on-behalf-of: @check-spelling <[email protected]>

* [check-spelling] Update metadata

Update for https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/10469690723/attempts/1https://github.com/Public-Health-Scotland/source-linkage-files/actions/runs/10469690723/attempts/1
Accepted in #984 (comment)

Signed-off-by: check-spelling-bot <[email protected]>
on-behalf-of: @check-spelling <[email protected]>

---------

Signed-off-by: check-spelling-bot <[email protected]>
Co-authored-by: marjom02 <[email protected]>
Co-authored-by: SwiftySalmon <[email protected]>
Co-authored-by: Jennifer Thom <[email protected]>
Co-authored-by: Jennit07 <[email protected]>
Co-authored-by: Jennit07 <[email protected]>
  • Loading branch information
6 people authored Aug 20, 2024
1 parent 72a66f8 commit fce3249
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 33 deletions.
30 changes: 18 additions & 12 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ Accom
Admissio
admloc
admtype
adpe
ADPE
adtf
alstr
anomymous
arrivalmode
arth
atlassian
Expand All @@ -20,12 +21,12 @@ bodyloc
boxi
CAK
callr
canx
Canx
carehome
careinspectorate
categorises
cattend
ccyy
CCYY
cdn
cennum
CEREBROVASC
Expand All @@ -36,10 +37,11 @@ chpstart
cij
Classificat
cmh
cnws
CNWs
codecov
comhairle
Comhairle
commhosp
communicty
congen
copd
costinc
Expand All @@ -53,6 +55,7 @@ customise
cvd
dataframe
datamart
datas
datazone
datediff
dateformat
Expand Down Expand Up @@ -158,7 +161,7 @@ keytime
kis
knitr
lcap
lcho
LCHO
lgl
linetype
lintr
Expand All @@ -168,9 +171,9 @@ ltd
lubridate
magrittr
markdownguide
matern
mcbride
mcmahon
Matern
mcnicol
megan
microsoft
MIU
MMMYY
Expand Down Expand Up @@ -203,6 +206,7 @@ parkinsons
patflow
pattype
PCEC
pcs
PERTH
PHIBCS
phs
Expand All @@ -215,13 +219,15 @@ PLICS
popluation
Posix
postcodes
ppas
Postcodesio
PPAs
prac
praccode
ptypes
purrr
quickstart
rankdir
rbindlist
rcmdcheck
rdd
rdname
Expand All @@ -232,13 +238,13 @@ readr
readxl
reasonwait
recid
recordlinkage
refailure
reflectoring
refsource
reftype
relaint
renviron
returnsthe
rlang
rmarkdown
Rnw
Expand Down Expand Up @@ -268,7 +274,7 @@ simd
slf
slfhelper
smr
smra
SMRA
smrtype
sourcedev
sparra
Expand Down
12 changes: 1 addition & 11 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@ Title: Create the Source Linkage Files
Version: 0.0.0.9000
Authors@R: c(
person("Public Health Scotland", , , "[email protected]", role = c("cre", "cph")),
person("Megan", "McNicol", , "[email protected]", role = "aut"),
person("Jennifer", "Thom", , "[email protected]", role = "aut"),
person("James", "McMahon", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-5380-2029")),
person("Catherine", "Holland", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-3259-5745")),
person("Bateman", "McBride", , "[email protected]", role = "aut"),
person("Zihao", "Li", , "[email protected]", role = "aut",
comment = c(ORCID = "0000-0002-5178-2124"))
)
Expand All @@ -25,25 +21,19 @@ Imports:
data.table (>= 1.14.6),
dbplyr (>= 2.3.1),
dplyr (>= 1.1.1),
dtplyr (>= 1.3.0),
fs (>= 1.6.1),
fst (>= 0.9.8),
future (>= 1.33.0),
future.callr (>= 0.8.1),
glue (>= 1.6.2),
haven (>= 2.5.2),
hms (>= 1.1.0),
janitor (>= 2.2.0),
keyring (>= 1.3.0),
lubridate (>= 1.9.2),
magrittr (>= 2.0.3),
odbc (>= 1.3.1),
openssl (>= 2.0.5),
openxlsx (>= 4.2.5),
phsmethods (>= 0.2.2),
phsopendata (>= 0.0.1.0),
purrr (>= 1.0.1),
qs (>= 0.25.5),
R.utils (>= 2.12.2),
readr (>= 2.1.0),
rlang (>= 1.1.0),
Expand Down
8 changes: 0 additions & 8 deletions R/read_file.R
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
#' @description Read a file, the function chosen to read the file is dependant
#' on the file path.
#' * `.rds` uses [readr::read_rds()].
#' * `.fst` uses [fst::read_fst()].
#' * `.sav` and `.zsav` use [haven::read_spss()].
#' * `.csv` and `.gz` use [readr::read_csv()]. Note that this assumes any file
#' ending with `.gz` is a zipped CSV which isn't necessarily true!
#' * `.parquet` uses [arrow::read_parquet()].
Expand All @@ -19,9 +17,6 @@ read_file <- function(path, col_select = NULL, as_data_frame = TRUE, ...) {
valid_extensions <- c(
"rds",
"rds.gz",
"fst",
"sav",
"zsav",
"csv",
"csv.gz",
"parquet"
Expand Down Expand Up @@ -60,9 +55,6 @@ read_file <- function(path, col_select = NULL, as_data_frame = TRUE, ...) {
data <- switch(ext,
"rds" = readr::read_rds(file = path),
"rds.gz" = readr::read_rds(file = path),
"fst" = tibble::as_tibble(fst::read_fst(path = path)),
"sav" = haven::read_spss(file = path, ...),
"zsav" = haven::read_spss(file = path, ...),
"csv" = readr::read_csv(file = path, ..., show_col_types = FALSE),
"csv.gz" = readr::read_csv(file = path, ..., show_col_types = FALSE),
"parquet" = arrow::read_parquet(
Expand Down
2 changes: 0 additions & 2 deletions man/read_file.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fce3249

Please sign in to comment.