Skip to content

Commit 761affd

Browse files
author
Sarah Endicott
committed
Trying out using precommit for precommit hooks
1 parent 712b932 commit 761affd

9 files changed

Lines changed: 137 additions & 19 deletions

.Rbuildignore

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
^data-raw$
2-
^extraPackageInstalls.R$
3-
^installRoads.R$
4-
^kylesCLUSExample.Rmd$
5-
^projectRoadsTroutLakeExample.R$
61
^.*\.Rproj$
7-
^\.Rproj\.user$
2+
^CRAN-RELEASE$
3+
^CRAN-SUBMISSION$
4+
^LICENSE\.md$
85
^README\.Rmd$
6+
^\.Rproj\.user$
7+
^\.git$
98
^\.github$
10-
^cran-comments\.md$
11-
^LICENSE\.md$
9+
^\.pre-commit-config\.yaml$
1210
^_pkgdown\.yml$
11+
^cran-comments\.md$
12+
^data-raw$
1313
^docs$
14+
^extraPackageInstalls.R$
15+
^installRoads.R$
16+
^kylesCLUSExample.Rmd$
1417
^pkgdown$
15-
^vignettes/articles$
16-
^\.git$
17-
^tests/testthat/benchmarking.R
18-
^CRAN-RELEASE$
19-
20-
^CRAN-SUBMISSION$
18+
^projectRoadsTroutLakeExample.R$
2119
^revdep$
20+
^tests/testthat/benchmarking.R
21+
^vignettes/articles$

.pre-commit-config.yaml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# All available hooks: https://pre-commit.com/hooks.html
2+
# R specific hooks: https://github.com/lorenzwalthert/precommit
3+
repos:
4+
- repo: https://github.com/lorenzwalthert/precommit
5+
rev: v0.4.3.9030
6+
hooks:
7+
- id: roxygenize
8+
# roxygen requires loading pkg -> add dependencies from DESCRIPTION
9+
additional_dependencies:
10+
- dplyr
11+
- igraph
12+
- data.table
13+
- sf
14+
- units
15+
- rlang
16+
- methods
17+
- tidyselect
18+
- terra
19+
- id: use-tidy-description
20+
- id: spell-check
21+
exclude: >
22+
(?x)^(
23+
.*\.[rR]|
24+
.*\.feather|
25+
.*\.jpeg|
26+
.*\.pdf|
27+
.*\.png|
28+
.*\.py|
29+
.*\.RData|
30+
.*\.rds|
31+
.*\.Rds|
32+
.*\.Rproj|
33+
.*\.sh|
34+
(.*/|)\.gitignore|
35+
(.*/|)\.gitlab-ci\.yml|
36+
(.*/|)\.lintr|
37+
(.*/|)\.pre-commit-.*|
38+
(.*/|)\.Rbuildignore|
39+
(.*/|)\.Renviron|
40+
(.*/|)\.Rprofile|
41+
(.*/|)\.travis\.yml|
42+
(.*/|)appveyor\.yml|
43+
(.*/|)NAMESPACE|
44+
(.*/|)renv/settings\.dcf|
45+
(.*/|)renv\.lock|
46+
(.*/|)WORDLIST|
47+
\.github/workflows/.*|
48+
data/.*|
49+
)$
50+
- id: readme-rmd-rendered
51+
- id: parsable-R
52+
- id: no-browser-statement
53+
- id: no-print-statement
54+
- id: no-debug-statement
55+
- id: deps-in-desc
56+
- id: pkgdown

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ Imports:
4949
methods,
5050
tidyselect,
5151
terra
52-
RoxygenNote: 7.3.3
5352
Suggests:
5453
testthat (>= 2.1.0),
5554
knitr,
@@ -82,3 +81,4 @@ Collate:
8281
'dem_example.R'
8382
BugReports: https://github.com/LandSciTech/roads/issues
8483
Roxygen: list(markdown = TRUE)
84+
Config/roxygen2/version: 8.0.0

R/getDistFromSource.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
#' library(sf)
6363
#' library(terra)
6464
#'
65-
#' #make example roads from scratch
65+
#' # make example roads from scratch
6666
#' rds <- st_as_sf(data.frame(x = 1:1000/100, y = cos(1:1000/100)),
6767
#' coords = c("x", "y"))
6868
#' rds <- st_cast(st_union(rds), "LINESTRING")

inst/WORDLIST

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
artefacts
2+
aut
3+
bc
4+
BugReports
5+
buildSimList
6+
buildSnapRoads
7+
CLUSexample
8+
Config
9+
cph
10+
cre
11+
CRS
12+
dem
13+
demoScen
14+
disaggregated
15+
dplyr
16+
ec
17+
endicott
18+
Endicott
19+
gc
20+
gdistance
21+
getClosestRoad
22+
getDistFromSource
23+
getGraph
24+
getLandingsFromTarget
25+
github
26+
https
27+
hughes
28+
igraph
29+
io
30+
josie
31+
knitr
32+
landscitech
33+
LandSciTech
34+
LazyData
35+
lcpList
36+
Lochhead
37+
modelling
38+
mstList
39+
ORCID
40+
pathsToLines
41+
pfocal
42+
plotRoads
43+
prepExData
44+
projectRoads
45+
rasterizeLine
46+
RasterLayer
47+
rasters
48+
rasterToLineSegments
49+
rlang
50+
rmarkdown
51+
roxygen
52+
Roxygen
53+
sarah
54+
shortestPaths
55+
SpatRaster
56+
terra
57+
testthat
58+
tidyselect
59+
VignetteBuilder
60+
viridis
61+
weightFunctions

man/getDistFromSource.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/getLandingsFromTarget.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/prepExData.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/roads-package.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)