Releases: r-lib/devtools
Devtools v1.13.2
Workaround a regression in Rcpp::compileAttributes()
.
Add trimws()
implementation for R 3.1 support.
Devtools v1.13.1
-
Bugfix for installing from git remote and not passing git2r credentials
(@james-atkins, #1498) -
Fix
test()
compatibility with testthat versions 1.0.2 (#1503). -
Fix
install_version()
,install_bitbucket()
,install_local()
,
install_url()
,install_svn()
,install_bioc()
gainquiet
arguments and
properly pass them to internal functions. (#1502)
Devtools 1.13.0
This release contains a number of bugfixes and should be the last release of the monolithic devtools package. After this release much of devtools' functionality will be split into separate smaller packages, however the devtools package will still remain as a meta package.
New Features
-
spell_check
gains adict
argument to set a custom language or dictionary -
release()
now checks documentation for spelling errors by default. -
New
use_gpl3_license()
sets the license field inDESCRIPTION
and
includes a copy of the license inLICENSE
.
Revdep check improvements
-
Various minor improvements around checking of reverse dependencies
(#1284, @krlmlr). All packages involved are listed at the start,
the whole process is now more resilient against package
installation failures. -
revdep_check()
andrevdep_check_resume()
gain a skip argument
which takes a character vector of packages to skip. -
revdep_check()
andcheck_cran()
gain aquiet_check
argument.
You can usequiet_check = FALSE
to see the actual text of R CMD
check as it runs (not recommending with multiple threads). -
revdep_check_resume()
now takes...
which can be used to
override settings fromrevdep_check()
. For debugging a problem
with package checks, try
revdep_check(threads = 1, quiet_check = FALSE)
-
revdep_check()
collects timing information intiming.md
(#1319, @krlmlr). -
Package names and examples are sorted in case-insensitive C collation (#1322, @krlmlr).
-
use_revdep()
adds.gitignore
entry for check database (#1321, @krlmlr). -
Own package is installed in temporary library for revdep checking (#1338, @krlmlr).
-
Automated revdep check e-mails now can use the new
my_version
and
you_cant_install
variables. The e-mail template has been updated
to use these variables (#1285, @krlmlr). -
Installation failures are logged during revdep checking, by default in
revdep/install
. Once an installation has failed, it is not attempted
a second time (#1300, @krlmlr). -
Print summary table in README.md and problems.md (#1284, @krlmlr).Revdep
check improvements (#1284)
Bug fixes and minor improvements
-
Handle case of un-installed package being passed to session_info (#1281).
-
Using authentication to access Github package name. (#1262, @eriknil).
-
spell_check()
checks for hunspell before running (#1475, @jimvine). -
add_desc_package()
checks for package dependencies correctly (#1463, @thomasp85). -
Remove deprecated
args
argument frominstall_git()
to allow passthrough toinstall
(#1373, @ReportMort). -
added a
quiet
argument toinstall_bitbucket()
, with a default value
ofFALSE
(fixes issue #1345, @plantarum). -
update_packages()
allows for override of interactive prompt (#1260, @pkq). -
use_test()
template no longer includes useless comments (#1349) -
Add encoding support in
test_dir()
call by adding reference to pkg$encoding (#1306, @hansharhoff) -
Parse valid Git remote URLs that lack trailing
.git
, e.g. GitHub browser URLs (#1253, @jennybc). -
Add a
check_bioconductor()
internal function to automatically install
BiocInstaller() if it is not installed and the user wants to do so. -
Improve Git integration.
use_git_ignore()
anduse_git_config()
gain
quiet
argument, tests work without settinguser.name
anduser.email
Git
configuration settings (#1320, @krlmlr). -
Improve Git status checks used in
release()
(#1205, @krlmlr). -
Improved handling of local
file://
repositories ininstall()
(#1284, @krlmlr). -
setup()
andcreate()
gain newquiet
argument (#1284, @krlmlr). -
Avoid unnecessary query of
available_packages()
(#1269, @krlmlr). -
Fix AppVeyor test by manually installing
curl
(#1301). -
install(dependencies = FALSE)
doesn't query the available packages anymore (@krlmlr, #1269). -
use_travis()
now opens a webpage in your browser to more easily activate
a repo. -
use_readme_rmd()
anduse_readme()
share a common template with sections
for package overview, GitHub installation (if applicable), and an example
(@jennybc, #1287). -
Fix auto download method selection for
install_github()
on R 3.1 which
lacks "libcurl" incapabilities()
. (@kiwiroy, #1244) -
Fix removal of vignette files by not trying to remove files twice anymore (#1291)
devtools 1.12.0
New features
- New
install_bioc()
function and bioc remote to install Bioconductor
packages from their SVN repository. install_dev_deps()
gets everything you need to start development on source
package - it installs all dependencies, and roxygen2 (#1193).use_dev_version()
automates the process of switching from a release
version number by tweaking theDESCRIPTION
, adding a heading to
NEWS.md
(if present), and checking into git (if you use it) (#1076.)use_github()
accepts a host argument, similar toinstall_github()
(@ijlyttle, #1101)
Bug fixes and minor improvements
- Update with Rtools-3.4 information, (@jimhester)
- devtools now uses https to access the RStudio CRAN mirror if it will work
on your system (#1059) - Handle case when a GitHub request returns a non-JSON error response.
(@jimhester, #1204, #1211) - Suggested packages, including those specified as
Remotes:
are now installed
after package installation. This allows you to use circularRemotes:
dependencies for two related packages as long as one of the dependencies is a
Suggested package. (@jimhester, #1184, tidyverse/dplyr#1809) - bug fix for installation of binary packages on windows, they must be
installed directly from a zip file. (@jimhester, #1191, #1192) build_vignette()
will now only install the "VignetteBuilder" if it's
not present, not try and upgrade it if it is (#1139).clean_dll()
Only removes package_name.def files and now operates
recursively. (@jimhester, #1175, #1159, #1161)check_man()
now prints a message if no problems are found (#1187).install_*
functions andupdate_packages()
refactored to allow updating of
packages installed using any of the install methods. (@jimhester, #1067)install_github()
now useshttps://api.github.com
as the host argument, so
users can specify 'http:' or other protocols if needed. (@jimhester, #1131, #1200)load_all()
runs package hooks before sourcing test helper files
allowing test helper to make use of objects created when a package is loaded
or attached. (@imanuelcostigan, #1146)revdep_check()
will now create therevdep/
directory if it does not
already exist (#1178).source_gist()
gains afilename
argument to specify a particular file to
source from a GitHub gist. (@ateucher, #1172)- Add a default codecov.yml file to turn off commenting with
use_coverage()
(@jimhester, #1188) - Bug fix for 'nchar(text) : invalid multibyte string' errors when running
write_dcf()
on DESCRIPTION files with non-ASCII encodings (#1224, @jimhester).
devtools 1.11.1
- Bug fix in
search_path_for_rtools()
using the gcc-4.9.3 toolchain when
there is no rtools setting in the windows registry. (@jimhester, #1155)
devtools 1.11.0
Infrastructure helpers
create_description()
now setsEncoding: UTF-8
. This helps non-English
package authors (#1123).- All
use_
function have been overhauled to be more consistent, particularly
arround notification. Most functions now also ask to overwrite if a file
already exists (#1074). use_coverage()
now adds covr to "Suggests", rather than recommending you
install it explicitly in.travis.yml
.use_cran_badge()
now uses HTTPS URL (@krlmlr, #1124).use_github()
now confirms that you've picked a good title and description
(#1092) and prints the url of the repo (#1063).use_news()
, anduse_test()
open the files in RStudio (if you're using
it and have the rstudioapi package installed).use_testthat()
tells you what it's doing (#1056).use_travis()
generates a template compatible with the newest R-travis.use_readme_md()
creates a basicREADME.md
template (#1064).use_revdep()
has an updated template for the new revdep check
system (#1090, @krlmlr).- Removed the deprecated
use_coveralls()
,add_rstudio_project()
,
add_test_infrastructure()
, andadd_travis()
.
Checks and and release()
check()
now always succeeds (instead of throwing an error when
R CMD check
finds anERROR
), returning an object that summarises
the check failures.check()
gainsrun_dont_test
andmanual
arguments to control whether or
not\donttest{}
tests are tested, or manuals are built. This defaults to
FALSE
, butrelease()
runs check with it set toTRUE
(#1071; #1087,
@krlmlr).- The
cleanup
argument tocheck()
is deprecated: it now always returns
the path to the check directory. check_built()
allows you to runR CMD check
on an already built package.check_cran()
suppresses X11 withDISPLAY = ""
.release()
has been tweaked to improve the order of the questions,
and to ensure that you're ok with problems. It warns if bothinst/NEWS.Rd
andNEWS.md
exist (@krlmlr, #1135), doesn't throw error if Git head is
detached (@krlmlr, #1136).release()
gains anargs
argument to control build options, e.g.
to allow passingargs = "--compact-vignettes=both"
for packages with
heavy PDF vignettes (@krlmlr, #1077).system_check()
gains new argumentspath
to controls the working directory
of the command, andthrow
to control whether or not it throws an error
on command failure.env
has been renamed to the more explicitenv_vars
.
Revdep checks
revdep_check()
has been overhauled. All revdep_
functions now work like
other devtools functions, taking a path to the package as the first argument.
revdep_check()
now saves its results to disk as check/check.rds
, and the other revdep()
functions read from that cache. This also allows you to resume a partial run with revdep_check_resume()
. This should be a big time saver if something goes unexpected wrong in the middle of the checks. You can blow away the cache and start afresh with revdep_check_reset()
.
revdep_check_save_summary()
now creates README.md
to save one level of clicking in github. It also creates a problems.md
that contains only results for only packages that had warnings or errors. Each problem is limited to at most 25 lines of output - this avoids lengthy output for failing examples. revdep_check_print_problems()
prints a bulleted list of problems, suitable for inclusion in your cran-comments.md
.
Summary results are reported as they come in, every then messages you'll get a message giving elapsed and estimated remaining time.
An experimental revdep_email()
emails individual maintainers with their R CMD check
summary results (#1014). See testthat and dplyr for example usage.
There were a handful of smaller fixes:
revdep_check()
doesn't complain about missinggit2r
package anymore
(#1068, @krlmlr).- Package index caches for
revdep_check()
now time out after 30 minutes. revdep_check_save_logs()
has been removed - it is just not that useful.revdep_check_summary()
has been removed - it never should have been
part of the exported API.
Other improvements
- Devtools now uses new gcc toolchain on windows, if installed (@jimhester).
install_git()
now allows you to pass credentials to git2r to specify
specific ssh credentials (@onlymee, #982)load_all()
now sources all test helpers if you use testthat. This makes it
much easier to interactively run tests (#1125).load_all()
also correctly
handlesunix
andwindows
subdirectories withinR
(@gaborcsardi, #1102)build_win()
defaults to only R-devel, since this is most commonly
what you want.- Help shims now inform you that you're using development documentation
(#1049). git_sha1()
Fix fetching the latest git commit so that it also works
for shallow git clones, i.e. git clones which make use of depth.
(#1048, #1046, @nparley)
devtools 1.10.0
New features
curl
,evaluate
,roxygen2
andrversions
have been moved from Imports
to Suggests to lighten the dependency load of devtools. If you run a
function that needs one of the packages, you'll prompted to install it
(#962, @jimhester).- Devtools uses a new strategy for detecting RTools on windows: it now only
looks for Rtools if you need toload_all()
orbuild()
a package with
compiled code. This should make it easier to work with devtools if
you're developing pure R packages (#947). package_file()
lets you find files inside a package. It starts by
finding the root directory of the package (i.e. the directory that contains
DESCRIPTION
) (#985).use_news_md()
adds a basicNEWS.md
template (#957).use_mit_license()
writes the necessary infrastructure to declare and
release an R package under the MIT license in a CRAN-compliant way.
(#995, @kevinushey)check(cran = TRUE)
adds--run-donttest
since you do need to test
code in\dontest()
for CRAN submission (#1002).
Package installation
install()
installs packages specified in theAdditional_repositories
field, such as drat repositories. (#907, #1028, @jimhester). It
correctly installs missing dependencies (#1013, @gaborcsardi). If called on a
Bioconductor package, include the Bioconductor repositories if they are not
already set (#895, @jimhester).install()
gains ametadata
argument which lets you add extra fields to
theDESCRIPTION
on install. (#1027, @rmflight)install_github()
andinstall_git()
only downloads and installs the
package if the remote SHA1 reference differs from the currently installed
reference (#903, @jimhester).install_local()
captures git and github information and stores it in the
DESCRIPTION
(#1027, @rmflight).install_version()
is more robust when handling multiple repos (#943, #1030,
@jimhester).- Bugfix for
Remotes:
feature that prevented it from working if devtools was
not attached as is done in travis-r (#936, @jimhester).
Bug fixes and minor improvements
check_dev_versions()
checks only package dependencies (#983).check_man()
replacescheck_doc()
(since most other functions are
named after the corresponding directory).check_doc()
will hang around
as an alias for the forseeable future (#958).create()
produces a dummy namespace will fake comment so roxygen2 will
overwrite silently (#1016).create()
andsetup()
are more permissive -- they now accept a path to
either a new directory or empty directory. (#966, @kevinushey)document()
now only runsupdate_collate()
once.load_all()
resolves a longstanding lazy load database corruption issue when
reloading packages which define S3 methods on generics from base or other
packages (#1001, @jimhester).release_checks()
gains two new checks:revdep_check()
:- More verbose about which package is installed (#926, @krlmlr)
- Verifies the integrity of already downloaded package archives
(#930, @krlmlr) - Is now more tolerant of errors when retrieving the summary for a
checked package (#929, @krlmlr). - When
ncpus > 1
, it includes the package name for when so you know
which package has failed and can start looking at the output without
needing to wait for all packages to finish (@mattdowle). - Uses proper repository when
BiocInstaller::useDevel(TRUE)
(#937, @jimhester).
- Shimmed
system.file()
now respectsmustWork = TRUE
and throws an error
if the file does not exist (#1034). use_appveyor()
template now createsfailure.zip
artifact instead of
polluting the logs withR CMD check
output (#1017, @krlmlr, @HenrikBengtsson).use_cran_comments()
template has been improved (#1038).use_data()
now warns when trying to save the same object twice,
and stops if there is no object to save (#948, @krlmlr).use_revdep_check()
no longer includesrevdep_check_save_logs
in
default template. I found I never used the logs and they just cluttered up
the package directory (#1003).with_*()
functions have moved into the withr package, and devtools
functions have been deprecated (#925, @jimhester).
devtools 1.9.1
- Avoid importing heavy dependencies to speed up loading (#830, @krlmlr).
- Remove explicit
library(testthat)
call intest()
(#798, @krlmlr). as.package()
andload_all()
gain new argumentcreate
. Like other
functions with apkg
argument,load_all()
looks for aDESCRIPTION
file
in parent directories - ifcreate = TRUE
it will be automatically
created if there's aR/
ordata/
directory (#852, @krlmlr).build_vignettes()
gains dependencies argument (#825, @krlmlr).build_win()
now usescurl
instead ofRCurl
for ftp upload.check()
now uses a better strategy whencran = TRUE
. Instead of
attempting to simulate--as-cran
behaviour by turning on certain env vars,
it now uses--as-cran
and turns off problematic checks with env vars (#866).
The problematiccran_env_vars()
function has been removed.find_rtools()
now looks for registry keys in both HKCU (user) and
HKLM (admin) locations (@Kevin-Jin, #844)install()
can now install dependencies from remote repositories by
specifying them asRemotes
in theDESCRIPTION
file (#902, @jimhester).
Seevignette("dependencies")
for more details.install_*()
detects if called on a Bioconductor package and if so,
automatically includes the Bioconductor repositories if needed (#895,
@jimhester).install_deps()
now automatically upgrades out of date dependencies. This
is typically what you want when you're working on a development version of a
package. To suppress this behaviour, setupgrade_dependencies = FALSE
(#863).install_deps()
is more careful with...
- this means additional
arguments toinstall_*
are more likely to work (#870).install_gitorious()
has been removed since gitorious no longer exists
(#913).load_all()
no longer fails if auseDynLib()
entry in the NAMESPACE
is incorrect. This should make it easy to recover from an incorrect
@useDynLib
, because re-documenting() should now succeed.release()
works for packages not located at root of git repository
(#845, #846, @mbjones).revdep_check()
now installs suggested packages by default (#808), and
setsNOT_CRAN
env var tofalse
(#809). This makes testing more similar to
CRAN so that more packages should pass cleanly. It also setsRGL_USE_NULL
totrue
to stop rgl windows from popping up during testing (#897). It
also downloads all source packages at the beginning - this makes life a
bit easier if you're on a flaky internet connection (#906).- New
uninstall()
removes installed package (#820, @krlmlr). - Add
use_coverage()
function to add codecov.io or coveralls.io to a project,
deprecateuse_coveralls()
(@jimhester, #822, #818). use_cran_badge()
uses canonical url form preferred by CRAN.use_data()
also works with data from the parent frame (#829, @krlmlr).use_git_hook()
now creates.git/hooks
if needed (#888)- GitHub integration extended:
use_github()
gains aprotocol
argument (ssh or https), populates URL and BugReports fields of DESCRIPTION (only if non-existent or empty), pushes to the newly created GitHub repo, and sets a remote tracking branch.use_github_links()
is a new exported function.dr_github()
diagnoses more possible problems. (#642, @jennybc). use_travis()
: Default travis script leaves notifications on default
settings.uses_testthat()
andcheck_failures()
are now exported (#824, #839,
@krlmlr).use_readme_rmd()
usesuses_git()
correctly (#793).with_debug()
now useswith_makevars()
rather thanwith_env()
, because R
reads compilation variables from the Makevars rather than the environment
(@jimhester, #788).- Properly reset library path after
with_lib()
(#836, @krlmlr). remove_s4classes()
performs a topological sort of the classes
(#848, #849, @famuvie).load_all()
warns (instead of failing) if importing symbols, methods, or classes
fromNAMESPACE
fails (@krlmlr, #921).
devtools 1.8.0
Helpers
- New
dr_devtools()
runs some common diagnostics: are you using the
latest version of R and devtools? It is run automatically by
release()
(#592). use_code_of_conduct()
adds a contributor code of conduct from
http://contributor-covenant.org. (#729)use_coveralls()
allows you to easily add test coverage with coveralls
(@jimhester, #680, #681).use_git()
sets up a package to use git, initialising the repo and
checking the existing files.use_test()
adds a new test file (#769, @krlmlr).- New
use_cran_badge()
adds a CRAN status badge that you can copy into a README file. Green indicates package is on CRAN. Packages not yet submitted or accepted to CRAN get a red badge.
Package installation and info
build_vignettes()
automatically installs the VignetteBuilder package,
if necessary (#736).install()
andinstall_deps()
gain a...
argument, so additional
arguments can be passed toutils::install.packages()
(@jimhester, #712).
install_svn()
optionally accepts a revision (@lev-kuznetsov, #739).
install_version()
now knows how to look in multiple repos (#721).package_deps()
(anddev_package_deps()
) determines all recursive
dependencies and whether or not they're up-to-date (#663). Use
update(package_deps("xyz"))
to update out of date dependencies. This code
is used ininstall_deps()
andrevdep_check()
- it's slightly more
aggressive than previous code (i.e. it forces you to use the latest version),
which should avoid problems when you go to submit to CRAN.- New
update_packages()
will install a package (and its dependencies) only if
they are missing or out of date (#675). session_info()
can now take a vector of package names, in which case it
will print the version of those packages and their dependencies (#664).
Git and github
- Devtools now uses the git2r package to inspect git properties and install
remote git packages withinstall_git()
. This should be considerably
more reliable than the previous strategy which involves calling the
command linegit
client. It has two small downsides:install_git()
no longer accepts additionalargs
, and must do a deep clone when
installing. dr_github()
checks for common problems with git/github setup (#643).- If you use git,
release()
now warns you if you have uncommited changes,
or if you've forgotten to synchronise with the remote (#691). install_github()
warns if repository contains submodules (@ashander, #751).
Bug fixes and minor improvements
- Previously, devtools ran all external R processes with
R --vanilla
.
Now it only suppresses user profiles, and constructs a custom.Rprofile
to
override the default. Currently, this.Rprofile
sets up therepos
option.
Among others, this enables the cyclic dependency check indevtools::release
(#602, @krlmlr). R_BROWSER
andR_PDFVIEWER
environment variables are set to "false" to
suppress random windows opening during checks.- Devtools correctly identifies RTools 3.1 and 3.2 (#738), and
preserves continuation lines in theDESCRIPTION
(#709). dev_help()
now usesnormalizePath()
. Hopefully this will make it more
likely to work if you're on windows and have a space in the path.lint()
gains acache
argument (@jimhester, #708).- Fixed namespace issues related to
stats::setNames()
(#734, #772) and
utils::unzip()
(#761, @robertzk). release()
now reminds you to check the existing CRAN check results page
(#613) ands shows file size before uploading to CRAN (#683, @krlmlr).RCMD()
andsystem_check()
are now exported so they can be used by other
packages. (@jimhester, #699).revdep_check()
creates directories if needed (#759).system_check()
combines arguments with,
. (#753)test()
gains an...
argument so that additional arguments can be passed
totestthat::test_dir
(@jimhester, #747)use_travis()
now suggests you link to the svg icon since that looks a
little sharper. Default template setsCRAN: http://cran.rstudio.com/
to
enable the cyclic dependency check.NOT_CRAN
envvar no longer overrides externally set variable.check(check_version = TRUE)
also checks spelling of theDESCRIPTION
; if no
spell checker is installed, a warning is given (#784, @krlmlr).
Devtools 1.7.0
Improve reverse dependency checking
Devtools now supports a new and improved style of revdep checking with use_revdep()
. This creates a new directory called revdep
which contains a check.R
template. Run this template to check all reverse dependencies, and save summarised results to check/summary.md
. You can then check this file into git, making it much easier to track how reverse dependency results change between versions. The documentation for revdep_check()
is much improved, and should be more useful (#635)
I recommend that you specify a library to use when checking with options("devtools.revdep.libpath")
. (This should be a directory that already exists). This should be difference from your default library to keep the revdep environment isolated from your development environment.
I've also tweaked the output of revdep_maintainers()
so it's easier to copy and paste into an email (#634). This makes life a little easier pre-release.
New helpers
lint()
runslintr::lint_package()
to check style consistency and errors
in a package. (@jimhester, #694)use_appveyor()
sets up a package for testing with AppVeyor (@krlmlr, #549).use_cran_comments()
creates acran-comments.md
template and adds it
to.Rbuildignore
to help with CRAN submissions. (#661)use_git_hook()
allows you to easily add a git hook to a package.use_readme_rmd()
sets up a template to generate aREADME.md
from a
README.Rmd
with knitr.
Minor improvements
-
Deprecated
doc_clean
argument tocheck()
has been removed. -
Initial package version in
create()
is now0.0.0.9000
(#632).
create()
andcreate_description()
checks that the package name is
valid (#610). -
load_all()
runsroxygen2::update_collate()
before loading code. This
ensures that files are sourced in the way you expect, as defined by
roxygen@include
tags. If you don't have any@include
tags, the
collate will be not be touched (#623). -
session_info()
gainsinclude_base
argument to also display loaded/attached
base packages (#646). -
release()
no longer asks if you've read the CRAN policies since the
CRAN submission process now asks the same question (#692).release(check = TRUE)
now runs some additional custom checks. These include:-
Checking that you don't depend on a development version of a package.
-
Checking that the version number has exactly three components (#633).
release()
now builds packages without the--no-manual
switch, both for
checking and for actually building the release package (#603, @krlmlr).
build()
gains an additional argumentmanual
, defaulting toFALSE
,
andcheck()
gains...
unmodified tobuild()
.
-
-
use_travis()
now sets an environment variable so that any WARNING will
also cause the build to fail (#570). -
with_debug()
andcompiler_flags()
setCFLAGS
etc instead of
PKG_CFLAGS
.PKG_*
are for packages to use, the raw values are for users
to set. (According to http://cran.rstudio.com/doc/manuals/r-devel/R-exts.html#Using-Makevars) -
New
setup()
works likecreate()
but assumes an existing, not necessarily
empty, directory (#627, @krlmlr).