Skip to content

Commit

Permalink
Merge pull request #2 from onnela-lab/cran-dev
Browse files Browse the repository at this point in the history
Update package for CRAN publication.
  • Loading branch information
tillahoffmann authored Dec 16, 2023
2 parents 49524a2 + df5b95c commit a8134d2
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 24 deletions.
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,3 @@ Makefile
^check$
^CRAN-SUBMISSION$
^cran-comments\.md$

11 changes: 3 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ jobs:
- macos-latest
runs-on: ${{ matrix.runner }}
steps:
- uses: "actions/checkout@v4"
- name: Install Windows dependencies.
run: choco install pandoc
if: matrix.runner == 'windows-latest'
- name: Install macOS dependencies.
run: brew install pandoc
if: matrix.runner == 'macos-latest'
- uses: "r-lib/actions/setup-r@v2"
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.Rproj.user
*.Rproj
*.Rcheck
*.tar.gz
inst/doc
vignettes/getting_started
*.html
check
.vscode
build
.DS_Store
18 changes: 5 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
.PHONY : build check man vignettes

vignettes/getting_started.html : vignettes/getting_started.Rmd vignettes/getting_started.stan
Rscript -e "devtools::build_rmd('$<')"

man :
Rscript -e 'devtools::document()'
.PHONY : build

build :
mkdir -p build
cd build && R CMD build ..

check : build
mkdir -p check
cd check && R CMD check --as-cran ../build/*.tar.gz
Rscript -e 'devtools::document()'
rm -f *.tar.gz
NOT_CRAN=true R CMD build .
R CMD check --as-cran *.tar.gz
5 changes: 4 additions & 1 deletion vignettes/getting_started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ vignette: >
%\VignetteIndexEntry{Getting Started with gptools in R}
%\VignetteEngine{knitr::rmarkdown}
%\VignetteEncoding{UTF-8}
params:
EVAL: !r identical(Sys.getenv("NOT_CRAN"), "true")
---

```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
comment = "#>",
eval = params$EVAL
)
```

Expand Down

0 comments on commit a8134d2

Please sign in to comment.