-
Notifications
You must be signed in to change notification settings - Fork 2
/
devstuff_history.R
127 lines (106 loc) · 3.37 KB
/
devstuff_history.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# Hide this file from build
usethis::use_build_ignore("devstuff_history.R")
usethis::use_build_ignore("inst/dev")
usethis::use_build_ignore("img")
usethis::use_build_ignore("rsconnect")
usethis::use_git_ignore("docs/")
usethis::use_git_ignore("rsconnect/")
usethis::use_build_ignore("rtweet_info.log")
usethis::use_build_ignore("timeline_rspatial.rds")
usethis::use_git_ignore("rtweet_info.log")
usethis::use_git_ignore("timeline_rspatial.rds")
# usethis::create_package(".")
usethis::use_build_ignore("reference/")
# description ----
library(desc)
unlink("DESCRIPTION")
my_desc <- description$new("!new")
my_desc$set_version("0.0.0.9000")
my_desc$set(Package = "tweetbotr")
my_desc$set(Title = "Functions for a Twitter bot")
my_desc$set(Description = "Functions to allow retrieve, store and retweet regularly.")
my_desc$set("Authors@R",
'c(
person("Sebastien", "Rochette", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1565-9313"))
)')
my_desc$set("VignetteBuilder", "knitr")
my_desc$del("Maintainer")
my_desc$del("URL")
my_desc$del("BugReports")
my_desc$write(file = "DESCRIPTION")
# Licence ----
usethis::use_mit_license("Sébastien Rochette")
# usethis::use_gpl3_license("ThinkR")
# Pipe ----
usethis::use_roxygen_md()
usethis::use_pipe()
# Package quality ----
# _Git
usethis::use_git()
usethis::use_github()
# _Tests
usethis::use_testthat()
usethis::use_test("app")
# _CI
tic::use_tic()
# travis::travis_set_pat()
# usethis::use_travis()
# usethis::use_appveyor()
# usethis::use_coverage()
# _rhub
# rhub::check_for_cran()
# Documentation ----
# _Functions
usethis::use_r("rtweet_functions")
usethis::use_r("get_account_info")
usethis::use_r("top_tweets")
# _Readme
# usethis::use_readme_rmd()
chameleon::generate_readme_rmd(source = "github",
url = "statnmap/tweetrbot")
chameleon::generate_readme_rmd(parts = "description")
# _News
usethis::use_news_md()
# _Vignette
# thinkridentity::create_vignette_thinkr("aa-2")
usethis::use_vignette("aa-retrieve-tweets-and-store")
usethis::use_vignette("ab-top_tweets")
devtools::build_vignettes()
# _Book
chameleon::create_book("inst/report", clean = TRUE)
chameleon::open_guide_function()
devtools::document()
chameleon::build_book(clean_rmd = TRUE, clean = TRUE)
# pkg::open_guide()
# _Pkgdown
chameleon::build_pkgdown(
# lazy = TRUE,
yml = system.file("pkgdown/_pkgdown.yml", package = "thinkridentity"),
favicon = system.file("pkgdown/favicon.ico", package = "thinkridentity"),
move = TRUE, clean_before = TRUE, clean_after = TRUE
)
chameleon::open_pkgdown_function(path = "docs")
# pkg::open_pkgdown()
# CI
usethis::use_github_actions()
usethis::use_github_action(name = "check-standard")
usethis::use_github_action(name = "pkgdown")
# Readme
knitr::knit("README.Rmd")
# Dependencies ----
# devtools::install_github("ThinkR-open/attachment")
# attachment::att_to_description(extra.suggests = c("bookdown", "pkgdown"))
attachment::att_amend_desc()
# attachment::create_dependencies_file()
# Description and Bibliography
chameleon::create_pkg_desc_file(out.dir = "inst", source = c("archive"), to = "html")
thinkridentity::create_pkg_biblio_file_thinkr()
# Utils for dev ----
checkhelper::print_globals()
usethis::use_r("globals")
# install
devtools::install(upgrade = "never")
# devtools::load_all()
devtools::check(vignettes = TRUE)
# ascii
stringi::stri_trans_general("é", "hex")