MyNixOS website logo
Description

Various Tests with 'roxygen2'.

Various tests as 'roxygen2' roclets: e.g. 'testthat' and 'tinytest' tests. Also other static analysis tools as checking parameter documentation consistency and others.

R buildstatus

roxytest

Inline tests with roxygen2 using testthat or tinytest. In addition, there are a few roclets that aim at catching common documentation issues during the development cycle.

See demo package using this at roxytestdemo.

Install

To build and install from Github run this command from within R:

remotes::install_github("mikldk/roxytest", 
                        build_opts = c("--no-resave-data", "--no-manual"))

You can also install the package without vignettes if needed as follows:

remotes::install_github("mikldk/roxytest")

Documentation

Please refer to this README as well as the included manual pages as well as the vignette, all also available online at https://mikldk.github.io/roxytest/.

Usage

There are a number of roclets included:

  • testthat_roclet
  • tinytest_roclet
  • param_roclet
  • return_roclet
  • examples_roclet

Please refer to the “Introduction” vignette for details on these.

To use the package in your own package you do not need to add any additional dependencies in your package’s DESCRIPTION file. Simply add the following lines to your package’s DESCRIPTION file (or any other of the roclets mentioned above):

Roxygen: list(roclets = c("namespace", "rd", "roxytest::testthat_roclet"))

Notes

Document package keyboard shortcut

In RStudio, CTRL+SHIFT+D/CMD+SHIFT+D option does not run devtools::document() but only devtools::document(roclets=c('rd', 'collate', 'namespace')) (possibly with fewer depending on the project options, but not none).

Instead, you can use devtoolsdocument()addin (see e.g. Rstudio documentation), and override the keyboard shortcut.

Metadata

Version

0.0.2

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows