-
Notifications
You must be signed in to change notification settings - Fork 0
/
prepare_submission.R
96 lines (67 loc) · 2.12 KB
/
prepare_submission.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
# Setup github actions in main branch
#------------------------------------
# Replace the check action from usethis::use_github_action("check-standard")
#- uses: r-lib/actions/check-r-package@v2
# with:
# upload-snapshots: true
# error-on: '"error"'
# with
# - name: Check
# env:
# _R_CHECK_CRAN_INCOMING_REMOTE_: false
# run: |
# options(crayon.enabled = TRUE)
# rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), build_args = c("--compact-vignettes=both"), error_on = "warning", check_dir = "check")
# shell: Rscript {0}
#
# - name: Upload check results
# if: failure()
# uses: actions/upload-artifact@main
# with:
# name: ${{ runner.os }}-r${{ matrix.config.r }}-results
# path: check
# Change version
#---------------
# check pdf manual
#-----------------
devtools::build_manual(pkg = ".", path = NULL)
# Spell check
#------------
spelling::spell_check_package()
# Test coverage
#--------------
#usethis::use_testthat()
detach("package:aldvmm", unload = TRUE)
ct <- covr::package_coverage()
covr::report(ct)
library("aldvmm")
# Register qpdf and ghostscript
#------------------------------
Sys.setenv('PATH' = paste0('C:/Users/phm1/qpdf-11.1.1/bin;', Sys.getenv('PATH')))
Sys.setenv(R_GSCMD = "C:/Users/phm1/gs10.00.0/bin/gswin64c.exe")
# Save pdf vignette in vignettes folder
#--------------------------------------
rmarkdown::render("./vignettes/pdf_vignette.Rmd")
# Save html vignette in vignettes folder
#--------------------------------------
rmarkdown::render("./vignettes/html_vignette.Rmd")
# Local check
#------------
devtools::check(pkg = ".", cran = TRUE)
# Build package
#--------------
# Pdf vignette
#devtools::build(args = c('--compact-vignettes=both'))
# Html vignette
devtools::build()
# Source check in shell
#----------------------
# R CMD check --as-cran ../aldvmm_0.8.8.tar.gz
# Winbuilder
#------------
# upload via webpage https://win-builder.r-project.org/upload.aspx
# Note about possibly invalid DOI in DESCRIPTION is fine.
# rhub checks
#------------
rhub::check("../aldvmm_0.8.8.tar.gz", platform = "ubuntu-gcc-release")
rhub::check("../aldvmm_0.8.8.tar.gz", platform = "debian-gcc-devel")