This repository was archived by the owner on Aug 25, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevhist.R
71 lines (59 loc) · 1.87 KB
/
devhist.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# ------------------------------------------------------------------------
#
# Title : lossrunAnalyzer R Package Development History Script
# By : Jimmy Briggs
# Date : 2020-01-10
#
# ------------------------------------------------------------------------
# packages
library(devtools)
library(usethis)
library(git2r)
library(fs)
library(desc)
# ignore this script
usethis::use_build_ignore("devhist.R")
# add description to DESCRIPTION
desc::desc_set(
Title = "Lossrun Analyzer",
Description = "R Package for Interactive Analysis for Insurance Lossruns."
)
# setup git / version control
usethis::edit_r_profile() # set ssh as default protocol
my_cred <- git2r::cred_ssh_key(
publickey = fs::path_abs('C:\\Users\\jimmy.briggs\\.ssh\\id_rsa.pub'),
privatekey = fs::path_abs('C:\\Users\\jimmy.briggs\\.ssh\\id_rsa')
)
usethis::use_git_credentials(my_cred)
usethis::git_credentials()
rm(my_cred)
usethis::use_git_config(user.name = "Jimmy Briggs", user.email = "jimmy.briggs@oliverwyman.com")
usethis::use_git()
usethis::git_vaccinate()
usethis::use_github()
usethis::git_sitrep()
# add a readme
usethis::use_readme_rmd()
# setup namespace and roxygen
usethis::use_namespace()
usethis::use_roxygen_md()
devtools::document()
# setup prelim .R files
usethis::use_package_doc()
usethis::use_tibble() # @return a [tibble][tibble::tibble-package]
usethis::use_pipe()
usethis::use_testthat()
devtools::document()
# lifecycle & WIP badge
usethis::use_lifecycle_badge("Experimental")
usethis::use_badge(
"Project Status: WIP",
href = "http://www.repostatus.org/#wip",
src = "https://www.repostatus.org/badges/latest/wip.svg"
)
knitr::knit("README.Rmd")
# add some raw data
usethis::use_data_raw("example-lossruns")
usethis::use_git_ignore(ignores = c("*", "!.gitignore"), directory = "data-raw/client-lossruns")
# add a vignette
usethis::use_vignette("what-is-a-lossrun", "What is a Lossrun ?")