Skip to content

Releases: r-lib/devtools

Devtools 1.6.1

07 Oct 21:24
Compare
Choose a tag to compare
  • Don't set non-portable compiler flags on Solaris.
  • The file template.Rproj is now correctly installed and the function
    use_rstudio works as it should. (#595, @hmalmedal)
  • The function use_rcpp will now create the file src/.gitignore with the
    correct wildcards. (@hmalmedal)

Devtools 1.6

23 Sep 11:37
Compare
Choose a tag to compare

devtools 1.6

Tool templates and create()

  • create() no longer generates man/ directory - roxygen2 now does
    this automatically. It also no longer generates an package-level doc
    template. If you want this, use use_package_doc(). It also makes a dummy
    namespace so that you can build & reload without running document() first.
  • New use_data() makes it easy to include data in a package, either
    in data/ (for exported datasets) or in R/sysdata.rda (for internal
    data). (#542)
  • New use_data_raw() creates data-raw/ directory for reproducible
    generation of data/ files (#541).
  • New use_package() allows you to set dependencies (#559).
  • New use_package_doc() sets up an Roxygen template for package-level
    docs.
  • New use_rcpp() sets up a package to use Rcpp.
  • use_travis() now figures out your github username and repo so it can
    construct the markdown for the build image. (#546)
  • New use_vignette() creates a draft vignette using Rmarkdown (#572).
  • renamed add_rstudio_project() to use_rstudio(), add_travis() to
    use_travis(), add_build_ignore() to use_build_ignore(), and
    add_test_infrastructure() to use_testthat() (old functions are
    aliased to new)

The release process

  • You can add arbitrary extra questions to release() by defining a function
    release_questions() in your package. Your release_questions() should
    return a character vector of questions to ask (#451).
  • release() uses new CRAN submission process, as implemented by
    submit_cran() (#430).

Package installation

  • All install_* now use the same code and store much useful metadata.
    Currently only session_info() takes advantage of this information,
    but it will allow the development of future tools like generic update
    functions.
  • Vignettes are no longer installed by default because they potentally require
    all suggested packages to also be installed. Use build_vignettes = TRUE to
    force building and to install all suggested packages (#573).
  • install_bitbucket() has been bought into alignment with install_github():
    this means you can now specify repos with the compact username/repo@ref
    syntax. The username is now deprecated.
  • install_git() has been simplified and many of the arguments have changed
    names for consistency with metadata for other package installs.
  • install_github() has been considerably improved:
    • username is deprecated - please include the user in the repo name:
      rstudio/shiny, hadley/devtools etc.
    • dependencies = TRUE is no longer forced (regression in 1.5)
      (@krlmlr, #462).
    • Deprecated parameters auth_user, branch, pull and password have
      all been removed.
    • New host argument which allows you to install packages from github
      enterprise (#410, #506).
    • The GitHub API is used to download archive file (@krlmlr, #466) - this
      makes it less likely to break in the future.
    • To download a specified pull request, use ref = github_pull(...)
      (@krlmlr, #509). To install the latest release, use "user/repo@*release"
      or ref = github_release() (@krlmlr, #350).
  • install_gitorious() has been bought into alignment with install_github():
    this means you can now specify repos with the compact username/repo@ref
    syntax. You must now always supply user (project) name and repo.
  • install_svn() lets you install an R package from a subversion repository
    (assuming you have subversion installed).
  • decompress() and hence install_url() now work when the downloaded
    file decompresses without additional top-level directory (#537).

Other minor improvements and bug fixes

  • If you're using Rstudio, and you you're trying to build a binary package
    without the necessary build tools, Rstudio will prompt to download and
    install the right thing. (#488)
  • Commands are no longer run with LC_ALL=C - this no longer seems
    necessary (#507).
  • build(binary = TRUE) creates an even-more-temporary package library
    avoid conflicts (#557).
  • check_dir() no longer fails on UNC paths (#522).
  • check_devtools() also checks for dependencies on development versions
    of packages (#534).
  • load_all() no longer fails on partial loading of a package containing
    S4 or RC classes (#577).
  • On windows, find_rtools() is now run on package load, not package
    attach.
  • help(), ?, and system.file() are now made available when a package is
    loaded with load_all(), even if the devtools package isn't attached.
  • httr 0.3 required (@krlmlr, #466).
  • load_all() no longer gives an error when objects listed as exports are
    missing.
  • Shim added for library.dynam.unload().
  • loaded_packages() now returns package name and path it was loaded from.
    (#486)
  • The parenvs() function has been removed from devtools, because is now in the
    pryr package.
  • missing_s3() uses a better heuristic for determining if a function
    is a S3 method (#393).
  • New session_info() provides useful information about your R session.
    It's a little more focussed than sessionInfo() and includes where
    packages where installed from (#526).
  • rstudioapi package moved from suggests to imports, since it's always
    needed (it's job is to figure out if rstudio is available, #458)
  • Implemented own version utils::unzip() that throws error if command
    fails and doesn't print unneeded messages on non-Windows platforms (#540).
  • Wrote own version of write.dcf() that doesn't butcher whitespace and
    fieldnames.

Removed functionality

  • The fresh argument to test() has been removed - this is best done by
    the editor since it can run the tests in a completely clean environment
    by starting a new R session.

devtools 1.5

07 Apr 19:00
Compare
Choose a tag to compare

devtools 1.5

Four new functions make it easier to add useful infrastructure to packages:

  • add_test_infrastructure() will create test infrastructure for a new package.
    It is called automatically from test() if no test directories are
    found, the session is interactive and you agree.
  • add_rstudio_project() adds an Rstudio project file to your package.
    create() gains an rstudio argument which will automatically create
    an Rstudio project in the package directory. It defaults to TRUE:
    if you don't use Rstudio, just delete the file.
  • add_travis() adds a basic travis template to your package. .travis.yml
    is automatically added to .Rbuildignore to avoid including it in the built
    package.
  • add_build_ignore() makes it easy to add files to .Rbuildignore,
    correctly escaping special characters

Two dependencies were incremented:

  • devtools requires at least R version 3.0.2.
  • document() requires at least roxygen2 version 3.0.0.

Minor improvements

  • build_win() now builds R-release and R-devel by default (@krlmlr, #438).
    It also gains parameter args, which is passed on to build()
    (@krlmlr, #421).
  • check_doc() now runs document() automatically.
  • install() gains thread argument which allows you to install multiple
    packages in parallel (@mllg, #401). threads argument to check_cran()
    now defaults to getOption("Ncpus")
  • install_deps(deps = T) no longer installs all dependencies of
    dependencies (#369).
  • install_github() now prefers personal access tokens supplied to
    auth_token rather than passwords (#418, @jeroenooms).
  • install_github() now defaults to dependencies = TRUE so you definitely
    get all the packages you need to build from source.
  • devtools supplies its own version of system.file() so that when the function
    is called from the R console, it will have special behavior for packages
    loaded with devtools.
  • devtools supplies its own version of help and ?, which will search
    devtools-loaded packages as well as normally-loaded packages.

Bug fixes

  • check_devtools() no longer called by check() because the relevant
    functionality is now included in R CMD CHECK and it was causing
    false positives (#446).
  • install_deps(TRUE) now includes packages listed in VignetteBuilder (#396)
  • build() no longer checks for pdflatex when building vignettes, as
    many modern vignettes don't need it (#398). It also uses
    --no-build-vignettes for >3.0.0 compatibility (#391).
  • release() does a better job of opening your email client if you're inside
    of Rstudio (#433).
  • check() now correctly reports the location of the R CMD check
    output when called with a custom check_dir. (Thanks to @brentonk)
  • check_cran() records check times for each package tested.
  • Improved default DESCRIPTION file created by create_description().
    (Thanks to @ncarchedi, #428)
  • Fixed bug in install_github() that prevented installing a pull request by
    supplying repo = "username/repo#pull". (#388)
  • explicitly specify user agent when querying user name and ref for pull request
    in install_github. (Thanks to Kirill Müller, #405)
  • install_github() now removes blank lines found in a package DESCRIPTION
    file, protecting users from the vague error: contains a blank line error.
    (#394)
  • with_options() now works, instead of throwing an error (Thanks to
    @krlmlr, #434)

devtools 1.4.1

27 Nov 18:37
Compare
Choose a tag to compare
  • Fixed bug in wd() when path was ommitted. (#374)
  • Fixed bug in dev_help() that prevented it from working when not using
    Rstudio.
  • source_gist() respects new github policy by sending user agent
    (hadley/devtools)
  • install_github() now takes repo names of the form
    [username/]repo[/subdir][@ref|#pull] -
    this is now the recommended form to specify username, subdir, ref and/or
    pull for install_github. (Thanks to Kirill Müller, #376)

Devtools 1.4

20 Nov 18:28
Compare
Choose a tag to compare

Installation improvements

  • install() now respects the global option keep.source.pkgs.
  • install() gains a build_vignettes which defaults to TRUE, and ensures
    that vignettes are built even when doing a local install. It does this
    by forcing local = FALSE if the package has vignettes, so R CMD build
    can follow the usual process. (#344)
  • install_github() now takes repo names of the form username/repo -
    this is now the recommended form for install_github if your username is
    not hadley ;)
  • install_github() now adds details on the source of the installed package
    (e.g. repository, SHA1, etc.) to the package DESCRIPTION file. (Thanks to JJ
    Allaire)
  • Adjusted install_version() to new meta data structure on CRAN.
    (Thanks to Kornelius Rohmeyer)
  • Fixed bug so that install_version() works with version numbers that
    contain hyphens. (Thanks to Kornelius Rohmeyer)
  • install_deps() is now exported, making it easier to install the dependencies
    of a package.

Other minor improvements

  • build(binary = TRUE) now no longer installs the package as a side-effect.
    (#335)
  • build_github_devtools() is a new function which makes it easy for Windows
    users to upgrade to the development version of devtools.
  • create_description() does a better job of combining defaults and user
    specified options. (#332)
  • install() also installs the dependencies that do not have the required
    versions; besides, the argument dependencies now works like
    install.packages() (in previous versions, it was essentially
    c("Depends", "Imports", "LinkingTo")) (thanks, Yihui Xie, #355)
  • check() and check_cran() gain new check_dir argument to control where
    checking takes place (#337)
  • check_devtools() no longer incorrectly complains about a vignettes/
    directory
  • Decompression of zip files now respects getOption("unzip") (#326)
  • dev_help will now use the Rstudio help pane, if you're using a recent
    version of Rstudio (#322)
  • Release is now a little bit smarter: if it's a new package, it'll ask you
    to read and agree to the CRAN policies; it will only ask about
    dependencies if it has any.
  • source_url() (and source_gist()) accept SHA1 prefixes.
  • source_gist() uses the github api to reliably locate the raw gist.
    Additionally it now only attempts to source files with .R or .r
    extensions, and gains a quiet argument. (#348)
  • Safer installation of source packages, which were previously extracted
    directly into the temp directory; this could be a problem if directory
    names collide. Instead, source packages are now extracted into unique
    subdirectories.