Skip to content

natverse/nat.devtools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

407babf · Mar 14, 2021

History

67 Commits
Mar 14, 2021
Mar 14, 2021
Aug 8, 2019
Oct 11, 2019
Mar 14, 2021
Jul 31, 2020
Oct 11, 2019
Mar 14, 2021
Jul 31, 2020
Mar 14, 2021
Aug 3, 2019
Mar 14, 2021
Aug 8, 2019
Oct 8, 2019
Mar 14, 2021
Aug 2, 2019

Repository files navigation

nat.devtools

natverse Docs Lifecycle: experimental Travis build status

The goal of nat.devtools is to enable efficient development of R packages according to natverse conventions.

Setup

nat.devtools uses the usethis package to automate a number of development tasks. Please ensure that you have configured usethis as recommended.

You can do this by typing the following in your R session:

nat.devtools::use_nat_description_defaults()

to edit your .Rprofile file. Mine looks like this:

options(
  usethis.full_name = "Gregory Jefferis",
  usethis.protocol  = "ssh",
  usethis.description = list(
    `Authors@R` = 'person("Gregory","Jefferis", email="jefferis@gmail.com", 
      role=c("aut", "cre"), comment = c(ORCID = "0000-0002-0587-9355"))',
    License = "GPL-3",
    Encoding = "UTF-8",
    Language = "en-GB"
  )
)

Use

Once you're all set up, then the easiest way to use the package to configure your current project is to do:

nat.devtools::nat_setup_package()

This configures almost everything about a project and will ask interactive questions to determine if you want to upgrade / overwrite different files.

If you switch between different projects in the same session, then you must do:

usethis::proj_set()

to set the active project to the current directory.