Skip to content

Commit

Permalink
Merge pull request #85 from getwilds/egs-files
Browse files Browse the repository at this point in the history
Files suite of functions examples
  • Loading branch information
sckott authored Jan 31, 2025
2 parents 58ab2e1 + 6f98fdb commit 5f630cd
Show file tree
Hide file tree
Showing 12 changed files with 354 additions and 161 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
PACKAGE := $(shell grep '^Package:' DESCRIPTION | sed -E 's/^Package:[[:space:]]+//')
RSCRIPT = Rscript --no-init-file
FILE_TARGET := "R/${FILE}"
MAN_TARGET := "man/${TOPIC}.Rd"

.PHONY: docs

Expand All @@ -16,9 +17,14 @@ doc:
docs:
${RSCRIPT} -e "pkgdown::build_site(); pkgdown::preview_site(preview=TRUE)"

eg:
egs:
${RSCRIPT} -e "devtools::run_examples(run_dontrun = TRUE)"

# use: `make eg TOPIC=aws_file_exists`
# ("man/" is prepended); accepts 1 file only
eg:
${RSCRIPT} -e 'pkgload::load_all(); pkgload::run_example(${MAN_TARGET})'

check: build
_R_CHECK_CRAN_INCOMING_=FALSE R CMD CHECK --as-cran --no-manual `ls -1tr ${PACKAGE}*gz | tail -n1`
@rm -f `ls -1tr ${PACKAGE}*gz | tail -n1`
Expand Down
Loading

0 comments on commit 5f630cd

Please sign in to comment.