-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathprep_cran_submit.R
More file actions
94 lines (76 loc) · 2.64 KB
/
prep_cran_submit.R
File metadata and controls
94 lines (76 loc) · 2.64 KB
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
#BEFORE SUBMITTING TO CRAN
setwd(dirname(rstudioapi::getSourceEditorContext()$path)) #not necessary in the Rproject
#1. update date AND version number in DESCRIPTION file
#2. update News.md
#3. update the CITATION.cff
cffr::cff_write(dependencies=FALSE)
#4. run lintr
lintr::lint_dir() #we took out return_linter = NULL
#5. check all URLs
urlchecker::url_check()
#6. document + manual + readme
devtools::document()
devtools::build_manual(path='I:\\biocon\\ebv_portal\\package\\ebvcube\\inst\\docs')
devtools::build_readme()
#7. update Rbuildignore + gitignore file -> ignore everything except the new manual version
#8. Again, run tests and examples + check
devtools::test()
devtools::run_examples()
devtools::check()
#9. optional: run tests and checks with gdal(warn=1) to check out the gdal warnings
# Check package as CRAN
# rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"))
# Check content
#install.packages('checkhelper', repos = 'https://thinkr-open.r-universe.dev')
# checkhelper::find_missing_tags()
# # _Check that you let the house clean after the check, examples and tests
# all_files_remaining <- checkhelper::check_clean_userspace()
# all_files_remaining
# Check spelling
# usethis::use_spell_check()
# spelling::spell_check_package()
# Check URL are correct
# install.packages('urlchecker', repos = 'https://r-lib.r-universe.dev')
# urlchecker::url_update()
# Upgrade version number
# usethis::use_version(which = c("patch", "minor", "major", "dev")[1])
# check on other distributions
# _rhub
# cran_prep <- rhub::check_for_cran()
# cran_prep$cran_summary()
# devtools::check_rhub()
# rhub::check_on_windows(check_args = "--force-multiarch")
# rhub::check_on_solaris()
# # _win devel
# devtools::check_win_devel()
# # Check reverse dependencies
# # remotes::install_github("r-lib/revdepcheck")
# install.packages('revdepcheck', repos = 'https://r-lib.r-universe.dev')
# usethis::use_git_ignore("revdep/")
# usethis::use_build_ignore("revdep/")
#
# devtools::revdep()
# library(revdepcheck)
# In another session
# id <- rstudioapi::terminalExecute("Rscript -e 'revdepcheck::revdep_check(num_workers = 4)'")
# rstudioapi::terminalKill(id)
# # See outputs
# revdep_details(revdep = "pkg")
# revdep_summary() # table of results by package
# revdep_report() # in revdep/
# # Clean up when on CRAN
# revdep_reset()
# Add comments for CRAN
# usethis::use_cran_comments(open = rlang::is_interactive())
#MANUALLY
#update date in DESCRIPTION
#upgraded version number correctly?
#news uptodate?
# Verify you're ready for release, and release
# devtools::release()
# # shiny app
# shiny,
# shinyFiles,
# shinyWidgets,
# bslib,
# remove stuff from Rbuildignore