usethis/0000755000176200001440000000000013507356065011750 5ustar liggesusersusethis/inst/0000755000176200001440000000000013507207664012725 5ustar liggesusersusethis/inst/WORDLIST0000644000176200001440000000223613507207664014122 0ustar liggesusersaddin Addin addins alphabetises api applypatch AppVeyor artefacts aspirationally backports behaviour BioConductor BugReports bzip CCBY ci CircleCI clipr codecov Codecov colour colours Colours config Cpp cran Depsy dev devtools DockerHub DropBox emacs eval filenaming foofy frontmatter fs funder gc Git's github gitignore Gitignores GitLab gzip Hadley hexb Homebrew hostname http https HTTPS httr initialisation Initialise initialises initialising io Javascript Jenkinsfile Jupyter labelled learnr LGL libgit lifecycle Lifecycle LinkingTo ly magrittr magrittr's maintainer's Makefile md minimise msg nano organisation organisations pkgbuild pandoc pkgdown pre preconfigured programmatically PRs purrr r's Rcpp RcppArmadillo RcppEigen README rebase redirections repo Repo REPO repo's repos reprex reproducibility restructing revdep revdepcheck revdepchecks rlang rmarkdown RMarkdown Rmd Rmds roxygen RProfile rprojroot RStudio rstd Rtools SHA shortener shorteners shortlink shortlinks signalling sitrep src styler sunsetted templated templating testthat tibble tidyverse Tidyverse todo travis triaged UI useR usethis's Ushey's ver whitelisted Wickham withr Xcode xz yaml YAML yyy zzz usethis/inst/templates/0000755000176200001440000000000013507207664014723 5ustar liggesusersusethis/inst/templates/license-LGPL-2.1.md0000644000176200001440000006334313453664176017737 0ustar liggesusers### GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] ### Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. ### TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION **0.** This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. **1.** You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. **2.** You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: - **a)** The modified work must itself be a software library. - **b)** You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. - **c)** You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. - **d)** If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. **3.** You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. **4.** You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. **5.** A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. **6.** As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: - **a)** Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) - **b)** Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. - **c)** Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. - **d)** If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. - **e)** Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. **7.** You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: - **a)** Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. - **b)** Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. **8.** You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. **9.** You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. **10.** Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. **11.** If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. **12.** If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. **13.** The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. **14.** If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. **NO WARRANTY** **15.** BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. **16.** IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ### END OF TERMS AND CONDITIONS ### How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the library's name and an idea of what it does. Copyright (C) year name of author This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice That's all there is to it! usethis/inst/templates/test-example-2.1.R0000644000176200001440000000010013453664176017750 0ustar liggesuserstest_that("multiplication works", { expect_equal(2 * 2, 4) }) usethis/inst/templates/Makefile0000644000176200001440000000143713507322272016361 0ustar liggesusers# h/t to @jimhester and @yihui for this parse block: # https://github.com/yihui/knitr/blob/dc5ead7bcfc0ebd2789fe99c527c7d91afb3de4a/Makefile#L1-L4 # Note the portability change as suggested in the manual: # https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Writing-portable-packages PKGNAME = `sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION` PKGVERS = `sed -n "s/Version: *\([^ ]*\)/\1/p" DESCRIPTION` all: check build: R CMD build . check: build R CMD check --no-manual $(PKGNAME)_$(PKGVERS).tar.gz install_deps: Rscript \ -e 'if (!requireNamespace("remotes") install.packages("remotes")' \ -e 'remotes::install_deps(dependencies = TRUE)' install: install_deps build R CMD INSTALL $(PKGNAME)_$(PKGVERS).tar.gz clean: @rm -rf $(PKGNAME)_$(PKGVERS).tar.gz $(PKGNAME).Rcheck usethis/inst/templates/code.cpp0000644000176200001440000000005013453664176016341 0ustar liggesusers#include using namespace Rcpp; usethis/inst/templates/project-README0000644000176200001440000000135213453664176017255 0ustar liggesusers{{#Rmd}} --- output: github_document --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` {{/Rmd}} # {{{ Project }}} The goal of {{{ Project }}} is to ... {{#Rmd}} What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so: ```{r cars} summary(cars) ``` You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. You can also embed plots, for example: ```{r pressure, echo = FALSE} plot(pressure) ``` In that case, don't forget to commit and push the resulting figure files, so they display on GitHub! {{/Rmd}} usethis/inst/templates/tidy-contributing.md0000644000176200001440000000424413507306104020714 0ustar liggesusers# Contributing to {{{ package }}} This outlines how to propose a change to {{{ package }}}. For more detailed info about contributing to this, and other tidyverse packages, please see the [**development contributing guide**](https://rstd.io/tidy-contrib). ### Fixing typos Small typos or grammatical errors in documentation may be edited directly using the GitHub web interface, so long as the changes are made in the _source_ file. * YES: you edit a roxygen comment in a `.R` file below `R/`. * NO: you edit an `.Rd` file below `man/`. ### Prerequisites Before you make a substantial pull request, you should always file an issue and make sure someone from the team agrees that it’s a problem. If you’ve found a bug, create an associated issue and illustrate the bug with a minimal [reprex](https://www.tidyverse.org/help/#reprex). ### Pull request process * We recommend that you create a Git branch for each pull request (PR). * Look at the Travis and AppVeyor build status before and after making changes. The `README` should contain badges for any continuous integration services used by the package. * New code should follow the tidyverse [style guide](https://style.tidyverse.org). You can use the [styler](https://CRAN.R-project.org/package=styler) package to apply these styles, but please don't restyle code that has nothing to do with your PR. * We use [roxygen2](https://cran.r-project.org/package=roxygen2), with [Markdown syntax](https://cran.r-project.org/web/packages/roxygen2/vignettes/markdown.html), for documentation. * We use [testthat](https://cran.r-project.org/package=testthat). Contributions with test cases included are easier to accept. * For user-facing changes, add a bullet to the top of `NEWS.md` below the current development version header describing the changes made followed by your GitHub username, and links to relevant issue(s)/PR(s). ### Code of Conduct Please note that the {{{ package }}} project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By contributing to this project you agree to abide by its terms. ### See tidyverse [development contributing guide](https://rstd.io/tidy-contrib) for further details. usethis/inst/templates/license-ccby-4.md0000644000176200001440000004433413453664176017763 0ustar liggesusersAttribution 4.0 International ======================================================================= Creative Commons Corporation ("Creative Commons") is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an "as-is" basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible. Using Creative Commons Public Licenses Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses. Considerations for licensors: Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC- licensed material, or material used under an exception or limitation to copyright. More considerations for licensors: wiki.creativecommons.org/Considerations_for_licensors Considerations for the public: By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor's permission is not necessary for any reason--for example, because of any applicable exception or limitation to copyright--then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. More considerations for the public: wiki.creativecommons.org/Considerations_for_licensees ======================================================================= Creative Commons Attribution 4.0 International Public License By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions. Section 1 -- Definitions. a. Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image. b. Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License. c. Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. d. Effective Technological Measures means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements. e. Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material. f. Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License. g. Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license. h. Licensor means the individual(s) or entity(ies) granting rights under this Public License. i. Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them. j. Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world. k. You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning. Section 2 -- Scope. a. License grant. 1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to: a. reproduce and Share the Licensed Material, in whole or in part; and b. produce, reproduce, and Share Adapted Material. 2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. Term. The term of this Public License is specified in Section 6(a). 4. Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a) (4) never produces Adapted Material. 5. Downstream recipients. a. Offer from the Licensor -- Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License. b. No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material. 6. No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. Other rights. 1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise. 2. Patent and trademark rights are not licensed under this Public License. 3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties. Section 3 -- License Conditions. Your exercise of the Licensed Rights is expressly made subject to the following conditions. a. Attribution. 1. If You Share the Licensed Material (including in modified form), You must: a. retain the following if it is supplied by the Licensor with the Licensed Material: i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated); ii. a copyright notice; iii. a notice that refers to this Public License; iv. a notice that refers to the disclaimer of warranties; v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; b. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and c. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License. 2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information. 3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable. 4. If You Share Adapted Material You produce, the Adapter's License You apply must not prevent recipients of the Adapted Material from complying with this Public License. Section 4 -- Sui Generis Database Rights. Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material: a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database; b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material; and c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database. For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights. Section 5 -- Disclaimer of Warranties and Limitation of Liability. a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability. Section 6 -- Term and Termination. a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically. b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates: 1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or 2. upon express reinstatement by the Licensor. For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License. c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License. d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. Section 7 -- Other Terms and Conditions. a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed. b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License. Section 8 -- Interpretation. a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License. b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions. c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor. d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority. ======================================================================= Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” The text of the Creative Commons public licenses is dedicated to the public domain under the CC0 Public Domain Dedication. Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at creativecommons.org/policies, Creative Commons does not authorize the use of the trademark "Creative Commons" or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses. Creative Commons may be contacted at creativecommons.org. usethis/inst/templates/NAMESPACE0000644000176200001440000000014013453664176016142 0ustar liggesusers# Generated by roxygen2: fake comment so roxygen2 overwrites silently. exportPattern("^[^\\.]") usethis/inst/templates/license-apache-2.0.md0000644000176200001440000002434513453664176020420 0ustar liggesusersApache License ============== _Version 2.0, January 2004_ _<>_ ### Terms and Conditions for use, reproduction, and distribution #### 1. Definitions “License” shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. “Licensor” shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. “Legal Entity” shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means **(i)** the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or **(ii)** ownership of fifty percent (50%) or more of the outstanding shares, or **(iii)** beneficial ownership of such entity. “You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License. “Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. “Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. “Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). “Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. “Contribution” shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as “Not a Contribution.” “Contributor” shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. #### 2. Grant of Copyright License Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. #### 3. Grant of Patent License Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. #### 4. Redistribution You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: * **(a)** You must give any other recipients of the Work or Derivative Works a copy of this License; and * **(b)** You must cause any modified files to carry prominent notices stating that You changed the files; and * **(c)** You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and * **(d)** If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. #### 5. Submission of Contributions Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. #### 6. Trademarks This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. #### 7. Disclaimer of Warranty Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. #### 8. Limitation of Liability In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. #### 9. Accepting Warranty or Additional Liability While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. _END OF TERMS AND CONDITIONS_ ### APPENDIX: How to apply the Apache License to your work To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets `[]` replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives. Copyright {{{year}}} {{{name}}} Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. usethis/inst/templates/revdep-email.yml0000644000176200001440000000014313453664176020023 0ustar liggesusersrelease_date: ??? rel_release_date: ??? my_news_url: ??? release_version: ??? release_details: ??? usethis/inst/templates/tidy-issue.md0000644000176200001440000000072213453664176017352 0ustar liggesusersPlease briefly describe your problem and what output you expect. If you have a question, please don't use this form. Instead, ask on or . Please include a minimal reproducible example (AKA a reprex). If you've never heard of a [reprex](https://reprex.tidyverse.org/) before, start by reading . --- Brief description of the problem ```r # insert reprex here ``` usethis/inst/templates/tidy-support.md0000644000176200001440000000364313453664176017743 0ustar liggesusers# Getting help with {{{ package }}} Thanks for using {{{ package }}}. Before filing an issue, there are a few places to explore and pieces to put together to make the process as smooth as possible. Start by making a minimal **repr**oducible **ex**ample using the [reprex](https://reprex.tidyverse.org/) package. If you haven't heard of or used reprex before, you're in for a treat! Seriously, reprex will make all of your R-question-asking endeavors easier (which is a pretty insane ROI for the five to ten minutes it'll take you to learn what it's all about). For additional reprex pointers, check out the [Get help!](https://www.tidyverse.org/help/) section of the tidyverse site. Armed with your reprex, the next step is to figure out [where to ask](https://www.tidyverse.org/help/#where-to-ask). * If it's a question: start with [community.rstudio.com](https://community.rstudio.com/), and/or StackOverflow. There are more people there to answer questions. * If it's a bug: you're in the right place, file an issue. * If you're not sure: let the community help you figure it out! If your problem _is_ a bug or a feature request, you can easily return here and report it. Before opening a new issue, be sure to [search issues and pull requests](https://github.com/tidyverse/{{{package}}}/issues) to make sure the bug hasn't been reported and/or already fixed in the development version. By default, the search will be pre-populated with `is:issue is:open`. You can [edit the qualifiers](https://help.github.com/articles/searching-issues-and-pull-requests/) (e.g. `is:pr`, `is:closed`) as needed. For example, you'd simply remove `is:open` to search _all_ issues in the repo, open or closed. If you _are_ in the right place, and need to file an issue, please review the ["File issues"](https://www.tidyverse.org/contribute/#issues) paragraph from the tidyverse contributing guidelines. Thanks for your help! usethis/inst/templates/pipe.R0000644000176200001440000000031713507207664016004 0ustar liggesusers#' Pipe operator #' #' See \code{magrittr::\link[magrittr:pipe]{\%>\%}} for details. #' #' @name %>% #' @rdname pipe #' @keywords internal #' @export #' @importFrom magrittr %>% #' @usage lhs \%>\% rhs NULL usethis/inst/templates/rmarkdown-template.yml0000644000176200001440000000016313453664176021270 0ustar liggesusersname: {{{ template_name }}} description: > {{{ template_description }}} create_dir: {{{ template_create_dir }}} usethis/inst/templates/NEWS.md0000644000176200001440000000013513453664176016025 0ustar liggesusers# {{{ Package }}} {{{ Version }}} * Added a `NEWS.md` file to track changes to the package. usethis/inst/templates/license-GPL-3.md0000644000176200001440000010412513453664176017457 0ustar liggesusersGNU General Public License ========================== _Version 3, 29 June 2007_ _Copyright © 2007 Free Software Foundation, Inc. <>_ Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. ## Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: **(1)** assert copyright on the software, and **(2)** offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. ## TERMS AND CONDITIONS ### 0. Definitions “This License” refers to version 3 of the GNU General Public License. “Copyright” also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. “The Program” refers to any copyrightable work licensed under this License. Each licensee is addressed as “you”. “Licensees” and “recipients” may be individuals or organizations. To “modify” a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a “modified version” of the earlier work or a work “based on” the earlier work. A “covered work” means either the unmodified Program or a work based on the Program. To “propagate” a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To “convey” a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays “Appropriate Legal Notices” to the extent that it includes a convenient and prominently visible feature that **(1)** displays an appropriate copyright notice, and **(2)** tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. ### 1. Source Code The “source code” for a work means the preferred form of the work for making modifications to it. “Object code” means any non-source form of a work. A “Standard Interface” means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The “System Libraries” of an executable work include anything, other than the work as a whole, that **(a)** is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and **(b)** serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A “Major Component”, in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The “Corresponding Source” for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. ### 2. Basic Permissions All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. ### 3. Protecting Users' Legal Rights From Anti-Circumvention Law No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. ### 4. Conveying Verbatim Copies You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. ### 5. Conveying Modified Source Versions You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: * **a)** The work must carry prominent notices stating that you modified it, and giving a relevant date. * **b)** The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to “keep intact all notices”. * **c)** You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. * **d)** If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an “aggregate” if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. ### 6. Conveying Non-Source Forms You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: * **a)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. * **b)** Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either **(1)** a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or **(2)** access to copy the Corresponding Source from a network server at no charge. * **c)** Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. * **d)** Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. * **e)** Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A “User Product” is either **(1)** a “consumer product”, which means any tangible personal property which is normally used for personal, family, or household purposes, or **(2)** anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, “normally used” refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. “Installation Information” for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. ### 7. Additional Terms “Additional permissions” are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: * **a)** Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or * **b)** Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or * **c)** Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or * **d)** Limiting the use for publicity purposes of names of licensors or authors of the material; or * **e)** Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or * **f)** Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered “further restrictions” within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. ### 8. Termination You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated **(a)** provisionally, unless and until the copyright holder explicitly and finally terminates your license, and **(b)** permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. ### 9. Acceptance Not Required for Having Copies You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. ### 10. Automatic Licensing of Downstream Recipients Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An “entity transaction” is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. ### 11. Patents A “contributor” is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's “contributor version”. A contributor's “essential patent claims” are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, “control” includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a “patent license” is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To “grant” such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either **(1)** cause the Corresponding Source to be so available, or **(2)** arrange to deprive yourself of the benefit of the patent license for this particular work, or **(3)** arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. “Knowingly relying” means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is “discriminatory” if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license **(a)** in connection with copies of the covered work conveyed by you (or copies made from those copies), or **(b)** primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. ### 12. No Surrender of Others' Freedom If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. ### 13. Use with the GNU Affero General Public License Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. ### 14. Revised Versions of this License The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License “or any later version” applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. ### 15. Disclaimer of Warranty THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. ### 16. Limitation of Liability IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ### 17. Interpretation of Sections 15 and 16 If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. _END OF TERMS AND CONDITIONS_ ## How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found. Copyright (C) {{{year}}} {{{name}}} This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: {{{project}}} Copyright (C) {{{year}}} {{{name}}} This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details. The hypothetical commands `show w` and `show c` should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an “about box”. You should also get your employer (if you work as a programmer) or school, if any, to sign a “copyright disclaimer” for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <>. usethis/inst/templates/code.c0000644000176200001440000000007213453664176016005 0ustar liggesusers#define R_NO_REMAP #include #include usethis/inst/templates/codecov.yml0000644000176200001440000000026013453664176017073 0ustar liggesuserscomment: false coverage: status: project: default: target: auto threshold: 1% patch: default: target: auto threshold: 1% usethis/inst/templates/Jenkinsfile0000644000176200001440000000043413507207664017110 0ustar liggesuserspipeline { agent any { stages { stage('Build') { steps { make build } } stage('Check') { steps { make check } } stage('Clean') { steps { make clean } } } } } usethis/inst/templates/cran-comments.md0000644000176200001440000000034413453664176020021 0ustar liggesusers## Test environments * local OS X install, R {{{ rversion }}} * ubuntu 14.04 (on travis-ci), R {{{ rversion }}} * win-builder (devel and release) ## R CMD check results 0 errors | 0 warnings | 1 note * This is a new release. usethis/inst/templates/tidy-eval.R0000644000176200001440000000410413507207664016743 0ustar liggesusers#' Tidy eval helpers #' #' @description #' #' * \code{\link[rlang:quotation]{sym}()} creates a symbol from a string and #' \code{\link[rlang:quotation]{syms}()} creates a list of symbols from a #' character vector. #' #' * \code{\link[rlang:quotation]{enquo}()} and #' \code{\link[rlang:quotation]{enquos}()} delay the execution of one or #' several function arguments. \code{enquo()} returns a single quoted #' expression, which is like a blueprint for the delayed computation. #' \code{enquos()} returns a list of such quoted expressions. #' #' * \code{\link[rlang:quotation]{expr}()} quotes a new expression _locally_. It #' is mostly useful to build new expressions around arguments #' captured with [enquo()] or [enquos()]: #' \code{expr(mean(!!enquo(arg), na.rm = TRUE))}. #' #' * \code{\link[rlang]{as_name}()} transforms a quoted variable name #' into a string. Supplying something else than a quoted variable #' name is an error. #' #' That's unlike \code{\link[rlang]{as_label}()} which also returns #' a single string but supports any kind of R object as input, #' including quoted function calls and vectors. Its purpose is to #' summarise that object into a single label. That label is often #' suitable as a default name. #' #' If you don't know what a quoted expression contains (for instance #' expressions captured with \code{enquo()} could be a variable #' name, a call to a function, or an unquoted constant), then use #' \code{as_label()}. If you know you have quoted a simple variable #' name, or would like to enforce this, use \code{as_name()}. #' #' To learn more about tidy eval and how to use these tools, visit #' \url{https://tidyeval.tidyverse.org} and the #' \href{https://adv-r.hadley.nz/metaprogramming.html}{Metaprogramming #' section} of \href{https://adv-r.hadley.nz}{Advanced R}. #' #' @md #' @name tidyeval #' @keywords internal #' @importFrom rlang expr enquo enquos sym syms .data := as_name as_label #' @aliases expr enquo enquos sym syms .data := as_name as_label #' @export expr enquo enquos sym syms .data := as_name as_label NULL usethis/inst/templates/test-example.R0000644000176200001440000000013613453664176017463 0ustar liggesuserscontext("{{{ test_name }}}") test_that("multiplication works", { expect_equal(2 * 2, 4) }) usethis/inst/templates/vignette.Rmd0000644000176200001440000000051413453664176017221 0ustar liggesusers--- title: "{{{ vignette_title }}}" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{{{ braced_vignette_title }}} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ```{r setup} library({{Package}}) ``` usethis/inst/templates/package-README0000644000176200001440000000250113453664176017177 0ustar liggesusers{{#Rmd}} --- output: github_document --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" ) ``` {{/Rmd}} # {{{ Package }}} The goal of {{{ Package }}} is to ... ## Installation You can install the released version of {{{ Package }}} from [CRAN](https://CRAN.R-project.org) with: ``` r install.packages("{{{ Package }}}") ``` {{#github}} And the development version from [GitHub](https://github.com/) with: ``` r # install.packages("devtools") devtools::install_github("{{{owner}}}/{{{repo}}}") ``` {{/github}} ## Example This is a basic example which shows you how to solve a common problem: {{#Rmd}} ```{r example} {{/Rmd}} {{^Rmd}}``` r {{/Rmd}} library({{Package}}) ## basic example code ``` {{#Rmd}} What is special about using `README.Rmd` instead of just `README.md`? You can include R chunks like so: ```{r cars} summary(cars) ``` You'll still need to render `README.Rmd` regularly, to keep `README.md` up-to-date. You can also embed plots, for example: ```{r pressure, echo = FALSE} plot(pressure) ``` In that case, don't forget to commit and push the resulting figure files, so they display on GitHub! {{/Rmd}} usethis/inst/templates/circleci-config.yml0000644000176200001440000000214713507207664020472 0ustar liggesusersversion: 2 jobs: build: docker: - image: {{{ image }}} environment: R_LIBS: ~/R/Library steps: - restore_cache: keys: - r-pkg-cache-{{ arch }}-{{ .Branch }} - r-pkg-cache-{{ arch }}- - checkout - run: name: Install package dependencies command: | mkdir -p ~/R/Library Rscript -e 'install.packages("remotes")' Rscript -e 'remotes::install_deps(dependencies = TRUE)' - run: name: Session information and installed package versions command: | Rscript -e 'sessionInfo()' Rscript -e 'installed.packages()[, c("Package", "Version")]' Rscript -e 'rmarkdown::pandoc_version()' - run: name: Build package command: R CMD build . - run: name: Check package command: R CMD check --as-cran --no-manual *tar.gz - store_artifacts: path: {{{ package }}}.Rcheck/ - save_cache: key: r-pkg-cache-{{ arch }}-{{ .Branch }} paths: - "~/R/Library" usethis/inst/templates/tidy-travis.yml0000644000176200001440000000040313507207664017722 0ustar liggesusers# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r language: R cache: packages matrix: include: - r: devel - r: release after_success: - Rscript -e 'covr::codecov()' - r: oldrel - r: 3.4 - r: 3.3 - r: 3.2 usethis/inst/templates/template.Rproj0000644000176200001440000000047013453664176017562 0ustar liggesusersVersion: 1.0 RestoreWorkspace: No SaveWorkspace: No AlwaysSaveHistory: Default EnableCodeIndexing: Yes Encoding: UTF-8 AutoAppendNewline: Yes StripTrailingWhitespace: Yes BuildType: Package PackageUseDevtools: Yes PackageInstallArgs: --no-multiarch --with-keep.source PackageRoxygenize: rd,collate,namespace usethis/inst/templates/rmarkdown-template.Rmd0000644000176200001440000000120613453664176021210 0ustar liggesusers--- title: "Template Title" author: "Your Name" date: "The Date" output: output_format --- ```{r setup, include=FALSE} knitr::opts_chunk$set(echo = TRUE) ``` ## Adding an RMarkdown Template This file is what a user will see when they select your template. Make sure that you update the fields in the yaml header. In particular you will want to update the `output` field to whatever format your template requires. This is a good place to demonstrate special features that your template provides. Ideally it should knit out-of-the-box, or at least contain clear instructions as to what needs changing. Finally, be sure to remove this message! usethis/inst/templates/travis.yml0000644000176200001440000000015613453664176016765 0ustar liggesusers# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r language: R cache: packages usethis/inst/templates/gitlab-ci.yml0000644000176200001440000000176313507207664017310 0ustar liggesusersimage: rocker/tidyverse stages: - build - test - deploy building: stage: build script: - R -e "remotes::install_deps(dependencies = TRUE)" - R -e 'devtools::check()' # To have the coverage percentage appear as a gitlab badge follow these # instructions: # https://docs.gitlab.com/ee/user/project/pipelines/settings.html#test-coverage-parsing # The coverage parsing string is # Coverage: \d+\.\d+ testing: stage: test allow_failure: true when: on_success only: - master script: - Rscript -e 'install.packages("DT")' - Rscript -e 'covr::gitlab(quiet = FALSE)' artifacts: paths: - public # To produce a code coverage report as a GitLab page see # https://about.gitlab.com/2016/11/03/publish-code-coverage-report-with-gitlab-pages/ pages: stage: deploy dependencies: - testing script: - ls artifacts: paths: - public expire_in: 30 days only: - master usethis/inst/templates/testthat.R0000644000176200001440000000010413453664176016706 0ustar liggesuserslibrary(testthat) library({{{ name }}}) test_check("{{{ name }}}") usethis/inst/templates/license-mit.md0000644000176200001440000000206313453664176017464 0ustar liggesusers# MIT License Copyright (c) {{{year}}} {{{name}}} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. usethis/inst/templates/CODE_OF_CONDUCT.md0000644000176200001440000000256413453664176017536 0ustar liggesusers# Contributor Code of Conduct As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. This Code of Conduct is adapted from the Contributor Covenant (https://www.contributor-covenant.org), version 1.0.0, available at https://contributor-covenant.org/version/1/0/0/. usethis/inst/templates/license-mit.txt0000644000176200001440000000005613453664176017703 0ustar liggesusersYEAR: {{{year}}} COPYRIGHT HOLDER: {{{name}}} usethis/inst/templates/addins.dcf0000644000176200001440000000013613453664176016650 0ustar liggesusersName: New Addin Name Description: New Addin Description Binding: {{addin}} Interactive: false usethis/inst/templates/tutorial-template.Rmd0000644000176200001440000000352013453664176021050 0ustar liggesusers--- title: "{{{ tutorial_title }}}" output: learnr::tutorial runtime: shiny_prerendered --- ```{r setup, include=FALSE} library(learnr) knitr::opts_chunk$set(echo = FALSE) ``` ## Topic 1 ### Exercise *Here's a simple exercise with an empty code chunk provided for entering the answer.* Write the R code required to add two plus two: ```{r two-plus-two, exercise=TRUE} ``` ### Exercise with Code *Here's an exercise with some prepopulated code as well as `exercise.lines = 5` to provide a bit more initial room to work.* Now write a function that adds any two numbers and then call it: ```{r add-function, exercise=TRUE, exercise.lines = 5} add <- function() { } ``` ## Topic 2 ### Exercise with Hint *Here's an exercise where the chunk is pre-evaulated via the `exercise.eval` option (so the user can see the default output we'd like them to customize). We also add a "hint" to the correct solution via the chunk immediate below labeled `print-limit-hint`.* Modify the following code to limit the number of rows printed to 5: ```{r print-limit, exercise=TRUE, exercise.eval=TRUE} mtcars ``` ```{r print-limit-hint} head(mtcars) ``` ### Quiz *You can include any number of single or multiple choice questions as a quiz. Use the `question` function to define a question and the `quiz` function for grouping multiple questions together.* Some questions to verify that you understand the purposes of various base and recommended R packages: ```{r quiz} quiz( question("Which package contains functions for installing other R packages?", answer("base"), answer("tools"), answer("utils", correct = TRUE), answer("codetools") ), question("Which of the R packages listed below are used to create plots?", answer("lattice", correct = TRUE), answer("tools"), answer("stats"), answer("grid", correct = TRUE) ) ) ``` usethis/inst/templates/license-cc0.md0000644000176200001440000001546613453664176017353 0ustar liggesusers## creative commons # CC0 1.0 Universal CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED HEREUNDER. ### Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. __Copyright and Related Rights.__ A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: i. the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; ii. moral rights retained by the original author(s) and/or performer(s); iii. publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; iv. rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; v. rights protecting the extraction, dissemination, use and reuse of data in a Work; vi. database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and vii. other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. __Waiver.__ To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. __Public License Fallback.__ Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. __Limitations and Disclaimers.__ a. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. b. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. c. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. d. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. usethis/inst/templates/citation-template.R0000644000176200001440000000035713453664176020503 0ustar liggesuserscitHeader("To cite {{Package}} in publications use:") citEntry( entry = "Article", title = , author = , journal = , year = , volume = , number = , pages = , url = , textVersion = paste( ) ) usethis/inst/templates/readme-rmd-pre-commit.sh0000644000176200001440000000064713453664176021362 0ustar liggesusers#!/bin/bash README=($(git diff --cached --name-only | grep -Ei '^README\.[R]?md$')) MSG="use 'git commit --no-verify' to override this check" if [[ ${#README[@]} == 0 ]]; then exit 0 fi if [[ README.Rmd -nt README.md ]]; then echo -e "README.md is out of date; please re-knit README.Rmd\n$MSG" exit 1 elif [[ ${#README[@]} -lt 2 ]]; then echo -e "README.Rmd and README.md should be both staged\n$MSG" exit 1 fi usethis/inst/templates/packagename-package.R0000644000176200001440000000031213453664176020674 0ustar liggesusers#' @keywords internal "_PACKAGE" # The following block is used by usethis to automatically manage # roxygen namespace tags. Modify with care! ## usethis namespace: start ## usethis namespace: end NULL usethis/inst/templates/appveyor.yml0000644000176200001440000000207513453664176017324 0ustar liggesusers# DO NOT CHANGE the "init" and "install" sections below # Download script file from GitHub init: ps: | $ErrorActionPreference = "Stop" Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" Import-Module '..\appveyor-tool.ps1' install: ps: Bootstrap cache: - C:\RLibrary environment: NOT_CRAN: true # env vars that may need to be set, at least temporarily, from time to time # see https://github.com/krlmlr/r-appveyor#readme for details # USE_RTOOLS: true # R_REMOTES_STANDALONE: true # Adapt as necessary starting from here build_script: - travis-tool.sh install_deps test_script: - travis-tool.sh run_tests on_failure: - 7z a failure.zip *.Rcheck\* - appveyor PushArtifact failure.zip artifacts: - path: '*.Rcheck\**\*.log' name: Logs - path: '*.Rcheck\**\*.out' name: Logs - path: '*.Rcheck\**\*.fail' name: Logs - path: '*.Rcheck\**\*.Rout' name: Logs - path: '\*_*.tar.gz' name: Bits - path: '\*_*.zip' name: Bits usethis/inst/templates/packagename-data-prep.R0000644000176200001440000000012313453664176021156 0ustar liggesusers## code to prepare `{{{name}}}` dataset goes here usethis::use_data("{{{name}}}") usethis/inst/templates/article.Rmd0000644000176200001440000000025113453664176017015 0ustar liggesusers--- title: "{{{ vignette_title }}}" --- ```{r, include = FALSE} knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) ``` ```{r setup} library({{Package}}) ``` usethis/tests/0000755000176200001440000000000013507322272013103 5ustar liggesusersusethis/tests/spelling.R0000644000176200001440000000021113461353635015043 0ustar liggesusersif (requireNamespace("spelling", quietly = TRUE)) { spelling::spell_check_test(vignettes = TRUE, error = FALSE, skip_on_cran = TRUE) } usethis/tests/testthat.R0000644000176200001440000000007213461353635015073 0ustar liggesuserslibrary(testthat) library(usethis) test_check("usethis") usethis/tests/testthat/0000755000176200001440000000000013507356065014752 5ustar liggesusersusethis/tests/testthat/test-use-testthat.R0000644000176200001440000000074413453664176020516 0ustar liggesuserscontext("use_testthat") test_that("use_testhat() sets up infrastructure", { pkg <- scoped_temporary_package() use_testthat() expect_match(desc::desc_get("Suggests", proj_get()), "testthat") expect_proj_dir("tests", "testthat") expect_proj_file("tests", "testthat.R") expect_true(uses_testthat()) }) test_that("use_test() creates a test file", { pkg <- scoped_temporary_package() use_test("foo", open = FALSE) expect_proj_file("tests", "testthat", "test-foo.R") }) usethis/tests/testthat/test-utils.R0000644000176200001440000000140313507207664017210 0ustar liggesuserscontext("utils") test_that("check_is_named_list() works", { l <- list(a = "a", b = 2, c = letters) expect_identical(l, check_is_named_list(l)) expect_usethis_error(check_is_named_list(NULL), "must be a list") expect_usethis_error(check_is_named_list(c(a = "a", b = "b")), "must be a list") expect_usethis_error(check_is_named_list(list("a", b = 2)), "Names of .+ must be") }) test_that("asciify() substitutes non-ASCII but respects case", { expect_identical(asciify("aB!d$F+_h"), "aB-d-F-_h") }) test_that("slug() sets file extension, iff 'ext' not aleady the extension", { expect_equal(slug("abc", "R"), "abc.R") expect_equal(slug("abc.R", "R"), "abc.R") expect_equal(slug("abc.r", "R"), "abc.r") expect_equal(slug("abc.R", "txt"), "abc.txt") }) usethis/tests/testthat/test-use-package-doc.R0000644000176200001440000000063713507207664021010 0ustar liggesuserscontext("use_package_doc") test_that("use_package_doc() requires a package", { scoped_temporary_project() expect_false(has_package_doc()) expect_usethis_error(use_package_doc(), "not an R package") }) test_that("use_package_doc() creates the promised file", { scoped_temporary_package() use_package_doc() expect_proj_file("R", paste0(project_name(), "-package.R")) expect_true(has_package_doc()) }) usethis/tests/testthat/test-github-utils.R0000644000176200001440000000652413507207664020501 0ustar liggesuserscontext("test-github-utils") test_that("parse_github_remotes() works on named list or named character", { urls <- list( https = "https://github.com/r-lib/devtools.git", browser = "https://github.com/r-lib/devtools", ssh = "git@github.com:r-lib/devtools.git" ) expected <- list(owner = "r-lib", repo = "devtools") expect_identical( parse_github_remotes(urls), list(https = expected, browser = expected, ssh = expected) ) expect_identical( parse_github_remotes(unlist(urls)), list(https = expected, browser = expected, ssh = expected) ) }) test_that("github_token() works", { withr::with_envvar( new = c("GITHUB_PAT" = "yes", "GITHUB_TOKEN" = "no"), expect_identical(github_token(), "yes") ) withr::with_envvar( new = c("GITHUB_PAT" = NA, "GITHUB_TOKEN" = "yes"), expect_identical(github_token(), "yes") ) withr::with_envvar( new = c("GITHUB_PAT" = NA, "GITHUB_TOKEN" = NA), expect_identical(github_token(), "") ) }) test_that("have_github_token() is definitive detector for 'we have no PAT'", { expect_false(have_github_token("")) expect_true(have_github_token("PAT")) }) test_that("check_github_token() passes good input through", { expect_identical(check_github_token("", allow_empty = TRUE), "") with_mock( `usethis:::github_user` = function(auth_token) list(login = "USER"), expect_identical(check_github_token("PAT"), "PAT") ) }) test_that("check_github_token() errors informatively for bad input", { expect_usethis_error(check_github_token(c("PAT1", "PAT2")), "single string") expect_usethis_error(check_github_token(NA), "single string") expect_usethis_error(check_github_token(NA_character_), "single string") expect_usethis_error(check_github_token(""), "No.*available") with_mock( `usethis:::github_user` = function(auth_token) NULL, expect_usethis_error(check_github_token("PAT"), "invalid") ) }) test_that("github_user() returns NULL if no auth_token", { skip_if_offline() skip_on_cran() withr::with_envvar( new = c("GITHUB_PAT" = NA, "GITHUB_TOKEN" = NA), expect_null(github_user()) ) }) test_that("github_user() returns NULL for bad token", { skip_if_offline() skip_on_cran() expect_null(github_user("abc")) }) test_that("github_remote_protocol() picks up ssh and https", { r <- list( origin = "git@github.com:OWNER/REPO.git" ) with_mock( `usethis:::github_remotes` = function() r, { expect_identical(github_remote_protocol(), "ssh") } ) r <- list( origin = "https://github.com/OWNER/REPO.git" ) with_mock( `usethis:::github_remotes` = function() r, { expect_identical(github_remote_protocol(), "https") } ) }) test_that("github_remote_protocol() errors for unrecognized URL", { r <- list( origin = "file:///srv/git/project.git" ) with_mock( `usethis:::github_remotes` = function() r, { expect_usethis_error(github_remote_protocol(), "Can't classify URL") } ) }) test_that("github_remote_protocol() returns NULL if no github origin", { r <- NULL with_mock( `usethis:::github_remotes` = function() r, { expect_null(github_remote_protocol()) } ) r <- list( non_standard_remote_name = "https://github.com/OWNER/REPO.git" ) with_mock( `usethis:::github_remotes` = function() r, { expect_null(github_remote_protocol()) } ) }) usethis/tests/testthat/test-use-r.R0000644000176200001440000000023013453664176017105 0ustar liggesuserscontext("use_r") test_that("use_r() creates a .R file below R/", { pkg <- scoped_temporary_package() use_r("foo") expect_proj_file("R/foo.R") }) usethis/tests/testthat/test-proj.R0000644000176200001440000001245713507207664017035 0ustar liggesuserscontext("projects") test_that("proj_set() errors on non-existent path", { expect_usethis_error( proj_set("abcedefgihklmnopqrstuv"), "does not exist" ) }) test_that("proj_set() errors if no criteria are fulfilled", { tmpdir <- file_temp(pattern = "i-am-not-a-project") on.exit(dir_delete(tmpdir)) dir_create(tmpdir) expect_usethis_error( proj_set(tmpdir), "does not appear to be inside a project or package" ) }) test_that("proj_set() can be forced, even if no criteria are fulfilled", { tmpdir <- file_temp(pattern = "i-am-not-a-project") on.exit(dir_delete(tmpdir)) dir_create(tmpdir) expect_error_free(old <- proj_set(tmpdir, force = TRUE)) on.exit(proj_set(old), add = TRUE) expect_identical(proj_get(), proj_path_prep(tmpdir)) proj_set_(tempdir()) expect_usethis_error( proj_set(proj_get()), "does not appear to be inside a project or package" ) }) test_that("is_package() detects package-hood", { scoped_temporary_package() expect_true(is_package()) scoped_temporary_project() expect_false(is_package()) }) test_that("check_is_package() errors for non-package", { scoped_temporary_project() expect_usethis_error(check_is_package(), "not an R package") }) test_that("check_is_package() can reveal who's asking", { scoped_temporary_project() expect_usethis_error(check_is_package("foo"), "foo") }) test_that("proj_path() appends to the project path", { scoped_temporary_project() expect_equal( proj_path("a", "b", "c"), path(proj_get(), "a/b/c") ) expect_identical(proj_path("a", "b", "c"), proj_path("a/b/c")) }) test_that("proj_rel_path() returns path part below the project", { scoped_temporary_project() expect_equal(proj_rel_path(proj_path("a/b/c")), "a/b/c") }) test_that("proj_rel_path() returns path 'as is' if not in project", { scoped_temporary_project() expect_identical(proj_rel_path(path_temp()), path_temp()) }) test_that("proj_set() enforces proj path preparation policy", { ## specifically: check that proj_get() returns realized path t <- dir_create(file_temp()) ## a/b/d and a/b2/d identify same directory a <- path_real(dir_create(path(t, "a"))) b <- dir_create(path(a, "b")) b2 <- link_create(b, path(a, "b2")) d <- dir_create(path(b, "d")) ## input path includes symbolic link path_with_symlinks <- path(b2, "d") expect_equal(path_rel(path_with_symlinks, a), "b2/d") ## force = TRUE old <- proj_set(path_with_symlinks, force = TRUE) on.exit(proj_set(old)) expect_equal(path_rel(proj_get(), a), "b/d") ## force = FALSE file_create(path(b, "d", ".here")) proj_set(path_with_symlinks, force = FALSE) expect_equal(path_rel(proj_get(), a), "b/d") dir_delete(t) }) test_that("proj_path_prep() passes NULL through", { expect_null(proj_path_prep(NULL)) }) test_that("is_in_proj() detects whether files are (or would be) in project", { scoped_temporary_package() ## file does not exist but would be in project if created expect_true(is_in_proj(proj_path("fiction"))) ## file exists in project expect_true(is_in_proj(proj_path("DESCRIPTION"))) ## file does not exist and would not be in project if created expect_false(is_in_proj(file_temp())) ## file exists and is not in project expect_false(is_in_proj(path_temp())) }) test_that("proj_sitrep() reports current working/project state", { pkg <- scoped_temporary_package() x <- proj_sitrep() expect_s3_class(x, "sitrep") expect_false(is.null(x[["working_directory"]])) expect_identical( fs::path_file(pkg), fs::path_file(x[["active_usethis_proj"]]) ) }) test_that("with_project() runs code in temp proj, restores (lack of) proj", { old_project <- proj_get_() on.exit(proj_set_(old_project)) temp_proj <- create_project( file_temp(pattern = "TEMPPROJ"), rstudio = FALSE, open = FALSE ) proj_set_(NULL) expect_identical(proj_get_(), NULL) res <- with_project(path = temp_proj, proj_get_()) expect_identical(res, temp_proj) expect_identical(proj_get_(), NULL) }) test_that("with_project() runs code in temp proj, restores original proj", { old_project <- proj_get_() on.exit(proj_set_(old_project)) host <- create_project( file_temp(pattern = "host"), rstudio = FALSE, open = FALSE ) guest <- create_project( file_temp(pattern = "guest"), rstudio = FALSE, open = FALSE ) proj_set(host) expect_identical(proj_get_(), host) res <- with_project(path = guest, proj_get_()) expect_identical(res, guest) expect_identical(proj_get(), host) }) test_that("with_project() works when temp proj == original proj", { old_project <- proj_get_() on.exit(proj_set_(old_project)) host <- create_project( file_temp(pattern = "host"), rstudio = FALSE, open = FALSE ) proj_set(host) expect_identical(proj_get_(), host) res <- with_project(path = host, proj_get_()) expect_identical(res, host) expect_identical(proj_get(), host) }) test_that("local_project() activates proj til scope ends", { old_project <- proj_get_() on.exit(proj_set_(old_project)) new_proj <- file_temp(pattern = "aaa") create_project(new_proj, rstudio = FALSE, open = FALSE) proj_set_(NULL) foo <- function() { local_project(new_proj) proj_sitrep() } res <- foo() expect_identical( res[["active_usethis_proj"]], as.character(proj_path_prep(new_proj)) ) expect_null(proj_get_()) }) usethis/tests/testthat/test-addin.R0000644000176200001440000000073013453664176017136 0ustar liggesuserscontext("use_addin") test_that("use_addin() creates the first addins.dcf as promised", { scoped_temporary_package() use_addin("addin.test") addin_dcf <- readLines(proj_path("inst", "rstudio", "addins.dcf")) expected_file <- system.file("templates", "addins.dcf", package = "usethis") addin_dcf_expected <- readLines(expected_file) addin_dcf_expected[3] <- "Binding: addin.test" addin_dcf_expected[5] <- "" expect_equal(addin_dcf, addin_dcf_expected) }) usethis/tests/testthat/test-roxygen.R0000644000176200001440000000047513453664176017560 0ustar liggesuserscontext("test-roxygen") test_that("use_package_doc() compatible with roxygen_ns_append()", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_package_doc()) expect_output(roxygen_ns_append("test"), "Adding 'test'") expect_silent(roxygen_ns_append("test")) }) usethis/tests/testthat/test-use-code-of-conduct.R0000644000176200001440000000027413453664176021625 0ustar liggesuserscontext("use_code_of_conduct") test_that("use_code_of_conduct() creates promised file", { scoped_temporary_project() use_code_of_conduct() expect_proj_file("CODE_OF_CONDUCT.md") }) usethis/tests/testthat/teardown.R0000644000176200001440000000003213453664176016720 0ustar liggesusersoptions(pre_test_options) usethis/tests/testthat/test-use-rmarkdown.R0000644000176200001440000000201413453664176020652 0ustar liggesuserscontext("use_rmarkdown_template") test_that("use_rmarkdown_template() creates everything as promised, defaults", { scoped_temporary_package() use_rmarkdown_template() path <- path("inst", "rmarkdown", "templates", "template-name") yml <- readLines(proj_path(path, "template.yaml")) expect_true( all( c("name: Template Name", "description: >", " A description of the template", "create_dir: FALSE") %in% yml ) ) expect_proj_file(path, "skeleton", "skeleton.Rmd") }) test_that("use_rmarkdown_template() creates everything as promised, args", { scoped_temporary_package() use_rmarkdown_template( template_name = "aaa", template_dir = "bbb", template_description = "ccc", template_create_dir = TRUE ) path <- path("inst", "rmarkdown", "templates", "bbb") yml <- readLines(proj_path(path, "template.yaml")) expect_true( all( c("name: aaa", "description: >", " ccc", "create_dir: TRUE") %in% yml ) ) expect_proj_file(path, "skeleton", "skeleton.Rmd") }) usethis/tests/testthat/test-write.R0000644000176200001440000000527013453664176017215 0ustar liggesuserscontext("write helpers") test_that("write_union() does not activate a project", { tmpdir <- file_temp(pattern = "write-tests") on.exit(dir_delete(tmpdir)) dir_create(tmpdir) file_create(path(tmpdir, ".here")) expect_true(possibly_in_proj(tmpdir)) expect_false(is_in_proj(tmpdir)) ## don't use `quiet = TRUE` because prevents what I want to test write_union(path(tmpdir, "abc"), lines = letters[1:3]) expect_false(is_in_proj(tmpdir)) }) test_that("same_contents() detects if contents are / are not same", { tmp <- file_temp() x <- letters[1:3] writeLines(x, con = tmp, sep = "\n") expect_true(same_contents(tmp, x)) expect_false(same_contents(tmp, letters[4:6])) }) test_that("write_union() writes a de novo file", { tmp <- file_temp() expect_false(file_exists(tmp)) write_union(tmp, letters[1:3], quiet = TRUE) expect_identical(readLines(tmp), letters[1:3]) }) test_that("write_union() leaves file 'as is'", { tmp <- file_temp() writeLines(letters[1:3], tmp) before <- readLines(tmp) write_union(tmp, "b", quiet = TRUE) expect_identical(before, readLines(tmp)) }) test_that("write_union() adds lines", { tmp <- file_temp() writeLines(letters[1:3], tmp) write_union(tmp, letters[4:5], quiet = TRUE) expect_setequal(readLines(tmp), letters[1:5]) }) # https://github.com/r-lib/usethis/issues/526 test_that("write_union() doesn't remove duplicated lines in the input", { tmp <- file_temp() before <- rep(letters[1:2], 3) add_me <- c("z", "a", "c", "a", "b") writeLines(before, tmp) expect_identical(before, readLines(tmp)) write_union(tmp, add_me, quiet = TRUE) expect_identical(readLines(tmp), c(before, c("z", "c"))) }) test_that("write_over() writes a de novo file", { tmp <- file_temp() expect_false(file_exists(tmp)) write_over(tmp, letters[1:3], quiet = TRUE) expect_identical(readLines(tmp), letters[1:3]) }) test_that("write_over() leaves file 'as is'", { tmp <- file_temp() writeLines(letters[1:3], tmp) before <- readLines(tmp) write_over(tmp, letters[1:3], quiet = TRUE) expect_identical(before, readLines(tmp)) }) # https://github.com/r-lib/usethis/issues/514 test_that("write_ut8 always produces a trailing newline", { path <- file_temp() write_utf8(path, "x") if (identical(Sys.info()[["sysname"]], "Windows")) { expect_equal(readChar(path, 3), "x\r\n") } else { expect_equal(readChar(path, 2), "x\n") } }) test_that("write_ut8 can append text when requested", { path <- file_temp() write_utf8(path, "x") write_utf8(path, "x", append = TRUE) if (identical(Sys.info()[["sysname"]], "Windows")) { expect_equal(readChar(path, 6), "x\r\nx\r\n") } else { expect_equal(readChar(path, 4), "x\nx\n") } }) usethis/tests/testthat/test-create.R0000644000176200001440000000577513507207664017333 0ustar liggesuserscontext("create") test_that("create_package() creates a package", { dir <- scoped_temporary_package() expect_true(possibly_in_proj(dir)) expect_true(is_package(dir)) }) test_that("create_project() creates a non-package project", { dir <- scoped_temporary_project() expect_true(possibly_in_proj(dir)) expect_false(is_package(dir)) }) test_that("create functions return path to new proj, but restore active proj", { path <- file_temp() cur_proj <- proj_get() new_path <- create_package(path) expect_equal(proj_get(), cur_proj) expect_equal(proj_path_prep(path), new_path) dir_delete(path) new_path <- create_project(path) expect_equal(proj_get(), cur_proj) expect_equal(proj_path_prep(path), new_path) dir_delete(path) }) test_that("nested package is disallowed, by default", { dir <- scoped_temporary_package() expect_usethis_error(scoped_temporary_package(path(dir, "abcde")), "anyway") }) test_that("nested project is disallowed, by default", { dir <- scoped_temporary_project() expect_usethis_error(scoped_temporary_project(path(dir, "abcde")), "anyway") }) ## https://github.com/r-lib/usethis/issues/227 test_that("create_* works w/ non-existing rel path and absolutizes it", { ## take care to provide a **non-absolute** path path_package <- path_file(file_temp(pattern = "aaa")) withr::with_dir( path_temp(), create_package(path_package, rstudio = FALSE, open = FALSE) ) expect_true(dir_exists(path_temp(path_package))) path_project <- path_file(file_temp(pattern = "aaa")) withr::with_dir( path_temp(), create_project(path_project, rstudio = FALSE, open = FALSE) ) expect_true(dir_exists(path_temp(path_project))) }) test_that("rationalize_fork() honors fork = FALSE", { expect_false( rationalize_fork(fork = FALSE, repo_info = list(), auth_token = "PAT") ) expect_false( rationalize_fork(fork = FALSE, repo_info = list(), auth_token = "") ) }) test_that("rationalize_fork() won't attempt to fork w/o auth_token", { expect_false( rationalize_fork(fork = NA, repo_info = list(), auth_token = "") ) expect_usethis_error( rationalize_fork(fork = TRUE, repo_info = list(), auth_token = ""), "No GitHub .+auth_token.+ is available" ) }) test_that("rationalize_fork() won't attempt to fork repo owned by user", { with_mock( `usethis:::github_user` = function(auth_token) list(login = "USER"), expect_usethis_error( rationalize_fork( fork = TRUE, repo_info = list(full_name = "USER/REPO", owner = list(login = "USER")), auth_token = "PAT" ), "Can't fork" ) ) }) test_that("rationalize_fork() forks by default iff user cannot push", { expect_false( rationalize_fork( fork = NA, repo_info = list(permissions = list(push = TRUE)), auth_token = "" ) ) expect_true( rationalize_fork( fork = NA, repo_info = list( owner = list(login = "SOMEONE_ELSE"), permissions = list(push = FALSE) ), auth_token = "PAT" ) ) }) usethis/tests/testthat/test-use-circleci.R0000644000176200001440000000256613507207664020432 0ustar liggesuserscontext("use_circleci") test_that("uses_circleci() reports usage of CircleCI", { skip_if_no_git_config() scoped_temporary_package() expect_false(uses_circleci()) use_git() use_git_remote(name = "origin", url = "https://github.com/fake/fake") use_circleci(browse = FALSE) expect_true(uses_circleci()) }) test_that("check_uses_circleci() can throw error", { scoped_temporary_package() expect_error( check_uses_circleci(), "Do you need to run `use_circleci()`?", fixed = TRUE, class = "usethis_error" ) }) test_that("use_circleci() configures CircleCI", { skip_if_no_git_config() scoped_temporary_package() use_git() use_git_remote(name = "origin", url = "https://github.com/fake/fake") use_circleci(browse = FALSE) expect_proj_dir(".circleci") expect_proj_file(".circleci/config.yml") yml <- yaml::yaml.load_file(".circleci/config.yml") expect_identical( yml$jobs$build$steps[[7]]$store_artifacts$path, paste0(project_name(), ".Rcheck/") ) }) test_that("use_circleci() specifies Docker image", { skip_if_no_git_config() scoped_temporary_package() use_git() use_git_remote(name = "origin", url = "https://github.com/fake/fake") docker <- "rocker/r-ver:3.5.3" use_circleci(browse = FALSE, image = docker) yml <- yaml::yaml.load_file(".circleci/config.yml") expect_identical(yml$jobs$build$docker[[1]]$image, docker) }) usethis/tests/testthat/test-use-build-ignore.R0000644000176200001440000000031513453664176021230 0ustar liggesuserscontext("use_build_ignore") test_that(". escaped around surround by anchors", { expect_equal(escape_path("."), "^\\.$") }) test_that("strip trailing /", { expect_equal(escape_path("./"), "^\\.$") }) usethis/tests/testthat/test-use-package.R0000644000176200001440000000030513507207664020235 0ustar liggesuserscontext("use_package") test_that("use_package() won't facilitate dependency on tidyverse", { scoped_temporary_package() expect_usethis_error(use_package("tidyverse"), "rarely a good idea") }) usethis/tests/testthat/test-use-rstudio.R0000644000176200001440000000420713507207664020340 0ustar liggesuserscontext("use_rstudio") test_that("use_rstudio() creates .Rproj file, named after directory", { dir <- scoped_temporary_package(rstudio = FALSE) use_rstudio() rproj <- path_file(dir_ls(proj_get(), regexp = "[.]Rproj$")) expect_identical(path_ext_remove(rproj), path_file(dir)) }) test_that("a non-RStudio project is not recognized", { scoped_temporary_package(rstudio = FALSE) expect_false(is_rstudio_project()) expect_identical(rproj_path(), NA_character_) }) test_that("an RStudio project is recognized", { scoped_temporary_package(rstudio = TRUE) expect_true(is_rstudio_project()) expect_match(rproj_path(), "\\.Rproj$") }) test_that("we error for multiple Rproj files", { scoped_temporary_package(rstudio = TRUE) file_copy( rproj_path(), proj_path("copy.Rproj") ) expect_usethis_error(rproj_path(), "Multiple .Rproj files found", fixed = TRUE) }) test_that("Rproj is parsed (actually, only colon-containing lines)", { tmp <- file_temp() writeLines(c("a: a", "", "b: b", "I have no colon"), tmp) expect_identical( parse_rproj(tmp), list(a = "a", "", b = "b", "I have no colon") ) }) test_that("Existing field(s) in Rproj can be modified", { tmp <- file_temp() writeLines( c( "Version: 1.0", "", "RestoreWorkspace: Default", "SaveWorkspace: Yes", "AlwaysSaveHistory: Default" ), tmp ) before <- parse_rproj(tmp) delta <- list(RestoreWorkspace = "No", SaveWorkspace = "No") after <- modify_rproj(tmp, delta) expect_identical(before[c(1, 2, 5)], after[c(1, 2, 5)]) expect_identical(after[3:4], delta) }) test_that("we can roundtrip an Rproj file", { scoped_temporary_package(rstudio = TRUE) rproj_file <- rproj_path() before <- readLines(rproj_file) rproj <- modify_rproj(rproj_file, list()) writeLines(serialize_rproj(rproj), rproj_file) after <- readLines(rproj_file) expect_identical(before, after) }) test_that("use_blank_state() modifies Rproj", { scoped_temporary_package(rstudio = TRUE) use_blank_slate("project") rproj <- parse_rproj(rproj_path()) expect_equal(rproj$RestoreWorkspace, "No") expect_equal(rproj$SaveWorkspace, "No") }) usethis/tests/testthat/test-use-tidy.R0000644000176200001440000000541513453664176017627 0ustar liggesuserscontext("tidyverse") test_that("use_tidy_description() alphabetises dependencies", { pkg <- scoped_temporary_package() use_package("usethis") use_package("desc") use_package("withr", "Suggests") use_package("gh", "Suggests") use_tidy_description() desc <- readLines(proj_path("DESCRIPTION")) expect_gt(grep("usethis", desc), grep("desc", desc)) expect_gt(grep("withr", desc), grep("gh", desc)) }) test_that("use_tidy_versions() specifies a version for dependencies", { pkg <- scoped_temporary_package() use_package("usethis") use_package("desc") use_package("withr", "Suggests") use_package("gh", "Suggests") use_tidy_versions() desc <- readLines(proj_path("DESCRIPTION")) desc <- grep("usethis|desc|withr|gh", desc, value = TRUE) expect_true(all(grepl("\\(>= [0-9.]+\\)", desc))) }) test_that("use_tidy_versions() does nothing for a base package", { ## if we ever depend on a recommended package, could beef up this test a bit pkg <- scoped_temporary_package() use_package("tools") use_package("stats", "Suggests") use_tidy_versions() desc <- readLines(proj_path("DESCRIPTION")) desc <- grep("tools|stats", desc, value = TRUE) expect_false(any(grepl("\\(>= [0-9.]+\\)", desc))) }) test_that("use_tidy_eval() inserts the template file and Imports rlang", { skip_if_not_installed("roxygen2") pkg <- scoped_temporary_package() ## fake the use of roxygen; this better in a test than use_roxygen_md() use_description_field(name = "RoxygenNote", value = "6.0.1.9000") use_tidy_eval() expect_match(dir_ls(proj_path("R")), "utils-tidy-eval.R") expect_match(desc::desc_get("Imports", pkg), "rlang") }) test_that("use_tidy_GITHUB-STUFF() adds and Rbuildignores files", { with_mock( `usethis:::uses_travis` = function(base_path) TRUE, `gh::gh_tree_remote` = function(path) list(username = "USER", repo = "REPO"), { scoped_temporary_package() use_tidy_contributing() use_tidy_issue_template() use_tidy_support() use_tidy_coc() expect_proj_file(".github/CONTRIBUTING.md") expect_proj_file(".github/ISSUE_TEMPLATE.md") expect_proj_file(".github/SUPPORT.md") expect_proj_file(".github/CODE_OF_CONDUCT.md") expect_true(is_build_ignored("^\\.github$")) } ) }) test_that("use_tidy_github() adds and Rbuildignores files", { with_mock( `usethis:::uses_travis` = function(base_path) TRUE, `gh::gh_tree_remote` = function(path) list(username = "USER", repo = "REPO"), { scoped_temporary_package() use_tidy_github() expect_proj_file(".github/CONTRIBUTING.md") expect_proj_file(".github/ISSUE_TEMPLATE.md") expect_proj_file(".github/SUPPORT.md") expect_proj_file(".github/CODE_OF_CONDUCT.md") expect_true(is_build_ignored("^\\.github$")) } ) }) usethis/tests/testthat/test-use-pipe.R0000644000176200001440000000251413507207664017603 0ustar liggesuserscontext("use_pipe") test_that("use_pipe() requires a package", { scoped_temporary_project() expect_usethis_error(use_pipe(), "not an R package") }) test_that("use_pipe(export = TRUE) adds promised file, Imports magrittr", { with_mock( `usethis:::uses_roxygen` = function(base_path) TRUE, { scoped_temporary_package() use_pipe(export = TRUE) expect_match(desc::desc_get("Imports", proj_get()), "magrittr") expect_proj_file("R", "utils-pipe.R") } ) }) test_that("use_pipe(export = FALSE) adds roxygen to package doc", { with_mock( `usethis:::uses_roxygen` = function(base_path) TRUE, { scoped_temporary_package() use_package_doc() use_pipe(export = FALSE) expect_match(desc::desc_get("Imports", proj_get()), "magrittr") package_doc <- readLines(proj_path(package_doc_path())) expect_match(package_doc, "#' @importFrom magrittr %>%", all = FALSE) } ) }) test_that("use_pipe(export = FALSE) gives advice if no package doc", { with_mock( `usethis:::uses_roxygen` = function(base_path) TRUE, { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output( use_pipe(export = FALSE), "Copy and paste this line" ) expect_match(desc::desc_get("Imports", proj_get()), "magrittr") } ) }) usethis/tests/testthat/test-use-version.R0000644000176200001440000000360513507277670020341 0ustar liggesuserscontext("use_version.R") test_that("bump_version() presents all possible incremented versions", { expect_identical( bump_version("1.1.1.9000"), c(major = "2.0.0", minor = "1.2.0", patch = "1.1.2", dev = "1.1.1.9001") ) }) test_that("use_version() and use_dev_version() require a package", { scoped_temporary_project() expect_usethis_error(use_version("major"), "not an R package") expect_usethis_error(use_dev_version(), "not an R package") }) test_that("use_version() errors for invalid `which`", { scoped_temporary_package() expect_error(use_version("1.2.3"), "should be one of") }) test_that("use_version() increments version in DESCRIPTION, edits NEWS", { scoped_temporary_package() use_description_field( name = "Version", value = "1.1.1.9000", overwrite = TRUE ) use_news_md() use_version("major") expect_identical( as.character(desc::desc_get_version(proj_get())), "2.0.0" ) expect_match( readLines(proj_path("NEWS.md"), n = 1), "2.0.0" ) }) test_that("use_dev_version() appends .9000 to Version, exactly once", { scoped_temporary_package() use_description_field(name = "Version", value = "0.0.1", overwrite = TRUE) use_dev_version() expect_identical( as.character(desc::desc_get_version(proj_get())), "0.0.1.9000" ) use_dev_version() expect_identical( as.character(desc::desc_get_version(proj_get())), "0.0.1.9000" ) }) test_that("use_version() updates (development version) directly", { scoped_temporary_package() use_description_field(name = "Version", value = "0.0.1", overwrite = TRUE) use_news_md() # bump to dev to set (development version) use_dev_version() # directly overwrite development header use_version("patch") expect_match( readLines(proj_path("NEWS.md"), n = 1), "0[.]0[.]2" ) expect_match( readLines(proj_path("NEWS.md"), n = 3)[3], "0[.]0[.]1" ) }) usethis/tests/testthat/test-browse.R0000644000176200001440000000330513453664176017361 0ustar liggesuserscontext("browse") test_that("github_link() has fall back", { scoped_temporary_package() expect_warning(out <- github_link("utils"), "CRAN mirror") expect_equal(out, "https://github.com/cran/utils") }) test_that("github_link() reports GitHub URL 'as is'", { expect_identical( github_link("usethis"), "https://github.com/r-lib/usethis" ) expect_identical( github_link("gh"), "https://github.com/r-lib/gh#readme" ) }) test_that("github_home() strips everything after USER/REPO", { expect_identical( github_home("usethis"), glue::as_glue("https://github.com/r-lib/usethis") ) expect_identical( github_home("gh"), glue::as_glue("https://github.com/r-lib/gh") ) }) test_that("cran_home() produces canonical URL", { pkg <- scoped_temporary_package(file_temp("aaa")) expect_match(cran_home(), "https://cran.r-project.org/package=aaa") expect_match(cran_home("bar"), "https://cran.r-project.org/package=bar") }) test_that("browse_XXX() goes to correct URL", { g <- function(x) paste0("https://github.com/", x) expect_equal(browse_github("gh"), g("r-lib/gh#readme")) expect_match(browse_github_issues("gh"), g("r-lib/gh/issues")) expect_equal(browse_github_issues("gh", 1), g("r-lib/gh/issues/1")) expect_equal(browse_github_issues("gh", "new"), g("r-lib/gh/issues/new")) expect_match(browse_github_pulls("gh"), g("r-lib/gh/pulls")) expect_equal(browse_github_pulls("gh", 1), g("r-lib/gh/pull/1")) expect_equal(browse_travis("usethis"), "https://travis-ci.org/r-lib/usethis") expect_equal(browse_travis("usethis", ext = "com"), "https://travis-ci.com/r-lib/usethis") expect_equal(browse_cran("usethis"), "https://cran.r-project.org/package=usethis") }) usethis/tests/testthat/test-use-pkgdown.R0000644000176200001440000000070713507207664020321 0ustar liggesuserscontext("use_pkgdown") test_that("use_pkgdown() requires a package", { scoped_temporary_project() expect_usethis_error(use_pkgdown(), "not an R package") }) test_that("use_pkgdown() creates and ignores the promised file/dir", { skip_if_not_installed("pkgdown", "1.1.0") scoped_temporary_package() use_pkgdown() expect_proj_file("_pkgdown.yml") expect_true(is_build_ignored("^_pkgdown\\.yml$")) expect_true(is_build_ignored("^docs$")) }) usethis/tests/testthat/test-use-badge.R0000644000176200001440000000225513507207664017712 0ustar liggesuserscontext("use_badge") test_that("use_[cran|bioc]_badge() don't error", { scoped_temporary_package() expect_error_free(use_cran_badge()) expect_error_free(use_bioc_badge()) }) test_that("use_lifecycle_badge() handles bad and good input", { scoped_temporary_package() expect_error(use_lifecycle_badge(), "argument \"stage\" is missing") expect_error(use_lifecycle_badge("eperimental"), "'arg' should be one of ") expect_error_free(use_lifecycle_badge("stable")) }) test_that("use_binder_badge() needs a github repository", { skip_if(getRversion() < 3.2) skip_if_no_git_config() scoped_temporary_project() expect_error(use_binder_badge()) }) test_that("use_badge() does nothing if badge seems to pre-exist", { scoped_temporary_package() href <- "https://cran.r-project.org/package=foo" writeLines(href, proj_path("README.md")) expect_false(use_badge("foo", href, "SRC")) }) test_that("default readme has placeholders / can add to empty badge block", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_readme_md()) expect_output(use_cran_badge(), "Adding CRAN status badge") expect_silent(use_cran_badge()) }) usethis/tests/testthat/test-git-utils.R0000644000176200001440000000442513507207664020000 0ustar liggesuserscontext("test-git-utils") test_that("git_config returns old local values", { scoped_temporary_package() repo <- git_init() out <- git_config(x.y = "x", .repo = repo) expect_equal(out, list(x.y = NULL)) out <- git_config(x.y = "y", .repo = repo) expect_equal(out, list(x.y = "x")) }) test_that("git_config returns old global values", { out <- git_config(usethis.test1 = "val1", usethis.test2 = "val2") expect_equal(out, list(usethis.test1 = NULL, usethis.test2 = NULL)) out <- git_config(usethis.test1 = NULL, usethis.test2 = NULL) expect_equal(out, list(usethis.test1 = "val1", usethis.test2 = "val2")) }) test_that("git_protocol() catches bad input from usethis.protocol option", { withr::with_options( list(usethis.protocol = "nope"), { expect_usethis_error(git_protocol(), "must be one of") expect_null(getOption("usethis.protocol")) } ) withr::with_options( list(usethis.protocol = c("ssh", "https")), { expect_usethis_error(git_protocol(), "must be one of") expect_null(getOption("usethis.protocol")) } ) }) test_that("use_git_protocol() errors for bad input", { expect_usethis_error(use_git_protocol("nope"), "must be one of") }) test_that("git_protocol() defaults to 'ssh' in a non-interactive session", { withr::with_options( list(usethis.protocol = NULL), expect_identical(git_protocol(), "ssh") ) }) test_that("non-interactive use_git_protocol(NA) is like dismissing the menu", { expect_usethis_error(use_git_protocol(NA), "must be either") }) test_that("git_protocol() honors, vets, and lowercases the option", { withr::with_options( list(usethis.protocol = "ssh"), expect_identical(git_protocol(), "ssh") ) withr::with_options( list(usethis.protocol = "SSH"), expect_identical(git_protocol(), "ssh") ) withr::with_options( list(usethis.protocol = "https"), expect_identical(git_protocol(), "https") ) withr::with_options( list(usethis.protocol = "nope"), expect_usethis_error(git_protocol(), "must be one of") ) }) test_that("use_git_protocol() prioritizes and lowercases direct input", { withr::with_options( list(usethis.protocol = "ssh"), { expect_identical(use_git_protocol("HTTPS"), "https") expect_identical(git_protocol(), "https") } ) }) usethis/tests/testthat/test-edit.R0000644000176200001440000000734413453664176017014 0ustar liggesuserscontext("edit") expect_r_file <- function(...) { expect_true(file_exists(path_home_r(...))) } expect_fs_file <- function(...) { expect_true(file_exists(path_home(...))) } ## testing edit_XXX("user") only on travis and appveyor, because I don't want to ## risk creating user-level files de novo for an actual user, which would ## obligate me to some nerve-wracking clean up test_that("edit_r_XXX() and edit_git_XXX() have default scope", { ## run these manually if you already have these files or are happy to ## have them or delete them skip_if_not_ci() ## on Windows, under R CMD check, some env vars are set to sentinel values ## https://github.com/wch/r-source/blob/78da6e06aa0017564ec057b768f98c5c79e4d958/src/library/tools/R/check.R#L257 ## we need to explicitly ensure R_ENVIRON_USER="" here withr::local_envvar(list(R_ENVIRON_USER = "")) expect_error_free(edit_r_profile()) expect_error_free(edit_r_buildignore()) expect_error_free(edit_r_environ()) expect_error_free(edit_r_makevars()) expect_error_free(edit_git_config()) expect_error_free(edit_git_ignore()) }) test_that("edit_r_XXX('user') ensures the file exists", { ## run these manually if you already have these files or are happy to ## have them or delete them skip_if_not_ci() ## on Windows, under R CMD check, some env vars are set to sentinel values ## https://github.com/wch/r-source/blob/78da6e06aa0017564ec057b768f98c5c79e4d958/src/library/tools/R/check.R#L257 ## we need to explicitly ensure R_ENVIRON_USER="" here withr::local_envvar(list(R_ENVIRON_USER = "")) edit_r_environ("user") expect_r_file(".Renviron") edit_r_profile("user") expect_r_file(".Rprofile") edit_r_buildignore("user") expect_r_file(".Rbuildignore") edit_r_makevars("user") expect_r_file(".R", "Makevars") edit_rstudio_snippets(type = "R") expect_r_file(".R", "snippets", "r.snippets") edit_rstudio_snippets(type = "HTML") expect_r_file(".R", "snippets", "html.snippets") }) test_that("edit_r_profile() respects R_PROFILE_USER", { path1 <- user_path_prep(file_temp()) withr::local_envvar(list(R_PROFILE_USER = path1)) path2 <- edit_r_profile("user") expect_equal(path1, as.character(path2)) }) test_that("edit_git_XXX('user') ensures the file exists", { ## run these manually if you already have these files or are happy to ## have them or delete them skip_if_not_ci() edit_git_config("user") expect_fs_file(".gitconfig") edit_git_ignore("user") expect_fs_file(".gitignore") cfg <- git2r::config() expect_match(cfg$global$core.excludesfile, "gitignore") }) test_that("edit_r_profile() ensures .Rprofile exists in project", { scoped_temporary_package() edit_r_profile("project") expect_proj_file(".Rprofile") scoped_temporary_project() edit_r_profile("project") expect_proj_file(".Rprofile") }) test_that("edit_r_environ() ensures .Renviron exists in project", { scoped_temporary_package() edit_r_environ("project") expect_proj_file(".Renviron") scoped_temporary_project() edit_r_environ("project") expect_proj_file(".Renviron") }) test_that("edit_r_makevars() ensures .R/Makevars exists in package", { scoped_temporary_package() edit_r_makevars("project") expect_proj_file(".R", "Makevars") }) test_that("edit_git_config() ensures git ignore file exists in project", { scoped_temporary_package() edit_git_config("project") expect_proj_file(".git", "config") scoped_temporary_project() edit_git_config("project") expect_proj_file(".git", "config") }) test_that("edit_git_ignore() ensures .gitignore exists in project", { scoped_temporary_package() edit_git_ignore("project") expect_proj_file(".gitignore") scoped_temporary_project() edit_git_ignore("project") expect_proj_file(".gitignore") }) usethis/tests/testthat/test-use-rcpp.R0000644000176200001440000000530513507300011017567 0ustar liggesuserscontext("use_rcpp") test_that("use_rcpp() requires a package", { scoped_temporary_project() expect_usethis_error(use_rcpp(), "not an R package") }) test_that("use_rcpp() creates files/dirs, edits DESCRIPTION and .gitignore", { pkg <- scoped_temporary_package() use_roxygen_md() use_rcpp() expect_match(desc::desc_get("LinkingTo", pkg), "Rcpp") expect_match(desc::desc_get("Imports", pkg), "Rcpp") expect_proj_dir("src") ignores <- readLines(proj_path("src", ".gitignore")) expect_true(all(c("*.o", "*.so", "*.dll") %in% ignores)) }) test_that("use_rcpp_armadillo() creates Makevars files and edits DESCRIPTION", { with_mock( ## Required to pass the check re: whether RcppArmadillo is installed `usethis:::is_installed` = function(pkg) TRUE, { pkg <- scoped_temporary_package() use_roxygen_md() use_rcpp_armadillo() expect_match(desc::desc_get("LinkingTo", pkg), "RcppArmadillo") expect_proj_file("src", "Makevars") expect_proj_file("src", "Makevars.win") } ) }) test_that("use_rcpp_eigen() edits DESCRIPTION", { with_mock( ## Required to pass the check re: whether RcppEigen is installed `usethis:::is_installed` = function(pkg) TRUE, { pkg <- scoped_temporary_package() use_roxygen_md() use_rcpp_eigen() expect_match(desc::desc_get("LinkingTo", pkg), "RcppEigen") } ) }) test_that("use_src() doesn't message if not needed", { scoped_temporary_package() use_roxygen_md() use_package_doc() use_src() withr::local_options(list(usethis.quiet = FALSE)) expect_silent(use_src()) }) test_that("use_makevars() respects pre-existing Makevars", { pkg <- scoped_temporary_package() dir_create(proj_path("src")) makevars_file <- proj_path("src", "Makevars") makevars_win_file <- proj_path("src", "Makevars.win") writeLines("USE_CXX = CXX11", makevars_file) file_copy(makevars_file, makevars_win_file) before_makevars_file <- readLines(makevars_file) before_makevars_win_file <- readLines(makevars_win_file) makevars_settings <- list( "PKG_CXXFLAGS" = "-Wno-reorder" ) use_makevars(makevars_settings) expect_identical(before_makevars_file, readLines(makevars_file)) expect_identical(before_makevars_win_file, readLines(makevars_win_file)) }) test_that("use_makevars() creates Makevars files with appropriate configuration", { pkg <- scoped_temporary_package() makevars_settings <- list( "CXX_STD"="CXX11" ) use_makevars(makevars_settings) makevars_content <- paste0(names(makevars_settings)," = ", makevars_settings) expect_identical(makevars_content, readLines(proj_path("src", "Makevars"))) expect_identical(makevars_content, readLines(proj_path("src", "Makevars.win"))) }) usethis/tests/testthat/test-ui.R0000644000176200001440000000111113507207664016461 0ustar liggesuserstest_that("trailing slash behaviour of ui_path()", { # target doesn't exist so no empirical evidence that it's a directory expect_match(ui_path("abc"), "abc'$") # path suggests it's a directory expect_match(ui_path("abc/"), "abc/'$") expect_match(ui_path("abc//"), "abc/'$") # path is known to be a directory tmpdir <- fs::file_temp(pattern = "ui_path") on.exit(fs::dir_delete(tmpdir)) fs::dir_create(tmpdir) expect_match(ui_path(tmpdir), "/'$") expect_match(ui_path(paste0(tmpdir, "/")), "[^/]/'$") expect_match(ui_path(paste0(tmpdir, "//")), "[^/]/'$") }) usethis/tests/testthat/setup.R0000644000176200001440000000070713453664176016246 0ustar liggesusersif (nzchar(Sys.getenv("CI"))) { message("Using GitHub r-lib CI PAT.") github_PAT <- paste0("b2b7441d", "aeeb010b", "1df26f1f6", "0a7f1ed", "c485e443") Sys.setenv(GITHUB_PAT = github_PAT) } pre_test_options <- options( usethis.quiet = TRUE, ## make ui_*() output easier to test against ## just say no to ANSI escape codes "crayon.enabled" = FALSE ) usethis/tests/testthat/test-use-template.R0000644000176200001440000000163413507207664020463 0ustar liggesuserscontext("use_template") test_that("can leave existing file unchanged, without an error", { scoped_temporary_package() desc_lines_before <- readLines(proj_path("DESCRIPTION")) expect_error_free( use_template("NEWS.md", "DESCRIPTION") ) desc_lines_after <- readLines(proj_path("DESCRIPTION")) expect_identical(desc_lines_before, desc_lines_after) }) # helpers ----------------------------------------------------------------- test_that("find_template errors if template missing", { expect_usethis_error(find_template("xxx"), "Could not find template") }) test_that("find_template can find templates for tricky Rbuildignored files", { expect_match(find_template("travis.yml"), "travis\\.yml$") expect_match(find_template("codecov.yml"), "codecov\\.yml$") expect_match(find_template("cran-comments.md"), "cran-comments\\.md$") expect_match(find_template("template.Rproj"), "template\\.Rproj$") }) usethis/tests/testthat/test-use-roxygen.R0000644000176200001440000000150113507277774020345 0ustar liggesuserscontext("use_roxygen_md") test_that("use_roxygen_md() adds DESCRIPTION fields to naive package", { skip_if_not_installed("roxygen2") pkg <- scoped_temporary_package() use_roxygen_md() expect_identical( desc::desc_get("Roxygen", pkg), c(Roxygen = "list(markdown = TRUE)") ) expect_true(desc::desc_has_fields("RoxygenNote", pkg)) expect_true(uses_roxygen_md()) }) test_that("use_roxygen_md() does not error on a roxygen-using package", { skip_if_not_installed("roxygen2") with_mock( ## need to pass the check re: whether roxygen2md is installed `usethis:::check_installed` = function(pkg) TRUE, { scoped_temporary_package() cat( "RoxygenNote: 6.0.1\n", file = proj_path("DESCRIPTION"), append = TRUE ) expect_error_free(use_roxygen_md()) } ) }) usethis/tests/testthat/test-use-dependency.R0000644000176200001440000000501113453664176020764 0ustar liggesuserscontext("use_dependency") test_that("we message for new type and are silent for same type", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output( use_dependency("crayon", "Imports"), "Adding 'crayon' to Imports field" ) expect_silent(use_dependency("crayon", "Imports")) }) test_that("we message for version change and are silent for same version", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output( use_dependency("crayon", "Imports"), "Adding 'crayon" ) expect_output( use_dependency("crayon", "Imports", min_version = "1.0.0"), "Increasing 'crayon'" ) expect_silent(use_dependency("crayon", "Imports", min_version = "1.0.0")) expect_output( use_dependency("crayon", "Imports", min_version = "2.0.0"), "Increasing 'crayon'" ) expect_silent(use_dependency("crayon", "Imports", min_version = "1.0.0")) }) ## https://github.com/r-lib/usethis/issues/99 test_that("use_dependency() upgrades a dependency", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_dependency("usethis", "Suggests")) expect_match(desc::desc_get("Suggests", proj_get()), "usethis") expect_output(use_dependency("usethis", "Imports"), "Moving 'usethis'") expect_match(desc::desc_get("Imports", proj_get()), "usethis") expect_false(grepl("usethis", desc::desc_get("Suggests", proj_get()))) }) ## https://github.com/r-lib/usethis/issues/99 test_that("use_dependency() declines to downgrade a dependency", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_dependency("usethis", "Imports")) expect_match(desc::desc_get("Imports", proj_get()), "usethis") expect_warning(use_dependency("usethis", "Suggests"), "no change") expect_match(desc::desc_get("Imports", proj_get()), "usethis") expect_false(grepl("usethis", desc::desc_get("Suggests", proj_get()))) }) test_that("can add LinkingTo dependency if other dependency already exists", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_dependency("Rcpp", "Imports")) expect_output(use_dependency("Rcpp", "LinkingTo"), "Adding 'Rcpp'") }) test_that("can add any dependency if LinkingTo dependency already exists", { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_dependency("Rcpp", "LinkingTo")) expect_output(use_dependency("Rcpp", "Import"), "Adding 'Rcpp'") }) usethis/tests/testthat/test-use-readme.R0000644000176200001440000000112213507277742020101 0ustar liggesuserscontext("use_readme") test_that("use_readme_md() creates README.md", { scoped_temporary_package() use_readme_md() expect_proj_file("README.md") }) test_that("use_readme_rmd() creates README.Rmd", { skip_if_not_installed("rmarkdown") scoped_temporary_package() use_readme_rmd() expect_proj_file("README.Rmd") }) test_that("use_readme_rmd() sets up git pre-commit hook if pkg uses git", { skip_if_no_git_config() skip_if_not_installed("rmarkdown") scoped_temporary_package() use_git() use_readme_rmd(open = FALSE) expect_proj_file(".git", "hooks", "pre-commit") }) usethis/tests/testthat/ref/0000755000176200001440000000000013453664176015533 5ustar liggesusersusethis/tests/testthat/ref/README.Rmd0000644000176200001440000000640213453664176017136 0ustar liggesusers--- title: "ZIP file structures" output: github_document --- ```{r setup, include=FALSE} knitr::opts_chunk$set(comment = "#>", collapse = TRUE) ``` ```{r} devtools::load_all("~/rrr/usethis") ``` ## Different styles of ZIP file Examples based on foo folder found here. ```{bash} tree foo ``` ### Not Loose Parts, a.k.a. GitHub style This is the structure of ZIP files yielded by GitHub via links of the forms and . ```{bash, eval = FALSE} zip -r foo-not-loose.zip foo/ ``` Notice that everything is packaged below one top-level directory. ```{r} foo_not_loose_files <- unzip("foo-not-loose.zip", list = TRUE) with( foo_not_loose_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) ``` ### Loose Parts, the Regular Way This is the structure of many ZIP files I've seen, just in general. ```{bash, eval = FALSE} cd foo zip ../foo-loose-regular.zip * cd .. ``` All the files are packaged in the ZIP archive as "loose parts", i.e. there is no explicit top-level directory. ```{r} foo_loose_regular_files <- unzip("foo-loose-regular.zip", list = TRUE) with( foo_loose_regular_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) ``` ### Loose Parts, the DropBox Way This is the structure of ZIP files yielded by DropBox via links of this form . I can't figure out how to even do this with zip locally, so I had to create an example on DropBox and download it. Jim Hester reports it is possible with `archive::archive_write_files()`. It's basically like the "loose parts" above, except it includes a spurious top-level directory `"/"`. ```{r} # curl::curl_download( # "https://www.dropbox.com/sh/5qfvssimxf2ja58/AABz3zrpf-iPYgvQCgyjCVdKa?dl=1", # destfile = "foo-loose-dropbox.zip" # ) foo_loose_dropbox_files <- unzip("foo-loose-dropbox.zip", list = TRUE) with( foo_loose_dropbox_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) ``` Also note that, when unzipping with `unzip` in the shell, you get this result: ``` Archive: foo-loose-dropbox.zip warning: stripped absolute path spec from / mapname: conversion of failed inflating: file.txt ``` So this is a pretty odd ZIP packing strategy. But we need to plan for it. ## Subdirs only at top-level Let's make sure we detect loose parts (or not) when the top-level has only directories, not files. Example based on the yo directory here: ```{bash} tree yo ``` ```{bash, eval = FALSE} zip -r yo-not-loose.zip yo/ ``` ```{r} (yo_not_loose_files <- unzip("yo-not-loose.zip", list = TRUE)) top_directory(yo_not_loose_files$Name) ``` ```{bash, eval = FALSE} cd yo zip -r ../yo-loose-regular.zip * cd .. ``` ```{r} (yo_loose_regular_files <- unzip("yo-loose-regular.zip", list = TRUE)) top_directory(yo_loose_regular_files$Name) ``` ```{r} # curl::curl_download( # "https://www.dropbox.com/sh/afydxe6pkpz8v6m/AADHbMZAaW3IQ8zppH9mjNsga?dl=1", # destfile = "yo-loose-dropbox.zip" # ) (yo_loose_dropbox_files <- unzip("yo-loose-dropbox.zip", list = TRUE)) top_directory(yo_loose_dropbox_files$Name) ``` usethis/tests/testthat/ref/yo/0000755000176200001440000000000013507356065016155 5ustar liggesusersusethis/tests/testthat/ref/yo/subdir2/0000755000176200001440000000000013453664176017534 5ustar liggesusersusethis/tests/testthat/ref/yo/subdir2/file2.txt0000644000176200001440000000005213453664176021273 0ustar liggesusersI am file2.txt, located below yo/subdir2/ usethis/tests/testthat/ref/yo/subdir1/0000755000176200001440000000000013453664176017533 5ustar liggesusersusethis/tests/testthat/ref/yo/subdir1/file1.txt0000644000176200001440000000005213453664176021271 0ustar liggesusersI am file1.txt, located below yo/subdir1/ usethis/tests/testthat/ref/foo-loose-dropbox.zip0000644000176200001440000000041213453664176021631 0ustar liggesusersPK!/PKPKr+Lfile.txtTHUHI+(Q(LP,K-V+LIUHPK(&PK!/PKr+L(& 1file.txtPKeusethis/tests/testthat/ref/foo-loose-regular.zip0000644000176200001440000000031413453664176021616 0ustar liggesusersPK Q+L&&file.txtUT  WZ}WZux I am file.txt which lives inside foo/ PK Q+L&&file.txtUT WZux PKNhusethis/tests/testthat/ref/README.md0000644000176200001440000001130513453664176017012 0ustar liggesusersZIP file structures ================ ``` r devtools::load_all("~/rrr/usethis") #> Loading usethis #> unloadNamespace("usethis") not successful, probably because another loaded package depends on it. Forcing unload. If you encounter problems, please restart R. #> Warning: package 'testthat' was built under R version 3.4.3 ``` Different styles of ZIP file ---------------------------- Examples based on foo folder found here. ``` bash tree foo #> foo #> └── file.txt #> #> 0 directories, 1 file ``` ### Not Loose Parts, a.k.a. GitHub style This is the structure of ZIP files yielded by GitHub via links of the forms and . ``` bash zip -r foo-not-loose.zip foo/ ``` Notice that everything is packaged below one top-level directory. ``` r foo_not_loose_files <- unzip("foo-not-loose.zip", list = TRUE) with( foo_not_loose_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) #> Name dirname basename #> 1 foo/ . foo #> 2 foo/file.txt foo file.txt ``` ### Loose Parts, the Regular Way This is the structure of many ZIP files I've seen, just in general. ``` bash cd foo zip ../foo-loose-regular.zip * cd .. ``` All the files are packaged in the ZIP archive as "loose parts", i.e. there is no explicit top-level directory. ``` r foo_loose_regular_files <- unzip("foo-loose-regular.zip", list = TRUE) with( foo_loose_regular_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) #> Name dirname basename #> 1 file.txt . file.txt ``` ### Loose Parts, the DropBox Way This is the structure of ZIP files yielded by DropBox via links of this form . I can't figure out how to even do this with zip locally, so I had to create an example on DropBox and download it. Jim Hester reports it is possible with `archive::archive_write_files()`. It's basically like the "loose parts" above, except it includes a spurious top-level directory `"/"`. ``` r # curl::curl_download( # "https://www.dropbox.com/sh/5qfvssimxf2ja58/AABz3zrpf-iPYgvQCgyjCVdKa?dl=1", # destfile = "foo-loose-dropbox.zip" # ) foo_loose_dropbox_files <- unzip("foo-loose-dropbox.zip", list = TRUE) with( foo_loose_dropbox_files, data.frame(Name = Name, dirname = dirname(Name), basename = basename(Name)) ) #> Name dirname basename #> 1 / / #> 2 file.txt . file.txt ``` Also note that, when unzipping with `unzip` in the shell, you get this result: Archive: foo-loose-dropbox.zip warning: stripped absolute path spec from / mapname: conversion of failed inflating: file.txt So this is a pretty odd ZIP packing strategy. But we need to plan for it. Subdirs only at top-level ------------------------- Let's make sure we detect loose parts (or not) when the top-level has only directories, not files. Example based on the yo directory here: ``` bash tree yo #> yo #> ├── subdir1 #> │   └── file1.txt #> └── subdir2 #> └── file2.txt #> #> 2 directories, 2 files ``` ``` bash zip -r yo-not-loose.zip yo/ ``` ``` r (yo_not_loose_files <- unzip("yo-not-loose.zip", list = TRUE)) #> Name Length Date #> 1 yo/ 0 2018-01-11 15:48:00 #> 2 yo/subdir1/ 0 2018-01-11 15:48:00 #> 3 yo/subdir1/file1.txt 42 2018-01-11 15:48:00 #> 4 yo/subdir2/ 0 2018-01-11 15:49:00 #> 5 yo/subdir2/file2.txt 42 2018-01-11 15:49:00 top_directory(yo_not_loose_files$Name) #> [1] "yo/" ``` ``` bash cd yo zip -r ../yo-loose-regular.zip * cd .. ``` ``` r (yo_loose_regular_files <- unzip("yo-loose-regular.zip", list = TRUE)) #> Name Length Date #> 1 subdir1/ 0 2018-01-11 15:48:00 #> 2 subdir1/file1.txt 42 2018-01-11 15:48:00 #> 3 subdir2/ 0 2018-01-11 15:49:00 #> 4 subdir2/file2.txt 42 2018-01-11 15:49:00 top_directory(yo_loose_regular_files$Name) #> [1] NA ``` ``` r # curl::curl_download( # "https://www.dropbox.com/sh/afydxe6pkpz8v6m/AADHbMZAaW3IQ8zppH9mjNsga?dl=1", # destfile = "yo-loose-dropbox.zip" # ) (yo_loose_dropbox_files <- unzip("yo-loose-dropbox.zip", list = TRUE)) #> Name Length Date #> 1 / 0 2018-01-11 23:57:00 #> 2 subdir1/file1.txt 42 2018-01-11 23:57:00 #> 3 subdir2/file2.txt 42 2018-01-11 23:57:00 #> 4 subdir1/ 0 2018-01-11 23:57:00 #> 5 subdir2/ 0 2018-01-11 23:57:00 top_directory(yo_loose_dropbox_files$Name) #> [1] NA ``` usethis/tests/testthat/ref/foo/0000755000176200001440000000000013507356065016311 5ustar liggesusersusethis/tests/testthat/ref/foo/file.txt0000644000176200001440000000004613453664176017776 0ustar liggesusersI am file.txt which lives inside foo/ usethis/tests/testthat/ref/foo-not-loose.zip0000644000176200001440000000053413453664176020761 0ustar liggesusersPK Q+Lfoo/UT WZWZux PK Q+L&& foo/file.txtUT  WZWZux I am file.txt which lives inside foo/ PK Q+LAfoo/UTWZux PK Q+L&& >foo/file.txtUT WZux PKusethis/tests/testthat/ref/yo-loose-dropbox.zip0000644000176200001440000000124613453664176021503 0ustar liggesusersPK/+L/PKPK0+Lsubdir1/file1.txtTHUHI5+(QON,IMQHJ/W/.MJ,2PKם=,*PK/+Lsubdir2/file2.txtTHUHI5+(QON,IMQHJ/W/.MJ,2PKd,*PK0+Lsubdir1/PKPK/+Lsubdir2/PKPK/+L/PK0+Lם=,* 1subdir1/file1.txtPK/+Ld,* subdir2/file2.txtPK0+Lsubdir1/PK/+L?subdir2/PKwusethis/tests/testthat/ref/yo-loose-regular.zip0000644000176200001440000000131613453664176021465 0ustar liggesusersPK ~+Lsubdir1/UT WZJWZux PK ~+Lם=**subdir1/file1.txtUT WZWZux I am file1.txt, located below yo/subdir1/ PK !~+Lsubdir2/UT WZJWZux PK $~+Ld**subdir2/file2.txtUT WZWZux I am file2.txt, located below yo/subdir2/ PK ~+LAsubdir1/UTWZux PK ~+Lם=**Bsubdir1/file1.txtUTWZux PK !~+LAsubdir2/UTWZux PK $~+Ld**subdir2/file2.txtUTWZux PKJnusethis/tests/testthat/ref/yo-not-loose.zip0000644000176200001440000000155413453664176020630 0ustar liggesusersPK ~+Lyo/UT WZWZux PK ~+L yo/subdir1/UT WZWZux PK ~+Lם=**yo/subdir1/file1.txtUT WZWZux I am file1.txt, located below yo/subdir1/ PK !~+L yo/subdir2/UT WZWZux PK $~+Ld**yo/subdir2/file2.txtUT WZWZux I am file2.txt, located below yo/subdir2/ PK ~+LAyo/UTWZux PK ~+L A=yo/subdir1/UTWZux PK ~+Lם=**yo/subdir1/file1.txtUTWZux PK !~+L Ayo/subdir2/UTWZux PK $~+Ld**?yo/subdir2/file2.txtUTWZux PKusethis/tests/testthat/test-use-revdep.R0000644000176200001440000000061313507207664020131 0ustar liggesuserscontext("use_revdep") test_that("use_revdep() requires a package", { scoped_temporary_project() expect_usethis_error(use_revdep(), "not an R package") }) test_that("use_revdep() creates and ignores files/dirs", { scoped_temporary_package() use_revdep() expect_proj_file("revdep", "email.yml") expect_proj_file("revdep", ".gitignore") expect_true(is_build_ignored("^revdep$")) }) usethis/tests/testthat/test-helpers.R0000644000176200001440000000657213507207664017526 0ustar liggesuserscontext("helpers") test_that("create_directory() doesn't bother a pre-existing target dir", { tmp <- file_temp() dir_create(tmp) expect_true(is_dir(tmp)) expect_error_free(create_directory(tmp)) expect_true(is_dir(tmp)) }) test_that("create_directory() creates a directory", { tmp <- file_temp("yes") create_directory(tmp) expect_true(is_dir(tmp)) }) test_that("edit_file() creates new directory and another and a file within", { tmp <- file_temp() expect_false(dir_exists(tmp)) capture.output(new_file <- edit_file(path(tmp, "new_dir", "new_file"))) expect_true(dir_exists(tmp)) expect_true(dir_exists(path(tmp, "new_dir"))) expect_true(file_exists(path(tmp, "new_dir", "new_file"))) }) test_that("edit_file() creates new file in existing directory", { tmp <- file_temp() dir_create(tmp) capture.output(new_file <- edit_file(path(tmp, "new_file"))) expect_true(file_exists(path(tmp, "new_file"))) }) test_that("edit_file() copes with path to existing file", { tmp <- file_temp() dir_create(tmp) existing <- file_create(path(tmp, "a_file")) capture.output(res <- edit_file(path(tmp, "a_file"))) expect_identical(existing, res) }) test_that("use_description_field() can address an existing field", { pkg <- scoped_temporary_package() orig <- tools::md5sum(proj_path("DESCRIPTION")) ## specify existing value of existing field --> should be no op use_description_field( name = "Version", value = desc::desc_get("Version", pkg)[[1]], base_path = pkg ) expect_identical(orig, tools::md5sum(proj_path("DESCRIPTION"))) expect_usethis_error( use_description_field( name = "Version", value = "1.1.1", base_path = pkg ), "has a different value" ) ## overwrite existing field use_description_field( name = "Version", value = "1.1.1", base_path = pkg, overwrite = TRUE ) expect_identical(c(Version = "1.1.1"), desc::desc_get("Version", pkg)) }) test_that("use_description_field() can add new field", { pkg <- scoped_temporary_package() use_description_field(name = "foo", value = "bar", base_path = pkg) expect_identical(c(foo = "bar"), desc::desc_get("foo", pkg)) }) test_that("use_description_field() ignores whitespace", { pkg <- scoped_temporary_package() use_description_field(name = "foo", value = "\n bar") use_description_field(name = "foo", value = "bar") expect_identical(c(foo = "\n bar"), desc::desc_get("foo", pkg)) }) test_that("valid_package_name() enforces valid package names", { # Contain only ASCII letters, numbers, and '.' # Have at least two characters # Start with a letter # Not end with '.' expect_true(valid_package_name("aa")) expect_true(valid_package_name("a7")) expect_true(valid_package_name("a.2")) expect_false(valid_package_name("a")) expect_false(valid_package_name("a-2")) expect_false(valid_package_name("2fa")) expect_false(valid_package_name(".fa")) expect_false(valid_package_name("aa\u00C0")) # \u00C0 is a-grave expect_false(valid_package_name("a3.")) }) test_that("valid_file_name() enforces valid file names", { # Contain only ASCII letters, numbers, '-', and '_' expect_true(valid_file_name("aa.R")) expect_true(valid_file_name("a7.R")) expect_true(valid_file_name("a-2.R")) expect_true(valid_file_name("a_2.R")) expect_false(valid_file_name("aa\u00C0.R")) # \u00C0 is a-grave expect_false(valid_file_name("a?3.R")) }) usethis/tests/testthat/helper.R0000644000176200001440000001015713507311102016337 0ustar liggesusers## attempt to activate a project, which is nice during development tryCatch(proj_set("."), error = function(e) NULL) ## If session temp directory appears to be, or be within, a project, there ## will be large scale, spurious test failures. ## The IDE sometimes leaves .Rproj files behind in session temp directory or ## one of its parents. ## Delete such files manually. session_temp_proj <- proj_find(path_temp()) if (!is.null(session_temp_proj)) { Rproj_files <- fs::dir_ls(session_temp_proj, glob = "*.Rproj") ui_line(c( "Rproj file(s) found at or above session temp dir:", paste0("* ", Rproj_files), "Expect this to cause spurious test failures." )) } ## putting `pattern` in the package or project name is part of our strategy for ## suspending the nested project check during testing pattern <- "aaa" scoped_temporary_package <- function(dir = file_temp(pattern = pattern), env = parent.frame(), rstudio = FALSE) { scoped_temporary_thing(dir, env, rstudio, "package") } scoped_temporary_project <- function(dir = file_temp(pattern = pattern), env = parent.frame(), rstudio = FALSE) { scoped_temporary_thing(dir, env, rstudio, "project") } scoped_temporary_thing <- function(dir = file_temp(pattern = pattern), env = parent.frame(), rstudio = FALSE, thing = c("package", "project")) { thing <- match.arg(thing) if (fs::dir_exists(dir)) { ui_stop("Target {ui_code('dir')} {ui_path(dir)} already exists.") } old_project <- proj_get_() ## Can't schedule a deferred project reset if calling this from the R ## console, which is useful when developing tests if (identical(env, globalenv())) { ui_done("Switching to a temporary project!") if (!is.null(old_project)) { command <- paste0('proj_set(\"', old_project, '\")') ui_todo( "Restore current project with: {ui_code(command)}" ) } } else { withr::defer({ withr::with_options( list(usethis.quiet = TRUE), proj_set(old_project, force = TRUE) ) setwd(old_project) fs::dir_delete(dir) }, envir = env) } withr::local_options(list(usethis.quiet = TRUE)) switch( thing, package = create_package(dir, rstudio = rstudio, open = FALSE), project = create_project(dir, rstudio = rstudio, open = FALSE) ) proj_set(dir) setwd(dir) invisible(dir) } test_mode <- function() { before <- Sys.getenv("TESTTHAT") after <- if (before == "true") "false" else "true" Sys.setenv(TESTTHAT = after) cat("TESTTHAT:", before, "-->", after, "\n") invisible() } skip_if_not_ci <- function() { ci <- any(toupper(Sys.getenv(c("TRAVIS", "APPVEYOR"))) == "TRUE") if (ci) { return(invisible(TRUE)) } skip("Not on Travis or Appveyor") } skip_if_no_git_config <- function() { cfg <- git2r::config() user_name <- cfg$local$`user.name` %||% cfg$global$`user.name` user_email <- cfg$local$`user.email` %||% cfg$global$`user.email` user_name_exists <- !is.null(user_name) user_email_exists <- !is.null(user_email) if (user_name_exists && user_email_exists) { return(invisible(TRUE)) } skip("No Git user configured") } expect_usethis_error <- function(...) { expect_error(..., class = "usethis_error") } expect_error_free <- function(...) { expect_error(..., regexp = NA) } is_build_ignored <- function(pattern, ..., base_path = proj_get()) { lines <- readLines(path(base_path, ".Rbuildignore"), warn = FALSE) length(grep(pattern, x = lines, fixed = TRUE, ...)) > 0 } test_file <- function(fname) testthat::test_path("ref", fname) expect_proj_file <- function(...) expect_true(file_exists(proj_path(...))) expect_proj_dir <- function(...) expect_true(dir_exists(proj_path(...))) ## use from testthat once > 2.0.0 is on CRAN skip_if_offline <- function(host = "r-project.org") { skip_if_not_installed("curl") has_internet <- !is.null(curl::nslookup(host, error = FALSE)) if (!has_internet) { skip("offline") } } usethis/tests/testthat/test-use-make.R0000644000176200001440000000025113507207664017557 0ustar liggesuserscontext("use_makefile") test_that("use_make() creates a Makefile at project root", { pkg <- scoped_temporary_package() use_make() expect_proj_file("Makefile") }) usethis/tests/testthat/test-use-course.R0000644000176200001440000001300213507207664020140 0ustar liggesusers## tidy_download ---- test_that("tidy_download() errors early if destdir is not a directory", { tmp <- fs::path_temp("I_am_just_a_file") expect_error( tidy_download("URL", destdir = tmp), "does not exist", class = "usethis_error" ) fs::file_create(tmp) expect_error( tidy_download("URL", destdir = tmp), "not a directory", class = "usethis_error" ) }) test_that("tidy_download() works", { skip_on_cran() skip_if_offline() tmp <- fs::file_temp("tidy-download-test-") fs::dir_create(tmp) on.exit(fs::dir_delete(tmp)) gh_url <- "https://github.com/r-lib/rematch2/archive/master.zip" expected <- fs::path(tmp, "rematch2-master.zip") out <- tidy_download(gh_url, destdir = tmp) expect_true(fs::file_exists(expected)) expect_equivalent(out, expected) expect_identical(attr(out, "content-type"), "application/zip") # refuse to overwrite when non-interactive expect_error(tidy_download(gh_url, destdir = tmp)) }) ## tidy_unzip ---- test_that("tidy_unzip() deals with loose parts, reports unpack destination", { tmp <- file_temp(ext = ".zip") fs::file_copy(test_file("yo-loose-regular.zip"), tmp) dest <- tidy_unzip(tmp) loose_regular_files <- fs::path_file(fs::dir_ls(dest, recurse = TRUE)) fs::dir_delete(dest) tmp <- file_temp(ext = ".zip") fs::file_copy(test_file("yo-loose-dropbox.zip"), tmp) dest <- tidy_unzip(tmp) loose_dropbox_files <- fs::path_file(fs::dir_ls(dest, recurse = TRUE)) fs::dir_delete(dest) tmp <- file_temp(ext = ".zip") fs::file_copy(test_file("yo-not-loose.zip"), tmp) dest <- tidy_unzip(tmp) not_loose_files <- fs::path_file(fs::dir_ls(dest, recurse = TRUE)) fs::dir_delete(dest) expect_identical(loose_regular_files, loose_dropbox_files) expect_identical(loose_dropbox_files, not_loose_files) }) ## helpers ---- test_that("normalize_url() prepends https:// (or not)", { expect_error(normalize_url(1), "is\\.character.*not TRUE") expect_identical(normalize_url("http://bit.ly/aaa"), "http://bit.ly/aaa") expect_identical(normalize_url("bit.ly/aaa"), "https://bit.ly/aaa") expect_identical( normalize_url("https://github.com/r-lib/rematch2/archive/master.zip"), "https://github.com/r-lib/rematch2/archive/master.zip" ) expect_identical( normalize_url("https://rstd.io/usethis-src"), "https://rstd.io/usethis-src" ) expect_identical( normalize_url("rstd.io/usethis-src"), "https://rstd.io/usethis-src" ) }) test_that("shortlinks pass through", { url1 <- "bit.ly/usethis-shortlink-example" url2 <- "rstd.io/usethis-shortlink-example" expect_equal(normalize_url(url1), paste0("https://", url1)) expect_equal(normalize_url(url2), paste0("https://", url2)) expect_equal(normalize_url(paste0("https://", url1)), paste0("https://", url1)) expect_equal(normalize_url(paste0("http://", url1)), paste0("http://", url1)) }) test_that("github links get expanded", { expect_equal( normalize_url("OWNER/REPO"), "https://github.com/OWNER/REPO/archive/master.zip" ) }) test_that("conspicuous_place() returns a writeable directory", { expect_error_free(x <- conspicuous_place()) expect_true(is_dir(x)) expect_true(file_access(x, mode = "write")) }) test_that("check_is_zip() errors if MIME type is not 'application/zip'", { skip("work this into a use_course test") skip_on_cran() skip_if_offline() expect_usethis_error( download_zip("https://httpbin.org/get"), "does not have MIME type" ) }) test_that("parse_content_disposition() parses Content-Description", { ## typical DropBox expect_identical( parse_content_disposition( "attachment; filename=\"foo.zip\"; filename*=UTF-8''foo.zip\"" ), c( "filename" = "\"foo.zip\"", "filename*" = "UTF-8''foo.zip\"" ) ) ## typical GitHub expect_identical( parse_content_disposition("attachment; filename=foo-master.zip"), c("filename" = "foo-master.zip") ) }) test_that("parse_content_disposition() errors on ill-formed `content-disposition` header", { expect_usethis_error( parse_content_disposition("aa;bb=cc;dd"), "doesn't start with" ) }) test_that("make_filename() gets name from `content-disposition` header", { ## DropBox expect_identical( make_filename( c( "filename" = "\"usethis-test.zip\"", "filename*" = "UTF-8''usethis-test.zip\"" ) ), "usethis-test.zip" ) ## GitHub expect_identical( make_filename(c("filename" = "buzzy-master.zip")), "buzzy-master.zip" ) }) test_that("make_filename() uses fallback if no `content-disposition` header", { expect_match(make_filename(NULL), "^file[0-9a-z]+$") }) test_that("keep_lgl() keeps and drops correct files", { keepers <- c("foo", ".gitignore", "a/.gitignore", "foo.Rproj", ".here") expect_true(all(keep_lgl(keepers))) droppers <- c( ".git", "/.git", "/.git/", ".git/", "foo/.git", ".git/config", ".git/objects/06/3d3gysle", ".Rproj.user", ".Rproj.user/123jkl/persistent-state", ".Rhistory", ".RData" ) expect_false(any(keep_lgl(droppers))) }) test_that("top_directory() identifies a unique top directory (or not)", { ## there is >= 1 file at top-level or >1 directories expect_identical(top_directory("a"), NA_character_) expect_identical(top_directory(c("a/", "b")), NA_character_) expect_identical(top_directory(c("a/", "b/")), NA_character_) ## there are no files at top-level and exactly 1 directory expect_identical(top_directory("a/"), "a/") expect_identical(top_directory(c("a/", "a/b")), "a/") expect_identical(top_directory(c("a/", "a/b", "a/c")), "a/") }) usethis/tests/testthat/test-use-vignette.R0000644000176200001440000000207013507207664020470 0ustar liggesuserscontext("use-vignette") test_that("use_vignette() requires a package", { skip_if_not_installed("rmarkdown") scoped_temporary_project() expect_usethis_error(use_vignette(), "not an R package") }) test_that("use_vignette() requires a `name`", { skip_if_not_installed("rmarkdown") scoped_temporary_package() expect_error(use_vignette(), "no default") }) test_that("valid_vignette_name() works", { expect_true(valid_vignette_name("perfectly-valid-name")) expect_false(valid_vignette_name("01-test")) expect_false(valid_vignette_name("test.1")) }) test_that("use_vignette() does the promised setup", { skip_if_not_installed("rmarkdown") scoped_temporary_package() use_vignette("name", "title") ignores <- readLines(proj_path(".gitignore"), warn = FALSE) expect_true("inst/doc" %in% ignores) deps <- desc::desc_get_deps(proj_get()) expect_true( all(c("knitr", "rmarkdown") %in% deps$package[deps$type == "Suggests"]) ) expect_identical( desc::desc_get_or_fail("VignetteBuilder", proj_get()), c(VignetteBuilder = "knitr") ) }) usethis/tests/testthat/test-use-jenkins.R0000644000176200001440000000034213507207664020304 0ustar liggesuserscontext("use_jenkins") test_that("use_jenkins() creates a Makefile AND a Jenkinsfile at project root", { pkg <- scoped_temporary_package() use_jenkins() expect_proj_file("Makefile") expect_proj_file("Jenkinsfile") }) usethis/tests/testthat/test-use-cran-comments.R0000644000176200001440000000062313507207664021413 0ustar liggesuserscontext("use-cran-comments") test_that("use_cran_comments() requires a package", { scoped_temporary_project() expect_usethis_error(use_cran_comments(), "not an R package") }) test_that("use_cran_comments() creates and ignores the promised file", { scoped_temporary_package() use_cran_comments() expect_proj_file("cran-comments.md") expect_true(is_build_ignored("^cran-comments\\.md$")) }) usethis/tests/testthat/test-use-tutorial.R0000644000176200001440000000130013507277755020511 0ustar liggesuserscontext("test-use-tutorial") test_that("use_tutorial() checks its inputs", { skip_if_not_installed("rmarkdown") scoped_temporary_package() expect_error(use_tutorial(), "no default") expect_error(use_tutorial(name = "tutorial-file"), "no default") }) test_that("use_tutorial() creates a tutorial", { with_mock( ## need to pass the check re: whether learnr is installed `usethis:::is_installed` = function(pkg) TRUE, { scoped_temporary_package() use_tutorial(name = "aaa", title = "bbb") tute_file <- path("inst", "tutorials", "aaa", ext = "Rmd") expect_proj_file(tute_file) expect_equal(rmarkdown::yaml_front_matter(tute_file)$title, "bbb") } ) }) usethis/tests/testthat/test-use-data.R0000644000176200001440000000435113507207664017560 0ustar liggesuserscontext("use_data") test_that("use_data() errors for a non-package project", { scoped_temporary_project() expect_usethis_error(use_data(letters), "not an R package") }) test_that("use_data() stores new, non-internal data", { pkg <- scoped_temporary_package() letters2 <- letters month.abb2 <- month.abb use_data(letters2, month.abb2) rm(letters2, month.abb2) load(proj_path("data", "letters2.rda")) load(proj_path("data", "month.abb2.rda")) expect_identical(letters2, letters) expect_identical(month.abb2, month.abb) }) test_that("use_data() honors `overwrite` for non-internal data", { pkg <- scoped_temporary_package() letters2 <- letters use_data(letters2) expect_usethis_error(use_data(letters2), ".*data/letters2.rda.* already exist") letters2 <- rev(letters) use_data(letters2, overwrite = TRUE) load(proj_path("data", "letters2.rda")) expect_identical(letters2, rev(letters)) }) test_that("use_data() stores new internal data", { pkg <- scoped_temporary_package() letters2 <- letters month.abb2 <- month.abb use_data(letters2, month.abb2, internal = TRUE) rm(letters2, month.abb2) load(proj_path("R", "sysdata.rda")) expect_identical(letters2, letters) expect_identical(month.abb2, month.abb) }) test_that("use_data() honors `overwrite` for internal data", { pkg <- scoped_temporary_package() letters2 <- letters use_data(letters2, internal = TRUE) rm(letters2) expect_usethis_error( use_data(letters2, internal = TRUE), ".*R/sysdata.rda.* already exist" ) letters2 <- rev(letters) use_data(letters2, internal = TRUE, overwrite = TRUE) load(proj_path("R", "sysdata.rda")) expect_identical(letters2, rev(letters)) }) test_that("use_data() writes version 2 by default", { scoped_temporary_package() x <- letters use_data(x, internal = TRUE, version = 2, compress = FALSE) expect_identical( rawToChar(readBin(proj_path("R", "sysdata.rda"), n = 4, what = "raw")), "RDX2" ) }) test_that("use_data_raw() does setup", { scoped_temporary_package() use_data_raw(open = FALSE) expect_proj_file(path("data-raw", "DATASET.R")) use_data_raw("daisy", open = FALSE) expect_proj_file(path("data-raw", "daisy.R")) expect_true(is_build_ignored("^data-raw$")) }) usethis/tests/testthat/test-directory.R0000644000176200001440000000031313453664176020060 0ustar liggesuserscontext("test-directory") test_that("check_is_dir() doesn't give false positive for trailing slash", { pwd <- sub("/$", "", getwd()) expect_error_free(check_path_is_directory(paste0(pwd, "/"))) }) usethis/tests/testthat/test-use-git.R0000644000176200001440000000264613507277727017446 0ustar liggesuserscontext("git") test_that('use_git_config(scope = "project) errors if project not using git', { scoped_temporary_package() expect_usethis_error( use_git_config(scope = "project", user.name = "USER.NAME"), "Cannot detect that project is already a Git repository" ) }) test_that("use_git_config() can set local config", { skip_if_no_git_config() scoped_temporary_package() use_git() use_git_config( scope = "project", user.name = "Jane", user.email = "jane@example.org" ) r <- git2r::repository(proj_get()) cfg <- git2r::config(repo = r, global = FALSE) expect_identical(cfg$local$user.name, "Jane") expect_identical(cfg$local$user.email, "jane@example.org") }) test_that("use_git_hook errors if project not using git", { scoped_temporary_package() expect_usethis_error( use_git_hook( "pre-commit", render_template("readme-rmd-pre-commit.sh") ), "Cannot detect that project is already a Git repository" ) }) test_that("git remote handlers work", { skip_if_no_git_config() scoped_temporary_package() use_git() expect_null(git_remotes()) use_git_remote(name = "foo", url = "foo_url") expect_identical(git_remotes(), list(foo = "foo_url")) use_git_remote(name = "foo", url = "new_url", overwrite = TRUE) expect_identical(git_remotes(), list(foo = "new_url")) use_git_remote(name = "foo", url = NULL, overwrite = TRUE) expect_null(git_remotes()) }) usethis/tests/testthat/test-use-tibble.R0000644000176200001440000000077713507207664020120 0ustar liggesuserscontext("use_tibble") test_that("use_tibble() requires a package", { scoped_temporary_project() expect_usethis_error(use_tibble(), "not an R package") }) test_that("use_tibble() Imports tibble", { with_mock( `usethis:::uses_roxygen` = function(base_path) TRUE, { scoped_temporary_package() withr::local_options(list(usethis.quiet = FALSE)) expect_output(use_tibble(), "#' @importFrom tibble tibble") expect_match(desc::desc_get("Imports", proj_get()), "tibble") } ) }) usethis/tests/testthat/test-use-description.R0000644000176200001440000000456113453664176021202 0ustar liggesuserscontext("use_description") test_that("build_description_list() defaults to values built into usethis", { withr::local_options(list(usethis.description = NULL, devtools.desc = NULL)) d <- build_description_list() expect_identical(d$Version, "0.0.0.9000") expect_match(d$Title, "What the Package Does") expect_match(d$Description, "What the package does") expect_match(d$License, "What license it uses") expect_match(d$Encoding, "UTF-8") expect_match(d$LazyData, "true") }) test_that("build_description_list(): user's fields > usethis defaults", { d <- build_description_list( fields = list(Title = "aaa", URL = "https://www.r-project.org") ) ## user's field overwrites default expect_identical(d$Title, "aaa") ## user's field is novel expect_identical(d$URL, "https://www.r-project.org") ## from usethis defaults expect_match(d$Description, "What the package does") }) test_that("build_description_list(): usethis options > usethis defaults", { withr::local_options(list(usethis.description = list( License = "BSD_2_clause" ))) d <- build_description_list() ## from usethis options expect_identical(d$License, "BSD_2_clause") ## from usethis defaults expect_match(d$Description, "What the package does") }) test_that("build_description_list(): devtools options can be picked up", { withr::local_options(list( usethis.description = NULL, devtools.desc = list(License = "LGPL-3") )) d <- build_description_list() ## from devtools options expect_identical(d$License, "LGPL-3") ## from usethis defaults expect_match(d$Description, "What the package does") }) test_that("build_description_list(): user's fields > options > defaults", { withr::local_options(list( usethis.description = list(Version = "4.0.0") )) d <- build_description_list(fields = list(Title = "aaa")) ## from user's fields expect_identical(d$Title, "aaa") ## from usethis options expect_identical(d$Version, "4.0.0") ## from usethis defaults expect_match(d$Description, "What the package does") }) test_that("default description is tidy", { withr::local_options(list(usethis.description = NULL, devtools.desc = NULL)) scoped_temporary_package() desc_lines_before <- readLines(proj_path("DESCRIPTION")) use_tidy_description() desc_lines_after <- readLines(proj_path("DESCRIPTION")) expect_identical(desc_lines_before, desc_lines_after) }) usethis/tests/testthat/test-use-license.R0000644000176200001440000000440113507207664020265 0ustar liggesuserscontext("use_license") test_that("find_name() errors when no name seems to be intentionally set", { withr::with_options( list(usethis.full_name = NULL, devtools.name = NULL), expect_usethis_error(find_name(), ".*name.* argument is missing") ) withr::with_options( list(usethis.full_name = NULL, devtools.name = "Your name goes here"), expect_usethis_error(find_name(), ".*name.* argument is missing") ) }) test_that("find_name() picks up usethis.full_name, then devtools.name", { withr::with_options( list( usethis.full_name = "usethis.full_name", devtools.name = "devtools.name" ), expect_identical(find_name(), "usethis.full_name") ) withr::with_options( list( usethis.full_name = NULL, devtools.name = "devtools.name" ), expect_identical(find_name(), "devtools.name") ) }) test_that("use_mit_license() works", { pkg <- scoped_temporary_package() use_mit_license(name = "MIT License") expect_match(desc::desc_get("License", file = pkg), "MIT [+] file LICENSE") expect_proj_file("LICENSE.md") expect_proj_file("LICENSE") expect_true(is_build_ignored("^LICENSE\\.md$")) expect_true(is_build_ignored("^LICENSE$", invert = TRUE)) }) test_that("use_gpl3_license() works", { pkg <- scoped_temporary_package() use_gpl3_license(name = "GPL3 License") expect_match(desc::desc_get("License", file = pkg), "GPL-3") expect_proj_file("LICENSE.md") expect_true(is_build_ignored("^LICENSE\\.md$")) }) test_that("use_apl2_license() works", { pkg <- scoped_temporary_package() use_apl2_license(name = "Apache License") expect_match(desc::desc_get("License", file = pkg), "Apache") expect_proj_file("LICENSE.md") expect_true(is_build_ignored("^LICENSE\\.md$")) }) test_that("use_cc0_license() works", { pkg <- scoped_temporary_package() use_cc0_license(name = "CC0 License") expect_match(desc::desc_get("License", file = pkg), "CC0") expect_proj_file("LICENSE.md") expect_true(is_build_ignored("^LICENSE\\.md$")) }) test_that("use_ccby_license() works", { pkg <- scoped_temporary_package() use_ccby_license(name = "CCBY-4.0 License") expect_match(desc::desc_get("License", file = pkg), "CCBY-4.0") expect_proj_file("LICENSE.md") expect_true(is_build_ignored("^LICENSE\\.md$")) }) usethis/tests/testthat/test-use-tidy-style.R0000644000176200001440000000153413453664176020763 0ustar liggesuserscontext("use_tidy_style") test_that("styling the package works", { skip_if(getRversion() < 3.2) skip_if_no_git_config() skip_if_not_installed("styler") pkg <- scoped_temporary_package() use_r("bad_style") path_to_bad_style <- proj_path("R/bad_style.R") write_utf8(path_to_bad_style, "a++2\n") capture_output(use_tidy_style()) expect_identical(readLines(path_to_bad_style), "a + +2") file_delete(path_to_bad_style) }) test_that("styling of non-packages works", { skip_if(getRversion() < 3.2) skip_if_no_git_config() skip_if_not_installed("styler") proj <- scoped_temporary_project() path_to_bad_style <- proj_path("R/bad_style.R") use_r("bad_style") write_utf8(path_to_bad_style, "a++22\n") capture_output(use_tidy_style()) expect_identical(readLines(path_to_bad_style), "a + +22") file_delete(path_to_bad_style) }) usethis/tests/testthat/test-use-logo.R0000644000176200001440000000043213453664176017610 0ustar liggesuserscontext("use_logo") test_that("use_logo() doesn't error", { skip_if_not_installed("magick") pkg <- scoped_temporary_package() img <- magick::image_write(magick::image_read("logo:"), "logo.png") on.exit(file_delete("logo.png")) expect_error_free(use_logo("logo.png")) }) usethis/NAMESPACE0000644000176200001440000000677413507322017013173 0ustar liggesusers# Generated by roxygen2: do not edit by hand S3method(print,sitrep) export(browse_cran) export(browse_github) export(browse_github_issues) export(browse_github_pat) export(browse_github_pulls) export(browse_github_token) export(browse_travis) export(create_from_github) export(create_package) export(create_project) export(create_tidy_package) export(edit_file) export(edit_git_config) export(edit_git_ignore) export(edit_r_buildignore) export(edit_r_environ) export(edit_r_makevars) export(edit_r_profile) export(edit_rstudio_snippets) export(git_credentials) export(git_protocol) export(git_remotes) export(git_sitrep) export(git_vaccinate) export(github_token) export(local_project) export(pr_fetch) export(pr_finish) export(pr_init) export(pr_pause) export(pr_pull) export(pr_pull_upstream) export(pr_push) export(pr_sync) export(pr_view) export(proj_activate) export(proj_get) export(proj_path) export(proj_set) export(proj_sitrep) export(tidy_label_colours) export(tidy_label_descriptions) export(tidy_labels) export(tidy_labels_rename) export(ui_code) export(ui_code_block) export(ui_done) export(ui_field) export(ui_info) export(ui_line) export(ui_nope) export(ui_oops) export(ui_path) export(ui_stop) export(ui_todo) export(ui_value) export(ui_warn) export(ui_yeah) export(use_addin) export(use_apl2_license) export(use_appveyor) export(use_article) export(use_badge) export(use_binder_badge) export(use_bioc_badge) export(use_blank_slate) export(use_build_ignore) export(use_c) export(use_cc0_license) export(use_ccby_license) export(use_circleci) export(use_citation) export(use_code_of_conduct) export(use_conflicted) export(use_course) export(use_coverage) export(use_covr_ignore) export(use_cran_badge) export(use_cran_comments) export(use_data) export(use_data_raw) export(use_depsy_badge) export(use_description) export(use_description_defaults) export(use_dev_package) export(use_dev_version) export(use_devtools) export(use_directory) export(use_git) export(use_git_config) export(use_git_credentials) export(use_git_hook) export(use_git_ignore) export(use_git_protocol) export(use_git_remote) export(use_github) export(use_github_labels) export(use_github_links) export(use_github_release) export(use_gitlab_ci) export(use_gpl3_license) export(use_jenkins) export(use_lgpl_license) export(use_lifecycle_badge) export(use_logo) export(use_make) export(use_mit_license) export(use_namespace) export(use_news_md) export(use_package) export(use_package_doc) export(use_partial_warnings) export(use_pipe) export(use_pkgdown) export(use_pkgdown_travis) export(use_r) export(use_rcpp) export(use_rcpp_armadillo) export(use_rcpp_eigen) export(use_readme_md) export(use_readme_rmd) export(use_release_issue) export(use_reprex) export(use_revdep) export(use_rmarkdown_template) export(use_roxygen_md) export(use_rstudio) export(use_spell_check) export(use_template) export(use_test) export(use_testthat) export(use_tibble) export(use_tidy_ci) export(use_tidy_coc) export(use_tidy_contributing) export(use_tidy_description) export(use_tidy_eval) export(use_tidy_github) export(use_tidy_issue_template) export(use_tidy_labels) export(use_tidy_release_test_env) export(use_tidy_style) export(use_tidy_support) export(use_tidy_thanks) export(use_tidy_versions) export(use_travis) export(use_tutorial) export(use_usethis) export(use_version) export(use_vignette) export(use_zip) export(with_project) export(write_over) export(write_union) import(fs) importFrom(glue,glue) importFrom(glue,glue_collapse) importFrom(rlang,"%|%") importFrom(rlang,"%||%") importFrom(rlang,":=") usethis/NEWS.md0000644000176200001440000006671313507322145013053 0ustar liggesusers# usethis 1.5.1 This is a patch release with various small features and bug fixes. ## Using the pipe `%>%` or the tidy eval toolkit in your package * The templates used by `use_pipe()` and `use_tidy_eval()` use a more robust form of cross-reference links, linking to files rather than topics. This should silence some warnings seen on Windows at install time (#730, #731 @jmgirard). * `use_pipe()` gains a logical `export` argument, so it can do the setup necessary to use the pipe operator when it is re-exported (`export = TRUE`, which is the default and preserves the previous behaviour) and when it is not (`export = FALSE`) (#783). ## Git, GitHub, and pull requests * `use_github()` removes newline `\n` characters from the description that can cause the initial push to fail (#493, @muschellij2). * `git_sitrep()` gives better feedback if we can't validate the GitHub PAT (#725, @ijlyttle). * `create_from_github()` sets remote tracking branch of `master` to `upstream/master`, when it creates (and clones) a fork (#792). * `pr_pause()` can switch back to master even if there is no remote tracking branch (#715, @cderv). ## Build tools and continuous integration * `use_tidy_ci()` is updated for R 3.6, meaning that R 3.2 is the oldest version of R supported through proactive testing. * `use_make()` and `use_jenkins()` add a Makefile and Jenkinsfile, respectively (#501, @ryapric). * `use_circleci()` creates a `.circleci/config.yaml` config file for CircleCI (#703, @jdblischak). ## Other * `use_zip()` is a new variant of `use_course()` that downloads and unpacks a ZIP file, with less pedantic behaviour re: the destination directory. Both functions now also work for ZIP files with MIME type `"application/x-zip-compressed"` (#573). * `use_version()` can detect `"(development version)"` in a NEWS header and update it with an actual version (#768, @DavisVaughan). ## Dependency changes R 3.1 is no longer explicitly supported or tested. Our general practice is to support the current release (3.6, at time of writing), devel, and the 4 previous versions of R (3.5, 3.4, 3.3, 3.2). fs minimum version is stated to be v1.3.0. glue minimum version is stated to be v1.3.0. # usethis 1.5.0 ## Git, GitHub (and GitLab) usethis gains several functions to inspect and manipulate the Git situation for the current project = repository. We also provide more control and visibility into git2r's workings, especially around credentials (usethis uses git2r for all Git operations). * `git_sitrep()` lets you know what's up with your Git, git2r and GitHub config (#328). * `git_vaccinate()` vaccinates your global (i.e. user-level) git ignore file. It adds standard entries for R users, such as `.Rhistory` and `.Rdata`. This decreases the chance that you commit and push files containing confidential information (#469). * `git_remotes()` and `use_git_remote()` are new helpers to inspect or modify Git remote URLs for the repo associated with the active project (#649). * `git_protocol()` + `use_git_protocol()` and `git_credentials()` + `use_git_credentials()` are new helpers to summon or set Git transport protocol (SSH or HTTPS) or git2r credentials, respectively. These functions are primarily for internal use. Most users can rely on default behaviour. Use these helpers to intervene if git2r isn't discovering the right credentials (#653). usethis honors the `usethis.protocol` option, which allows you to express a general preference for SSH vs. HTTPS. Other improvements and bug fixes: * `use_github()` tries harder but also fails earlier, with more informative messages, making it less likely to leave the repo partially configured (#221). * `use_github()` and `create_from_github()` gain a `protocol` argument (#494, @cderv). * `create_from_github()` pulls from upstream master in a fork (#695, @ijlyttle). * `use_release_issue()` creates a GitHub issue containing a release checklist, reflecting the standard practices of the tidyverse team (#338). * `use_github_release()` creates a draft GitHub release using the entries in `NEWS.md` (#137). * `use_gitlab_ci()` creates a `gitlab-ci.yaml` config file for GitLab CI (#565, @overmar). * `use_git_config()` now invisibly returns the previous values of the settings. * `use_github_labels()` has been rewritten be more flexible. You can now supply a repo name, and `descriptions`, and you can set colours/descriptions independently of creating labels. You can also `rename` existing labels (#290). ## GitHub pull requests We've added **experimental** functions to work with GitHub pull requests. They are aimed at both a maintainer (who may make, review, and modify pull requests) and a contributor (who may make or explore pull requests). * `git_sitrep()` includes a section at the end aimed at describing "pull request readiness". Expect that to develop and expand. * `pr_init()`, `pr_fetch()`, `pr_push()`, `pr_pull()`, `pr_finish()`, and `pr_view()` constitute the new family of helpers. They are designed to be smart about the significance of remotes with the standard names of `origin` and `upstream` and to facilitate both internal and external pull requests. ## Partial file management usethis gains tooling to manage part of a file. This is currently used for managing badges in your README and roxygen import tags: * `use_badge()` and friends now automatically add badges if your README contains a specially formatted badge block (#497): ``` <-- badge:start --> <-- badge:end --> ``` * `use_tibble()` and `use_rcpp()` automatically add roxygen tags to to `{package}-package.R` if it contains a specially formatted namespace block (#517): ```R ## usethis namespace: start ## usethis namespace: end NULL ``` Unfortunately this means that `use_rcpp()` no longer supports non-roxygen2 workflows, but I suspect the set of people who use usethis and Rcpp but not roxygen2 is very small. ## Extending and wrapping usethis * New `proj_activate()` lets you activate a project, either opening a new RStudio session (if you use RStudio) or changing the working directory (#511). * `proj_get()` and `proj_set()` no longer have a `quiet` argument. The user-facing message about setting a project is now under the same control as other messages, i.e. `getOption("usethis.quiet", default = FALSE)` (#441). * A new set of `ui_*()` functions makes it possible to give your own code the same user interface as usethis (#308). All use the glue and crayon and packages to power easy interpolation and formatting. There are four families of functions: * block styles: `ui_line()`, `ui_done()`, `ui_todo()`, `ui_oops()`, `ui_info()`. * conditions: `ui_stop()`, `ui_warn()`. * questions: `ui_yeah()`, `ui_nope()`. * inline styles: `ui_field()`, `ui_value()`, `ui_path()`, `ui_code()`. * `with_project()` and `local_project()` are new withr-style functions to temporarily set an active usethis project. They make usethis functions easier to use in an *ad hoc* fashion or from another package (#441). ## Tidyverse standards These standards are (aspirationally) used by all tidyverse packages; you are welcome to use them if you find them helpful. * Call `use_tidy_labels()` to update GitHub labels. Colours are less saturated, docs is now documentation, we use some emoji, and performance is no longer automatically added to all repos (#519). Repo specific issues should be given colour `#eeeeee` and have an emoji. * Call `use_logo()` to update the package logo to the latest specifications: `man/figure/logo.png` should be 240 x 278, and README should contain ``. This gives a nicer display on retina displays. The logo is also linked to the pkgdown site if available (#536). * When creating a new package, use `create_tidy_package()` to start with a package following the tidyverse standards (#461). * `NEWS.md` for the development version should use "(development version)" rather than the specific version (#440). * pkgdown sites should now be built by travis and deployed automatically to GitHub pages. `use_pkgdown_travis()` will help you set that up. * When starting the release process, call `use_release_issue()` to create a release checklist issue (#338). * Prior to CRAN submission call `use_tidy_release_test_env()` to update the test environment section in `cran-comments()` (#496). * After acceptance, try `use_github_release()` to automatically create a release. It's created as a draft so you have a chance to look over before publishing. * `use_vignette()` includes the a standard initialisation chunk with `knitr::opts_chunk$set(comment = "#>", collapse = TRUE)` which should be used for all Rmds. ## New functions not already mentioned * `use_devtools()` (#624), `use_conflicted()` (#362), and `use_reprex()` (#465) help add useful packages to your `.Rprofile`. * `use_partial_warnings()` helps the user add a standard warning block to `.Rprofile` (#64). * `edit_r_buildignore()` opens `.Rbuildignore` for manual editing (#462, @bfgray3). * `use_lgpl_license()` automates set up of the LGL license (#448, @krlmlr). * `use_ccby_license()` adds a CCBY 4.0 license (#547, @njtierney). * `use_rcpp_armadillo()` and `use_rcpp_eigen()` set up a package to use RcppArmadillo or RcppEigen, respectively (#421, @coatless, @duckmayr). * `use_c("foo")` sets up `src/` and creates `src/foo.c` (#117). * `use_covr_ignore()` makes it easy to ignore files in test coverage (#434). * `use_pkgdown_travis()` helps you set up pkgdown for automatic build-and-deploy from Travis-CI to GitHub Pages (#524). * `use_addin()` does setup for RStudio addins (#353, @haozhu233). * `use_tutorial()` creates a new interactive R Markdown tutorial, as implemented by the [`learnr` package](https://rstudio.github.io/learnr/index.html) (@angela-li, #645). * `use_article()` creates articles, vignettes that are automatically added to `.Rbuildignore`. These appear on pkgdown sites, but are not included with the package itself (#281). * `use_citation()` creates a basic `CITATION` template and puts it in the right place (#100). ## Other minor bug fixes and improvements * `write_union()` appends the novel `lines`, but does not remove duplicates from existing lines (#583, @khailper). * `use_rcpp("foo")` now creates `src/foo.cpp` (#117). * `use_data()` gains a `version` argument and defaults to serialization format version 2 (#675). * `use_data_raw()` accepts a name for the to-be-prepared dataset and opens a templated R script (#646). * `browse_github()` now falls back to CRAN organisation (with a warning) if package doesn't have its own GitHub repo (#186). * `create_*()` restore the active project if they error part way through, and use `proj_activate()` (#453, #511). * `edit_r_profile()` and `edit_r_environ()` now respect environment variables `R_PROFILE_USER` and `R_ENVIRON_USER`, respectively (#480). * `use_description()` once again prints the generated description (#287). * `use_description_field()` is no longer sensitive to whitespace, which allows `use_vignette()` to work even if the `VignetteBuilder` field is spread over multiple lines (#439). * `use_logo()` can override existing logo if user gives permission (#454). It also produces retina appropriate logos by default, and matches the aspect ratio to the specification (#499). * `use_news_md()` will optionally commit. * `use_package()` gains a `min_version` argument to specify a minimum version requirement (#498). Set to `TRUE` to use the currently installed version (#386). This is used by `use_tidy_eval()` in order to require version 0.1.2 or greater of rlang (#484). * `use_pkgdown()` is now configurable with site options (@jayhesselberth, #467), and no longer creates the `docs/` directory (#495). * `use_test()` no longer forces the filename to be lowercase (#613, @stufield). * `use_test()` will not include a `context()` in the generated file if used with testthat 2.1.0 and above (the future release of testthat) (#325). * `use_tidy_description()` sets the `Encoding` field in `DESCRIPTION` (#502, @krlmlr). * `use_tidy_eval()` re-exports `:=` (#595, @jonthegeek). * `use_tidy_versions()` has source argument so that you can choose to use local or CRAN versions (#309). * `use_travis()` gains an `ext` argument, defaulting to `"org"`. Use `ext = "com"` for `https://travis-ci.com` (@cderv, #500). * `use_version()` asks before committing. * `use_vignette()` now has a `title` argument which is used in YAML header (in the two places where it is needed). The vignettes also lose the default author and date fields (@rorynolan, #445), and the R Markdown starter material. They gain a standard setup chunk. * `use_version("dev")` now creates a standard "(development version)" heading in `NEWS.md` (#440). * `use_vignette()` now checks if the vignette name is valid (starts with letter and consists of letters, numbers, hyphen, and underscore) and throws an error if not (@akgold, #555). * `restart_rstudio()` now returns `FALSE` in RStudio if no project is open, fixing an issue that caused errors in helpers that suggest restarting RStudio (@gadenbuie, #571). ## Dependency changes * withr moves from Suggests to Imports. * purrr and yaml are new in Imports. # usethis 1.4.0 ## File system All usethis file system operations now use the [fs](https://fs.r-lib.org) package (#177). This should not change how usethis functions, but users may notice these features of fs-mediated paths: - Paths are "tidy", meaning `/` is the path separator and there are never multiple or trailing `/`. - Paths are UTF-8 encoded. - A Windows user's home directory is interpreted as `C:\Users\username` (typical of Unix-oriented tools, like Git and ssh; also matches Python), as opposed to `C:\Users\username\Documents` (R's default on Windows). Read more in [`fs::path_expand()`](https://fs.r-lib.org/reference/path_expand.html). ## Extending or wrapping usethis These changes make it easier for others to extend usethis, i.e. to create workflow packages specific to their organization, or to use usethis in other packages. * `proj_path()` is newly exported. Use it to build paths within the active project. Like `proj_get()` and `proj_set()`, it is not aimed at end users, but rather for use in extension packages. End users should use [rprojroot](https://rprojroot.r-lib.org) or its simpler companion, [here](https://here.r-lib.org), to programmatically detect a project and build paths within it (#415, #425). * `edit_file()`, `write_over()`, and `write_union()` are newly exported helpers. They are mostly for internal use, but can also be useful in packages that extend or customize usethis (#344, #366, #389). * `use_template()` no longer errors when a user chooses not to overwrite an existing file and simply exits with confirmation that the file is unchanged (#348, #350, @boshek). * `getOption("usethis.quiet", default = FALSE)` is consulted when printing user-facing messages. Set this option to `TRUE` to suppress output, e.g., to use usethis functions quietly in another package. For example, use `withr::local_options(list(usethis.quiet = TRUE))` in the calling function (#416, #424). ## New functions * `proj_sitrep()` reports current working directory, the active usethis project, and the active RStudio Project. Call this function if things seem weird and you're not sure what's wrong or how to fix it. Designed for interactive use and debugging, not for programmatic use (#426). * `use_tibble()` does minimum setup necessary for a package that returns or exports a tibble. For example, this guarantees a tibble will print as a tibble (#324 @martinjhnhadley). * `use_logo()` resizes and adds a logo to a package (#358, @jimhester). * `use_spell_check()` adds a whitelist of words and a unit test to spell check package documentation during `R CMD check` (#285 @jeroen). ## Other small changes and bug fixes * usethis has a new logo! (#429) * `use_course()` reports progress during download (#276, #380). * `use_git()` only makes an initial commit of all files if user gives explicit consent (#378). * `create_from_github()`: the `repo` argument is renamed to `repo_spec`, since it takes input of the form "OWNER/REPO" (#376). * `use_depsy_badge()` is defunct. The Depsy project has officially concluded and is no longer being maintained (#354). * `use_github()` fails earlier, with a more informative message, in the absence of a GitHub personal access token (PAT). Also looks for the PAT more proactively in the usual environment variables (i.e., GITHUB_PAT, GITHUB_TOKEN) (#320, #340, @cderv). * The logic for setting DESCRIPTION fields in `create_package()` and `use_description()` got a Spring Cleaning. Fields directly specified by the user take precedence, then the named list in `getOption("usethis.description")` is consulted, and finally defaults built into usethis. `use_description_defaults()` is a new function that reveals fields found in options and built into usethis. Options specific to one DESCRIPTION field, e.g. `devtools.desc.license`, are no longer supported. Instead, use a single named list for all fields, preferably stored in an option named `"usethis.description"` (however,`"devtools.desc"` is still consulted for backwards compatibility). (#159, #233, #367) ## Dependency changes New Imports: fs, glue, utils No longer in Imports: backports, httr, rematch2, rmarkdown (moved to Suggests), styler (moved to Suggests) # usethis 1.3.0 * usethis has a website: (#217). It includes an article with advice on system setup, for usethis and for R development more generally. * `edit_*()` functions now return the target path, invisibly (#255). * `edit_git_ignore(scope = "user")` prefers `~/.gitignore`, but detects an existing `~/.gitignore_global`, if it exists. If a new global gitignore file is created, it is created as `~/.gitignore` and recorded in user's git config as the `core.excludesfile` (#255). * `create_from_github()` gains several arguments and new functionality. The `protocol` argument lets user convey whether remote URLs should be ssh or https. In the case of "fork and clone", the original repo is added as `upstream` remote. It is now possible -- although rarely necessary -- to directly specify the GitHub PAT, credentials (in git2r form), and GitHub host (#214, #214, #253). * `use_github_labels()` can create or update the colour of arbitrary GitHub issue labels, defaulting to a set of labels and colours used by the tidyverse packages, which are now exposed via `tidy_labels()`. That set now includes the labels "good first issue" and "help wanted" (#168, #249). * `appveyor_info()` no longer reverses the repo's URL and image link. Corrects the markdown produced by `use_appveyor_badge()` (#240, @llrs). * `use_cran_badge()` uses an HTTPS URL for the CRAN badge image (#235, @jdblischak). * `create_package()` and `create_project()` return a normalized path, even if target directory does not pre-exist (#227, #228). ## New functions * `use_git_config()` can set user's Git name or email, globally or locally in a project/repo (#267). * `browse_github_pat()` goes to the webpage where a GitHub user can create a personal access token (PAT) for the GitHub API. If the user configures a PAT, they can use functions like `create_from_github()` and `use_github()` to easily create and connect GitHub repos to local projects. (#248, #257, @jeroen, via @jennybc). * `use_version()` increments the version of the active package, including an interactive chooser. `use_dev_version()` is now a special case wrapper around this. (#188, #223, @EmilHvitfeldt). * `use_tidy_github()` creates a standard set of files that make a GitHub repository more navigable for users and contributors: an issue template, contributing guidelines, support documentation, and a code of conduct. All are now placed in a `.github/` subdirectory (#165, @batpigandme). * `use_bioc_badge` creates a Bioconductor badge that links to the build report (#271, @LiNk-NY). * `use_binder_badge()` creates a badge indicating the repository can be launched in an executable environment via [Binder](https://mybinder.org/) (#242, @uribo). # usethis 1.2.0 ## New functions * `use_course()` downloads a folder's worth of materials from a ZIP file, with deliberate choices around the default folder name and location. Developed for use at the start of a workshop. Helps participants obtain materials from, e.g., a DropBox folder or GitHub repo (#196). * `use_blank_slate()` provides a way to opt in to an RStudio workflow where the user's workspace is neither saved nor reloaded between R sessions. Automated for `scope = "project"`. Provides UI instructions for `scope = "user"`, for now (#139). * `use_tidy_style()` styles an entire project according to (#72, #197 @lorenzwalthert). * GitHub conventions common to tidyverse packages are enacted by `use_tidy_contributing()`, `use_tidy_issue_template()`, and `use_tidy_support()` (@batpigandme, #143, #166). Other changes * New projects that don't exhibit other obvious criteria for being a "project" will include a sentinel, empty file named `.here`, so they can be recognized as a project. * Project launching and switching works on RStudio server (#115, #129). * `use_template()` is newly exported, so that other packages can provide templating functions using this framework (@ijlyttle #120). * `use_readme_rmd()` and `use_readme_md()` work, in a similar fashion, for projects that are and are not a package (#131, #135). * `use_readme_rmd()` once again creates a pre-commit git hook, to help keep `README.Rmd` and `README.md` in sync (@PeteHaitch #41). * Substantial increase in unit test coverage. # usethis 1.1.0 ## New helpers * `browse_github()`, `browse_github_issues()`, `browse_github_pulls()`, `browse_cran()` and `browse_travis()` open useful websites related to the current project or a named package. (#96, #103). * `create_from_github()` creates a project from an existing GitHub repository, forking if needed (#109). * `use_cc0_license()` applies a CC0 license, particularly appropriate for data packages (#94) * `use_lifecycle_badge()` creates a badge describing current stage in project lifecycle (#48). * `use_pkgdown()` creates the basics needed for a [pkgdown](https://github.com/hadley/pkgdown) website (#88). * `use_r("foo")` creates and edit `R/foo.R` file. If you have a test file open, `use_r()` will open the corresponding `.R` file (#105). * `use_tidy_versions()` sets minimum version requirement for all dependencies. ## Bug fixes and improvements * `use_dev_version()` now correctly updates the `Version` field in a package description file. (@tjmahr, #104) * `use_revdep()` now also git-ignores the SQLite database (#107). * `use_tidy_eval()` has been tweaked to reflect current guidance (#106) # usethis 1.0.0 This is a new package that extracts out many functions that previously lived in devtools, as well as providing more building blocks so you can create your own helpers. As well as the many new helpers listed below, there are three main improvements to the package: * More support for general R projects, other than packages. * A notion of an "active" project that all commands operate on. * Refined output. usethis is gradually evolving towards supporting more general R "projects", not just packages. This is still a work in progress, so please let me know if you use a function that you think should work with projects but doesn't. You can also try out the new `create_project()` which creates a basic RStudio project. The concept of the working directory and the "base path" have been refined. Rather than using an argument to specify the active project, all `use_` functions now use a global active project setting, as returned by `proj_get()`. This is cached throughout a session, although it will be updated by `create_package()` and `create_project()`. You'll now get an clear error if you attempt to `use_something()` outside of a project, and `create_something()` will warn if you're trying to create inside an existing project. The output from all usethis commands has been reviewed to be informative but not overwhelming. usethis takes advantage of colour (using crayon and RStudio 1.1) to help chunk the output and clearly differentiate what you need to do vs. what has been done for you. ## New functions * `use_apl2_license()` if you want to use the Apache 2.0 license. * `use_depsy_badge()` allows including a Depsy badge (@gvegayon, #68). * `use_dev_package()` works like `use_package()` but also adds the repo to the `Remotes` field (#32). * `use_github_labels()` will automatically set up a standard set of labels, optionally removing the default labels (#1). * `use_pipe()` creates a template to use magrittr's `%>%` in your package (#15). * `use_tidy_ci()` which sets up travis and codecov using the tidyverse conventions (#14) * `use_tidy_description()` puts description fields in a standard order and alphabetises dependencies. * `use_tidy_eval()` imports and re-exports the recommend set of tidy eval helpers if your package uses tidy eval (#46). * `use_usethis()` opens your `.Rprofile` and gives you the code to copy and paste in. ## New edit functions A new class of functions make it easy to edit common config files: * `edit_r_profile_user()` opens `.Rprofile` * `edit_r_environ_user()` opens `.Renviron` * `edit_r_makevars_user()` opens `.R/Makevars` * `edit_git_config_user()` opens `.gitconfig` * `edit_git_ignore_user()` opens `.gitignore` * `edit_rstudio_snippets(type)` opens `~/R/snippets/{type}.snippets` ## Updates * `use_coverage("codecov")` now sets a default threshold of 1% to try and reduce false positives (#8). * `use_description()` now sets `ByteCompile: true` so you can benefit from the byte compiler (#29) * The license functions (`use_mit_license()`, `use_apl2_license()`, and `use_gpl3_license()`) save a copy of the standard license text in `LICENSE.md`, which is then added to `.Rbuildignore`. This allows you to follow standard licensing best practices while adhering to CRANs requirements (#10). * `use_package_doc()` uses more a modern roxygen2 template that requires less duplication. * `use_test()` will use the name of the currently open file in RStudio if you don't supply an explicit name (#89). * `use_readme_rmd()` now puts images in `man/figures/` and no longer adds to `.Rbuildgnore`. This ensures that the rendered `README.md` will also work on CRAN (#16, #19). The first chunk now uses `include = FALSE` and is named setup (#19). * `use_revdep()` creates structure for use with revdepcheck package, the preferred way to run revdepchecks. (#33) ## Building blocks * New `use_badge()` for adding any badge to a README. Now only prints a todo message if the badge does not already exist. * `use_directory()` is now exported (#27). ## Bug fixes and minor improvements * Functions which require code to be copied now automatically put the code on the clipboard if it is available (#52). * `create_package()` no longer creates a dependency on the current version of R. * `use_build_ignore()` now strips trailing `/` * `use_git()` will restart RStudio if needed (and possible) (#42). * `use_github()` now has an organisation parameter so you can create repos in organisations (#4). * `use_template()` and `use_test()` now convert title to a slug that only contains lowercase letters, numbers, and `-`. * `use_vignette()` now adds `*.html` and `*.R` to your `.gitgnore` so you don't accidentally add in compiled vignette products (#35). usethis/R/0000755000176200001440000000000013507322271012141 5ustar liggesusersusethis/R/ui.R0000644000176200001440000001342213507207664012713 0ustar liggesusers#' User interface #' #' These functions are used to construct the user interface of usethis. Use #' them in your own package so that your `use_` functions work the same way #' as usethis. #' #' The `ui_` functions can be broken down into four main categories: #' #' * block styles: `ui_line()`, `ui_done()`, `ui_todo()`, `ui_oops()`, #' `ui_info()`. #' * conditions: `ui_stop()`, `ui_warn()`. #' * questions: `ui_yeah()`, `ui_nope()`. #' * inline styles: `ui_field()`, `ui_value()`, `ui_path()`, `ui_code()`. #' #' @param x A character vector. #' #' For block styles, conditions, and questions, each element of the #' vector becomes a line, and the result is processed by [glue::glue()]. #' For inline styles, each element of the vector becomes an entry in a #' comma separated list. #' @param .envir Used to ensure that [glue::glue()] gets the correct #' environment. For expert use only. #' @return The block styles, conditions, and questions are called for their #' side-effect. The inline styles return a string. #' @keywords internal #' @name ui #' @examples #' new_val <- "oxnard" #' ui_done("{ui_field('name')} set to {ui_value(new_val)}") #' ui_todo("Redocument with {ui_code('devtools::document()')}") #' #' ui_code_block(c( #' "Line 1", #' "Line 2", #' "Line 3" #' )) NULL # Block styles ------------------------------------------------------------ #' @rdname ui #' @export ui_line <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cat_line(x) } #' @rdname ui #' @export ui_todo <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cat_bullet(x, crayon::red(clisymbols::symbol$bullet)) } #' @rdname ui #' @export ui_done <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cat_bullet(x, crayon::green(clisymbols::symbol$tick)) } #' @rdname ui #' @export ui_oops <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cat_bullet(x, crayon::red(clisymbols::symbol$cross)) } #' @rdname ui #' @export ui_info <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cat_bullet(x, crayon::yellow(clisymbols::symbol$info)) } #' @param copy If `TRUE`, the session is interactive, and the clipr package #' is installed, will copy the code block to the clipboard. #' @rdname ui #' @export ui_code_block <- function(x, copy = interactive(), .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) block <- indent(x, " ") block <- crayon::silver(block) cat_line(block) if (copy && clipr::clipr_available()) { x <- crayon::strip_style(x) clipr::write_clip(x) cat_line(" [Copied to clipboard]") } } # Conditions -------------------------------------------------------------- #' @rdname ui #' @export ui_stop <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) cnd <- structure( class = c("usethis_error", "error", "condition"), list(message = x) ) stop(cnd) } #' @rdname ui #' @export ui_warn <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) warning(x, call. = FALSE, immediate. = TRUE) } # Questions --------------------------------------------------------------- #' @rdname ui #' @export ui_yeah <- function(x, .envir = parent.frame()) { x <- glue_collapse(x, "\n") x <- glue(x, .envir = .envir) if (!interactive()) { ui_stop(c( "User input required, but session is not interactive.", "Query: {x}" )) } ayes <- c("Yes", "Definitely", "For sure", "Yup", "Yeah", "I agree", "Absolutely") nays <- c("No way", "Not now", "Negative", "No", "Nope", "Absolutely not") qs <- c(sample(ayes, 1), sample(nays, 2)) ord <- sample(length(qs)) cat_line(x) out <- utils::menu(qs[ord]) out != 0L && (ord == 1)[[out]] } #' @rdname ui #' @export ui_nope <- function(x, .envir = parent.frame()) { !ui_yeah(x, .envir = .envir) } # Inline styles ----------------------------------------------------------- #' @rdname ui #' @export ui_field <- function(x) { x <- crayon::green(x) x <- glue_collapse(x, sep = ", ") x } #' @rdname ui #' @export ui_value <- function(x) { if (is.character(x)) { x <- encodeString(x, quote = "'") } x <- crayon::blue(x) x <- glue_collapse(x, sep = ", ") x } #' @rdname ui #' @export #' @param base If specified, paths will be displayed relative to this path. ui_path <- function(x, base = NULL) { is_directory <- is_dir(x) | grepl("/$", x) if (is.null(base)) { x <- proj_rel_path(x) } else if (!identical(base, NA)) { x <- path_rel(x, base) } # rationalize trailing slashes x <- path_tidy(x) x <- ifelse(is_directory, paste0(x, "/"), x) ui_value(x) } #' @rdname ui #' @export ui_code <- function(x) { x <- encodeString(x, quote = "`") x <- crayon::silver(x) x <- glue_collapse(x, sep = ", ") x } # Cat wrappers --------------------------------------------------------------- cat_bullet <- function(x, bullet) { bullet <- paste0(bullet, " ") x <- indent(x, bullet, " ") cat_line(x) } # All UI output must eventually go through cat_line() so that it # can be quieted with 'usethis.quiet' when needed. cat_line <- function(..., quiet = getOption("usethis.quiet", default = FALSE)) { if (quiet) { return(invisible()) } lines <- paste0(..., "\n") cat(lines, sep = "") } # Sitrep helpers --------------------------------------------------------------- hd_line <- function(name) { cat_line(crayon::bold(name)) } kv_line <- function(key, value) { if (is.null(value)) { value <- crayon::silver("") } else { value <- ui_value(value) } cat_line("* ", key, ": ", value) } usethis/R/sitrep.R0000644000176200001440000000722213453664176013612 0ustar liggesusers#' Report working directory and usethis/RStudio project #' #' @description `proj_sitrep()` reports #' * current working directory #' * the active usethis project #' * the active RStudio Project #' #' @description Call this function if things seem weird and you're not sure #' what's wrong or how to fix it. Usually, all three of these should coincide #' (or be unset) and `proj_sitrep()` provides suggested commands for getting #' back to this happy state. #' #' @return A named list, with S3 class `sitrep` (for printing purposes), #' reporting current working directory, active usethis project, and active #' RStudio Project #' @export #' @family project functions #' @examples #' proj_sitrep() proj_sitrep <- function() { out <- list( working_directory = getwd(), active_usethis_proj = if (proj_active()) proj_get(), active_rstudio_proj = if (rstudioapi::hasFun("getActiveProject")) { rstudioapi::getActiveProject() } ## TODO(?): address home directory to help clarify fs issues on Windows? ## home_usethis = fs::path_home(), ## home_r = normalizePath("~") ) out <- ifelse(purrr::map_lgl(out, is.null), out, as.character(path_tidy(out))) structure(out, class = "sitrep") } #' @export print.sitrep <- function(x, ...) { keys <- format(names(x), justify = "right") purrr::walk2(keys, x, kv_line) rstudio_proj_is_active <- !is.null(x[["active_rstudio_proj"]]) usethis_proj_is_active <- !is.null(x[["active_usethis_proj"]]) rstudio_proj_is_not_wd <- rstudio_proj_is_active && x[["working_directory"]] != x[["active_rstudio_proj"]] usethis_proj_is_not_wd <- usethis_proj_is_active && x[["working_directory"]] != x[["active_usethis_proj"]] usethis_proj_is_not_rstudio_proj <- usethis_proj_is_active && rstudio_proj_is_active && x[["active_rstudio_proj"]] != x[["active_usethis_proj"]] if (rstudioapi::isAvailable() && !rstudio_proj_is_active) { ui_todo( " You are working in RStudio, but are not in an RStudio Project. A Project-based workflow offers many advantages. Read more at: {ui_field('https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects')} {ui_field('https://whattheyforgot.org/project-oriented-workflow.html')} " ) } if (!usethis_proj_is_active) { ui_todo( " There is currently no active usethis project. usethis attempts to activate a project upon first need. Call {ui_code('proj_get()')} to initiate project discovery. Call {ui_code('proj_set(\"path/to/project\")')} or \\ {ui_code('proj_activate(\"path/to/project\")')} to provide an explicit path. " ) } if (usethis_proj_is_not_wd) { ui_todo( " Your working directory is not the same as the active usethis project. Set working directory to the project: {ui_code('setwd(proj_get())')} Set project to working directory: {ui_code('proj_set(getwd())')} " ) } if (rstudio_proj_is_not_wd) { ui_todo( " Your working directory is not the same as the active RStudio Project. Set working directory to the Project: {ui_code('setwd(rstudioapi::getActiveProject())')} " ) } if (usethis_proj_is_not_rstudio_proj) { ui_todo( " Your active RStudio Project is not the same as the active usethis project. Set usethis project to RStudio Project: \\ {ui_code('proj_set(rstudioapi::getActiveProject())')} Restart RStudio in the usethis project: \\ {ui_code('rstudioapi::openProject(proj_get())')} Open the usethis project in a new instance of RStudio: \\ {ui_code('proj_activate(proj_get())')} " ) } invisible(x) } usethis/R/jenkins.R0000644000176200001440000000116013507207664013733 0ustar liggesusers#' Create Jenkinsfile for Jenkins CI Pipelines #' #' `use_jenkins()` adds a basic Jenkinsfile for R packages to the project root #' directory. The Jenkinsfile stages take advantage of calls to `make`, and so #' calling this function will also run `use_make()` if a Makefile does not #' already exist at the project root. #' #' @seealso The [documentation on Jenkins #' Pipelines](https://jenkins.io/doc/book/pipeline/jenkinsfile). #' @seealso [use_make()] #' @export use_jenkins <- function() { use_make() use_template( "Jenkinsfile", data = list(name = project_name()) ) use_build_ignore("Jenkinsfile") } usethis/R/write.R0000644000176200001440000000621313453664176013435 0ustar liggesusers#' Write into or over a file #' #' Helpers to write into or over a new or pre-existing file. Designed mostly for #' for internal use. File is written with UTF-8 encoding. #' #' @name write-this #' @param path Path to target file. It is created if it does not exist, but the #' parent directory must exist. #' @param lines Character vector of lines. For `write_union()`, these are lines #' to add to the target file, if not already present. For `write_over()`, #' these are the exact lines desired in the target file. #' @param quiet Logical. Whether to message about what is happening. #' @return Logical indicating whether a write occurred, invisibly. #' @keywords internal #' #' @examples #' \dontshow{.old_wd <- setwd(tempdir())} #' write_union("a_file", letters[1:3]) #' readLines("a_file") #' write_union("a_file", letters[1:5]) #' readLines("a_file") #' #' write_over("another_file", letters[1:3]) #' readLines("another_file") #' write_over("another_file", letters[1:3]) #' #' \dontrun{ #' ## will error if user isn't present to approve the overwrite #' write_over("another_file", letters[3:1]) #' } #' #' ## clean up #' file.remove("a_file", "another_file") #' \dontshow{setwd(.old_wd)} NULL #' @describeIn write-this writes lines to a file, taking the union of what's #' already there, if anything, and some new lines. Note, there is no explicit #' promise about the line order. Designed to modify simple config files like #' `.Rbuildignore` and `.gitignore`. #' @export write_union <- function(path, lines, quiet = FALSE) { stopifnot(is.character(lines)) path <- user_path_prep(path) if (file_exists(path)) { existing_lines <- readLines(path, warn = FALSE, encoding = "UTF-8") } else { existing_lines <- character() } new <- setdiff(lines, existing_lines) if (length(new) == 0) { return(invisible(FALSE)) } if (!quiet) { ui_done("Adding {ui_value(new)} to {ui_path(path)}") } all <- c(existing_lines, new) write_utf8(path, all) } #' @describeIn write-this writes a file with specific lines, creating it if #' necessary or overwriting existing, if proposed contents are not identical #' and user is available to give permission. #' @param contents Character vector of lines. #' @export write_over <- function(path, lines, quiet = FALSE) { stopifnot(is.character(lines), length(lines) > 0) path <- user_path_prep(path) if (same_contents(path, lines)) { return(invisible(FALSE)) } if (can_overwrite(path)) { if (!quiet) { ui_done("Writing {ui_path(path)}") } write_utf8(path, lines) } else { if (!quiet) { ui_done("Leaving {ui_path(path)} unchanged") } invisible(FALSE) } } write_utf8 <- function(path, lines, append = FALSE) { stopifnot(is.character(path)) stopifnot(is.character(lines)) file_mode <- if (append) "a" else "" con <- file(path, open = file_mode, encoding = "utf-8") on.exit(close(con), add = TRUE) lines <- paste0(lines, "\n", collapse = "") cat(lines, file = con, sep = "") invisible(TRUE) } same_contents <- function(path, contents) { if (!file_exists(path)) { return(FALSE) } identical(readLines(path, encoding = "UTF-8"), contents) } usethis/R/roxygen.R0000644000176200001440000000441413507207664013772 0ustar liggesusers#' Use roxygen with markdown #' #' You'll need to manually re-document once enabled. If you are already using #' roxygen2, but not with markdown, the #' [roxygen2md](https://roxygen2md.r-lib.org) package will be used to #' convert many Rd expressions to markdown. The package uses heuristics, so #' you'll need to check the results. #' #' @export use_roxygen_md <- function() { check_installed("roxygen2") if (!uses_roxygen()) { roxy_ver <- as.character(utils::packageVersion("roxygen2")) use_description_field("Roxygen", "list(markdown = TRUE)") use_description_field("RoxygenNote", roxy_ver) ui_todo("Run {ui_code('devtools::document()')}") } else if (!uses_roxygen_md()) { check_installed("roxygen2md") if (!uses_git()) { ui_todo("Use git to ensure that you don't lose any data") } ui_todo( " Refer to {ui_code('roxygen2md::roxygen2md()')} to use markdown markup \\ with roxygen2. " ) ui_todo("Run {ui_code('devtools::document()')} when you're done.") } invisible() } uses_roxygen_md <- function(base_path = proj_get()) { if (!desc::desc_has_fields("Roxygen", base_path)) { return(FALSE) } roxygen <- desc::desc_get("Roxygen", base_path)[[1]] value <- tryCatch( { eval(parse(text = roxygen)) }, error = function(e) { NULL } ) isTRUE(value$markdown) } uses_roxygen <- function(base_path = proj_get()) { desc::desc_has_fields("RoxygenNote", base_path) } roxygen_ns_append <- function(tag) { block_append( glue("{ui_value(tag)}"), glue("#' {tag}"), path = proj_path(package_doc_path()), block_start = "## usethis namespace: start", block_end = "## usethis namespace: end", block_suffix = "NULL" ) } roxygen_update <- function() { ui_todo("Run {ui_code('devtools::document()')} to update {ui_path('NAMESPACE')}") TRUE } # Checkers ---------------------------------------------------------------- check_uses_roxygen <- function(whos_asking) { force(whos_asking) if (uses_roxygen()) { return(invisible()) } ui_stop( " Project {ui_value(project_name())} does not use roxygen2. {ui_code(whos_asking)} can not work without it. You might just need to run {ui_code('devtools::document()')} once, then try again. " ) } usethis/R/utils.R0000644000176200001440000000343613507207664013442 0ustar liggesuserscan_overwrite <- function(path) { if (!file_exists(path)) { return(TRUE) } if (interactive()) { ui_yeah("Overwrite pre-existing file {ui_path(path)}?") } else { FALSE } } check_is_named_list <- function(x, nm = deparse(substitute(x))) { if (!rlang::is_list(x)) { bad_class <- paste(class(x), collapse = "/") ui_stop("{ui_code(nm)} must be a list, not {ui_value(bad_class)}.") } if (!rlang::is_dictionaryish(x)) { ui_stop( "Names of {ui_code(nm)} must be non-missing, non-empty, and non-duplicated." ) } x } dots <- function(...) { eval(substitute(alist(...))) } asciify <- function(x) { stopifnot(is.character(x)) gsub("[^a-zA-Z0-9_-]+", "-", x) } slug <- function(x, ext) { x_base <- path_ext_remove(x) x_ext <- path_ext(x) ext <- if (identical(tolower(x_ext), tolower(ext))) x_ext else ext path_ext_set(x_base, ext) } compact <- function(x) { is_empty <- vapply(x, function(x) length(x) == 0, logical(1)) x[!is_empty] } check_installed <- function(pkg) { if (!is_installed(pkg)) { ui_stop("Package {ui_value(pkg)} required. Please install before re-trying.") } } is_installed <- function(pkg) { requireNamespace(pkg, quietly = TRUE) } ## mimimalist, type-specific purrr::pluck()'s pluck_chr <- function(l, what) vapply(l, `[[`, character(1), what) is_testing <- function() { identical(Sys.getenv("TESTTHAT"), "true") } interactive <- function() { base::interactive() && !is_testing() } is_string <- function(x) { length(x) == 1 && is.character(x) } seq2 <- function(from, to) { if (from > to) { integer() } else { seq(from, to) } } indent <- function(x, first = " ", indent = first) { x <- gsub("\n", paste0("\n", indent), x) paste0(first, x) } isNA <- function(x) { length(x) == 1 && is.na(x) } usethis/R/version.R0000644000176200001440000000510713507307102013750 0ustar liggesusers#' Increment package version #' #' @description `use_version()` increments the "Version" field in `DESCRIPTION`, #' adds a new heading to `NEWS.md` (if it exists), and commits those changes #' (if package uses Git). #' #' @description `use_dev_version()` increments to a development version, e.g. #' from 1.0.0 to 1.0.0.9000. If the existing version is already a development #' version with four components, it does nothing. Thin wrapper around #' `use_version()`. #' #' @param which A string specifying which level to increment, one of: "major", #' "minor", "patch", "dev". If `NULL`, user can choose interactively. #' #' @seealso The [version #' section](https://r-pkgs.org/description.html#version) of [R #' Packages](https://r-pkgs.org). #' #' @examples #' \dontrun{ #' ## for interactive selection, do this: #' use_version() #' #' ## request a specific type of increment #' use_version("minor") #' use_dev_version() #' } #' #' @name use_version NULL #' @rdname use_version #' @export use_version <- function(which = NULL) { if (is.null(which) && !interactive()) { return(invisible(FALSE)) } check_is_package("use_version()") check_uncommitted_changes() new_ver <- choose_version(which) if (is.null(new_ver)) { return(invisible(FALSE)) } use_description_field("Version", new_ver, overwrite = TRUE) if (names(new_ver) == "dev") { use_news_heading("(development version)") } else { use_news_heading(new_ver) } git_ask_commit("Increment version number") invisible(TRUE) } #' @rdname use_version #' @export use_dev_version <- function() { check_is_package("use_dev_version()") ver <- desc::desc_get_version(proj_get()) if (length(unlist(ver)) > 3) { return(invisible()) } use_version(which = "dev") } choose_version <- function(which = NULL) { ver <- desc::desc_get_version(proj_get()) versions <- bump_version(ver) if (is.null(which)) { choice <- utils::menu( choices = glue( "{format(names(versions), justify = 'right')} --> {versions}" ), title = glue( "Current version is {ver}.\n", "Which part to increment? (0 to exit)" ) ) if (choice == 0) { return(invisible()) } else { which <- names(versions)[choice] } } which <- match.arg(which, c("major", "minor", "patch", "dev")) versions[which] } bump_version <- function(ver) { bumps <- c("major", "minor", "patch", "dev") vapply(bumps, bump_, character(1), ver = ver) } bump_ <- function(x, ver) { d <- desc::desc(text = paste0("Version: ", ver)) suppressMessages(d$bump_version(x)$get("Version")[[1]]) } usethis/R/rprofile.R0000644000176200001440000000314213507224743014113 0ustar liggesusers#' Helpers to make useful changes to `.Rprofile` #' #' @description #' All functions open your `.Rprofile` and give you the code you need to #' paste in. #' #' * `use_devtools()`: makes devtools available in interactive sessions. #' * `use_usethis()`: makes usethis available in interactive sessions. #' * `use_reprex()`: makes reprex available in interactive sessions. #' * `use_conflicted()`: makes conflicted available in interactive sessions. #' * `use_partial_warning()`: warns on partial matches. #' #' @name rprofile-helper NULL #' @rdname rprofile-helper #' @export use_conflicted <- function() { use_rprofile_package("conflicted") } #' @rdname rprofile-helper #' @export use_reprex <- function() { use_rprofile_package("reprex") } #' @rdname rprofile-helper #' @export use_usethis <- function() { use_rprofile_package("usethis") } #' @rdname rprofile-helper #' @export use_devtools <- function() { use_rprofile_package("devtools") } use_rprofile_package <- function(package) { ui_todo( "Include this code in {ui_value('.Rprofile')} to make \\ {ui_field(package)} available in all interactive sessions." ) ui_code_block( " if (interactive()) {{ suppressMessages(require({package})) }} " ) edit_r_profile("user") } #' @rdname rprofile-helper #' @export use_partial_warnings <- function() { ui_todo( "Include this code in {ui_path('.Rprofile')} to warn on partial matches." ) ui_code_block( " options( warnPartialMatchArgs = TRUE, warnPartialMatchDollar = TRUE, warnPartialMatchAttr = TRUE ) " ) edit_r_profile("user") } usethis/R/helpers.R0000644000176200001440000000627513453664176013755 0ustar liggesusersuse_description_field <- function(name, value, base_path = proj_get(), overwrite = FALSE) { curr <- desc::desc_get(name, file = base_path)[[1]] curr <- gsub("^\\s*|\\s*$", "", curr) if (identical(curr, value)) { return(invisible()) } if (!is.na(curr) && !overwrite) { ui_stop( "{ui_field(name)} has a different value in DESCRIPTION.\\ Use {ui_code('overwrite = TRUE')} to overwrite." ) } ui_done("Setting {ui_field(name)} field in DESCRIPTION to {ui_value(value)}") desc::desc_set(name, value, file = base_path) invisible() } use_dependency <- function(package, type, min_version = NULL) { stopifnot(is_string(package)) stopifnot(is_string(type)) if (package != "R" && !is_installed(package)) { ui_stop(c( "{ui_value(package)} must be installed before you can ", "take a dependency on it." )) } if (isTRUE(min_version)) { min_version <- utils::packageVersion(package) } version <- if (is.null(min_version)) "*" else paste0(">= ", min_version) types <- c("Depends", "Imports", "Suggests", "Enhances", "LinkingTo") names(types) <- tolower(types) type <- types[[match.arg(tolower(type), names(types))]] deps <- desc::desc_get_deps(proj_get()) existing_dep <- deps$package == package existing_type <- deps$type[existing_dep] existing_ver <- deps$version[existing_dep] is_linking_to <- (existing_type != "LinkingTo" && type == "LinkingTo") || (existing_type == "LinkingTo" && type != "LinkingTo") # No existing dependency, so can simply add if (!any(existing_dep) || is_linking_to) { ui_done("Adding {ui_value(package)} to {ui_field(type)} field in DESCRIPTION") desc::desc_set_dep(package, type, version = version, file = proj_get()) return(invisible()) } delta <- sign(match(existing_type, types) - match(type, types)) if (delta < 0) { # don't downgrade ui_warn( "Package {ui_value(package)} is already listed in\\ {ui_value(existing_type)} in DESCRIPTION, no change made." ) } else if (delta == 0 && !is.null(min_version)) { # change version upgrade <- existing_ver == "*" || numeric_version(min_version) > version_spec(existing_ver) if (upgrade) { ui_done( "Increasing {ui_value(package)} version to {ui_value(version)} in DESCRIPTION" ) desc::desc_set_dep(package, type, version = version, file = proj_get()) } } else if (delta > 0) { # upgrade if (existing_type != "LinkingTo") { ui_done( " Moving {ui_value(package)} from {ui_field(existing_type)} to {ui_field(type)}\\ field in DESCRIPTION " ) desc::desc_del_dep(package, existing_type, file = proj_get()) desc::desc_set_dep(package, type, version = version, file = proj_get()) } } invisible() } version_spec <- function(x) { x <- gsub("(<=|<|>=|>|==)\\s*", "", x) numeric_version(x) } view_url <- function(..., open = interactive()) { url <- paste(..., sep = "/") if (open) { ui_done("Opening URL {ui_value(url)}") utils::browseURL(url) } else { ui_todo("Open URL {ui_value(url)}") } invisible(url) } usethis/R/github-labels.R0000644000176200001440000002276513507207664015032 0ustar liggesusers#' Manage GitHub issue labels #' #' @description #' `use_github_labels()` can create new labels, update colours and descriptions, #' and optionally delete GitHub's default labels (if `delete_default = TRUE`). #' It will never delete labels that have associated issues. #' #' `use_tidy_labels()` calls `use_github_labels()` with tidyverse conventions #' powered by `tidy_labels()`, `tidy_labels_rename()`, `tidy_label_colours()` #' and `tidy_label_descriptions()`. #' #' @section Label usage: #' Labels are used as part of the issue-triage process, designed to minimise the #' time spent re-reading issues. The absence of a label indicates that an issue #' is new, and has yet to be triaged. #' * `reprex` indicates that an issue does not have a minimal reproducible #' example, and that a reply has been sent requesting one from the user. #' * `bug` indicates an unexpected problem or unintended behavior. #' * `feature` indicates a feature request or enhancement. #' * `docs` indicates an issue with the documentation. #' * `wip` indicates that someone is working on it or has promised to. #' * `good first issue` indicates a good issue for first-time contributors. #' * `help wanted` indicates that a maintainer wants help on an issue. #' #' @param repo_spec Optional repository specification (`owner/repo`) if you #' don't want to target the current project. #' @param labels A character vector giving labels to add. #' @param rename A named vector with names giving old names and values giving #' new names. #' @param colours,descriptions Named character vectors giving hexadecimal #' colours (like `e02a2a`) and longer descriptions. The names should match #' label names, and anything unmatched will be left unchanged. If you #' create a new label, and don't supply colours, it will be given a random #' colour. #' @param delete_default If `TRUE`, removes GitHub default labels that do #' not appear in the `labels` vector and that do not have associated issues. #' #' @inheritParams use_github_links #' @export #' @examples #' \dontrun{ #' # typical use in, e.g., a new tidyverse project #' use_github_labels(delete_default = TRUE) #' #' # create labels without changing colours/descriptions #' use_github_labels( #' labels = c("foofy", "foofier", "foofiest"), #' colours = NULL, #' descriptions = NULL #' ) #' #' # change descriptions without changing names/colours #' use_github_labels( #' labels = NULL, #' colours = NULL, #' descriptions = c("foofiest" = "the foofiest issue you ever saw") #' ) #' } use_github_labels <- function(repo_spec = github_repo_spec(), labels = character(), rename = character(), colours = character(), descriptions = character(), delete_default = FALSE, auth_token = github_token(), host = NULL) { if (missing(repo_spec)) { check_uses_github() } check_github_token(auth_token) gh <- function(endpoint, ...) { out <- gh::gh( endpoint, ..., owner = spec_owner(repo_spec), repo = spec_repo(repo_spec), .token = auth_token, .api_url = host, .send_headers = c( "Accept" = "application/vnd.github.symmetra-preview+json" ) ) if (identical(out[[1]], "")) { list() } else { out } } cur_labels <- gh("GET /repos/:owner/:repo/labels") label_attr <- function(x, l, mapper = purrr::map_chr) { mapper(l, x, .default = NA) } # Rename existing labels cur_label_names <- label_attr("name", cur_labels) to_rename <- intersect(cur_label_names, names(rename)) if (length(to_rename) > 0) { delta <- purrr::map2_chr( to_rename, rename[to_rename], ~ paste0(ui_value(.x), " -> ", ui_value(.y)) ) ui_done("Renaming labels: {paste0(delta, collapse = '\n')}") # Can't do this at label level, i.e. "old_label_name --> new_label_name" # Fails if "new_label_name" already exists # https://github.com/r-lib/usethis/issues/551 # Must first PATCH issues, then sort out labels issues <- purrr::map( to_rename, ~ gh("GET /repos/:owner/:repo/issues", labels = .x) ) issues <- purrr::flatten(issues) number <- purrr::map_int(issues, "number") old_labels <- purrr::map(issues, "labels") df <- data.frame( number = rep.int(number, lengths(old_labels)) ) df$labels <- purrr::flatten(old_labels) df$labels <- purrr::map_chr(df$labels, "name") # enact relabelling m <- match(df$labels, names(rename)) df$labels[!is.na(m)] <- rename[m[!is.na(m)]] df <- df[!duplicated(df), ] new_labels <- split(df$labels, df$number) purrr::iwalk( new_labels, ~ gh( "PATCH /repos/:owner/:repo/issues/:issue_number", issue_number = .y, labels = I(.x) ) ) # issues have correct labels now; safe to edit labels themselves purrr::walk( to_rename, ~ gh("DELETE /repos/:owner/:repo/labels/:name", name = .x) ) labels <- union(labels, setdiff(rename, cur_label_names)) } else { ui_info("No labels need renaming") } cur_labels <- gh("GET /repos/:owner/:repo/labels") cur_label_names <- label_attr("name", cur_labels) # Add missing labels if (all(labels %in% cur_label_names)) { ui_info("No new labels needed") } else { to_add <- setdiff(labels, cur_label_names) ui_done("Adding missing labels: {ui_value(to_add)}") for (label in to_add) { gh( "POST /repos/:owner/:repo/labels", name = label, color = purrr::pluck(colours, label, .default = random_colour()), description = purrr::pluck(descriptions, label, .default = "") ) } } cur_labels <- gh("GET /repos/:owner/:repo/labels") cur_label_names <- label_attr("name", cur_labels) # Update colours cur_label_colours <- rlang::set_names( label_attr("color", cur_labels), cur_label_names ) if (identical(cur_label_colours[names(colours)], colours)) { ui_info("Label colours are up-to-date") } else { to_update <- intersect(cur_label_names, names(colours)) ui_done("Updating colours: {ui_value(to_update)}") for (label in to_update) { gh( "PATCH /repos/:owner/:repo/labels/:name", name = label, color = colours[[label]] ) } } # Update descriptions cur_label_descriptions <- rlang::set_names( label_attr("description", cur_labels), cur_label_names ) if (identical(cur_label_descriptions[names(descriptions)], descriptions)) { ui_info("Label descriptions are up-to-date") } else { to_update <- intersect(cur_label_names, names(descriptions)) ui_done("Updating descriptions: {ui_value(to_update)}") for (label in to_update) { gh( "PATCH /repos/:owner/:repo/labels/:name", name = label, description = descriptions[[label]] ) } } # Delete unused default labels if (delete_default) { default <- purrr::map_lgl(cur_labels, "default") to_remove <- setdiff(cur_label_names[default], labels) if (length(to_remove) > 0) { ui_done("Removing default labels: {ui_value(to_remove)}") for (label in to_remove) { issues <- gh("GET /repos/:owner/:repo/issues", labels = label) if (length(issues) > 0) { ui_todo("Delete {ui_value(label)} label manually; it has associated issues") } else { gh("DELETE /repos/:owner/:repo/labels/:name", name = label) } } } } } #' @export #' @rdname use_github_labels use_tidy_labels <- function(repo_spec = github_repo_spec(), auth_token = github_token(), host = NULL) { use_github_labels( repo_spec = repo_spec, labels = tidy_labels(), rename = tidy_labels_rename(), colours = tidy_label_colours(), descriptions = tidy_label_descriptions(), delete_default = TRUE, auth_token = auth_token, host = host ) } #' @rdname use_github_labels #' @export tidy_labels <- function() { names(tidy_label_colours()) } #' @rdname use_github_labels #' @export tidy_labels_rename <- function() { c( # before = after "enhancement" = "feature", "question" = "reprex", "good first issue" = "good first issue :heart:", "help wanted" = "help wanted :heart:", "docs" = "documentation" ) } #' @rdname use_github_labels #' @export tidy_label_colours <- function() { # http://tristen.ca/hcl-picker/#/hlc/5/0.26/E0B3A2/E1B996 c( "breaking change :skull_and_crossbones:" = "E0B3A2", "bug" = "E0B3A2", "documentation" = "CBBAB8", "feature" = "B4C3AE", "good first issue :heart:" = "CBBAB8", "help wanted :heart:" = "C5C295", "reprex" = "C5C295", "tidy-dev-day :nerd_face:" = "CBBAB8", "wip" = "E1B996" ) } #' @rdname use_github_labels #' @export tidy_label_descriptions <- function() { c( "bug" = "an unexpected problem or unintended behavior", "feature" = "a feature request or enhancement", "reprex" = "needs a minimal reproducible example", "wip" = "work in progress", "documentation" = "", "good first issue :heart:" = "good issue for first-time contributors", "help wanted :heart:" = "we'd love your help!", "breaking change :skull_and_crossbones:" = "API change likely to affect existing code", "tidy-dev-day :nerd_face:" = "Tidyverse Developer Day rstd.io/tidy-dev-day" ) } random_colour <- function() { format(as.hexmode(sample(256 * 256 * 256 - 1, 1)), width = 6) } usethis/R/git-utils.R0000644000176200001440000002117513507207664014223 0ustar liggesusers# Repository -------------------------------------------------------------- git_repo <- function() { check_uses_git() git2r::repository(proj_get()) } git_init <- function() { git2r::init(proj_get()) } git_pull <- function(remote_branch = git_branch_tracking_FIXME(), credentials = NULL) { repo <- git_repo() git2r::fetch( repo, name = remref_remote(remote_branch), refspec = remref_branch(remote_branch), verbose = FALSE, credentials = credentials ) mr <- git2r::merge(repo, remote_branch) if (isTRUE(mr$conflicts)) { ui_stop("Merge conflict! Please resolve before continuing") } invisible() } git_status <- function(...) { git2r::status(..., repo = git_repo()) } uses_git <- function(path = proj_get()) { !is.null(git2r::discover_repository(path)) } # Remotes ------------------------------------------------------------------ git_remote_find <- function(rname = "origin") { remotes <- git_remotes() if (length(remotes) == 0) return(NULL) remotes[[rname]] } git_remote_exists <- function(rname = "origin") { rname %in% names(git_remotes()) } # GitHub ------------------------------------------------------------------ git_is_fork <- function() { git_remote_exists("upstream") } # Commit ------------------------------------------------------------------ git_commit_find <- function(refspec = NULL) { repo <- git_repo() if (is.null(refspec)) { git2r::last_commit(repo) } else { git2r::revparse_single(repo, refspec) } } # Remote refs ------------------------------------------------------------- git_remref <- function(remote = "origin", branch = "master") { glue("{remote}/{branch}") } ## remref --> remote, branch git_parse_remref <- function(remref) { repo <- git_repo() rnames <- git2r::remotes(repo) rnames <- paste0("^", rnames, collapse = "|") regex <- glue("({rnames})/(.*)") list(remote = sub(regex, "\\1", remref), branch = sub(regex, "\\2", remref)) } remref_remote <- function(remref) git_parse_remref(remref)$remote remref_branch <- function(remref) git_parse_remref(remref)$branch # Branch ------------------------------------------------------------------ git_branch <- function(name = NULL) { if (is.null(name)) { return(git_branch_current()) } b <- git2r::branches(git_repo()) b[[name]] } git_branch_current <- function() { repo <- git_repo() branch <- git2r::repository_head(repo) if (!git2r::is_branch(branch)) { ui_stop("Detached head; can't continue") } branch } git_branch_name <- function() { git_branch_current()$name } git_branch_exists <- function(branch) { repo <- git_repo() branch %in% names(git2r::branches(repo)) } git_branch_tracking <- function(branch = git_branch_name()) { b <- git_branch(name = branch) git2r::branch_get_upstream(b)$name } ## FIXME: this function is 50% "actual tracking branch" and ## 50% "what we think tracking branch should be" ## different uses need to be untangled, then we can give a better name git_branch_tracking_FIXME <- function(branch = git_branch_name()) { if (identical(branch, "master") && git_is_fork()) { # We always pretend that the master branch of a fork tracks the # master branch in the source repo "upstream/master" } else { git_branch_tracking(branch) } } git_branch_create <- function(branch, commit = NULL) { git2r::branch_create(git_commit_find(commit), branch) } git_branch_switch <- function(branch) { old <- git_branch_current() git2r::checkout(git_repo(), branch) invisible(old) } git_branch_compare <- function(branch = git_branch_name()) { repo <- git_repo() remref <- git_branch_tracking_FIXME(branch) git2r::fetch( repo, name = remref_remote(remref), refspec = branch, verbose = FALSE ) git2r::ahead_behind( git_commit_find(branch), git_commit_find(remref) ) } git_branch_push <- function(branch = git_branch_name(), remote_name = NULL, remote_branch = NULL, credentials = NULL, force = FALSE) { remote_info <- git_branch_remote(branch) remote_name <- remote_name %||% remote_info$remote_name remote_branch <- remote_branch %||% remote_info$remote_branch remote <- paste0(remote_name, ":", remote_branch) ui_done("Pushing local {ui_value(branch)} branch to {ui_value(remote)}") git2r::push( git_repo(), name = remote_name, refspec = glue("refs/heads/{branch}:refs/heads/{remote_branch}"), force = force, credentials = credentials ) } git_branch_remote <- function(branch = git_branch_name()) { remote <- git_branch_tracking_FIXME(branch) if (is.null(remote)) { list( remote_name = "origin", remote_branch = branch ) } else { list( remote_name = remref_remote(remote), remote_branch = remref_branch(remote) ) } } git_branch_track <- function(branch, remote = "origin", remote_branch = branch) { branch_obj <- git_branch(branch) upstream <- git_remref(remote, remote_branch) ui_done("Setting upstream tracking branch for {ui_value(branch)} to {ui_value(upstream)}") git2r::branch_set_upstream(branch_obj, upstream) } git_branch_delete <- function(branch) { branch <- git_branch(branch) git2r::branch_delete(branch) } # Checks ------------------------------------------------------------------ check_uses_git <- function(base_path = proj_get()) { if (uses_git(base_path)) { return(invisible()) } ui_stop(c( "Cannot detect that project is already a Git repository.", "Do you need to run {ui_code('use_git()')}?" )) } check_uncommitted_changes <- function(path = proj_get(), untracked = FALSE) { if (rstudioapi::hasFun("documentSaveAll")) { rstudioapi::documentSaveAll() } if (uses_git(path) && git_uncommitted(path, untracked = untracked)) { ui_stop("Uncommited changes. Please commit to git before continuing.") } } git_uncommitted <- function(path = proj_get(), untracked = FALSE) { r <- git2r::repository(path, discover = TRUE) st <- vapply(git2r::status(r, untracked = untracked), length, integer(1)) any(st != 0) } check_branch_not_master <- function() { if (git_branch_name() != "master") { return() } ui_stop( " Currently on {ui_value('master')} branch. Do you need to call {ui_code('pr_init()')} first? " ) } check_branch <- function(branch) { ui_done("Checking that current branch is {ui_value(branch)}") actual <- git_branch_name() if (actual == branch) return() code <- glue("git checkout {branch}") ui_stop( " Must be on branch {ui_value(branch)}, not {ui_value(actual)}. How to switch to the correct branch in the shell: {ui_code(code)} " ) } check_branch_pulled <- function(branch = git_branch_name(), use = "git pull") { remote <- git_branch_tracking_FIXME(branch) if (is.null(remote)) { ui_done("Local branch {ui_value(branch)} is not tracking a remote branch.") return(invisible()) } ui_done( "Checking that local branch {ui_value(branch)} has the changes \\ in {ui_value(remote)}" ) diff <- git_branch_compare(branch) if (diff[[2]] == 0) { return(invisible()) } ui_stop(c( "Local branch {ui_value(branch)} is behind {ui_value(remote)}.", "Please use {ui_code(use)} to update." )) } check_branch_pushed <- function(branch = git_branch_name(), use = "git push") { local <- paste0("local/", branch) remote <- git_branch_tracking_FIXME(branch) ui_done( "Checking that remote branch {ui_value(remote)} has the changes \\ in {ui_value(local)}" ) diff <- git_branch_compare(branch) if (diff[[1]] == 0) { return(invisible()) } ui_stop(c( "{ui_value(remote)} is behind {ui_value(local)}", "Please use {ui_code(use)} to update." )) } # config ------------------------------------------------------------------ git_config_get <- function(name, global = FALSE) { if (global) { config <- git2r::config() config$global[[name]] } else { config <- git2r::config(git_repo()) config$local[[name]] } } git_config_set <- function(name, value, global = FALSE) { old <- git_config_get(name, global = global) config <- list(git_repo(), value, global) names(config) <- c("repo", name, "global") do.call(git2r::config, config) invisible(old) } git_config <- function(..., .repo = NULL) { values <- list(...) if (is.null(.repo)) { old <- git2r::config()$global %||% list() old <- old[names(values)] do.call(git2r::config, c(list(global = TRUE), values)) } else { old <- git2r::config(.repo)$local[names(values)] do.call(git2r::config, c(list(repo = .repo), values)) } names(old) <- names(values) invisible(old) } usethis/R/spelling.R0000644000176200001440000000220213453664176014112 0ustar liggesusers#' Use spell check #' #' Adds a unit test to automatically run a spell check on documentation and, #' optionally, vignettes during `R CMD check`, using the #' [spelling][spelling::spell_check_package] package. Also adds a `WORDLIST` #' file to the package, which is a dictionary of whitelisted words. See #' [spelling::wordlist] for details. #' #' @param vignettes Logical, `TRUE` to spell check all `rmd` and `rnw` files in #' the `vignettes/` folder. #' @param lang Preferred spelling language. Usually either `"en-US"` or #' `"en-GB"`. #' @param error Logical, indicating whether the unit test should fail if #' spelling errors are found. Defaults to `FALSE`, which does not error, but #' prints potential spelling errors #' @export use_spell_check <- function(vignettes = TRUE, lang = "en-US", error = FALSE) { check_is_package("use_spell_check") check_installed("spelling") use_dependency("spelling", "Suggests") use_description_field("Language", lang) spelling::spell_check_setup( pkg = proj_get(), vignettes = vignettes, lang = lang, error = error ) ui_todo("Run {ui_code('devtools::check()')} to trigger spell check") } usethis/R/r.R0000644000176200001440000000326413507307477012545 0ustar liggesusers#' Create or edit a .R file #' #' @param name File name, without extension; will create if it doesn't already #' exist. If not specified, and you're currently in a test file, will guess #' name based on test name. #' @seealso [use_test()], and also the [R code #' chapter](https://r-pkgs.org/r.html) of [R #' Packages](https://r-pkgs.org). #' @export use_r <- function(name = NULL) { name <- name %||% get_active_r_file(path = "tests/testthat") name <- gsub("^test-", "", name) name <- slug(name, "R") check_file_name(name) use_directory("R") edit_file(proj_path("R", name)) invisible(TRUE) } check_file_name <- function(name) { if (!valid_file_name(path_ext_remove(name))) { ui_stop(c( "{ui_value(name)} is not a valid file name. It should:", "* Contain only ASCII letters, numbers, '-', and '_'." )) } name } valid_file_name <- function(x) { grepl("^[a-zA-Z0-9._-]+$", x) } get_active_r_file <- function(path = "R") { if (!rstudioapi::isAvailable()) { ui_stop("Argument {ui_code('name')} must be specified.") } ## rstudioapi can return a path like '~/path/to/file' where '~' means ## R's notion of user's home directory active_file <- proj_path_prep(rstudioapi::getSourceEditorContext()$path) rel_path <- proj_rel_path(active_file) if (path_dir(rel_path) != path) { ui_stop(c( "Open file must be in the {ui_path(path)} directory of the active package.", " * Actual path: {ui_path(rel_path)}" )) } ext <- path_ext(active_file) if (toupper(ext) != "R") { ui_stop( "Open file must have {ui_value('.R')} or {ui_value('.r')} as extension,\\ not {ui_value(ext)}." ) } path_file(active_file) } usethis/R/browse.R0000644000176200001440000001055513453664176013610 0ustar liggesusers#' Quickly browse to important package webpages #' #' These functions take you to various webpages associated with a package and #' return the target URL invisibly. Some URLs are formed from first principles #' and there is no guarantee there will be content at the destination. #' @details #' #' * `browse_github()`: Looks for a GitHub URL in the URL field of #' `DESCRIPTION`. #' * `browse_github_issues()`: Visits the GitHub Issues index or one specific #' issue. #' * `browse_github_pulls()`: Visits the GitHub Pull Request index or one #' specific pull request. #' * `browse_travis()`: Visits the package's page on [Travis #' CI](https://travis-ci.org). #' * `browse_cran()`: Visits the package on CRAN, via the canonical URL. #' #' @param package Name of package; leave as `NULL` to use current package #' @param number For GitHub issues and pull requests. Can be a number or #' `"new"`. #' @examples #' browse_github("gh") #' browse_github_issues("backports") #' browse_github_issues("backports", 1) #' browse_github_pulls("rprojroot") #' browse_github_pulls("rprojroot", 3) #' browse_travis("usethis") #' browse_cran("MASS") #' @name browse-this NULL #' @export #' @rdname browse-this browse_github <- function(package = NULL) { view_url(github_link(package)) } #' @export #' @rdname browse-this browse_github_issues <- function(package = NULL, number = NULL) { view_url(github_home(package), "issues", number) } #' @export #' @rdname browse-this browse_github_pulls <- function(package = NULL, number = NULL) { pull <- if (is.null(number)) "pulls" else "pull" view_url(github_home(package), pull, number) } #' @export #' @rdname browse-this #' @param ext Version of travis to use. browse_travis <- function(package = NULL, ext = c("org", "com")) { gh <- github_home(package) ext <- rlang::arg_match(ext) travis_url <- glue::glue("travis-ci.{ext}") view_url(sub("github.com", travis_url, gh)) } #' @export #' @rdname browse-this browse_cran <- function(package = NULL) { view_url(cran_home(package)) } ## gets at most one GitHub link from the URL field of DESCRIPTION ## strips any trailing slash ## respects the URL given by maintainer, e.g. ## "https://github.com/simsem/semTools/wiki" <-- note the "wiki" part ## "https://github.com/r-lib/gh#readme" <-- note trailing "#readme" github_link <- function(package = NULL) { if (is.null(package)) { desc <- desc::desc(proj_get()) } else { desc <- desc::desc(package = package) } urls <- desc$get_urls() gh_links <- grep("^https?://github.com/", urls, value = TRUE) if (length(gh_links) == 0) { ui_warn(" Package does not provide a GitHub URL. Falling back to GitHub CRAN mirror") return(glue("https://github.com/cran/{package}")) } gsub("/$", "", gh_links[[1]]) } cran_home <- function(package = NULL) { package <- package %||% project_name() glue("https://cran.r-project.org/package={package}") } github_url_rx <- function() { paste0( "^", "(?:https?://github.com/)", "(?[^/]+)/", "(?[^/#]+)", "/?", "(?.*)", "$" ) } ## takes URL return by github_link() and strips it down to support ## appending path parts for issues or pull requests ## input: "https://github.com/simsem/semTools/wiki" ## output: "https://github.com/simsem/semTools" ## input: "https://github.com/r-lib/gh#readme" ## output: "https://github.com/r-lib/gh" github_home <- function(package = NULL) { gh_link <- github_link(package) df <- re_match_inline(gh_link, github_url_rx()) glue("https://github.com/{df$owner}/{df$repo}") } ## inline a simplified version of rematch2::re_match() re_match_inline <- function(text, pattern) { match <- regexpr(pattern, text, perl = TRUE) start <- as.vector(match) length <- attr(match, "match.length") end <- start + length - 1L matchstr <- substring(text, start, end) matchstr[ start == -1 ] <- NA_character_ res <- data.frame( stringsAsFactors = FALSE, .text = text, .match = matchstr ) if (!is.null(attr(match, "capture.start"))) { gstart <- attr(match, "capture.start") glength <- attr(match, "capture.length") gend <- gstart + glength - 1L groupstr <- substring(text, gstart, gend) groupstr[ gstart == -1 ] <- NA_character_ dim(groupstr) <- dim(gstart) res <- cbind(groupstr, res, stringsAsFactors = FALSE) } names(res) <- c(attr(match, "capture.names"), ".text", ".match") res } usethis/R/citation.R0000644000176200001440000000047013453664176014114 0ustar liggesusers#' Create a CITATION template #' #' Use this if you want to encourage users of your package to cite an #' article or book. #' #' @export use_citation <- function() { use_directory("inst") use_template( "citation-template.R", path("inst", "CITATION"), data = package_data(), open = TRUE ) } usethis/R/news.R0000644000176200001440000000207613507307437013254 0ustar liggesusers#' Create a simple `NEWS.md` #' #' This creates a basic `NEWS.md` in the root directory. #' #' @inheritParams use_template #' @seealso The [important files #' section](https://r-pkgs.org/release.html#important-files) of [R #' Packages](https://r-pkgs.org). #' @export use_news_md <- function(open = interactive()) { check_uncommitted_changes() use_template( "NEWS.md", data = package_data(), open = open ) git_ask_commit("Add NEWS.md") } use_news_heading <- function(version) { news_path <- proj_path("NEWS.md") if (!file_exists(news_path)) { return(invisible()) } news <- readLines(news_path, encoding = "UTF-8") title <- glue("# {project_name()} {version}") if (title == news[[1]]) { return(invisible()) } development_title <- glue("# {project_name()} (development version)") if (development_title == news[[1]]) { news[[1]] <- title ui_done("Replacing development heading in NEWS.md") return(write_utf8(news_path, news)) } ui_done("Adding new heading to NEWS.md") write_utf8(news_path, c(title, "", news)) } usethis/R/directory.R0000644000176200001440000000237213507207664014304 0ustar liggesusers#' Use a directory #' #' `use_directory()` creates a directory (if it does not already exist) in the #' project's top-level directory. This function powers many of the other `use_` #' functions such as [use_data()] and [use_vignette()]. #' #' @param path Path of the directory to create, relative to the project. #' @inheritParams use_template #' #' @export #' @examples #' \dontrun{ #' use_directory("inst") #' } use_directory <- function(path, ignore = FALSE) { create_directory(proj_path(path)) if (ignore) { use_build_ignore(path) } invisible(TRUE) } create_directory <- function(path) { if (dir_exists(path)) { return(invisible(FALSE)) } else if (file_exists(path)) { ui_stop("{ui_path(path)} exists but is not a directory.") } dir_create(path, recurse = TRUE) ui_done("Creating {ui_path(path)}") invisible(TRUE) } check_path_is_directory <- function(path) { if (!file_exists(path)) { ui_stop("Directory {ui_path(path)} does not exist.") } if (!is_dir(path)) { ui_stop("{ui_path(path)} is not a directory.") } } check_directory_is_empty <- function(x) { files <- dir_ls(x) if (length(files) > 0) { ui_stop("{ui_path(x)} exists and is not an empty directory.") } invisible(x) } usethis/R/create.R0000644000176200001440000002317013507207664013542 0ustar liggesusers#' Create a package or project #' #' @description #' These functions create an R project: #' * `create_package()` creates an R package #' * `create_project()` creates a non-package project, i.e. a data analysis #' project #' #' Both functions can be called on an existing project; you will be asked #' before any existing files are changed. #' #' @param path A path. If it exists, it is used. If it does not exist, it is #' created, provided that the parent path exists. #' @inheritParams use_description #' @param rstudio If `TRUE`, calls [use_rstudio()] to make the new package or #' project into an [RStudio #' Project](https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects). #' If `FALSE` and a non-package project, a sentinel `.here` file is placed so #' that the directory can be recognized as a project by the #' [here](https://here.r-lib.org) or #' [rprojroot](https://rprojroot.r-lib.org) packages. #' @param open If `TRUE`, [activates][proj_activate()] the new project: #' #' * If RStudio desktop, the package is opened in a new session. #' * If on RStudio server, the current RStudio project is activated. #' * Otherwise, the working directory and active project is changed. #' #' @return Path to the newly created project or package, invisibly. #' @export create_package <- function(path, fields = NULL, rstudio = rstudioapi::isAvailable(), open = interactive()) { path <- user_path_prep(path) check_path_is_directory(path_dir(path)) name <- path_file(path) check_package_name(name) check_not_nested(path_dir(path), name) create_directory(path) old_project <- proj_set(path, force = TRUE) on.exit(proj_set(old_project), add = TRUE) use_directory("R") use_description(fields) use_namespace() if (rstudio) { use_rstudio() } if (open) { if (proj_activate(path)) { # Working directory/active project changed; so don't undo on exit on.exit() } } invisible(proj_get()) } #' @export #' @rdname create_package create_project <- function(path, rstudio = rstudioapi::isAvailable(), open = interactive()) { path <- user_path_prep(path) name <- path_file(path) check_not_nested(path_dir(path), name) create_directory(path) old_project <- proj_set(path, force = TRUE) on.exit(proj_set(old_project), add = TRUE) use_directory("R") if (rstudio) { use_rstudio() } else { ui_done("Writing a sentinel file {ui_path('.here')}") ui_todo("Build robust paths within your project via {ui_code('here::here()')}") ui_todo("Learn more at ") file_create(proj_path(".here")) } if (open) { if (proj_activate(path)) { # Working directory/active project changed; so don't undo on exit on.exit() } } invisible(proj_get()) } #' Create a project from a GitHub repo #' #' Creates a new local Git repository from a repository on GitHub. It is highly #' recommended that you pre-configure or pass a GitHub personal access token #' (PAT), which is facilitated by [browse_github_token()]. In particular, a PAT #' is required in order for `create_from_github()` to do ["fork and #' clone"](https://help.github.com/articles/fork-a-repo/). It is also required #' by [use_github()], which connects existing local projects to GitHub. #' #' @seealso [use_github()] for GitHub setup advice. [git_protocol()] and #' [git_credentials()] for background on `protocol` and `credentials`. #' [use_course()] for one-time download of all files in a Git repo, without #' any local or remote Git operations. #' #' @section Using SSH Keys on Windows: #' If you are a Windows user who connects to GitHub using SSH, as opposed to #' HTTPS, you may need to explicitly specify the paths to your keys and register #' this credential in the current R session. This helps if git2r, which usethis #' uses for Git operations, does not automatically find your keys or handle your #' passphrase. #' #' In the snippet below, do whatever is necessary to make the paths correct, #' e.g., replace `` with your Windows username. Omit the `passphrase` #' part if you don't have one. Replace `` with the appropriate #' GitHub specification. You get the idea. #' #' ``` #' creds <- git2r::cred_ssh_key( #' publickey = "C:/Users//.ssh/id_rsa.pub", #' privatekey = "C:/Users//.ssh/id_rsa", #' passphrase = character(0) #' ) #' use_git_protocol("ssh") #' use_git_credentials(credentials = creds) #' #' create_from_github( #' repo_spec = "", #' ... #' ) #' ``` #' #' @inheritParams create_package #' @param repo_spec GitHub repo specification in this form: `owner/repo`. The #' `repo` part will be the name of the new local repo. #' @inheritParams use_course #' @param fork If `TRUE`, we create and clone a fork. If `FALSE`, we clone #' `repo_spec` itself. Will be set to `FALSE` if no `auth_token` (a.k.a. PAT) #' is provided or preconfigured. Otherwise, defaults to `FALSE` if you can #' push to `repo_spec` and `TRUE` if you cannot. In the case of a fork, the #' original target repo is added to the local repo as the `upstream` remote, #' using the preferred `protocol`. The `master` branch is set to track #' `upstream/master` and is immediately pulled, which matters in the case of a #' pre-existing, out-of-date fork. #' @param rstudio Initiate an [RStudio #' Project](https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects)? #' Defaults to `TRUE` if in an RStudio session and project has no #' pre-existing `.Rproj` file. Defaults to `FALSE` otherwise. #' @inheritParams use_github #' #' @export #' @examples #' \dontrun{ #' create_from_github("r-lib/usethis") #' } create_from_github <- function(repo_spec, destdir = NULL, fork = NA, rstudio = NULL, open = interactive(), protocol = git_protocol(), credentials = NULL, auth_token = github_token(), host = NULL) { destdir <- user_path_prep(destdir %||% conspicuous_place()) check_path_is_directory(destdir) owner <- spec_owner(repo_spec) repo <- spec_repo(repo_spec) check_not_nested(destdir, repo) repo_path <- path(destdir, repo) create_directory(repo_path) check_directory_is_empty(repo_path) auth_token <- check_github_token(auth_token, allow_empty = TRUE) gh <- function(endpoint, ...) { gh::gh( endpoint, ..., .token = auth_token, .api_url = host ) } repo_info <- gh("GET /repos/:owner/:repo", owner = owner, repo = repo) fork <- rationalize_fork(fork, repo_info, auth_token) if (fork) { ## https://developer.github.com/v3/repos/forks/#create-a-fork ui_done("Forking {ui_value(repo_info$full_name)}") upstream_url <- switch( protocol, https = repo_info$clone_url, ssh = repo_info$ssh_url ) repo_info <- gh( "POST /repos/:owner/:repo/forks", owner = owner, repo = repo ) } origin_url <- switch( protocol, https = repo_info$clone_url, ssh = repo_info$ssh_url ) ui_done("Cloning repo from {ui_value(origin_url)} into {ui_value(repo_path)}") credentials <- credentials %||% git_credentials(protocol, auth_token) git2r::clone( origin_url, repo_path, credentials = credentials, progress = FALSE ) old_project <- proj_set(repo_path, force = TRUE) on.exit(proj_set(old_project), add = TRUE) if (fork) { r <- git2r::repository(proj_get()) ui_done("Adding {ui_value('upstream')} remote: {ui_value(upstream_url)}") git2r::remote_add(r, "upstream", upstream_url) pr_pull_upstream() ui_done( " Setting remote tracking branch for local {ui_value('master')} branch to \\ {ui_value('upstream/master')} " ) git2r::branch_set_upstream(git2r::repository_head(r), "upstream/master") config_key <- glue("remote.upstream.created-by") git_config_set(config_key, "usethis::create_from_github") } rstudio <- rstudio %||% rstudioapi::isAvailable() rstudio <- rstudio && !is_rstudio_project(proj_get()) if (rstudio) { use_rstudio() } if (open) { if (proj_activate(repo_path)) { # Working directory/active project changed; so don't undo on exit on.exit() } } invisible(proj_get()) } check_not_nested <- function(path, name) { if (!possibly_in_proj(path)) { return(invisible()) } ## special case: allow nested project if ## 1) is_testing() ## 2) proposed project name matches magic string we build into test projects ## https://github.com/r-lib/usethis/pull/241 if (is_testing() && grepl("aaa", name)) { return() } ui_line( "New project {ui_value(name)} is nested inside an existing project \\ {ui_path(path)}, which is rarely a good idea." ) if (ui_nope("Do you want to create anyway?")) { ui_stop("Aborting project creation.") } invisible() } rationalize_fork <- function(fork, repo_info, auth_token) { have_token <- have_github_token(auth_token) can_push <- isTRUE(repo_info$permissions$push) repo_owner <- repo_info$owner$login user <- if (have_token) github_user(auth_token)[["login"]] if (is.na(fork)) { fork <- have_token && !can_push } if (fork && !have_token) { ## throw the usual error for bad/missing token check_github_token(auth_token) } if (fork && identical(user, repo_owner)) { ui_stop( "Repo {ui_value(repo_info$full_name)} is owned by user \\ {ui_value(user)}. Can't fork." ) } fork } usethis/R/github.R0000644000176200001440000002543213507211611013547 0ustar liggesusers#' Connect a local repo with GitHub #' #' `use_github()` takes a local project, creates an associated repo on GitHub, #' adds it to your local repo as the `origin` remote, and makes an initial push #' to synchronize. `use_github()` requires that your project already be a Git #' repository, which you can accomplish with [use_git()], if needed. See the #' Authentication section below for other necessary setup. #' #' @section Authentication: #' A new GitHub repo will be created via the GitHub API, therefore you must #' make a [GitHub personal access token #' (PAT)](https://github.com/settings/tokens) available. You can either #' provide this directly via the `auth_token` argument or store it for retrieval #' with [github_token()]. #' #' @inheritParams use_git #' @param organisation If supplied, the repo will be created under this #' organisation, instead of the account of the user associated with the #' `auth_token`. You must have permission to create repositories. #' @param private If `TRUE`, creates a private repository. #' @inheritParams git_protocol #' @inheritParams git_credentials #' @param host GitHub API host to use. Override with the endpoint-root for your #' GitHub enterprise instance, for example, #' "https://github.hostname.com/api/v3". #' #' @export #' @examples #' \dontrun{ #' pkgpath <- file.path(tempdir(), "testpkg") #' create_package(pkgpath) # creates package below temp directory #' proj_set(pkgpath) #' #' ## now, working inside "testpkg", initialize git repository #' use_git() #' #' ## create github repository and configure as git remote #' use_github() #' } use_github <- function(organisation = NULL, private = FALSE, protocol = git_protocol(), credentials = NULL, auth_token = github_token(), host = NULL) { check_uses_git() check_branch("master") check_uncommitted_changes() check_no_origin() check_github_token(auth_token) credentials <- credentials %||% git_credentials(protocol, auth_token) r <- git_repo() owner <- organisation %||% github_user(auth_token)[["login"]] repo_name <- project_name() check_no_github_repo(owner, repo_name, host, auth_token) repo_desc <- project_data()$Title %||% "" repo_desc <- gsub("\n", " ", repo_desc) if (interactive()) { ui_todo("Check title and description") ui_code_block( " Name: {repo_name} Description: {repo_desc} ", copy = FALSE ) if (ui_nope("Are title and description ok?")) { return(invisible()) } } else { ui_todo("Setting title and description") ui_code_block( " Name: {repo_name} Description: {repo_desc} ", copy = FALSE ) } ui_done("Creating GitHub repository") if (is.null(organisation)) { create <- gh::gh( "POST /user/repos", name = repo_name, description = repo_desc, private = private, .api_url = host, .token = auth_token ) } else { create <- gh::gh( "POST /orgs/:org/repos", org = organisation, name = repo_name, description = repo_desc, private = private, .api_url = host, .token = auth_token ) } origin_url <- switch( protocol, https = create$clone_url, ssh = create$ssh_url ) ui_done("Setting remote {ui_value('origin')} to {ui_value(origin_url)}") git2r::remote_add(r, "origin", origin_url) if (is_package()) { ui_done("Adding GitHub links to DESCRIPTION") use_github_links(auth_token = auth_token, host = host) if (git_uncommitted()) { git2r::add(r, "DESCRIPTION") git2r::commit(r, "Add GitHub links to DESCRIPTION") } } ui_done("Pushing {ui_value('master')} branch to GitHub and setting remote tracking branch") pushed <- tryCatch({ git2r::push(r, "origin", "refs/heads/master", credentials = credentials) TRUE }, error = function(e) FALSE) if (pushed) { git2r::branch_set_upstream(git2r::repository_head(r), "origin/master") } else { ui_todo(c( "Failed to push and set tracking branch.", "This often indicates a problem with git2r and the credentials.", "Try this in the shell, to complete the set up:", "{ui_code('git push --set-upstream origin master')}" )) } view_url(create$html_url) invisible(NULL) } #' Use GitHub links in URL and BugReports #' #' Populates the `URL` and `BugReports` fields of a GitHub-using R package with #' appropriate links. #' #' @inheritParams use_github #' @export #' @param overwrite By default, `use_github_links()` will not overwrite existing #' fields. Set to `TRUE` to overwrite existing links. #' @examples #' \dontrun{ #' use_github_links() #' } #' use_github_links <- function(auth_token = github_token(), host = "https://api.github.com", overwrite = FALSE) { check_uses_github() res <- gh::gh( "GET /repos/:owner/:repo", owner = github_owner(), repo = github_repo(), .api_url = host, .token = check_github_token(auth_token, allow_empty = TRUE) ) use_description_field("URL", res$html_url, overwrite = overwrite) use_description_field( "BugReports", paste0(res$html_url, "/issues"), overwrite = overwrite ) invisible() } #' Create and retrieve a GitHub personal access token #' #' A [personal access #' token](https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line) #' (PAT) is needed for git operations via the GitHub API. Two helper functions #' are provided: #' * `browse_github_token()` is synonymous with `browse_github_pat()`: Both #' open a browser window to the GitHub form to generate a PAT. See below for #' advice on how to store this. #' * `github_token()` retrieves a stored PAT by consulting, in this order: #' - `GITHUB_PAT` environment variable #' - `GITHUB_TOKEN` environment variable #' - the empty string `""` #' #' @section: Get and store a PAT: #' Sign up for a free [GitHub.com](https://github.com/) account and sign in. #' Call `browse_github_token()`. Verify the scopes and click "Generate token". #' Copy the token right away! A common approach is to store in `.Renviron` as #' the `GITHUB_PAT` environment variable. [edit_r_environ()] opens this file for #' editing. #' #' @param scopes Character vector of token scopes, pre-selected in the web #' form. Final choices are made in the GitHub form. Read more about GitHub #' API scopes at #' . #' @param description Short description or nickname for the token. It helps you #' distinguish various tokens on GitHub. #' @inheritParams use_github #' #' @seealso [gh::gh_whoami()] for information on an existing token. #' #' @return `github_token()` returns a string, a GitHub PAT or `""`. #' @export #' @examples #' \dontrun{ #' browse_github_token() #' ## COPY THE PAT!!! #' ## almost certainly to be followed by ... #' edit_r_environ() #' ## which helps you store the PAT as an env var #' } browse_github_token <- function(scopes = c("repo", "gist"), description = "R:GITHUB_PAT", host = "https://github.com") { scopes <- glue_collapse(scopes, ",") url <- glue( "{host}/settings/tokens/new?scopes={scopes}&description={description}" ) view_url(url) ui_todo( "Call {ui_code('usethis::edit_r_environ()')} to open {ui_path('.Renviron')}." ) ui_todo("Store your PAT with a line like:") ui_code_block("GITHUB_PAT=xxxyyyzzz") ui_todo("Make sure {ui_value('.Renviron')} ends with a newline!") invisible() } #' @rdname browse_github_token #' @export browse_github_pat <- browse_github_token #' @rdname browse_github_token #' @export #' @examples #' # for safety's sake, just reveal first 4 characters #' substr(github_token(), 1, 4) github_token <- function() { token <- Sys.getenv("GITHUB_PAT", "") if (token == "") Sys.getenv("GITHUB_TOKEN", "") else token } ## checks for existence of 'origin' remote with 'github' in URL uses_github <- function() { if (!uses_git()) { return(FALSE) } length(github_origin()) > 0 } check_no_origin <- function() { origin <- git_remote_find(rname = "origin") if (is.null(origin)) { return(invisible()) } ui_stop(c( "This repo already has an {ui_value('origin')} remote, with value {ui_value(origin)}.", "How to remove this setting in the shell:", "{ui_code('git remote rm origin')}" )) } check_uses_github <- function() { if (uses_github()) { return(invisible()) } ui_stop(c( "This project does not have a GitHub remote configured as {ui_value('origin')}.", "Do you need to run {ui_code('use_github()')}?" )) } github_repo_exists <- function(owner, repo, host, auth_token) { tryCatch( error = function(err) FALSE, { gh::gh( "/repos/:owner/:repo", owner = owner, repo = repo, .api_url = host, .token = auth_token ) TRUE } ) } check_no_github_repo <- function(owner, repo, host, auth_token) { if (!github_repo_exists(owner, repo, host, auth_token)) { return(invisible()) } spec <- paste(owner, repo, sep = "/") where <- if (is.null(host)) "github.com" else host ui_stop("Repo {ui_value(spec)} already exists on {ui_value(where)}.") } # github token helpers ---------------------------------------------------- ## minimal check: token is not the value that means "we have no PAT", ## which is currently the empty string "", for compatibility with gh have_github_token <- function(auth_token = github_token()) { !isTRUE(auth_token == "") } # TODO(@jennybc): this should be used / usable by git_sitrep(), which # currently uses one-off code for checking the token check_github_token <- function(auth_token = github_token(), allow_empty = FALSE) { if (allow_empty && !have_github_token(auth_token)) { return(invisible(auth_token)) } local_stop <- function(msg) { ui_stop(c( msg, "See {ui_code('browse_github_token()')} for help storing a token as an environment variable." )) } if (!is_string(auth_token) || is.na(auth_token)) { local_stop("GitHub {ui_code('auth_token')} must be a single string.") } if (!have_github_token(auth_token)) { local_stop("No GitHub {ui_code('auth_token')} is available.") } user <- github_user(auth_token) if (is.null(user)) { local_stop("GitHub {ui_code('auth_token')} is invalid.") } invisible(auth_token) } ## AFAICT there is no targetted way to check validity of a PAT ## GET /user seems to be the simplest API call to verify a PAT ## that's what gh::gh_whoami() does ## https://developer.github.com/v3/auth/#via-oauth-tokens github_user <- function(auth_token = github_token()) { suppressMessages( tryCatch(gh::gh_whoami(auth_token), error = function(e) NULL) ) } usethis/R/pipe.R0000644000176200001440000000267513507207664013243 0ustar liggesusers#' Use magrittr's pipe in your package #' #' Does setup necessary to use magrittr's pipe operator, `%>%` in your package. #' This function requires the use roxygen. #' * Adds magrittr to "Imports" in `DESCRIPTION`. #' * Imports the pipe operator specifically, which is necessary for internal #' use. #' * Exports the pipe operator, if `export = TRUE`, which is necessary to make #' `%>%` available to the users of your package. #' #' @param export If `TRUE`, the file `R/utils-pipe.R` is added, which provides #' the roxygen template to import and re-export `%>%`. If `FALSE`, the necessary #' roxygen directive is added, if possible, or otherwise instructions are given. #' #' @export #' #' @examples #' \dontrun{ #' use_pipe() #' } use_pipe <- function(export = TRUE) { check_is_package("use_pipe()") check_uses_roxygen("use_pipe()") use_dependency("magrittr", "Imports") if (export) { use_template("pipe.R", "R/utils-pipe.R") && roxygen_update() return(invisible(TRUE)) } if (has_package_doc()) { roxygen_ns_append("@importFrom magrittr %>%") && roxygen_update() return(invisible(TRUE)) } ui_todo( "Copy and paste this line into some roxygen header, then run \\ {ui_code('devtools::document()')}:" ) ui_code_block("#' @importFrom magrittr %>%", copy = FALSE) ui_todo( "Alternative recommendation: call {ui_code('use_package_doc()')}, then \\ call {ui_code('use_pipe()')} again." ) invisible(FALSE) } usethis/R/revdep.R0000644000176200001440000000156413453664176013574 0ustar liggesusers#' Reverse dependency checks #' #' Performs set up for checking the reverse dependencies of an R package, as #' implemented by the revdepcheck package: #' * Adds `revdep` directory and adds it to `.Rbuildignore` #' * Populates `revdep/.gitignore` to prevent tracking of various revdep #' artefacts #' * Creates `revdep/email.yml` for use with `revdepcheck::revdep_email()` #' * Prompts user to run the checks with `revdepcheck::revdep_check()` #' #' @export use_revdep <- function() { check_is_package("use_revdep()") use_directory("revdep", ignore = TRUE) use_git_ignore( directory = "revdep", c("checks", "library", "checks.noindex", "library.noindex", "data.sqlite", "*.html") ) new <- use_template( "revdep-email.yml", "revdep/email.yml" ) ui_todo("Run checks with {ui_code('revdepcheck::revdep_check(num_workers = 4)')}") invisible(new) } usethis/R/logo.R0000644000176200001440000000402213453664176013237 0ustar liggesusers#' Use a package logo #' #' This function helps you use a logo in your package: #' * Enforces a specific size #' * Stores logo image file at `man/figures/logo.png` #' * Produces the markdown text you need in README to include the logo #' #' @param img The path to an existing image file #' @param geometry a [magick::geometry] string specifying size. The default #' assumes that you have a hex logo using spec from #' . #' @param retina `TRUE`, the default, scales the image on the README, #' assuming that geometry is double the desired size. #' #' @examples #' \dontrun{ #' use_logo("usethis.png") #' } #' @export use_logo <- function(img, geometry = "240x278", retina = TRUE) { check_is_package("use_logo()") logo_path <- proj_path("man", "figures", "logo", ext = path_ext(img)) create_directory(path_dir(logo_path)) if (!can_overwrite(logo_path)) { return(invisible(FALSE)) } if (path_ext(img) == "svg") { logo_path <- path("man", "figures", "logo.svg") file_copy(img, proj_path(logo_path)) ui_done("Copied {ui_path(img)} to {ui_path(logo_path)}") height <- as.integer(sub(".*x", "", geometry)) } else { check_installed("magick") img_data <- magick::image_read(img) img_data <- magick::image_resize(img_data, geometry) magick::image_write(img_data, logo_path) ui_done("Resized {ui_path(img)} to {geometry}") height <- magick::image_info(magick::image_read(logo_path))$height } pkg <- project_name() if (retina) { height <- height / 2 } ui_todo("Add logo to your README with the following html:") pd_link <- pkgdown_link() if (is.null(pd_link)) { ui_code_block("# {pkg} ") } else { ui_code_block("# {pkg} ") } } has_logo <- function() { file_exists(proj_path("man", "figures", "logo.png")) || file_exists(proj_path("man", "figures", "logo.svg")) } usethis/R/block.R0000644000176200001440000000441413506476067013375 0ustar liggesusersblock_append <- function(desc, value, path, block_start, block_end, block_prefix = NULL, block_suffix = NULL) { if (!is.null(path) && file_exists(path)) { lines <- readLines(path) if (value %in% lines) { return(FALSE) } block_lines <- block_find(lines, block_start, block_end) } else { block_lines <- NULL } if (is.null(block_lines)) { ui_todo("Copy and paste the following lines into {ui_value(path)}:") ui_code_block(c(block_prefix, block_start, value, block_end, block_suffix)) return(FALSE) } ui_done("Adding {desc} to {ui_path(path)}") start <- block_lines[[1]] end <- block_lines[[2]] block <- lines[seq2(start, end)] lines <- c( lines[seq2(1, start - 1L)], block, value, lines[seq2(end + 1L, length(lines))] ) write_utf8(path, lines) TRUE } block_replace <- function(desc, value, path, block_start, block_end) { if (!is.null(path) && file_exists(path)) { lines <- readLines(path) block_lines <- block_find(lines, block_start, block_end) } else { block_lines <- NULL } if (is.null(block_lines)) { ui_todo("Copy and paste the following lines into {ui_value(path)}:") ui_code_block(c(block_start, value, block_end)) return(invisible(FALSE)) } start <- block_lines[[1]] end <- block_lines[[2]] block <- lines[seq2(start, end)] if (identical(value, block)) { return(invisible(FALSE)) } ui_done("Replacing {desc} in {ui_path(path)}") lines <- c( lines[seq2(1, start - 1L)], value, lines[seq2(end + 1L, length(lines))] ) write_utf8(path, lines) } block_show <- function(path, block_start, block_end) { lines <- readLines(path) block <- block_find(lines, block_start, block_end) lines[seq2(block[[1]], block[[2]])] } block_find <- function(lines, block_start, block_end) { # No file if (is.null(lines)) { return(NULL) } start <- which(lines == block_start) end <- which(lines == block_end) # No block if (length(start) == 0 && length(end) == 0) { return(NULL) } if (!(length(start) == 1 && length(end) == 1 && start < end)) { ui_stop( "Invalid block specification. Must start with {ui_code(block_start)} and end with {ui_code(block_end)}" ) } c(start + 1L, end - 1L) } usethis/R/namespace.R0000644000176200001440000000052513507307246014227 0ustar liggesusers#' Use a basic `NAMESPACE` #' #' This `NAMESPACE` exports everything, except functions that start #' with a `.`. #' #' @seealso The [namespace chapter](https://r-pkgs.org/namespace.html) of #' [R Packages](https://r-pkgs.org). #' #' @export use_namespace <- function() { check_is_package("use_namespace()") use_template("NAMESPACE") } usethis/R/tidyverse.R0000644000176200001440000003136313507306005014305 0ustar liggesusers#' Helpers for tidyverse development #' #' These helpers follow tidyverse conventions which are generally a little #' stricter than the defaults, reflecting the need for greater rigor in #' commonly used packages. #' #' @details #' #' * `create_tidy_package()`: creates a new package, immediately applies as many #' of the tidyverse conventions as possible, issues a few reminders, and #' activates the new package. #' #' * `use_tidy_ci()`: sets up [Travis CI](https://travis-ci.org) and #' [Codecov](https://codecov.io), ensuring that the package is actively tested #' on the versions of R officially supported by the Tidyverse (current release, #' devel, and four previous versions). It also ignores `compat-` and `deprec-` #' files from code coverage. #' #' * `use_tidy_description()`: puts fields in standard order and alphabetises #' dependencies. #' #' * `use_tidy_eval()`: imports a standard set of helpers to facilitate #' programming with the tidy eval toolkit. #' #' * `use_tidy_style()`: styles source code according to the [tidyverse style #' guide](https://style.tidyverse.org). This function will overwrite files! See #' below for usage advice. #' #' * `use_tidy_versions()`: pins all dependencies to require at least #' the currently installed version. #' #' * `use_tidy_contributing()`: adds standard tidyverse contributing guidelines. #' #' * `use_tidy_issue_template()`: adds a standard tidyverse issue template. #' #' * `use_tidy_release_test_env()`: updates the test environment section in #' `cran-comments.md`. #' #' * `use_tidy_support()`: adds a standard description of support resources for #' the tidyverse. #' #' * `use_tidy_coc()`: equivalent to `use_code_of_conduct()`, but puts the #' document in a `.github/` subdirectory. #' #' * `use_tidy_github()`: convenience wrapper that calls #' `use_tidy_contributing()`, `use_tidy_issue_template()`, `use_tidy_support()`, #' `use_tidy_coc()`. #' #' @section `use_tidy_style()`: #' Uses the [styler package](https://styler.r-lib.org) package to style all code #' in a package, project, or directory, according to the [tidyverse style #' guide](https://style.tidyverse.org). #' #' **Warning:** This function will overwrite files! It is strongly suggested to #' only style files that are under version control or to first create a backup #' copy. #' #' Invisibly returns a data frame with one row per file, that indicates whether #' styling caused a change. #' #' @param strict Boolean indicating whether or not a strict version of styling #' should be applied. See [styler::tidyverse_style()] for details. #' #' @name tidyverse NULL #' @export #' @rdname tidyverse #' @inheritParams create_package #' @inheritParams licenses create_tidy_package <- function(path, name = "RStudio") { path <- create_package(path, rstudio = TRUE, open = FALSE) old_project <- proj_set(path) on.exit(proj_set(old_project), add = TRUE) use_roxygen_md() use_testthat() use_gpl3_license(name) use_tidy_description() use_readme_rmd(open = FALSE) use_lifecycle_badge("experimental") use_cran_badge() use_cran_comments(open = FALSE) use_tidy_github() ui_todo("In the new package, remember to do:") ui_todo("{ui_code('use_git()')}") ui_todo("{ui_code('use_github()')}") ui_todo("{ui_code('use_tidy_ci()')}") ui_todo("{ui_code('use_pkgdown()')}") ui_todo("{ui_code('use_pkgdown_travis()')}") proj_activate(path) } #' @export #' @rdname tidyverse #' @inheritParams use_travis use_tidy_ci <- function(browse = interactive()) { check_uses_github() new_travis <- use_template( "tidy-travis.yml", ".travis.yml", ignore = TRUE ) use_template("codecov.yml", ignore = TRUE) use_dependency("R", "Depends", min_version = "3.2") use_dependency("covr", "Suggests") use_covr_ignore(c("R/deprec-*.R", "R/compat-*.R")) use_travis_badge() use_codecov_badge() use_tidy_release_test_env() if (new_travis) { travis_activate(browse) } invisible(TRUE) } #' @export #' @rdname tidyverse use_tidy_description <- function() { desc <- desc::description$new(file = proj_get()) tidy_desc(desc) desc$write() invisible(TRUE) } #' @export #' @rdname tidyverse #' @param overwrite By default (`FALSE`), only dependencies without version #' specifications will be modified. Set to `TRUE` to modify all dependencies. #' @param source Use "local" or "CRAN" package versions. use_tidy_versions <- function(overwrite = FALSE, source = c("local", "CRAN")) { deps <- desc::desc_get_deps(proj_get()) deps <- update_versions(deps, overwrite = overwrite, source = source) desc::desc_set_deps(deps, file = proj_get()) invisible(TRUE) } update_versions <- function(deps, overwrite = FALSE, source = c("local", "CRAN")) { baserec <- base_and_recommended() to_change <- !deps$package %in% c("R", baserec) if (!overwrite) { to_change <- to_change & deps$version == "*" } packages <- deps$package[to_change] versions <- switch(match.arg(source), local = purrr::map_chr(packages, package_version), CRAN = utils::available.packages()[packages, "Version"] ) deps$version[to_change] <- paste0(">= ", versions) deps } package_version <- function(x) { as.character(utils::packageVersion(x)) } #' @export #' @rdname tidyverse use_tidy_eval <- function() { check_is_package("use_tidy_eval()") use_dependency("roxygen2", "Suggests") use_dependency("rlang", "Imports", min_version = "0.1.2") new <- use_template("tidy-eval.R", "R/utils-tidy-eval.R") ui_todo("Run {ui_code('devtools::document()')}") return(invisible(new)) } #' @export #' @rdname tidyverse use_tidy_contributing <- function() { use_directory(".github", ignore = TRUE) use_template( "tidy-contributing.md", ".github/CONTRIBUTING.md", data = list(package = project_name()) ) } #' @export #' @rdname tidyverse use_tidy_issue_template <- function() { use_directory(".github", ignore = TRUE) use_template( "tidy-issue.md", ".github/ISSUE_TEMPLATE.md" ) } #' @export #' @rdname tidyverse use_tidy_support <- function() { use_directory(".github", ignore = TRUE) use_template( "tidy-support.md", ".github/SUPPORT.md", data = list(package = project_name()) ) } #' @export #' @rdname tidyverse use_tidy_coc <- function() { use_code_of_conduct(path = ".github") } #' @export #' @rdname tidyverse use_tidy_github <- function() { use_tidy_contributing() use_tidy_issue_template() use_tidy_support() use_tidy_coc() } #' @export #' @rdname tidyverse use_tidy_style <- function(strict = TRUE) { check_installed("styler") check_uncommitted_changes() if (is_package()) { styled <- styler::style_pkg( proj_get(), style = styler::tidyverse_style, strict = strict ) } else { styled <- styler::style_dir( proj_get(), style = styler::tidyverse_style, strict = strict ) } cat_line() ui_done("Styled project according to the tidyverse style guide") invisible(styled) } #' @export #' @rdname tidyverse use_tidy_release_test_env <- function() { block_replace( "release environment", tidy_release_test_env(), path = proj_path("cran-comments.md"), block_start = "## Test environments", block_end = "## R CMD check results" ) } tidy_release_test_env <- function() { use_bullet <- function(name, versions) { versions <- paste(versions, collapse = ", ") glue("* {name}: {versions}") } c( "", use_bullet("local", paste0(R.version$os, "-", R.version$major, ".", R.version$minor)), use_bullet("travis", c("3.1", "3.2", "3.3", "oldrel", "release", "devel")), use_bullet("r-hub", c("windows-x86_64-devel", "ubuntu-gcc-release", "fedora-clang-devel")), use_bullet("win-builder", "windows-x86_64-devel"), "" ) } #' Identify contributors via GitHub activity #' #' Derives a list of GitHub usernames, based on who has opened issues or pull #' requests. Used to populate the acknowledgment section of package release blog #' posts at . All arguments can potentially #' be determined from the active project, if the project follows standard #' practices around the GitHub remote and GitHub releases. Unexported helper #' functions, `releases()` and `ref_df()` can be useful interactively to get a #' quick look at release tag names and a data frame about refs (defaulting to #' releases), respectively. #' #' @param repo_spec GitHub repo specification in this form: `owner/repo`. #' Default is to infer from Git remotes of active project. #' @param from,to GitHub ref (i.e., a SHA, tag, or release) or a timestamp in #' ISO 8601 format, specifying the start or end of the interval of interest. #' Examples: "08a560d", "v1.3.0", "2018-02-24T00:13:45Z", "2018-05-01". `NULL` #' means there is no bound on that end of the interval. #' #' @return A character vector of GitHub usernames, invisibly. #' @export #' #' @examples #' \dontrun{ #' ## active project, interval = since the last release #' use_tidy_thanks() #' #' ## active project, interval = since a specific datetime #' use_tidy_thanks(from = "2018-02-24T00:13:45Z") #' #' ## r-lib/usethis, inteval = since a certain date #' use_tidy_thanks("r-lib/usethis", from = "2018-05-01") #' #' ## r-lib/usethis, up to a specific release #' use_tidy_thanks("r-lib/usethis", from = NULL, to = "v1.3.0") #' #' ## r-lib/usethis, since a specific commit, up to a specific date #' use_tidy_thanks("r-lib/usethis", from = "08a560d", to = "2018-05-14") #' } use_tidy_thanks <- function(repo_spec = github_repo_spec(), from = releases(repo_spec)[[1]], to = NULL) { from_timestamp <- as_timestamp(from, repo_spec) %||% "2008-01-01" to_timestamp <- as_timestamp(to, repo_spec) ui_done("Looking for contributors from {as.Date(from_timestamp)} to {to_timestamp %||% 'now'}") res <- gh::gh( "/repos/:owner/:repo/issues", owner = spec_owner(repo_spec), repo = spec_repo(repo_spec), since = from_timestamp, state = "all", filter = "all", .limit = Inf ) if (identical(res[[1]], "")) { ui_line("No matching issues/PRs found.") return(invisible()) } creation_time <- function(x) { as.POSIXct(pluck_chr(x, "created_at")) } res <- res[creation_time(res) >= as.POSIXct(from_timestamp)] if (!is.null(to_timestamp)) { res <- res[creation_time(res) <= as.POSIXct(to_timestamp)] } if (length(res) == 0) { ui_line("No matching issues/PRs found.") return(invisible()) } contributors <- sort(unique(pluck_chr(res, c("user", "login")))) contrib_link <- glue("[@{contributors}](https://github.com/{contributors})") ui_done("Found {length(contributors)} contributors:") ui_code_block(glue_collapse(contrib_link, sep = ", ", last = ", and ")) invisible(contributors) } ## if x appears to be a timestamp, pass it through ## otherwise, assume it's a ref and look up its timestamp as_timestamp <- function(x = NULL, repo_spec = github_repo_spec()) { if (is.null(x)) return(NULL) as_POSIXct <- try(as.POSIXct(x), silent = TRUE) if (inherits(as_POSIXct, "POSIXct")) return(x) ui_line("Resolving timestamp for ref ", ui_value(x)) ref_df(x, repo_spec)$timestamp } ## returns a data frame on GitHub refs, defaulting to all releases ref_df <- function(refs = NULL, repo_spec = github_repo_spec()) { refs <- refs %||% releases(repo_spec) if (is.null(refs)) return(NULL) get_thing <- function(thing) { gh::gh( "/repos/:owner/:repo/commits/:thing", owner = spec_owner(repo_spec), repo = spec_repo(repo_spec), thing = thing ) } res <- lapply(refs, get_thing) data.frame( ref = refs, sha = substr(pluck_chr(res, "sha"), 1, 7), timestamp = pluck_chr(res, c("commit", "committer", "date")), stringsAsFactors = FALSE ) } ## returns character vector of release tag names releases <- function(repo_spec = github_repo_spec()) { res <- gh::gh( "/repos/:owner/:repo/releases", owner = spec_owner(repo_spec), repo = spec_repo(repo_spec) ) if (identical(res[[1]], "")) return(NULL) pluck_chr(res, "tag_name") } ## approaches based on available.packages() and/or installed.packages() present ## several edge cases, requirements, and gotchas ## for this application, hard-wiring seems to be "good enough" base_and_recommended <- function() { # base_pkgs <- as.vector(installed.packages(priority = "base")[, "Package"]) # av <- available.packages() # keep <- av[ , "Priority", drop = TRUE] %in% "recommended" # rec_pkgs <- unname(av[keep, "Package", drop = TRUE]) # dput(sort(unique(c(base_pkgs, rec_pkgs)))) c( "base", "boot", "class", "cluster", "codetools", "compiler", "datasets", "foreign", "graphics", "grDevices", "grid", "KernSmooth", "lattice", "MASS", "Matrix", "methods", "mgcv", "nlme", "nnet", "parallel", "rpart", "spatial", "splines", "stats", "stats4", "survival", "tcltk", "tools", "utils" ) } usethis/R/cran.R0000644000176200001440000000132513453664176013225 0ustar liggesusers#' CRAN submission comments #' #' Creates `cran-comments.md`, a template for your communications with CRAN when #' submitting a package. The goal is to clearly communicate the steps you have #' taken to check your package on a wide range of operating systems. If you are #' submitting an update to a package that is used by other packages, you also #' need to summarize the results of your [reverse dependency #' checks][use_revdep]. #' #' @export #' @inheritParams use_template use_cran_comments <- function(open = interactive()) { check_is_package("use_cran_comments()") use_template( "cran-comments.md", data = list(rversion = glue("{version$major}.{version$minor}")), ignore = TRUE, open = open ) } usethis/R/data.R0000644000176200001440000000734513507307140013204 0ustar liggesusers#' Create package data #' #' `use_data()` makes it easy to save package data in the correct format. #' I recommend you save scripts that generate package data in `data-raw`: #' use `use_data_raw()` to set it up. #' #' @param ... Unquoted names of existing objects to save. #' @param internal If `FALSE`, saves each object in its own `.rda` #' file in the `data/` directory. These data files bypass the usual #' export mechanism and are available whenever the package is loaded #' (or via [data()] if `LazyData` is not true). #' #' If `TRUE`, stores all objects in a single `R/sysdata.rda` file. #' Objects in this file follow the usual export rules. Note that this means #' they will be exported if you are using the common `exportPattern()` #' rule which exports all objects except for those that start with `.`. #' @param overwrite By default, `use_data()` will not overwrite existing #' files. If you really want to do so, set this to `TRUE`. #' @param compress Choose the type of compression used by [save()]. #' Should be one of "gzip", "bzip2", or "xz". #' @param version The serialization format version to use. The default, 2, was #' the default format from R 1.4.0 to 3.5.3. Version 3 became the default from #' R 3.6.0 and can only be read by R versions 3.5.0 and higher. #' #' @seealso The [data chapter](https://r-pkgs.org/data.html) of [R #' Packages](https://r-pkgs.org). #' @export #' @examples #' \dontrun{ #' x <- 1:10 #' y <- 1:100 #' #' use_data(x, y) # For external use #' use_data(x, y, internal = TRUE) # For internal use #' } use_data <- function(..., internal = FALSE, overwrite = FALSE, compress = "bzip2", version = 2) { check_is_package("use_data()") objs <- get_objs_from_dots(dots(...)) if (internal) { use_directory("R") paths <- path("R", "sysdata.rda") objs <- list(objs) } else { use_directory("data") paths <- path("data", objs, ext = "rda") } check_files_absent(proj_path(paths), overwrite = overwrite) ui_done("Saving {ui_value(unlist(objs))} to {ui_value(paths)}") envir <- parent.frame() mapply( save, list = objs, file = proj_path(paths), MoreArgs = list(envir = envir, compress = compress, version = version) ) invisible() } get_objs_from_dots <- function(.dots) { if (length(.dots) == 0L) { ui_stop("Nothing to save.") } is_name <- vapply(.dots, is.symbol, logical(1)) if (any(!is_name)) { ui_stop("Can only save existing named objects.") } objs <- vapply(.dots, as.character, character(1)) duplicated_objs <- which(stats::setNames(duplicated(objs), objs)) if (length(duplicated_objs) > 0L) { objs <- unique(objs) ui_warn("Saving duplicates only once: {ui_value(names(duplicated_objs))}") } objs } check_files_absent <- function(paths, overwrite) { if (overwrite) { return() } ok <- !file_exists(paths) if (all(ok)) { return() } ui_stop( " {ui_path(paths[!ok])} already exist., Use {ui_code('overwrite = TRUE')} to overwrite. " ) } #' @param name Name of the dataset to be prepared for inclusion in the package. #' @inheritParams use_template #' @rdname use_data #' @export #' @examples #' \dontrun{ #' use_data_raw("daisy") #' } use_data_raw <- function(name = "DATASET", open = interactive()) { stopifnot(is_string(name)) r_path <- path("data-raw", asciify(name), ext = "R") use_directory("data-raw", ignore = TRUE) use_template( "packagename-data-prep.R", save_as = r_path, data = list(name = name), ignore = FALSE, open = open ) ui_todo("Finish the data preparation script in {ui_value(r_path)}") ui_todo("Use {ui_code('usethis::use_data()')} to add prepared data to package") } usethis/R/code-of-conduct.R0000644000176200001440000000233613507305042015236 0ustar liggesusers#' Add a code of conduct #' #' Adds a `CODE_OF_CONDUCT.md` file to the active project and lists in #' `.Rbuildignore`, in the case of a package. The goal of a code of conduct is #' to foster an environment of inclusiveness, and to explicitly discourage #' inappropriate behaviour. The template comes from #' , version 1: #' . #' #' @param path Path of the directory to put `CODE_OF_CONDUCT.md` in, relative to #' the active project. Passed along to [use_directory()]. Default is to locate #' at top-level, but `.github/` is also common. #' #' @export use_code_of_conduct <- function(path = NULL) { if (!is.null(path)) { use_directory(path, ignore = is_package()) } save_as <- path_join(c(path, "CODE_OF_CONDUCT.md")) new <- use_template( "CODE_OF_CONDUCT.md", save_as = save_as, ignore = is_package() && is.null(path) ) ui_todo("Don't forget to describe the code of conduct in your README:") ui_code_block(" Please note that the {ui_value(project_name())} project is released with a [Contributor Code of Conduct]({save_as}). By contributing to this project, you agree to abide by its terms." ) invisible(new) } usethis/R/badge.R0000644000176200001440000001047713507305676013351 0ustar liggesusers#' README badges #' #' These helpers produce the markdown text you need in your README to include #' badges that report information, such as the CRAN version or test coverage, #' and link out to relevant external resources. To add badges automatically #' ensure your badge block starts with a line containing only #' `` and ends with a line containing only #' ``. #' #' @details #' #' * `use_badge()`: a general helper used in all badge functions #' * `use_bioc_badge()`: badge indicates [BioConductor build #' status](https://bioconductor.org/developers/) #' * `use_cran_badge()`: badge indicates what version of your package is #' available on CRAN, powered by #' * `use_lifecycle_badge()`: badge declares the developmental stage of a #' package, according to : #' - Experimental #' - Maturing #' - Stable #' - Retired #' - Archived #' - Dormant #' - Questioning #' * `use_binder_badge()`: badge indicates that your repository can be launched #' in an executable environment on #' #' @param badge_name Badge name. Used in error message and alt text #' @param href,src Badge link and image src #' @param stage Stage of the package lifecycle #' #' @seealso The [functions that set up continuous integration #' services][use_travis] also create badges. #' #' @name badges #' @examples #' \dontrun{ #' use_cran_badge() #' use_lifecycle_badge("stable") #' } NULL #' @rdname badges #' @export use_badge <- function(badge_name, href, src) { path <- find_readme() changed <- block_append( glue("{ui_field(badge_name)} badge"), glue("[![{badge_name}]({src})]({href})"), path = path, block_start = badge_start, block_end = badge_end ) if (changed && path_ext(path) == "Rmd") { ui_todo("Re-knit {ui_path(path)}") } invisible(changed) } #' @rdname badges #' @export use_cran_badge <- function() { check_is_package("use_cran_badge()") pkg <- project_name() src <- glue("https://www.r-pkg.org/badges/version/{pkg}") href <- glue("https://CRAN.R-project.org/package={pkg}") use_badge("CRAN status", href, src) invisible(TRUE) } #' @rdname badges #' @export use_bioc_badge <- function() { check_is_package("use_bioc_badge()") pkg <- project_name() src <- glue("http://www.bioconductor.org/shields/build/release/bioc/{pkg}.svg") href <- glue("https://bioconductor.org/checkResults/release/bioc-LATEST/{pkg}") use_badge("BioC status", href, src) invisible(TRUE) } #' @rdname badges #' @export use_lifecycle_badge <- function(stage) { check_is_package("use_lifecycle_badge()") pkg <- project_name() stage <- match.arg(tolower(stage), names(stages)) colour <- stages[[stage]] src <- glue("https://img.shields.io/badge/lifecycle-{stage}-{colour}.svg") href <- glue("https://www.tidyverse.org/lifecycle/#{stage}") use_badge(paste0("Lifecycle: ", stage), href, src) invisible(TRUE) } stages <- c( experimental = "orange", maturing = "blue", stable = "brightgreen", retired = "orange", archived = "red", dormant = "blue", questioning = "blue" ) #' @rdname badges #' @param urlpath An optional `urlpath` component to add to the link, e.g. `"rstudio"` #' to open an RStudio IDE instead of a Jupyter notebook. #' See the [binder documentation](https://mybinder.readthedocs.io/en/latest/howto/user_interface.html) #' for additional examples. #' @export use_binder_badge <- function(urlpath = NULL) { check_uses_github() if (is.null(urlpath)) { urlpath <- "" } else { urlpath <- glue("?urlpath={urlpath}") } url <- glue("https://mybinder.org/v2/gh/{github_repo_spec()}/master{urlpath}") img <- "https://mybinder.org/badge_logo.svg" use_badge("Launch binder", url, img) invisible(TRUE) } has_badge <- function(href) { readme_path <- proj_path("README.md") if (!file_exists(readme_path)) { return(FALSE) } readme <- readLines(readme_path, encoding = "UTF-8") any(grepl(href, readme, fixed = TRUE)) } # Badge data structure ---------------------------------------------------- badge_start <- "" badge_end <- "" find_readme <- function() { Rmd <- proj_path("README.Rmd") if (file_exists(Rmd)) { return(Rmd) } md <- proj_path("README.md") if (file_exists(md)) { return(md) } NULL } usethis/R/rstudio.R0000644000176200001440000001123113507207664013763 0ustar liggesusers#' Add RStudio Project infrastructure #' #' It is likely that you want to use [create_project()] or [create_package()] #' instead of `use_rstudio()`! Both `create_*()` functions can add RStudio #' Project infrastructure to a pre-existing project or package. `use_rstudio()` #' is mostly for internal use or for those creating a usethis-like package for #' their organization. It does the following in the current project, often after #' executing `proj_set(..., force = TRUE)`: #' * Creates an `.Rproj` file #' * Adds RStudio files to `.gitignore` #' * Adds RStudio files to `.Rbuildignore`, if project is a package #' #' @export use_rstudio <- function() { rproj_file <- paste0(project_name(), ".Rproj") new <- use_template("template.Rproj", rproj_file) use_git_ignore(".Rproj.user") if (is_package()) { use_build_ignore(c(rproj_file, ".Rproj.user")) } invisible(new) } #' Don't save/load user workspace between sessions #' #' R can save and reload the user's workspace between sessions via an `.RData` #' file in the current directory. However, long-term reproducibility is enhanced #' when you turn this feature off and clear R's memory at every restart. #' Starting with a blank slate provides timely feedback that encourages the #' development of scripts that are complete and self-contained. More detail can #' be found in the blog post [Project-oriented #' workflow](https://www.tidyverse.org/articles/2017/12/workflow-vs-script/). #' #' Only `use_blank_slate("project")` is automated so far, since RStudio #' currently only supports modification of user-level or global options via the #' user interface. #' #' @inheritParams edit #' #' @export use_blank_slate <- function(scope = c("user", "project")) { scope <- match.arg(scope) if (scope == "user") { # nocov start ui_todo( "To start ALL RStudio sessions with a blank slate, \\ you must set this interactively, for now." ) ui_todo( "In {ui_field('Global Options > General')}, \\ do NOT check {ui_field('Restore .RData into workspace at startup')}." ) ui_todo( "In {ui_field('Global Options > General')}, \\ set {ui_field('Save workspace to .RData on exit')} to {ui_value('Never')}." ) ui_todo( "Call {ui_code('use_blank_slate(\"project\")')} to opt in to the \\ blank slate workflow for a specific project." ) return(invisible()) } # nocov end if (!is_rstudio_project()) { ui_stop("{ui_value(project_name())} is not an RStudio Project.") } rproj_fields <- modify_rproj( rproj_path(), list(RestoreWorkspace = "No", SaveWorkspace = "No") ) write_utf8(rproj_path(), serialize_rproj(rproj_fields)) restart_rstudio("Restart RStudio with a blank slate?") invisible() } # Is base_path an RStudio Project or inside an RStudio Project? is_rstudio_project <- function(base_path = proj_get()) { res <- tryCatch( rprojroot::find_rstudio_root_file(path = base_path), error = function(e) NA ) !is.na(res) } rproj_path <- function(base_path = proj_get()) { rproj_path <- dir_ls(base_path, regexp = "[.]Rproj$") if (length(rproj_path) > 1) { ui_stop("Multiple .Rproj files found.") } if (length(rproj_path) == 1) rproj_path else NA_character_ } # Is base_path open in RStudio? in_rstudio <- function(base_path = proj_get()) { if (!rstudioapi::isAvailable()) { return(FALSE) } if (!rstudioapi::hasFun("getActiveProject")) { return(FALSE) } proj <- rstudioapi::getActiveProject() if (is.null(proj)) { return(FALSE) } path_real(proj) == path_real(base_path) } in_rstudio_server <- function() { if (!rstudioapi::isAvailable()) { return(FALSE) } identical(rstudioapi::versionInfo()$mode, "server") } parse_rproj <- function(file) { lines <- as.list(readLines(file, encoding = "UTF-8")) has_colon <- grepl(":", lines) fields <- lapply(lines[has_colon], function(x) strsplit(x, split = ": ")[[1]]) lines[has_colon] <- vapply(fields, `[[`, "character", 2) names(lines)[has_colon] <- vapply(fields, `[[`, "character", 1) names(lines)[!has_colon] <- "" lines } modify_rproj <- function(file, update) { utils::modifyList(parse_rproj(file), update) } serialize_rproj <- function(fields) { named <- nzchar(names(fields)) as.character(ifelse(named, paste0(names(fields), ": ", fields), fields)) } # Must be last command run restart_rstudio <- function(message = NULL) { if (!in_rstudio(proj_get())) { return(FALSE) } if (!interactive()) { return(FALSE) } if (!is.null(message)) { ui_todo(message) } if (!rstudioapi::hasFun("openProject")) { return(FALSE) } if (ui_nope("Restart now?")) { return(FALSE) } rstudioapi::openProject(proj_get()) } usethis/R/pr.R0000644000176200001440000002676413507207664012734 0ustar liggesusers#' Helpers for GitHub pull requests #' #' The `pr_*` family of functions is designed to make working with GitHub #' PRs as painless as possible for both contributors and package maintainers. #' They are designed to support the git and GitHub best practices described in #' [Happy Git and GitHub for the useR](https://happygitwithr.com). #' #' @section Set up advice: #' These functions make heavy use of git2r and the GitHub API. You'll need a #' GitHub personal access token (PAT); see [browse_github_token()] for help #' with that. If git2r does not seem to be finding your git credentials, read #' [git_credentials()] for troubleshooting advice. The transport protocol #' (SSH vs HTTPS) is determined from the existing remote URL(s) of the repo. #' #' @section For contributors: #' To contribute to a package, first use `create_from_github(owner/repo)` to #' fork the source repository, and then check out a local copy. Next use #' `pr_init()` to create a branch for your PR (__never__ submit a PR from the #' `master` branch). You'll then work locally, making changes to files #' and checking them into git. Once you're ready to submit, run `pr_push()` #' to push your local branch to GitHub, and open a webpage that lets you #' initiate the PR. #' #' If you are lucky, your PR will be perfect, and the maintainer will accept #' it. You can then run `pr_finish()` to close and delete your PR branch. #' In most cases, however, the maintainer will ask you to make some changes. #' Make the changes, then run `pr_push()` to sync back up to GitHub. #' #' It's also possible that the maintainer will contribute some code to your #' PR: you get that code back to your computer, run `pr_pull()`. It's also #' possible that other changes have occurred to the package while you've been #' working on your PR, and you need to "merge master". Do that by running #' `pr_pull_upstream()`: this makes sure that your copy of the package is #' up-to-date with the maintainer's latest changes. Either of the pull #' functions may cause merge conflicts, so be prepared to resolve before #' continuing. #' #' @section For maintainers: #' To download a PR locally so that you can experiment with it, run #' `pr_fetch()`. If you make changes, run `pr_push()` to push #' them back to GitHub. After you have merged the PR, run `pr_finish()` #' to delete the local branch. #' #' @section Other helpful functions: #' * `pr_sync()` is a shortcut for `pr_pull()`, `pr_pull_upstream()`, and #' `pr_push()` #' * `pr_pause()` makes sure you're synced with the PR and then switches #' back to master. #' * `pr_view()` opens the PR in the browser #' @export #' @param branch branch name. Should usually consist of lower case letters, #' numbers, and `-`. pr_init <- function(branch) { stopifnot(is_string(branch)) check_uses_github() check_branch_pulled("master", "pr_pull_upstream()") if (!git_branch_exists(branch)) { if (git_branch_name() != "master") { if (ui_nope("Create local PR branch with non-master parent?")) { return(invisible(FALSE)) } } ui_done("Creating local PR branch {ui_value(branch)}") git_branch_create(branch) config_key <- glue("branch.{branch}.created-by") git_config_set(config_key, "usethis::pr_init") } if (git_branch_name() != branch) { ui_done("Switching to branch {ui_value(branch)}") git_branch_switch(branch) } ui_todo("Use {ui_code('pr_push()')} to create PR") invisible() } #' @export #' @rdname pr_init #' @param number Number of PR to fetch. #' @param owner Name of the owner of the repository that is the target of the #' pull request. Default of `NULL` tries to identify the source repo and uses #' the owner of the `upstream` remote, if present, or the owner of `origin` #' otherwise. #' #' @examples #' \dontrun{ #' ## scenario: current project is a local copy of fork of a repo owned by #' ## 'tidyverse', not you #' pr_fetch(123, owner = "tidyverse") #' } pr_fetch <- function(number, owner = NULL) { check_uses_github() check_uncommitted_changes() auth_token <- check_github_token(allow_empty = TRUE) owner <- owner %||% github_owner_upstream() %||% github_owner() repo <- github_repo() pr <- gh::gh( "GET /repos/:owner/:repo/pulls/:number", owner = owner, repo = repo, number = number, .token = auth_token ) pr_string <- glue("{owner}/{repo}/#{number}") pr_user <- glue("@{pr$user$login}") ui_done( 'Checking out PR {ui_value(pr_string)} ({ui_field(pr_user)}): \\ {ui_value(pr$title)}' ) their_branch <- pr$head$ref them <- pr$head$user$login if (them == github_owner()) { remote <- "origin" our_branch <- their_branch } else { remote <- them our_branch <- glue("{them}-{their_branch}") if (!isTRUE(pr$maintainer_can_modify)) { ui_info(" Note that user does NOT allow maintainer to modify this PR \\ at this time, although this can be changed. ") } } protocol <- github_remote_protocol() if (!remote %in% git2r::remotes(git_repo())) { url <- switch( protocol, https = pr$head$repo$clone_url, ssh = pr$head$repo$ssh_url ) ui_done("Adding remote {ui_value(remote)} as {ui_value(url)}") git2r::remote_add(git_repo(), remote, url) config_key <- glue("remote.{remote}.created-by") git_config_set(config_key, "usethis::pr_fetch") } if (!git_branch_exists(our_branch)) { their_refname <- git_remref(remote, their_branch) credentials <- git_credentials(protocol, auth_token) ui_done("Creating local branch {ui_value(our_branch)}") git2r::fetch( git_repo(), name = remote, credentials = credentials, refspec = their_branch, verbose = FALSE ) git_branch_create(our_branch, their_refname) git_branch_track(our_branch, remote, their_branch) config_key <- glue("branch.{our_branch}.created-by") git_config_set(config_key, "usethis::pr_fetch") # Cache URL for PR in config for branch config_url <- glue("branch.{our_branch}.pr-url") git_config_set(config_url, pr$html_url) # `git push` will not work if the branch names differ, unless # `push.default=upstream`; there's no simple way to make it work without # drawbacks, due to the design of git. `pr_push()`, however, will always # work. } if (git_branch_name() != our_branch) { ui_done("Switching to branch {ui_value(our_branch)}") git_branch_switch(our_branch) } } #' @export #' @rdname pr_init pr_push <- function() { check_uses_github() check_branch_not_master() check_uncommitted_changes() branch <- git_branch_name() has_remote_branch <- !is.null(git_branch_tracking_FIXME(branch)) if (has_remote_branch) { check_branch_pulled(use = "pr_pull()") } remote_info <- git_branch_remote(branch) protocol <- github_remote_protocol(remote_info$remote_name) credentials <- git_credentials(protocol) # TODO: I suspect the tryCatch (and perhaps the git_branch_compare()?) is # better pushed down into git_branch_push(), which could then return TRUE for # success and FALSE for failure pushed <- tryCatch( git_branch_push(branch, credentials = credentials), error = function(e) { ui_stop( "The push was not successful. Consider that user can decline to allow maintainers to modify a PR." ) } ) if (!has_remote_branch) { git_branch_track(branch) } diff <- git_branch_compare(branch) if (diff[[1]] != 0) { ui_stop( "The push was not successful. Consider that user can decline to allow maintainers to modify a PR." ) } # Prompt to create PR on first push url <- pr_url() if (is.null(url)) { pr_create_gh() } else { ui_done("View PR at {ui_value(url)} or call {ui_code('pr_view()')}") } invisible() } #' @export #' @rdname pr_init pr_pull <- function() { check_uses_github() check_branch_not_master() check_uncommitted_changes() protocol <- github_remote_protocol() credentials <- git_credentials(protocol) ui_done("Pulling changes from GitHub PR") git_pull(credentials = credentials) invisible(TRUE) } #' @export #' @rdname pr_init pr_pull_upstream <- function() { check_uses_github() check_uncommitted_changes() branch <- "master" remote <- if (git_is_fork()) "upstream" else "origin" source <- git_remref(remote, branch) protocol <- github_remote_protocol(remote) credentials <- git_credentials(protocol) ui_done("Pulling changes from GitHub source repo {ui_value(source)}") git_pull(source, credentials = credentials) } #' @export #' @rdname pr_init pr_sync <- function() { pr_pull() pr_pull_upstream() pr_push() } #' @export #' @rdname pr_init pr_view <- function() { url <- pr_url() if (is.null(url)) { pr_create_gh() } else { view_url(pr_url()) } } #' @export #' @rdname pr_init pr_pause <- function() { check_branch_not_master() check_uncommitted_changes() check_branch_pulled(use = "pr_pull()") ui_done("Switching back to {ui_value('master')} branch") git_branch_switch("master") } #' @export #' @rdname pr_init pr_finish <- function() { check_branch_not_master() pr <- git_branch_name() tracking_branch <- git_branch_tracking() ui_done("Switching back to {ui_value('master')} branch") git_branch_switch("master") pr_pull_upstream() # TODO: check that this is merged! ui_done("Deleting local {ui_value(pr)} branch") git_branch_delete(pr) if (is.null(tracking_branch)) { return(invisible()) } remote <- remref_remote(tracking_branch) created_by <- git_config_get(glue("remote.{remote}.created-by")) if (is.null(created_by) || !grepl("^usethis::pr_", created_by)) { return(invisible()) } b <- git2r::branches(git_repo(), flags = "local") remote_specs <- purrr::map(b, ~ git2r::branch_get_upstream(.x)$name) remote_specs <- purrr::compact(remote_specs) if (sum(grepl(glue("^{remote}/"), remote_specs)) == 0) { ui_done("Removing remote {ui_value(remote)}") git2r::remote_remove(git_repo(), remote) } } pr_create_gh <- function() { owner <- github_owner() repo <- github_repo() branch <- git_branch_name() ui_done("Create PR at link given below") view_url(glue("https://github.com/{owner}/{repo}/compare/{branch}")) } pr_url <- function(branch = git_branch_name()) { # Have we done this before? Check if we've cached pr-url in git config. config_url <- glue("branch.{branch}.pr-url") url <- git_config_get(config_url) if (!is.null(url)) { return(url) } if (git_is_fork()) { source <- github_owner_upstream() pr_branch <- remref_branch(git_branch_tracking_FIXME(branch)) } else { source <- github_owner() pr_branch <- branch } urls <- pr_find(source, github_repo(), github_owner(), pr_branch) if (length(urls) == 0) { NULL } else if (length(urls) == 1) { git_config_set(config_url, urls[[1]]) urls[[1]] } else { ui_stop("Multiple PRs correspond to this branch. Please close before continuing") } } pr_find <- function(owner, repo, pr_owner = owner, pr_branch = git_branch_name()) { # Look at all PRs prs <- gh::gh("GET /repos/:owner/:repo/pulls", owner = owner, repo = repo, .limit = Inf, .token = check_github_token(allow_empty = TRUE) ) if (identical(prs[[1]], "")) { return(character()) } refs <- purrr::map_chr(prs, c("head", "ref"), .default = NA_character_) user <- purrr::map_chr(prs, c("head", "user", "login"), .default = NA_character_) urls <- purrr::map_chr(prs, c("html_url"), .default = NA_character_) urls[refs == pr_branch & user == pr_owner] } usethis/R/tutorial.R0000644000176200001440000000276513453664176014156 0ustar liggesusers#' Create a learnr tutorial #' #' Creates a new tutorial below `inst/tutorials/`. Tutorials are interactive R #' Markdown documents built with the [`learnr` #' package](https://rstudio.github.io/learnr/index.html). `use_tutorial()` does #' this setup: #' * Adds learnr to Suggests in `DESCRIPTION`. #' * Gitignores `inst/tutorials/*.html` so you don't accidentally track #' rendered tutorials. #' * Creates a new `.Rmd` tutorial from a template and, optionally, opens it #' for editing. #' * Adds new `.Rmd` to `.Rbuildignore`. #' #' @param name Base for file name to use for new `.Rmd` tutorial. Should consist #' only of numbers, letters, `_` and `-`. We recommend using lower case. #' @param title The human-facing title of the tutorial. #' @inheritParams use_template #' @seealso The [learnr package #' documentation](https://rstudio.github.io/learnr/index.html). #' @export #' @examples #' \dontrun{ #' use_tutorial("learn-to-do-stuff", "Learn to do stuff") #' } use_tutorial <- function(name, title, open = interactive()) { stopifnot(is_string(name)) stopifnot(is_string(title)) dir_path <- path("inst", "tutorials") use_directory(dir_path) use_git_ignore("*.html", directory = dir_path) use_dependency("learnr", "Suggests") path <- path(dir_path, asciify(name), ext = "Rmd") data <- project_data() data$tutorial_title <- title new <- use_template( "tutorial-template.Rmd", save_as = path, data = data, ignore = TRUE, open = open ) invisible(new) } usethis/R/rcpp.R0000644000176200001440000000541413453664176013251 0ustar liggesusers#' Use C, C++, RcppArmadillo, or RcppEigen #' #' Creates `src/`, adds required packages to `DESCRIPTION`, #' optionally creates `.c` or `.cpp` files, and #' where needed, `Makevars` and `Makevars.win` files. #' #' @param name If supplied, creates and opens `src/name.{c,cpp}`. #' @export use_rcpp <- function(name = NULL) { check_is_package("use_rcpp()") check_uses_roxygen("use_rcpp()") use_src() use_dependency("Rcpp", "LinkingTo") use_dependency("Rcpp", "Imports") roxygen_ns_append("@importFrom Rcpp sourceCpp") && roxygen_update() if (!is.null(name)) { name <- slug(name, "cpp") check_file_name(name) use_template("code.cpp", path("src", name), open = TRUE) } invisible() } #' @rdname use_rcpp #' @export use_rcpp_armadillo <- function(name = NULL) { use_rcpp(name) use_dependency("RcppArmadillo", "LinkingTo") makevars_settings <- list( "CXX_STD" = "CXX11", "PKG_CXXFLAGS" = "$(SHLIB_OPENMP_CXXFLAGS)", "PKG_LIBS" = "$(SHLIB_OPENMP_CXXFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)" ) use_makevars(makevars_settings) invisible() } #' @rdname use_rcpp #' @export use_rcpp_eigen <- function(name = NULL) { use_rcpp(name) use_dependency("RcppEigen", "LinkingTo") roxygen_ns_append("@import RcppEigen") && roxygen_update() invisible() } #' @rdname use_rcpp #' @export use_c <- function(name = NULL) { use_src() if (!is.null(name)) { name <- slug(name, "c") check_file_name(name) use_template("code.c", path("src", name), open = TRUE) } invisible(TRUE) } use_src <- function() { check_is_package("use_src()") check_uses_roxygen("use_rcpp()") use_directory("src") use_git_ignore(c("*.o", "*.so", "*.dll"), "src") roxygen_ns_append(glue("@useDynLib {project_name()}, .registration = TRUE")) && roxygen_update() invisible() } use_makevars <- function(settings = NULL) { use_directory("src") settings_list <- settings %||% list() check_is_named_list(settings_list) makevars_entries <- vapply(settings_list, glue_collapse, character(1)) makevars_content <- glue("{names(makevars_entries)} = {makevars_entries}") makevars_path <- proj_path("src", "Makevars") makevars_win_path <- proj_path("src", "Makevars.win") if (!file_exists(makevars_path) && !file_exists(makevars_win_path)) { write_utf8(makevars_path, makevars_content) file_copy(makevars_path, makevars_win_path) ui_done("Created {ui_path(makevars_path)} and {ui_path(makevars_win_path)} \\ with requested compilation settings.") } else { ui_todo("Ensure the following Makevars compilation settings are set for both \\ {ui_path(makevars_path)} and {ui_path(makevars_win_path)}:") ui_code_block( makevars_content ) edit_file(makevars_path) edit_file(makevars_win_path) } } usethis/R/readme.R0000644000176200001440000000306613507307203013524 0ustar liggesusers#' Create README files #' #' Creates skeleton README files with sections for #' \itemize{ #' \item a high-level description of the package and its goals #' \item R code to install from GitHub, if GitHub usage detected #' \item a basic example #' } #' Use `Rmd` if you want a rich intermingling of code and data. Use #' `md` for a basic README. `README.Rmd` will be automatically #' added to `.Rbuildignore`. The resulting README is populated with default #' YAML frontmatter and R fenced code blocks (`md`) or chunks (`Rmd`). #' #' @inheritParams use_template #' @seealso The [important files #' section](https://r-pkgs.org/release.html#important-files) of [R #' Packages](https://r-pkgs.org). #' @export #' @examples #' \dontrun{ #' use_readme_rmd() #' use_readme_md() #' } use_readme_rmd <- function(open = interactive()) { check_installed("rmarkdown") data <- project_data() data$Rmd <- TRUE if (uses_github()) { data$github <- list( owner = github_owner(), repo = github_repo() ) } new <- use_template( if (is_package()) "package-README" else "project-README", "README.Rmd", data = data, ignore = TRUE, open = open ) if (!new) return(invisible(FALSE)) if (uses_git()) { use_git_hook( "pre-commit", render_template("readme-rmd-pre-commit.sh") ) } invisible(TRUE) } #' @export #' @rdname use_readme_rmd use_readme_md <- function(open = interactive()) { use_template( if (is_package()) "package-README" else "project-README", "README.md", data = project_data(), open = open ) } usethis/R/course.R0000644000176200001440000003463213507207664013604 0ustar liggesusers## see end of file for some cURL notes #' Download and unpack a ZIP file #' #' Functions to download and unpack a ZIP file into a local folder of files, #' with very intentional default behaviour. Useful in pedagogical settings or #' anytime you need a large audience to download a set of files quickly and #' actually be able to find them. #' #' @param url Link to a ZIP file containing the materials. Various short forms #' are accepted, to reduce the typing burden in live settings: #' #' * bit.ly or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz" or "rstd.io/foofy" #' * GitHub repo spec: "OWNER/REPO" #' Function works well with DropBox folders and GitHub repos, but should work #' for ZIP files generally. See examples and [use_course_details] for more. #' @param destdir The new folder is stored here. If `NULL`, defaults to user's #' Desktop or some other conspicuous place. #' @param cleanup Whether to delete the original ZIP file after unpacking its #' contents. In an interactive setting, `NA` leads to a menu where user can #' approve the deletion (or decline). #' #' @return Path to the new directory holding the unpacked ZIP file, invisibly. #' @name zip-utils #' @examples #' \dontrun{ #' # download the source of usethis from GitHub, behind a bit.ly shortlink #' use_course("bit.ly/usethis-shortlink-example") #' use_course("http://bit.ly/usethis-shortlink-example") #' #' ## download the source of rematch2 package, from CRAN and GitHub #' use_course("https://cran.r-project.org/bin/windows/contrib/3.4/rematch2_2.0.1.zip") #' #' ## from GitHub, 3 ways #' use_course("r-lib/rematch2") #' use_course("https://github.com/r-lib/rematch2/archive/master.zip") #' use_course("https://api.github.com/repos/r-lib/rematch2/zipball/master") #' } NULL #' @describeIn zip-utils Designed with live workshops in mind. Includes #' intentional friction to highlight the download destination. Workflow: #' * User executes, e.g., `use_course("bit.ly/xxx-yyy-zzz")`. #' * User is asked to notice and confirm the location of the new folder. Specify #' `destdir` to prevent this. #' * User is asked if they'd like to delete the ZIP file. #' * If new folder contains an `.Rproj` file, a new instance of RStudio is #' launched. Otherwise, the folder is opened in the file manager, e.g. Finder #' or File Explorer. #' @export use_course <- function(url, destdir = NULL) { url <- normalize_url(url) destdir_not_specified <- is.null(destdir) destdir <- user_path_prep(destdir %||% conspicuous_place()) check_path_is_directory(destdir) if (destdir_not_specified && interactive()) { ui_line(c( "Downloading into {ui_path(destdir)}.", "Prefer a different location? Cancel, try again, and specify {ui_code('destdir')}" )) if (ui_nope("OK to proceed?")) { ui_stop("Aborting.") } } ui_done("Downloading from {ui_value(url)}") zipfile <- tidy_download(url, destdir) ui_done("Download stored in {ui_path(zipfile)}") check_is_zip(attr(zipfile, "content-type")) tidy_unzip(zipfile, cleanup = NA) } #' @describeIn zip-utils More useful in day-to-day work. Downloads in current #' working directory, by default, and allows `cleanup` behaviour to be #' specified. #' @export use_zip <- function(url, destdir = getwd(), cleanup = if (interactive()) NA else FALSE) { url <- normalize_url(url) check_path_is_directory(destdir) ui_done("Downloading from {ui_value(url)}") zipfile <- tidy_download(url, destdir) ui_done("Download stored in {ui_path(zipfile)}") check_is_zip(attr(zipfile, "content-type")) tidy_unzip(zipfile, cleanup) } #' Helpers to download and unpack a ZIP file #' #' Details on the internal functions that power [use_course()] and [use_zip()]. #' These helpers are currently unexported but a course instructor may want more #' details. #' #' @name use_course_details #' @keywords internal #' #' @section tidy_download(): #' #' ``` #' ## function signature #' tidy_download(url, destdir = getwd()) #' #' ## as called inside use_course() #' tidy_download( #' url, ## after post-processing with normalize_url() #' # conspicuous_place() = Desktop or home directory or working directory #' destdir = destdir %||% conspicuous_place() #' ) #' ``` #' #' Special-purpose function to download a ZIP file and automatically determine #' the file name, which often determines the folder name after unpacking. #' Developed with DropBox and GitHub as primary targets, possibly via #' shortlinks. Both platforms offer a way to download an entire folder or repo #' as a ZIP file, with information about the original folder or repo transmitted #' in the `Content-Disposition` header. In the absence of this header, a #' filename is generated from the input URL. In either case, the filename is #' sanitized. Returns the path to downloaded ZIP file, invisibly. #' #' **DropBox:** #' #' To make a folder available for ZIP download, create a shared link for it: #' * #' #' A shared link will have this form: #' ``` #' https://www.dropbox.com/sh/12345abcde/6789wxyz?dl=0 #' ``` #' Replace the `dl=0` at the end with `dl=1` to create a download link. The ZIP #' download link will have this form: #' ``` #' https://www.dropbox.com/sh/12345abcde/6789wxyz?dl=1 #' ``` #' This download link (or a shortlink that points to it) is suitable as input #' for `tidy_download()`. After one or more redirections, this link will #' eventually lead to a download URL. For more details, see #' and #' . #' #' **GitHub:** #' #' Click on the repo's "Clone or download" button, to reveal a "Download ZIP" #' button. Capture this URL, which will have this form: #' ``` #' https://github.com/r-lib/usethis/archive/master.zip #' ``` #' This download link (or a shortlink that points to it) is suitable as input #' for `tidy_download()`. After one or more redirections, this link will #' eventually lead to a download URL. Here's an alternative link that also leads #' to ZIP download, albeit with a different filenaming scheme: #' ``` #' https://api.github.com/repos/r-lib/usethis/zipball/master #' ``` #' #' @param url Download link for the ZIP file, possibly behind a shortlink or #' other redirect. See Details. #' @param destdir Path to existing local directory where the ZIP file will be #' stored. Defaults to current working directory, but note that [use_course()] #' has different default behavior. #' #' @examples #' \dontrun{ #' tidy_download("https://github.com/r-lib/rematch2/archive/master.zip") #' } #' #' @section tidy_unzip(): #' #' Special-purpose function to unpack a ZIP file and (attempt to) create the #' directory structure most people want. When unpacking an archive, it is easy #' to get one more or one less level of nesting than you expected. #' #' It's especially important to finesse the directory structure here: we want #' the same local result when unzipping the same content from either GitHub or #' DropBox ZIP files, which pack things differently. Here is the intent: #' * If the ZIP archive `foo.zip` does not contain a single top-level directory, #' i.e. it is packed as "loose parts", unzip into a directory named `foo`. #' Typical of DropBox ZIP files. #' * If the ZIP archive `foo.zip` has a single top-level directory (which, by #' the way, is not necessarily called "foo"), unpack into said directory. #' Typical of GitHub ZIP files. #' #' Returns path to the directory holding the unpacked files, invisibly. #' #' **DropBox:** #' The ZIP files produced by DropBox are special. The file list tends to contain #' a spurious directory `"/"`, which we ignore during unzip. Also, if the #' directory is a Git repo and/or RStudio Project, we unzip-ignore various #' hidden files, such as `.RData`, `.Rhistory`, and those below `.git/` and #' `.Rproj.user`. #' #' @param zipfile Path to local ZIP file. #' #' @examples #' \dontrun{ #' tidy_download("https://github.com/r-lib/rematch2/archive/master.zip") #' tidy_unzip("rematch2-master.zip") #' } NULL # 1. downloads from `url` # 2. determines filename from content-description header (with fallbacks) # 3. returned path has content-type and content-description as attributes tidy_download <- function(url, destdir = getwd()) { check_path_is_directory(destdir) tmp <- file_temp("tidy-download-") h <- curl::new_handle(noprogress = FALSE, progressfunction = progress_fun) curl::curl_download(url, tmp, quiet = FALSE, mode = "wb", handle = h) cat_line() cd <- content_disposition(h) base_name <- make_filename(cd, fallback = path_file(url)) full_path <- path(destdir, base_name) if (!can_overwrite(full_path)) { ui_stop("Aborting.") } attr(full_path, "content-type") <- content_type(h) attr(full_path, "content-disposition") <- cd file_move(tmp, full_path) invisible(full_path) } tidy_unzip <- function(zipfile, cleanup = FALSE) { base_path <- path_dir(zipfile) filenames <- utils::unzip(zipfile, list = TRUE)[["Name"]] ## deal with DropBox's peculiar habit of including "/" as a file --> drop it filenames <- filenames[filenames != "/"] ## DropBox ZIP files often include lots of hidden R, RStudio, and Git files filenames <- filenames[keep_lgl(filenames)] td <- top_directory(filenames) loose_parts <- is.na(td) if (loose_parts) { target <- path_ext_remove(zipfile) utils::unzip(zipfile, files = filenames, exdir = target) } else { target <- path(path_dir(zipfile), td) utils::unzip(zipfile, files = filenames, exdir = path_dir(zipfile)) } ui_done( "Unpacking ZIP file into {ui_path(target, base_path)} \\ ({length(filenames)} files extracted)" ) if (isNA(cleanup)) { cleanup <- interactive() && ui_yeah("Shall we delete the ZIP file ({ui_path(zipfile, base_path)})?") } if (isTRUE(cleanup)) { ui_done("Deleting {ui_path(zipfile, base_path)}") file_delete(zipfile) } if (interactive()) { rproj_path <- dir_ls(target, regexp = "[.]Rproj$") if (length(rproj_path) == 1 && rstudioapi::hasFun("openProject")) { ui_done("Opening project in RStudio") rstudioapi::openProject(target, newSession = TRUE) } else if (!in_rstudio_server()) { ui_done("Opening {ui_path(target, base_path)} in the file manager") utils::browseURL(path_real(target)) } } invisible(target) } normalize_url <- function(url) { stopifnot(is.character(url)) has_scheme <- grepl("^http[s]?://", url) if (has_scheme) { return(url) } if (!is_shortlink(url)) { url <- tryCatch( expand_github(url), error = function(e) url ) } paste0("https://", url) } is_shortlink <- function(url) { shortlink_hosts <- c("rstd\\.io", "bit\\.ly") any(purrr::map_lgl(shortlink_hosts, grepl, x = url)) } expand_github <- function(url) { # mostly to handle errors in the spec repo_spec <- parse_repo_spec(url) glue::glue_data(repo_spec, "github.com/{owner}/{repo}/archive/master.zip") } conspicuous_place <- function() { Filter(dir_exists, c( path_home("Desktop"), path_home(), path_home_r(), path_tidy(getwd()) ))[[1]] } keep_lgl <- function(file, ignores = c(".Rproj.user", ".rproj.user", ".Rhistory", ".RData", ".git", "__MACOSX", ".DS_Store")) { ignores <- paste0( "((\\/|\\A)", gsub("\\.", "[.]", ignores), "(\\/|\\Z))", collapse = "|" ) !grepl(ignores, file, perl = TRUE) } top_directory <- function(filenames) { in_top <- dirname(filenames) == "." unique_top <- unique(filenames[in_top]) is_directory <- grepl("/$", unique_top) if (length(unique_top) > 1 || !is_directory) { NA_character_ } else { unique_top } } content_type <- function(h) { headers <- curl::parse_headers_list(curl::handle_data(h)$headers) headers[["content-type"]] } content_disposition <- function(h) { headers <- curl::parse_headers_list(curl::handle_data(h)$headers) cd <- headers[["content-disposition"]] if (is.null(cd)) { return() } parse_content_disposition(cd) } check_is_zip <- function(ct) { # "https://www.fueleconomy.gov/feg/epadata/16data.zip" comes with # MIME type "application/x-zip-compressed" # see https://github.com/r-lib/usethis/issues/573 allowed <- c("application/zip", "application/x-zip-compressed") if (!ct %in% allowed ) { ui_stop(c( "Download does not have MIME type {ui_value('application/zip')}.", "Instead it's {ui_value(ct)}." )) } invisible(ct) } ## https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition ## https://tools.ietf.org/html/rfc6266 ## DropBox eg: "attachment; filename=\"foo.zip\"; filename*=UTF-8''foo.zip\" ## GitHub eg: "attachment; filename=foo-master.zip" # https://stackoverflow.com/questions/30193569/get-content-disposition-parameters # http://test.greenbytes.de/tech/tc2231/ parse_content_disposition <- function(cd) { if (!grepl("^attachment;", cd)) { ui_stop(c( "{ui_code('Content-Disposition')} header doesn't start with {ui_value('attachment')}.", "Actual header: {ui_value(cd)}" )) } cd <- sub("^attachment;\\s*", "", cd, ignore.case = TRUE) cd <- strsplit(cd, "\\s*;\\s*")[[1]] cd <- strsplit(cd, "=") stats::setNames( vapply(cd, `[[`, character(1), 2), vapply(cd, `[[`, character(1), 1) ) } progress_fun <- function(down, up) { total <- down[[1]] now <- down[[2]] pct <- if(length(total) && total > 0) { paste0("(", round(now/total * 100), "%)") } else { "" } if (now > 10000) { cat("\rDownloaded:", sprintf("%.2f", now / 2^20), "MB ", pct) } TRUE } make_filename <- function(cd, fallback = path_file(file_temp())) { ## TO DO(jennybc): the element named 'filename*' is preferred but I'm not ## sure how to parse it yet, so targetting 'filename' for now ## https://tools.ietf.org/html/rfc6266 cd <- cd[["filename"]] if (is.null(cd) || is.na(cd)) { stopifnot(is_string(fallback)) return(path_sanitize(fallback)) } ## I know I could use regex and lookahead but this is easier for me to ## maintain cd <- sub("^\"(.+)\"$", "\\1", cd) path_sanitize(cd) } ## https://stackoverflow.com/questions/21322614/use-curl-to-download-a-dropbox-folder-via-shared-link-not-public-link ## lesson: if using cURL, you'd want these options ## -L, --location (follow redirects) ## -O, --remote-name (name local file like the file part of remote name) ## -J, --remote-header-name (tells -O option to consult Content-Disposition ## instead of the URL) ## https://curl.haxx.se/docs/manpage.html#OPTIONS usethis/R/tibble.R0000644000176200001440000000261113453664176013542 0ustar liggesusers#' Prepare to return a tibble #' #' @description Does minimum setup such that a tibble returned by your package #' is handled using the tibble method for generics like `print()` or \code{[}. #' Presumably you care about this if you've chosen to store and expose an #' object with class `tbl_df`. Specifically: #' * Check that the active package uses roxygen2 #' * Add the tibble package to "Imports" in `DESCRIPTION` #' * Reveal the roxygen directive necessary to import at least one function #' from tibble. #' * Offer support re: where to put this directive. Preferred location is #' in the roxygen snippet produced by [use_package_doc()]. #' #' @description This is necessary when your package returns a stored data object #' that has class `tbl_df`, but the package code does not make direct use of #' functions from the tibble package. If you do nothing, the tibble namespace #' is not necessarily loaded and your tibble may therefore be printed and #' subsetted like a base `data.frame`. #' #' @export #' @examples #' \dontrun{ #' use_tibble() #' } use_tibble <- function() { check_is_package("use_tibble()") check_uses_roxygen("use_tibble()") use_dependency("tibble", "Imports") roxygen_ns_append("@importFrom tibble tibble") && roxygen_update() ui_todo("Document a returned tibble like so:") ui_code_block("#' @return a [tibble][tibble::tibble-package]", copy = FALSE) } usethis/R/template.R0000644000176200001440000000620013507207664014105 0ustar liggesusers#' Use a usethis-style template #' #' Creates a file from data and a template found in a package. Provides control #' over file name, the addition to `.Rbuildignore`, and opening the file for #' inspection. #' #' This function can be used as the engine for a templating function in other #' packages. The `template` argument is used along with the `package` argument #' to derive the path to your template file; it will be expected at #' `fs::path_package(package = package, "templates", template)`. We use #' `fs::path_package()` instead of `base::system.file()` so that path #' construction works even in a development workflow, e.g., works with #' `devtools::load_all()` or `pkgload::load_all()`. *Note this describes the #' behaviour of `fs::path_package()` in fs v1.2.7.9001 and higher.* #' #' To interpolate your data into the template, supply a list using #' the `data` argument. Internally, this function uses #' [whisker::whisker.render()] to combine your template file with your data. #' #' @param template Path to template file relative to `templates/` directory #' within `package`; see details. #' @param save_as Path of file to create, relative to root of active project. #' Defaults to `template` #' @param data A list of data passed to the template. #' @param ignore Should the newly created file be added to `.Rbuildignore`? #' @param open Open the newly created file for editing? Happens in RStudio, if #' applicable, or via [utils::file.edit()] otherwise. #' @param package Name of the package where the template is found. #' @return A logical vector indicating if file was modified. #' @export #' @examples #' \dontrun{ #' # Note: running this will write `NEWS.md` to your working directory #' use_template( #' template = "NEWS.md", #' data = list(Package = "acme", Version = "1.2.3"), #' package = "usethis" #' ) #' } use_template <- function(template, save_as = template, data = list(), ignore = FALSE, open = FALSE, package = "usethis") { template_contents <- render_template(template, data, package = package) new <- write_over(proj_path(save_as), template_contents) if (ignore) { use_build_ignore(save_as) } if (open && new) { edit_file(proj_path(save_as)) } invisible(new) } render_template <- function(template, data = list(), package = "usethis") { template_path <- find_template(template, package = package) strsplit(whisker::whisker.render(readLines(template_path, encoding = "UTF-8"), data), "\n")[[1]] } find_template <- function(template_name, package = "usethis") { ## TODO: remove this once we can increment min version of fs and use ## fs::path_package() unconditionally path <- if (utils::packageVersion("fs") > "1.2.7") { tryCatch( path_package(package = package, "templates", template_name), error = function(e) "" ) } else { system.file("templates", template_name, package = package) } if (identical(path, "")) { ui_stop( "Could not find template {ui_value(template_name)} \\ in package {ui_value(package)}." ) } path } usethis/R/make.R0000644000176200001440000000071613507207664013215 0ustar liggesusers#' Create Makefile #' #' `use_make()` adds a basic Makefile to the project root directory. #' #' @seealso The [documentation for GNU #' Make](https://www.gnu.org/software/make/manual/html_node). #' @export use_make <- function() { use_template( "Makefile", data = list(name = project_name()) ) use_build_ignore("Makefile") } uses_make <- function(base_path = proj_get()) { makefile_path <- proj_path("Makefile") file_exists(makefile_path) } usethis/R/documentation.R0000644000176200001440000000204613507306754015147 0ustar liggesusers#' Package-level documentation #' #' Adds a dummy `.R` file that will prompt roxygen to generate basic #' package-level documentation. If your package is named "foo", this will make #' help available to the user via `?foo` or `package?foo`. Once you call #' `devtools::document()`, roxygen will flesh out the `.Rd` file using data from #' the `DESCRIPTION`. That ensures you don't need to repeat the same information #' in multiple places. This `.R` file is also a good place for roxygen #' directives that apply to the whole package (vs. a specific function), such as #' global namespace tags like `@importFrom`. #' #' @seealso The [documentation chapter](https://r-pkgs.org/man.html) of [R #' Packages](https://r-pkgs.org) #' #' @export use_package_doc <- function() { check_is_package("use_package_doc()") use_template( "packagename-package.R", package_doc_path() ) } package_doc_path <- function() { path("R", paste0(project_name(), "-package"), ext = "R") } has_package_doc <- function() { file_exists(proj_path(package_doc_path())) } usethis/R/test.R0000644000176200001440000000426513453664176013267 0ustar liggesusers#' Create tests #' #' There are two helper functions: #' * `use_testthat()` sets up overall testing infrastructure: creates #' `tests/testthat/`, `tests/testthat.R`, and adds testthat to Suggests. #' * `use_test()` sets up individual test files: creates #' `tests/testthat/test-.R` and, optionally, opens it for editing. #' #' @seealso The [testing chapter](https://r-pkgs.org/tests.html) of [R #' Packages](https://r-pkgs.org). #' @export #' @inheritParams use_template #' @examples #' \dontrun{ #' use_testthat() #' #' use_test() #' #' use_test("something-management") #' } use_testthat <- function() { check_is_package("use_testthat()") check_installed("testthat") use_dependency("testthat", "Suggests") use_directory(path("tests", "testthat")) use_template( "testthat.R", save_as = path("tests", "testthat.R"), data = list(name = project_name()) ) ui_todo( "Call {ui_code('use_test()')} to initialize a basic test file and open it \\ for editing." ) } #' @rdname use_testthat #' @param name Base of test file name. If `NULL`, and you're using RStudio, will #' be based on the name of the file open in the source editor. #' @export use_test <- function(name = NULL, open = interactive()) { if (!uses_testthat()) { use_testthat() } if (is.null(name)) { name <- get_active_r_file(path = "R") } else { check_file_name(name) } name <- paste0("test-", name) name <- slug(name, "R") path <- path("tests", "testthat", name) if (file_exists(proj_path(path))) { if (open) { edit_file(proj_path(path)) } return(invisible(TRUE)) } # As of testthat 2.1.0, a context() is no longer needed/wanted if (utils::packageVersion("testthat") >= "2.1.0") { use_dependency("testthat", "Suggests", "2.1.0") use_template( "test-example-2.1.R", save_as = path, open = open ) } else { use_template( "test-example.R", save_as = path, data = list(test_name = path_ext_remove(name)), open = open ) } } uses_testthat <- function(base_path = proj_get()) { paths <- c( path(base_path, "inst", "tests"), path(base_path, "tests", "testthat") ) any(dir_exists(paths)) } usethis/R/coverage.R0000644000176200001440000000323413453664176014076 0ustar liggesusers#' Test coverage #' #' `use_coverage()` Adds test coverage reports to a package that is already #' using Travis CI. #' #' @param type Which web service to use for test reporting. Currently supports #' [Codecov](https://codecov.io) and [Coveralls](https://coveralls.io). #' @export use_coverage <- function(type = c("codecov", "coveralls")) { check_uses_travis() use_dependency("covr", "Suggests") type <- match.arg(type) if (type == "codecov") { new <- use_template("codecov.yml", ignore = TRUE) if (!new) { return(invisible(FALSE)) } } else if (type == "coveralls") { ui_todo("Turn on coveralls for this repo at https://coveralls.io/repos/new") } switch(type, codecov = use_codecov_badge(), coveralls = use_coveralls_badge() ) ui_todo("Add to {ui_path('.travis.yml')}:") ui_code_block( " after_success: - Rscript -e 'covr::{type}()' " ) invisible(TRUE) } #' @export #' @rdname use_coverage #' @param files Character vector of file globs. use_covr_ignore <- function(files) { use_build_ignore(".covrignore") write_union(proj_path(".covrignore"), files) } use_codecov_badge <- function() { check_uses_github() url <- glue("https://codecov.io/gh/{github_repo_spec()}?branch=master") img <- glue( "https://codecov.io/gh/{github_repo_spec()}/branch/master/graph/badge.svg" ) use_badge("Codecov test coverage", url, img) } use_coveralls_badge <- function() { check_uses_github() url <- glue("https://coveralls.io/r/{github_repo_spec()}?branch=master") img <- glue( "https://coveralls.io/repos/github/{github_repo_spec()}/badge.svg" ) use_badge("Coveralls test coverage", url, img) } usethis/R/description.R0000644000176200001440000000773313507307367014632 0ustar liggesusers#' Create or modify a DESCRIPTION file #' #' @description #' usethis consults the following sources, in this order, to set `DESCRIPTION` #' fields: #' * `fields` argument of [create_package()] or [use_description()]. #' * `getOption("usethis.description")` or `getOption("devtools.desc")`. The #' devtools option is consulted only for backwards compatibility and it's #' recommended to switch to an option named "usethis.description". #' * Defaults built into usethis. #' #' The fields discovered via options or the usethis package can be viewed with #' `use_description_defaults()`. #' #' If you create a lot of packages, consider storing personalized defaults as a #' named list in an option named `"usethis.description"`. Here's an example of #' code to include in `.Rprofile`: #' #' ``` #' options( #' usethis.description = list( #' `Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"), #' comment = c(ORCID = "YOUR-ORCID-ID"))', #' License = "MIT + file LICENSE", #' Language = "es" #' ) #' ) #' ``` #' #' @param fields A named list of fields to add to `DESCRIPTION`, potentially #' overriding default values. See [use_description()] for how you can set #' personalized defaults using package options #' @seealso The [description chapter](https://r-pkgs.org/description.html#dependencies) #' of [R Packages](https://r-pkgs.org). #' @export #' @examples #' \dontrun{ #' use_description() #' #' use_description(fields = list(Language = "es")) #' #' use_description_defaults() #' } use_description <- function(fields = NULL) { name <- project_name() check_package_name(name) fields <- fields %||% list() check_is_named_list(fields) fields[["Package"]] <- name desc <- build_description(fields) desc <- desc::description$new(text = desc) tidy_desc(desc) lines <- desc$str(by_field = TRUE, normalize = FALSE, mode = "file") write_over(proj_path("DESCRIPTION"), lines) if (!getOption("usethis.quiet", default = FALSE)) { print(desc) } } #' @rdname use_description #' @export use_description_defaults <- function() { list( usethis.description = getOption("usethis.description"), devtools.desc = getOption("devtools.desc"), usethis = list( Package = "valid.package.name.goes.here", Version = "0.0.0.9000", Title = "What the Package Does (One Line, Title Case)", Description = "What the package does (one paragraph).", "Authors@R" = 'person("First", "Last", , "first.last@example.com", c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID"))', License = "What license it uses", Encoding = "UTF-8", LazyData = "true" ) ) } build_description <- function(fields = list()) { desc_list <- build_description_list(fields) # Collapse all vector arguments to single strings desc <- vapply(desc_list, glue_collapse, character(1)) glue("{names(desc)}: {desc}") } build_description_list <- function(fields = list()) { defaults <- use_description_defaults() defaults <- utils::modifyList( defaults$usethis, defaults$usethis.description %||% defaults$devtools.desc %||% list() ) compact(utils::modifyList(defaults, fields)) } check_package_name <- function(name) { if (!valid_package_name(name)) { ui_stop(c( "{ui_value(name)} is not a valid package name. It should:", "* Contain only ASCII letters, numbers, and '.'", "* Have at least two characters", "* Start with a letter", "* Not end with '.'" )) } } valid_package_name <- function(x) { grepl("^[a-zA-Z][a-zA-Z0-9.]+$", x) && !grepl("\\.$", x) } tidy_desc <- function(desc) { # Alphabetise dependencies deps <- desc$get_deps() deps <- deps[order(deps$type, deps$package), , drop = FALSE] desc$del_deps() desc$set_deps(deps) # Alphabetise remotes remotes <- desc$get_remotes() if (length(remotes) > 0) { desc$set_remotes(sort(remotes)) } desc$set("Encoding" = "UTF-8") # Normalize all fields (includes reordering) desc$normalize() } usethis/R/edit.R0000644000176200001440000001146013507224743013220 0ustar liggesusers#' Open file for editing #' #' Opens a file for editing in RStudio, if that is the active environment, or #' via [utils::file.edit()] otherwise. If the file does not exist, it is #' created. If the parent directory does not exist, it is also created. #' #' @param path Path to target file. #' #' @return Target path, invisibly. #' @export #' @keywords internal #' #' @examples #' \dontrun{ #' edit_file("DESCRIPTION") #' edit_file("~/.gitconfig") #' } edit_file <- function(path) { path <- user_path_prep(path) create_directory(path_dir(path)) file_create(path) if (!interactive() || is_testing()) { ui_todo("Edit {ui_path(path)}") } else { ui_todo("Modify {ui_path(path)}") if (rstudioapi::isAvailable() && rstudioapi::hasFun("navigateToFile")) { rstudioapi::navigateToFile(path) } else { utils::file.edit(path) } } invisible(path) } #' Open configuration files #' #' * `edit_r_profile()` opens `.Rprofile` #' * `edit_r_environ()` opens `.Renviron` #' * `edit_r_makevars()` opens `.R/Makevars` #' * `edit_git_config()` opens `.gitconfig` or `.git/config` #' * `edit_git_ignore()` opens `.gitignore` #' * `edit_rstudio_snippets(type)` opens `.R/snippets/{type}.snippets` #' #' The `edit_r_*()` and `edit_rstudio_*()` functions consult R's notion of #' user's home directory. The `edit_git_*()` functions -- and \pkg{usethis} in #' general -- inherit home directory behaviour from the \pkg{fs} package, which #' differs from R itself on Windows. The \pkg{fs} default is more conventional #' in terms of the location of user-level Git config files. See #' [fs::path_home()] for more details. #' #' @return Path to the file, invisibly. #' #' @param scope Edit globally for the current __user__, or locally for the #' current __project__ #' @name edit NULL #' @export #' @rdname edit edit_r_profile <- function(scope = c("user", "project")) { path <- scoped_path_r(scope, ".Rprofile", envvar = "R_PROFILE_USER") edit_file(path) ui_todo("Restart R for changes to take effect") invisible(path) } #' @export #' @rdname edit edit_r_environ <- function(scope = c("user", "project")) { path <- scoped_path_r(scope, ".Renviron", envvar = "R_ENVIRON_USER") edit_file(path) ui_todo("Restart R for changes to take effect") invisible(path) } #' @export #' @rdname edit edit_r_buildignore <- function(scope = c("user", "project")) { path <- scoped_path_r(scope, ".Rbuildignore") edit_file(path) } #' @export #' @rdname edit edit_r_makevars <- function(scope = c("user", "project")) { path <- scoped_path_r(scope, ".R", "Makevars") edit_file(path) } #' @export #' @rdname edit #' @param type Snippet type. One of: "R", "markdown", "C_Cpp", "Tex", #' "Javascript", "HTML", "SQL" edit_rstudio_snippets <- function(type = "R") { # RStudio snippets stored using R's definition of ~ # https://github.com/rstudio/rstudio/blob/4febd2feba912b2a9f8e77e3454a95c23a09d0a2/src/cpp/core/system/Win32System.cpp#L411-L458 path <- path_home_r(".R", "snippets", path_ext_set(tolower(type), "snippets")) edit_file(path) } scoped_path_r <- function(scope = c("user", "project"), ..., envvar = NULL) { scope <- match.arg(scope) # Try environment variable in user scopes if (scope == "user" && !is.null(envvar)) { env <- Sys.getenv(envvar, unset = "") if (!identical(env, "")) { return(user_path_prep(env)) } } root <- switch(scope, user = path_home_r(), project = proj_get() ) path(root, ...) } # git paths --------------------------------------------------------------- # Note that on windows R's definition of ~ is in a nonstandard place, # so it is important to use path_home(), not path_home_r() #' @export #' @rdname edit edit_git_config <- function(scope = c("user", "project")) { scope <- match.arg(scope) path <- switch( scope, user = path_home(".gitconfig"), project = proj_path(".git", "config") ) invisible(edit_file(path)) } #' @export #' @rdname edit edit_git_ignore <- function(scope = c("user", "project")) { scope <- match.arg(scope) file <- git_ignore_path(scope) if (scope == "user" && !file_exists(file)) { ui_done("Setting up new global gitignore: {ui_path(file)}") # Describe relative to home directory path <- path("~", path_rel(file, path_home())) git_config_set("core.excludesfile", path, global = TRUE) git_vaccinate() } invisible(edit_file(file)) } git_ignore_path <- function(scope = c("user", "project")) { scope <- match.arg(scope) if (scope == "project") { return(proj_path(".gitignore")) } # .gitignore is most common, but .gitignore_global appears in prominent # places --> so we allow the latter, but prefer the former path <- path_home(".gitignore") if (file_exists(path)) { return(path) } alt_path <- path_home(".gitignore_global") if (file_exists(alt_path)) { return(alt_path) } path } usethis/R/github-utils.R0000644000176200001440000000463213453664176014726 0ustar liggesusersgithub_remotes <- function() { remotes <- git_remotes() if (length(remotes) == 0) return(NULL) m <- vapply(remotes, function(x) grepl("github", x), logical(1)) if (length(m) == 0) return(NULL) remotes[m] } github_remote <- function(name) { remotes <- github_remotes() if (length(remotes) == 0) return(NULL) remotes[[name]] } github_remote_protocol <- function(name = "origin") { # https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols url <- github_remote(name) if (is.null(url)) return(NULL) switch( substr(url, 1, 5), `https` = "https", `git@g` = "ssh", ui_stop( "Can't classify URL for {ui_value(name)} remote as \\ {ui_value('ssh')}' or {ui_value('https')}:\\ \n{ui_code(url)}" ) ) } github_origin <- function() { r <- github_remote("origin") if (is.null(r)) return(r) parse_github_remotes(r)[[1]] } github_upstream <- function() { r <- github_remote("upstream") if (is.null(r)) return(r) parse_github_remotes(r)[[1]] } github_owner <- function() { github_origin()[["owner"]] } github_owner_upstream <- function() { github_upstream()[["owner"]] } github_repo <- function() { github_origin()[["repo"]] } github_repo_spec <- function(name = "origin") { url <- github_remote(name) paste0(parse_github_remotes(url)[[1]], collapse = "/") } ## repo_spec --> owner, repo parse_repo_spec <- function(repo_spec) { repo_split <- strsplit(repo_spec, "/")[[1]] if (length(repo_split) != 2) { ui_stop("{ui_code('repo_spec')} must be of form {ui_value('owner/repo')}.") } list(owner = repo_split[[1]], repo = repo_split[[2]]) } spec_owner <- function(repo_spec) parse_repo_spec(repo_spec)$owner spec_repo <- function(repo_spec) parse_repo_spec(repo_spec)$repo ## named vector or list of Git remote URLs --> named list of (owner, repo) parse_github_remotes <- function(x) { # https://github.com/r-lib/devtools.git --> rlib, devtools # https://github.com/r-lib/devtools --> rlib, devtools # git@github.com:r-lib/devtools.git --> rlib, devtools # git@github.com:/r-hub/rhub.git --> r-hub, rhub re <- "github[^/:]*[:/]{1,2}([^/]+)/(.*?)(?:\\.git)?$" ## on R < 3.4.2, regexec() fails to apply as.character() to first 2 args, ## though it is documented m <- regexec(re, as.character(x)) match <- stats::setNames(regmatches(as.character(x), m), names(x)) lapply(match, function(y) list(owner = y[[2]], repo = y[[3]])) } usethis/R/usethis-package.R0000644000176200001440000000044013507207664015347 0ustar liggesusers#' @keywords internal #' @importFrom glue glue glue_collapse #' @import fs #' @importFrom rlang := %|% %||% "_PACKAGE" # The following block is used by usethis to automatically manage # roxygen namespace tags. Modify with care! ## usethis namespace: start ## usethis namespace: end NULL usethis/R/git.R0000644000176200001440000004622313507211611013051 0ustar liggesusers#' Initialise a git repository #' #' `use_git()` initialises a Git repository and adds important files to #' `.gitignore`. If user consents, it also makes an initial commit. #' #' @param message Message to use for first commit. #' @family git helpers #' @export #' @examples #' \dontrun{ #' use_git() #' } use_git <- function(message = "Initial commit") { if (uses_git()) { return(invisible()) } ui_done("Initialising Git repo") git_init() use_git_ignore(c(".Rhistory", ".RData", ".Rproj.user")) git_ask_commit(message, untracked = TRUE) restart_rstudio("A restart of RStudio is required to activate the Git pane") invisible(TRUE) } git_ask_commit <- function(message, untracked = FALSE) { if (!interactive() || !uses_git()) { return(invisible()) } paths <- unlist(git_status(untracked = untracked), use.names = FALSE) if (length(paths) == 0) { return(invisible()) } paths <- sort(paths) ui_paths <- purrr::map_chr(proj_path(paths), ui_path) n <- length(ui_paths) if (n > 20) { ui_paths <- c(ui_paths[1:20], "...") } ui_line(c( "There are {n} uncommitted files:", paste0("* ", ui_paths) )) if (ui_yeah("Is it ok to commit them?")) { ui_done("Adding files") repo <- git_repo() git2r::add(repo, paths) ui_done("Commit with message {ui_value(message)}") git2r::commit(repo, message) } invisible() } #' Add a git hook #' #' Sets up a git hook using specified script. Creates hook directory if #' needed, and sets correct permissions on hook. #' #' @param hook Hook name. One of "pre-commit", "prepare-commit-msg", #' "commit-msg", "post-commit", "applypatch-msg", "pre-applypatch", #' "post-applypatch", "pre-rebase", "post-rewrite", "post-checkout", #' "post-merge", "pre-push", "pre-auto-gc". #' @param script Text of script to run #' @family git helpers #' @export use_git_hook <- function(hook, script) { check_uses_git() hook_path <- proj_path(".git", "hooks", hook) create_directory(path_dir(hook_path)) write_over(hook_path, script) file_chmod(hook_path, "0744") invisible() } #' Tell git to ignore files #' #' @param ignores Character vector of ignores, specified as file globs. #' @param directory Directory relative to active project to set ignores #' @family git helpers #' @export use_git_ignore <- function(ignores, directory = ".") { write_union(proj_path(directory, ".gitignore"), ignores) } #' Configure Git #' #' Sets Git options, for either the user or the project ("global" or "local", in #' Git terminology). #' #' @param ... Name-value pairs. #' @return Invisibly, the previous values of the modified components. #' @inheritParams edit #' #' @family git helpers #' @export #' @examples #' \dontrun{ #' # set the user's global user.name and user.email #' use_git_config(user.name = "Jane", user.email = "jane@example.org") #' #' # set the user.name and user.email locally, i.e. for current repo/project #' use_git_config( #' scope = "project", #' user.name = "Jane", #' user.email = "jane@example.org" #' ) #' } use_git_config <- function(scope = c("user", "project"), ...) { scope <- match.arg(scope) if (scope == "user") { git_config(...) } else { check_uses_git() git_config(..., .repo = git_repo()) } } #' Produce or register git protocol #' #' Git operations that address a remote use a so-called "transport protocol". #' usethis supports SSH and HTTPS. The protocol affects two things: #' * The default URL format for repos with no existing remote protocol: #' - `protocol = "ssh"` implies `git@@github.com:/.git` #' - `protocol = "https"` implies `https://github.com//.git` #' * The strategy for creating `credentials` when none are given. See #' [git_credentials()] for details. #' Two helper functions are available: #' * `git_protocol()` returns the user's preferred protocol, if known, and, #' otherwise, asks the user (interactive session) or defaults to SSH #' (non-interactive session). #' * `use_git_protocol()` allows the user to set the git protocol, which is #' stored in the `usethis.protocol` option. #' Any interactive choice re: `protocol` comes with a reminder of how to set the #' protocol at startup by setting an option in `.Rprofile`: #' ``` #' options(usethis.protocol = "ssh") #' ## or #' options(usethis.protocol = "https") #' ``` #' #' @param protocol Optional. Should be "ssh" or "https", if specified. Defaults #' to the option `usethis.protocol` and, if unset, to an interactive choice #' or, in non-interactive sessions, "ssh". `NA` triggers the interactive menu. #' #' @return "ssh" or "https" #' @export #' #' @examples #' \dontrun{ #' ## consult the option and maybe get an interactive menu #' git_protocol() #' #' ## explicitly set the protocol #' use_git_protocol("ssh") #' use_git_protocol("https") #' } git_protocol <- function() { protocol <- getOption( "usethis.protocol", default = if (interactive()) NA else "ssh" ) ## this is where a user-supplied protocol gets checked, because ## use_git_protocol() shoves it in the option unconditionally and calls this bad_protocol <- length(protocol) != 1 || ! (tolower(protocol) %in% c("ssh", "https", NA)) if (bad_protocol) { options(usethis.protocol = NULL) ui_stop( "{ui_code('protocol')} must be one of {ui_value('ssh')}, \\ {ui_value('https')}', or {ui_value('NA')}." ) } if (is.na(protocol)) { protocol <- choose_protocol() if (is.null(protocol)) { ui_stop( "{ui_code('protocol')} must be either {ui_value('ssh')} or \\ {ui_value('https')}'." ) } code <- glue("options(usethis.protocol = \"{protocol}\")") ui_todo(c( "Tip: To suppress this menu in future, put", "{ui_code(code)}", "in your script or in a user- or project-level startup file, {ui_value('.Rprofile')}.", "Call {ui_code('usethis::edit_r_profile()')} to open it for editing." )) } protocol <- match.arg(tolower(protocol), c("ssh", "https")) options("usethis.protocol" = protocol) getOption("usethis.protocol") } #' @rdname git_protocol #' @export use_git_protocol <- function(protocol) { options("usethis.protocol" = protocol) git_protocol() } choose_protocol <- function() { ## intercept with our internal interactive() if (!interactive()) { return(invisible()) } choices <- c( ssh = "ssh <-- presumes that you have set up ssh keys", https = "https <-- choose this if you don't have ssh keys (or don't know if you do)" ) choice <- utils::menu( choices = choices, title = "Which git protocol to use? (enter 0 to exit)" ) if (choice == 0) { invisible() } else { names(choices)[choice] } } #' Configure and report Git remotes #' #' Two helpers are available: #' * `use_git_remote()` sets the remote associated with `name` to `url`. #' * `git_remotes()` reports the configured remotes, similar to #' `git remote -v`. #' #' @param name A string giving the short name of a remote. #' @param url A string giving the url of a remote. #' @param overwrite Logical. Controls whether an existing remote can be #' modified. #' #' @return Named list of Git remotes. #' @export #' #' @examples #' \dontrun{ #' # see current remotes #' git_remotes() #' #' # add new remote named 'foo', a la `git remote add ` #' use_git_remote(name = "foo", url = "https://github.com//.git") #' #' # remove existing 'foo' remote, a la `git remote remove ` #' use_git_remote(name = "foo", url = NULL, overwrite = TRUE) #' #' # change URL of remote 'foo', a la `git remote set-url ` #' use_git_remote( #' name = "foo", #' url = "https://github.com//.git", #' overwrite = TRUE #' ) #' #' # Scenario: Fix remotes when you cloned someone's repo, but you should #' # have fork-and-cloned (in order to make a pull request). #' #' # Store origin = main repo's URL, e.g., "git@github.com:/.git" #' upstream_url <- git_remotes()[["origin"]] #' #' # IN THE BROWSER: fork the main GitHub repo and get your fork's remote URL #' my_url <- "git@github.com:/.git" #' #' # Rotate the remotes #' use_git_remote(name = "origin", url = my_url) #' use_git_remote(name = "upstream", url = upstream_url) #' git_remotes() #' #' # Scenario: Add upstream remote to a repo that you fork-and-cloned, so you #' # can pull upstream changes. #' # Note: If you fork-and-clone via `usethis::create_from_github()`, this is #' # done automatically! #' #' # Get URL of main GitHub repo, probably in the browser #' upstream_url <- "git@github.com:/.git" #' use_git_remote(name = "upstream", url = upstream_url) #' } use_git_remote <- function(name = "origin", url, overwrite = FALSE) { stopifnot(is_string(name)) stopifnot(is.null(url) || is_string(url)) stopifnot(rlang::is_true(overwrite) || rlang::is_false(overwrite)) repo <- git_repo() remotes <- git_remotes() if (name %in% names(remotes) && !overwrite) { ui_stop("Remote {ui_value(name)} already exists. Use \\ {ui_code('overwrite = TRUE')} to edit it anyway.") } if (name %in% names(remotes)) { if (is.null(url)) { git2r::remote_remove(repo = repo, name = name) } else { git2r::remote_set_url(repo = repo, name = name, url = url) } } else { git2r::remote_add(repo = repo, name = name, url = url) } invisible(git_remotes()) } #' @rdname use_git_remote #' @export git_remotes <- function() { repo <- git_repo() rnames <- git2r::remotes(repo) if (length(rnames) == 0) { return(NULL) } stats::setNames(as.list(git2r::remote_url(repo, rnames)), rnames) } git2r_env <- new.env(parent = emptyenv()) have_git2r_credentials <- function() rlang::env_has(git2r_env, "credentials") #' Produce or register git credentials #' #' Credentials are needed for git operations like `git push` that address a #' remote, typically GitHub. usethis uses the git2r package. git2r tries to use #' the same credentials as command line git, but sometimes fails. usethis tries #' to increase the chance that things "just work" and, when they don't, to #' provide the user a way to intervene: #' * `git_credentials()` returns any `credentials` that have been registered #' with `use_git_credentials()` and, otherwise, implements usethis's #' default strategy. #' * `use_git_credentials()` allows you to register `credentials` explicitly #' for use in all usethis functions in an R session. Do this only after #' proven failure of the defaults. #' #' @section Default credentials: #' #' If the default behaviour of usethis + git2r works, rejoice and leave well #' enough alone. Keep reading if you need more control or understanding. #' #' @section SSH credentials: #' #' For `protocol = "ssh"`, by default, usethis passes `NULL` credentials #' to git2r. This will work if you have the exact configuration expected by #' git2r: #' #' 1. Your public and private keys are in the default locations, #' `~/.ssh/id_rsa.pub` and `~/.ssh/id_rsa`, respectively. #' 1. All the relevant software agrees on the definition of `~/`, i.e. #' your home directory. This is harder than it sounds on Windows. #' 1. Your `ssh-agent` is configured to manage your SSH passphrase, if you have #' one. This too can be a problem on Windows. Read more about SSH setup in #' [Happy Git and GitHub for the useR](https://happygitwithr.com/ssh-keys.html), #' especially the [troubleshooting #' section](https://happygitwithr.com/ssh-keys.html#ssh-troubleshooting). #' #' If the `NULL` default doesn't work, you can make `credentials` explicitly #' with [git2r::cred_ssh_key()] and register that with #' `use_git_credentials()` for the rest of the session: #' ``` #' my_cred <- git2r::cred_ssh_key( #' publickey = "path/to/your/id_rsa.pub", #' privatekey = "path/to/your/id_rsa", #' # include / omit passphrase as appropriate to your situation #' passphrase = askpass::askpass() #' ) #' use_git_credentials(credentials = my_cred) #' ``` #' For the remainder of the session, `git_credentials()` will return #' `my_cred`. #' #' @section HTTPS credentials: #' #' For `protocol = "https"`, we must send username and password. It is #' possible that your OS has cached this and git2r will successfully use that. #' However, usethis can offer even more chance of success in the HTTPS case. #' GitHub also accepts a personal access token (PAT) via HTTPS. If #' `credentials = NULL` and a PAT is available, we send it. Preference is #' given to any `auth_token` that is passed explicitly. Otherwise, #' [github_token()] is called. If a PAT is found, we make an HTTPS #' credential with [git2r::cred_user_pass()]. The PAT is sent as the password #' and dummy text is sent as the username (the PAT is what really matters in #' this case). You can also register an explicit credential yourself in a #' similar way: #' ``` #' my_cred <- git2r::cred_user_pass( #' username = "janedoe", #' password = askpass::askpass() #' ) #' use_git_credentials(credentials = my_cred) #' ``` #' For the remainder of the session, `git_credentials()` will return #' `my_cred`. #' #' @inheritParams git_protocol #' @param auth_token GitHub personal access token (PAT). #' @param credentials A git2r credential object produced with #' [git2r::cred_env()], [git2r::cred_ssh_key()], [git2r::cred_token()], or #' [git2r::cred_user_pass()]. #' #' @return Either `NULL` or a git2r credential object, invisibly, i.e. #' something to be passed to git2r as `credentials`. #' @export #' #' @examples #' git_credentials() #' git_credentials(protocol = "ssh") #' #' \dontrun{ #' # these calls look for a GitHub PAT #' git_credentials(protocol = "https") #' git_credentials(protocol = "https", auth_token = "MY_GITHUB_PAT") #' } git_credentials <- function(protocol = git_protocol(), auth_token = github_token()) { if (have_git2r_credentials()) { return(git2r_env$credentials) } if (is.null(protocol) || protocol == "ssh") { return(NULL) } if (have_github_token(auth_token)) { git2r::cred_user_pass("EMAIL", check_github_token(auth_token)) } else { NULL } } #' @rdname git_credentials #' @export use_git_credentials <- function(credentials) { git2r_env$credentials <- credentials invisible(git_credentials()) } #' git/GitHub sitrep #' #' Get a situation report on your current git/GitHub status. Useful for #' diagnosing problems. [git_vaccinate()] adds some basic R- and RStudio-related #' entries to the user-level git ignore file. #' @export #' @examples #' git_sitrep() git_sitrep <- function() { # git user ------------------------------------------------------------------ hd_line("Git user") kv_line("Name", git_config_get("user.name", global = TRUE)) kv_line("Email", git_config_get("user.email", global = TRUE)) ## TODO: forward info from the credentials package once we start using it ## and it reflects the credentials situation usethis will actually meet ## e.g., git version, HTTPS credential helpers, SSH keys, etc. kv_line("Vaccinated", git_vaccinated()) # usethis + git2r ---------------------------------------------------------- hd_line("usethis + git2r") kv_line("Default usethis protocol", getOption("usethis.protocol")) kv_line("git2r supports SSH", git2r::libgit2_features()$ssh) credentials_value <- if (have_git2r_credentials()) { glue("") } else { "" } kv_line("Credentials", credentials_value) # github user --------------------------------------------------------------- hd_line("GitHub") have_token <- have_github_token() if (have_token) { kv_line("Personal access token", "") tryCatch( { who <- gh::gh_whoami(github_token()) kv_line("User", who$login) kv_line("Name", who$name) }, http_error_401 = function(e) ui_oops("Token is invalid."), error = function(e) ui_oops("Can't validate token. Is the network reachable?") ) } else { kv_line("Personal access token", NULL) } # repo overview ------------------------------------------------------------- hd_line("Repo") withr::with_options( list(usethis.quiet = TRUE), try(proj_get(), silent = TRUE) ) if (!proj_active()) { ui_info("No active usethis project.") return(invisible()) } if (!uses_git()) { ui_info("Active project is not a Git repo.") return(invisible()) } kv_line("Path", git_repo()$path) branch <- tryCatch(git_branch_name(), error = function(e) NULL) tracking_branch <- if (is.null(branch)) NULL else git_branch_tracking() ## TODO: rework when ui_*() functions make it possible to do better branch <- if (is.null(branch)) "" else branch tracking_branch <- if (is.null(tracking_branch)) "" else tracking_branch cat_line("* ", "Local branch -> remote tracking branch: ", ui_value(branch), " -> ", ui_value(tracking_branch)) # PR outlook ------------------------------------------------------------- hd_line("GitHub pull request readiness") if (is.null(github_remote("origin")) && is.null(github_remote("upstream"))) { ui_info( " This repo has neither {ui_value('origin')} nor {ui_value('upstream')} \\ remote on GitHub.com. " ) return(invisible()) } origin <- git_remote_scrutinize("origin", have_token) upstream <- git_remote_scrutinize("upstream", have_token) kv_line("origin", github_remote_report(origin)) kv_line("upstream", github_remote_report(upstream)) } git_remote_scrutinize <- function(name, have_token = have_github_token()) { out <- list( exists = FALSE, is_github = NA, spec = NA, perms = NA_character_, is_fork = NA, fork_spec = NA_character_ ) remotes <- git_remotes() if (is.null(remotes)) { return(out) } if (is.null(remotes[[name]])) { return(out) } out$exists <- TRUE gh_remote <- github_remote(name) if (is.null(gh_remote)) { out$is_github <- FALSE return(out) } out$is_github <- TRUE out$spec <- github_repo_spec(name) gh_GET <- if (have_token) gh::gh(glue("/repos/{out$spec}")) else NULL if (is.null(gh_GET)) { return(out) } out$perms <- if (isTRUE(gh_GET$permissions$push)) "can push" else "read only" out$is_fork <- isTRUE(gh_GET$fork) if (!out$is_fork) { return(out) } out$fork_spec <- gh_GET$parent$full_name out } github_remote_report <- function(info) { if (!info$exists) { return("") } if (!info$is_github) { return("") } out <- info[c("spec", "perms")] if (isTRUE(info$is_fork)) { out <- c(out, glue("forked from {info$fork_spec}")) } out } # Vaccination ------------------------------------------------------------- #' Vaccinate your global git ignore #' #' Adds `.DS_Store`, `.Rproj.user`, and `.Rhistory` to your global #' `.gitignore`. This is good practices as it ensures that you will never #' accidentally leak credentials to GitHub. #' #' @export git_vaccinate <- function() { path <- git_ignore_path("user") write_union(path, git_global_ignore) } git_vaccinated <- function() { path <- git_ignore_path("user") if (!file_exists(path)) { return(FALSE) } lines <- readLines(path) all(git_global_ignore %in% lines) } git_global_ignore <- c( ".Rproj.user", ".Rhistory", ".Rdata", ".DS_Store" ) usethis/R/license.R0000644000176200001440000000727113453664176013732 0ustar liggesusers#' License a package #' #' @description #' Adds the necessary infrastructure to declare your package as licensed #' with one of these popular open source licenses: #' #' * [CC0](https://creativecommons.org/publicdomain/zero/1.0/): dedicated #' to public domain. Appropriate for data packages. #' * [MIT](https://choosealicense.com/licenses/mit/): simple and permissive. #' * [Apache 2.0](https://choosealicense.com/licenses/apache-2.0/): #' provides patent protection. #' * [GPL v3](https://choosealicense.com/licenses/gpl-3.0/): requires sharing #' of improvements. #' * [CCBY 4.0](https://creativecommons.org/licenses/by/4.0/): Free to share and #' adapt, must give appropriate credit. Appropriate for data packages. #' #' See for more details and other options. #' #' @details #' CRAN does not allow you to include copies of standard licenses in your #' package, so these functions save the license as `LICENSE.md` and add it #' to `.Rbuildignore`. #' #' @name licenses #' @param name Name of the copyright holder or holders. Separate multiple #' individuals with `;`. You can supply a global default with #' `options(usethis.full_name = "My name")`. #' @seealso The [license #' section](https://r-pkgs.org/description.html#license) of [R #' Packages](https://r-pkgs.org). #' @aliases NULL NULL #' @rdname licenses #' @export use_mit_license <- function(name = find_name()) { force(name) check_is_package("use_mit_license()") use_description_field("License", "MIT + file LICENSE", overwrite = TRUE) use_license_template("mit", name) # Fill in template use_template( "license-mit.txt", save_as = "LICENSE", data = license_data(name) ) } #' @rdname licenses #' @export use_gpl3_license <- function(name = find_name()) { force(name) check_is_package("use_gpl3_license()") use_description_field("License", "GPL-3", overwrite = TRUE) use_license_template("GPL-3", name) } #' @rdname licenses #' @export use_lgpl_license <- function(name = find_name()) { force(name) check_is_package("use_lgpl_license()") use_description_field("License", "LGPL (>= 2.1)", overwrite = TRUE) use_license_template("LGPL-2.1", name) } #' @rdname licenses #' @export use_apl2_license <- function(name = find_name()) { force(name) check_is_package("use_apl2_license()") use_description_field("License", "Apache License (>= 2.0)", overwrite = TRUE) use_license_template("apache-2.0", name) } #' @rdname licenses #' @export use_cc0_license <- function(name = find_name()) { force(name) check_is_package("use_cc0_license()") use_description_field("License", "CC0", overwrite = TRUE) use_license_template("cc0", name) } #' @rdname licenses #' @export use_ccby_license <- function(name = find_name()) { force(name) check_is_package("use_ccby_license()") use_description_field("License", "CCBY-4.0", overwrite = TRUE) use_license_template("ccby-4", name) } use_license_template <- function(license, name) { license_template <- glue("license-{license}.md") use_template( license_template, save_as = "LICENSE.md", data = license_data(name), ignore = TRUE ) } license_data <- function(name, base_path = proj_get()) { list( year = format(Sys.Date(), "%Y"), name = name, project = project_name(base_path) ) } find_name <- function() { name <- getOption("usethis.full_name") if (!is.null(name)) { return(name) } name <- getOption("devtools.name") if (!is.null(name) && name != "Your name goes here") { return(name) } ui_stop( " {ui_code('name')} argument is missing. Set it globally with {ui_code('options(usethis.full_name = \"My name\")')}\\ probably in your {ui_path('.Rprofile')}. " ) } usethis/R/proj.R0000644000176200001440000002075413507305732013251 0ustar liggesusersproj <- new.env(parent = emptyenv()) proj_get_ <- function() proj$cur proj_set_ <- function(path) { old <- proj$cur proj$cur <- path invisible(old) } #' Utility functions for the active project #' #' Most `use_*()` functions act on the **active project**. If it is #' unset, usethis uses [rprojroot](https://rprojroot.r-lib.org) to #' find the project root of the current working directory. It establishes the #' project root by looking for a `.here` file, an RStudio Project, a package #' `DESCRIPTION`, Git infrastructure, a `remake.yml` file, or a `.projectile` #' file. It then stores the active project for use for the remainder of the #' session. #' #' In general, end user scripts should not contain direct calls to #' `usethis::proj_*()` utility functions. They are internal functions that are #' exported for occasional interactive use or use in packages that extend #' usethis. End user code should call functions in #' [rprojroot](https://rprojroot.r-lib.org) or its simpler companion, #' [here](https://here.r-lib.org), to programmatically detect a project and #' build paths within it. #' #' @name proj_utils #' @family project functions #' @examples #' \dontrun{ #' ## see the active project #' proj_get() #' #' ## manually set the active project #' proj_set("path/to/target/project") #' #' ## build a path within the active project (both produce same result) #' proj_path("R/foo.R") #' proj_path("R", "foo", ext = "R") #' #' ## build a path within SOME OTHER project #' with_project("path/to/some/other/project", proj_path("blah.R")) #' #' ## convince yourself that with_project() temporarily changes the project #' with_project("path/to/some/other/project", print(proj_sitrep())) #' } NULL #' @describeIn proj_utils Retrieves the active project and, if necessary, #' attempts to set it in the first place. #' @export proj_get <- function() { # Called for first time so try working directory if (!proj_active()) { proj_set(".") } proj_get_() } #' @describeIn proj_utils Sets the active project. #' @param path Path to set. This `path` should exist or be `NULL`. #' @param force If `TRUE`, use this path without checking the usual criteria for #' a project. Use sparingly! The main application is to solve a temporary #' chicken-egg problem: you need to set the active project in order to add #' project-signalling infrastructure, such as initialising a Git repo or #' adding a `DESCRIPTION` file. #' @export proj_set <- function(path = ".", force = FALSE) { if (dir_exists(path %||% "") && is_in_proj(path)) { return(invisible(proj_get_())) } path <- proj_path_prep(path) if (is.null(path) || force) { proj_string <- if (is.null(path)) "" else path ui_done("Setting active project to {ui_value(proj_string)}") return(proj_set_(path)) } check_path_is_directory(path) new_project <- proj_find(path) if (is.null(new_project)) { ui_stop( "Path {ui_path(path)} does not appear to be inside a project or package." ) } proj_set(path = new_project, force = TRUE) } #' @describeIn proj_utils Builds a path within the active project returned by #' `proj_get()`. Thin wrapper around [fs::path()]. #' @inheritParams fs::path #' @export proj_path <- function(..., ext = "") { path_norm(path(proj_get(), ..., ext = ext)) } #' @describeIn proj_utils Runs code with a temporary active project. It is an #' example of the `with_*()` functions in [withr](https://withr.r-lib.org). #' @param code Code to run with temporary active project. #' @param quiet Whether to suppress user-facing messages, while operating in the #' temporary active project. #' @export with_project <- function(path = ".", code, force = FALSE, quiet = getOption("usethis.quiet", default = FALSE)) { old_quiet <- options(usethis.quiet = quiet) old_proj <- proj_set(path = path, force = force) on.exit({ proj_set(path = old_proj, force = TRUE) options(old_quiet) }) force(code) } #' @describeIn proj_utils Sets an active project until the current execution #' environment goes out of scope, e.g. the end of the current function or #' test. It is an example of the `local_*()` functions in #' [withr](https://withr.r-lib.org). #' @param .local_envir The environment to use for scoping. Defaults to current #' execution environment. #' @export local_project <- function(path = ".", force = FALSE, quiet = getOption("usethis.quiet", default = FALSE), .local_envir = parent.frame()) { old_quiet <- options(usethis.quiet = quiet) old_proj <- proj_set(path = path, force = force) withr::defer({ proj_set(path = old_proj, force = TRUE) options(old_quiet) }, envir = .local_envir) } ## usethis policy re: preparation of the path to active project proj_path_prep <- function(path) { if (is.null(path)) return(path) path_real(path) } ## usethis policy re: preparation of user-provided path to a resource on user's ## file system user_path_prep <- function(path) { ## usethis uses fs's notion of home directory ## this ensures we are consistent about that path_expand(path) } proj_rel_path <- function(path) { if (is_in_proj(path)) { path_rel(path, start = proj_get()) } else { path } } proj_crit <- function() { rprojroot::has_file(".here") | rprojroot::is_rstudio_project | rprojroot::is_r_package | rprojroot::is_git_root | rprojroot::is_remake_project | rprojroot::is_projectile_project } proj_find <- function(path = ".") { tryCatch( rprojroot::find_root(proj_crit(), path = path), error = function(e) NULL ) } possibly_in_proj <- function(path = ".") !is.null(proj_find(path)) is_package <- function(base_path = proj_get()) { res <- tryCatch( rprojroot::find_package_root_file(path = base_path), error = function(e) NULL ) !is.null(res) } check_is_package <- function(whos_asking = NULL) { if (is_package()) { return(invisible()) } message <- "Project {ui_value(project_name())} is not an R package." if (!is.null(whos_asking)) { message <- c( "{ui_code(whos_asking)} is designed to work with packages.", message ) } ui_stop(message) } proj_active <- function() !is.null(proj_get_()) is_in_proj <- function(path) { if (!proj_active()) { return(FALSE) } identical( proj_get(), ## use path_abs() in case path does not exist yet path_common(c(proj_get(), path_expand(path_abs(path)))) ) } project_data <- function(base_path = proj_get()) { if (!possibly_in_proj(base_path)) { ui_stop(c( "{ui_path(base_path)} doesn't meet the usethis criteria for a project.", "Read more in the help for {ui_code(\"proj_get()\")}." )) } if (is_package(base_path)) { data <- package_data(base_path) } else { data <- list(Project = path_file(base_path)) } if (proj_active() && uses_github()) { data$github_owner <- github_owner() data$github_repo <- github_repo() data$github_spec <- github_repo_spec() } data } package_data <- function(base_path = proj_get()) { desc <- desc::description$new(base_path) as.list(desc$get(desc$fields())) } project_name <- function(base_path = proj_get()) { ## escape hatch necessary to solve this chicken-egg problem: ## create_package() calls use_description(), which calls project_name() ## to learn package name from the path, in order to make DESCRIPTION ## and DESCRIPTION is how we recognize a package as a usethis project if (!possibly_in_proj(base_path)) { return(path_file(base_path)) } if (is_package(base_path)) { project_data(base_path)$Package } else { project_data(base_path)$Project } } #' Activate a project #' #' Activates a project in usethis, R session, and (if relevant) RStudio senses. #' If you are in RStudio, this will open a new RStudio session. If not, it will #' change the working directory and [active project][proj_set()]. #' #' @param path Project directory #' @return Single logical value indicating if current session is modified. #' @export proj_activate <- function(path) { check_path_is_directory(path) path <- user_path_prep(path) if (rstudioapi::isAvailable()) { ui_done("Opening {ui_path(path, base = NA)} in new RStudio session") rstudioapi::openProject(path, newSession = TRUE) invisible(FALSE) } else { if (user_path_prep(getwd()) != path) { ui_done("Changing working directory to {ui_path(path, base = NA)}") setwd(path) } proj_set(path) invisible(TRUE) } } usethis/R/package.R0000644000176200001440000000715313507307332013666 0ustar liggesusers#' Depend on another package #' #' `use_package()` adds a CRAN package dependency to `DESCRIPTION` and offers a #' little advice about how to best use it. `use_dev_package()` adds a versioned #' dependency on an in-development GitHub package, adding the repo to `Remotes` #' so it will be automatically installed from the correct location. #' #' @param package Name of package to depend on. #' @param type Type of dependency: must be one of "Imports", "Depends", #' "Suggests", "Enhances", or "LinkingTo" (or unique abbreviation). Matching #' is case insensitive. #' @param min_version Optionally, supply a minimum version for the package. #' Set to `TRUE` to use the currently installed version. #' @seealso The [dependencies #' section](https://r-pkgs.org/description.html#dependencies) of [R #' Packages](https://r-pkgs.org). #' @export #' @examples #' \dontrun{ #' use_package("ggplot2") #' use_package("dplyr", "suggests") #' use_dev_package("glue") #' } use_package <- function(package, type = "Imports", min_version = NULL) { refuse_package(package, verboten = "tidyverse") use_dependency(package, type, min_version = min_version) how_to_use(package, type) invisible() } #' @export #' @rdname use_package use_dev_package <- function(package, type = "Imports") { refuse_package(package, verboten = "tidyverse") use_dependency(package, type = type, min_version = TRUE) use_remote(package) how_to_use(package, type) invisible() } use_remote <- function(package) { remotes <- desc::desc_get_remotes(proj_get()) if (any(grepl(package, remotes))) { return(invisible()) } package_remote <- package_remote(package) ui_done( "Adding {ui_value(package_remote)} to {ui_field('Remotes')} field in DESCRIPTION" ) remotes <- c(remotes, package_remote) desc::desc_set_remotes(remotes, file = proj_get()) invisible() } # Helpers ----------------------------------------------------------------- ## TO DO: make this less hard-wired to GitHub? package_remote <- function(package) { desc <- desc::desc(package = package) github_info <- desc$get(c("GithubUsername", "GithubRepo")) if (any(is.na(github_info))) { ui_stop("{ui_value(package)} was not installed from GitHub.") } glue_collapse(github_info, sep = "/") } refuse_package <- function(package, verboten) { if (identical(package, verboten)) { ui_stop( "{ui_value(package)} is a meta-package and it is rarely a good idea to \\ depend on it. Please determine the specific underlying package(s) that \\ offer the function(s) you need and depend on that instead." ) } invisible(package) } how_to_use <- function(package, type) { types <- tolower(c("Imports", "Depends", "Suggests", "Enhances", "LinkingTo")) type <- match.arg(tolower(type), types) switch(type, imports = ui_todo("Refer to functions with {ui_code(paste0(package, '::fun()'))}"), depends = ui_todo( "Are you sure you want {ui_field('Depends')}? \\ {ui_field('Imports')} is almost always the better choice." ), suggests = { code <- glue("requireNamespace(\"{package}\", quietly = TRUE)") ui_todo("Use {ui_code(code)} to test if package is installed") code <- glue("{package}::fun()") ui_todo("Then directly refer to functons like {ui_code(code)} (replacing {ui_code('fun()')}).") }, enhances = "", linkingto = show_includes(package) ) } show_includes <- function(package) { incl <- path_package("include", package = package) h <- dir_ls(incl, regexp = "[.](h|hpp)$") if (length(h) == 0) return() ui_todo("Possible includes are:") ui_code_block("#include <{path_file(h)}>", copy = FALSE) } usethis/R/vignette.R0000644000176200001440000000443213507307032014112 0ustar liggesusers#' Create a vignette or article. #' #' Creates a new vignette or article in `vignettes/`. Articles are a special #' type of vignette that appear on pkgdown websites, but are not included #' in the package itself (because they are added to `.Rbuildignore` #' automatically). #' #' @section General setup: #' * Adds needed packages to `DESCRIPTION`. #' * Adds `inst/doc` to `.gitignore` so built vignettes aren't tracked. #' * Adds `vignettes/*.html` and `vignettes/*.R` to `.gitignore` so #' you never accidentally track rendered vignettes. #' @param name Base for file name to use for new vignette. Should consist only #' of numbers, letters, `_` and `-`. Lower case is recommended. #' @param title The title of the vignette. #' @seealso The [vignettes chapter](https://r-pkgs.org/vignettes.html) of #' [R Packages](https://r-pkgs.org). #' @export #' @examples #' \dontrun{ #' use_vignette("how-to-do-stuff", "How to do stuff") #' } use_vignette <- function(name, title = name) { check_is_package("use_vignette()") check_vignette_name(name) use_dependency("knitr", "Suggests") use_description_field("VignetteBuilder", "knitr") use_git_ignore("inst/doc") use_vignette_template("vignette.Rmd", name, title) invisible() } #' @export #' @rdname use_vignette use_article <- function(name, title = name) { check_is_package("use_article()") path <- use_vignette_template("article.Rmd", name, title) use_build_ignore(path) invisible() } use_vignette_template <- function(template, name, title) { stopifnot(is_string(name)) stopifnot(is_string(title)) use_directory("vignettes") use_git_ignore(c("*.html", "*.R"), directory = "vignettes") use_dependency("rmarkdown", "Suggests") path <- path("vignettes", asciify(name), ext = "Rmd") data <- project_data() data$vignette_title <- title data$braced_vignette_title <- glue::glue("{{{title}}}") use_template(template, save_as = path, data = data, open = TRUE ) path } check_vignette_name <- function(name) { if (!valid_vignette_name(name)) { ui_stop(c( "{ui_value(name)} is not a valid filename for a vignette. It must:", "* Start with a letter.", "* Contain only letters, numbers, '_', and '-'." )) } } valid_vignette_name <- function(x) { grepl("^[[:alpha:]][[:alnum:]_-]+$", x) } usethis/R/ignore.R0000644000176200001440000000136513453664176013571 0ustar liggesusers#' Add files to `.Rbuildignore` #' #' `.Rbuildignore` has a regular expression on each line, but it's #' usually easier to work with specific file names. By default, #' `use_build_ignore` will (crudely) turn a filename into a regular #' expression that will only match that path. Repeated entries will be #' silently removed. #' #' @param files Character vector of path names. #' @param escape If `TRUE`, the default, will escape `.` to #' `\\.` and surround with `^` and `$`. #' @export use_build_ignore <- function(files, escape = TRUE) { if (escape) { files <- escape_path(files) } write_union(proj_path(".Rbuildignore"), files) } escape_path <- function(x) { x <- gsub("\\.", "\\\\.", x) x <- gsub("/$", "", x) paste0("^", x, "$") } usethis/R/pkgdown.R0000644000176200001440000000565613453664176013766 0ustar liggesusers#' Use pkgdown #' #' [pkgdown](https://pkgdown.r-lib.org) makes it easy to turn your package into #' a beautiful website. There are two helper functions: #' * `use_pkgdown()`: creates a pkgdown config file and adds the file and #' destination directory to `.Rbuildignore`. #' * `use_pkgdown_travis()`: helps you set up pkgdown for automatic deployment #' on Travis-CI. #' #' @seealso #' @param config_file Path to the pkgdown yaml config file #' @param destdir Target directory for pkgdown docs #' @export use_pkgdown <- function(config_file = "_pkgdown.yml", destdir = "docs") { check_is_package("use_pkgdown()") check_installed("pkgdown") use_build_ignore(c(config_file, destdir)) use_build_ignore("pkgdown") if (has_logo()) { pkgdown::build_favicon(proj_get()) } config <- proj_path(config_file) write_over(config, paste("destination:", destdir)) edit_file(config) invisible(TRUE) } #' @export #' @rdname use_pkgdown use_pkgdown_travis <- function() { check_installed("pkgdown") if (!uses_pkgdown()) { ui_stop(c( "Package doesn't use pkgdown.", "Do you need to call {ui_code('use_pkgdown()')}?" )) } use_build_ignore("docs/") use_git_ignore("docs/") # TODO: suggest git rm -r --cache docs/ # Can't currently detect if git known files in that directory if (has_logo()) { pkgdown::build_favicon(proj_get()) use_build_ignore("pkgdown") } ui_todo("Set up deploy keys by running {ui_code('travis::use_travis_deploy()')}") ui_todo("Insert the following code in {ui_path('.travis.yml')}") ui_code_block( " before_cache: Rscript -e 'remotes::install_cran(\"pkgdown\")' deploy: provider: script script: Rscript -e 'pkgdown::deploy_site_github()' skip_cleanup: true " ) if (!git_branch_exists("origin/gh-pages")) { create_gh_pages_branch() } invisible() } create_gh_pages_branch <- function() { # git hash-object -t tree /dev/null. sha_empty_tree <- "4b825dc642cb6eb9a060e54bf8d69288fbee4904" # Create commit with empty tree res <- gh::gh("POST /repos/:owner/:repo/git/commits", owner = github_owner(), repo = github_repo(), message = "first commit", tree = sha_empty_tree ) # Assign ref to above commit gh::gh( "POST /repos/:owner/:repo/git/refs", owner = github_owner(), repo = github_repo(), ref = "refs/heads/gh-pages", sha = res$sha ) } uses_pkgdown <- function() { file_exists(proj_path("_pkgdown.yml")) || file_exists(proj_path("pkgdown", "_pkgdown.yml")) } pkgdown_link <- function() { if (!uses_pkgdown()) { return(NULL) } path <- proj_path("_pkgdown.yml") yaml <- yaml::yaml.load_file(path) %||% list() if (is.null(yaml$url)) { ui_warn(" Package does not provide a pkgdown URL. Set one in the `url:` field of `_pkgdown.yml`" ) return(NULL) } gsub("/$", "", yaml$url) } usethis/R/release.R0000644000176200001440000001134413507222203013701 0ustar liggesusers#' Create a release issue checklist #' #' When preparing to release a package there are quite a few steps that #' need to be performed, and some of the steps can take multiple hours. #' This function creates an issue checklist so that you can keep track of #' where you are in the process, and feel a sense of satisfaction as you #' progress. It also helps watchers of your package stay informed about where #' you are in the process. #' #' @param version Version number for release #' @export #' @examples #' \dontrun{ #' use_release_issue("2.0.0") #' } use_release_issue <- function(version = NULL) { check_uses_github() check_is_package("use_release_issue()") version <- version %||% choose_version() if (is.null(version)) { return(invisible(FALSE)) } checklist <- release_checklist(version) issue <- gh::gh("POST /repos/:owner/:repo/issues", owner = github_owner(), repo = github_repo(), title = glue("Release {project_name()} {version}"), body = paste(checklist, "\n", collapse = "") ) view_url(issue$html_url) } release_checklist <- function(version) { type <- release_type(version) on_cran <- !is.null(cran_version()) has_src <- dir_exists(proj_path("src")) has_news <- file_exists(proj_path("NEWS.md")) todo <- function(x, cond = TRUE) { x <- glue(x, .envir = parent.frame()) if (cond) { paste0("* [ ] ", x) } } c( "Prepare for release:", "", todo("Check that description is informative", !on_cran), todo("Check licensing of included files", !on_cran), todo("`usethis::use_cran_comments()`", !on_cran), todo("`devtools::check()`"), todo("`devtools::check_win_devel()`"), todo("`rhub::check_for_cran()`"), todo("`rhub::check(platform = 'ubuntu-rchk')`", has_src), todo("`rhub::check_with_sanitizers()`", has_src), todo("`revdepcheck::revdep_check(num_workers = 4)`", on_cran), todo("[Polish NEWS](https://style.tidyverse.org/news.html#news-release)", on_cran), todo("Polish pkgdown reference index"), todo("Draft blog post", type != "patch"), "", "Submit to CRAN:", "", todo("`usethis::use_version('{type}')`"), todo("Update `cran-comments.md`"), todo("`devtools::submit_cran()`"), todo("Approve email"), "", "Wait for CRAN...", "", todo("Accepted :tada:"), todo("`usethis::use_github_release()`"), todo("`usethis::use_dev_version()`"), todo("`usethis::use_news_md()`", !has_news), todo("Update install instructions in README", !on_cran), todo("Finish blog post", type != "patch"), todo("Tweet"), todo("Add link to blog post in pkgdown news menu", type != "patch") ) } release_type <- function(version) { x <- unclass(numeric_version(version))[[1]] n <- length(x) if (n >= 3 && x[[3]] != 0L) { "patch" } else if (n >= 2 && x[[2]] != 0L) { "minor" } else { "major" } } #' Draft a GitHub release #' #' Creates a __draft__ GitHub release for the current package using the current #' version and `NEWS.md`. If you are comfortable that it is correct, you will #' need to publish the release from GitHub. It also deletes `CRAN-RELEASE` #' and checks that you've pushed all commits to GitHub. #' #' @inheritParams use_github_links #' @export use_github_release <- function(host = NULL, auth_token = github_token()) { cran_release <- proj_path("CRAN-RELEASE") if (file_exists(cran_release)) { file_delete(cran_release) } check_uses_github() check_branch_pushed() check_github_token(auth_token) package <- package_data() release <- gh::gh( "POST /repos/:owner/:repo/releases", owner = github_owner(), repo = github_repo(), tag_name = paste0("v", package$Version), name = paste0(package$Package, " ", package$Version), body = news_latest(), draft = TRUE, .api_url = host, .token = auth_token ) view_url(release$html_url) } cran_version <- function(package = project_name(), available = utils::available.packages()) { idx <- available[, "Package"] == package if (any(idx)) { as.package_version(available[package, "Version"]) } else { NULL } } news_latest <- function() { path <- proj_path("NEWS.md") if (!file_exists(path)) { ui_stop("{ui_path(path)} not found") } lines <- readLines(path) headings <- which(grepl("^#\\s+", lines)) if (length(headings) == 0) { ui_stop("No top-level headings found in {ui_value(path)}") } else if (length(headings) == 1) { news <- lines[seq2(headings + 1, length(lines))] } else { news <- lines[seq2(headings[[1]] + 1, headings[[2]] - 1)] } # Remove leading and trailing empty lines text <- which(news != "") news <- news[text[[1]]:text[[length(text)]]] paste(news, "\n", collapse = "") } usethis/R/ci.R0000644000176200001440000001371513507207664012676 0ustar liggesusers#' Continuous integration setup and badges #' #' Sets up continuous integration (CI) services for an R package that is #' developed on GitHub. CI services can run `R CMD check` automatically on #' various platforms, triggered by each push or pull request. These functions #' * Add service-specific configuration files and add them to `.Rbuildignore`. #' * Activate a service or give the user a detailed prompt. #' * Provide the markdown to insert a badge into README. #' #' @name ci #' @aliases NULL NULL #' @section `use_travis()`: #' Adds a basic `.travis.yml` to the top-level directory of a package. This is a #' configuration file for the [Travis CI](https://travis-ci.org/) continuous #' integration service. #' @param browse Open a browser window to enable automatic builds for the #' package. #' @param ext which travis website to use. default to `"org"`for #' https://travis-ci.org. Change to `"com"` for https://travis-ci.com. #' @export #' @rdname ci use_travis <- function(browse = interactive(), ext = c("org", "com")) { check_uses_github() ext <- rlang::arg_match(ext) new <- use_template( "travis.yml", ".travis.yml", ignore = TRUE ) if (!new) return(invisible(FALSE)) travis_activate(browse, ext = ext) use_travis_badge(ext = ext) invisible(TRUE) } use_travis_badge <- function(ext = "org") { check_uses_github() url <- glue("https://travis-ci.{ext}/{github_repo_spec()}") img <- glue("{url}.svg?branch=master") use_badge("Travis build status", url, img) } travis_activate <- function(browse = interactive(), ext = "org") { url <- glue("https://travis-ci.{ext}/profile/{github_owner()}") ui_todo("Turn on travis for your repo at {url}") if (browse) { utils::browseURL(url) } } uses_travis <- function(base_path = proj_get()) { path <- glue("{base_path}/.travis.yml") file_exists(path) } check_uses_travis <- function(base_path = proj_get()) { if (uses_travis(base_path)) { return(invisible()) } ui_stop( " Cannot detect that package {ui_value(project_name(base_path))} already uses Travis. Do you need to run {ui_code('use_travis()')}? " ) } #' @section `use_appveyor()`: #' Adds a basic `appveyor.yml` to the top-level directory of a package. This is #' a configuration file for the [AppVeyor](https://www.appveyor.com) continuous #' integration service for Windows. #' @export #' @rdname ci use_appveyor <- function(browse = interactive()) { check_uses_github() new <- use_template("appveyor.yml", ignore = TRUE) if (!new) return(invisible(FALSE)) appveyor_activate(browse) use_appveyor_badge() invisible(TRUE) } appveyor_activate <- function(browse = interactive()) { url <- "https://ci.appveyor.com/projects/new" ui_todo("Turn on AppVeyor for this repo at {url}") if (browse) { utils::browseURL(url) } } use_appveyor_badge <- function() { appveyor <- appveyor_info() use_badge("AppVeyor build status", appveyor$url, appveyor$img) } appveyor_info <- function() { check_uses_github() img <- glue( "https://ci.appveyor.com/api/projects/status/github/", "{github_repo_spec()}?branch=master&svg=true" ) url <- glue("https://ci.appveyor.com/project/{github_repo_spec()}") list(url = url, img = img) } #' @section `use_gitlab_ci()`: #' Adds a basic `.gitlab-ci.yml` to the top-level directory of a package. This is #' a configuration file for the [GitLab CI/CD](https://docs.gitlab.com/ee/ci/) continuous #' integration service for GitLab. #' @export #' @rdname ci use_gitlab_ci <- function() { check_uses_git() new <- use_template( "gitlab-ci.yml", ".gitlab-ci.yml", ignore = TRUE ) if (!new) return(invisible(FALSE)) invisible(TRUE) } uses_gitlab_ci <- function(base_path = proj_get()) { path <- path(base_path, ".gitlab-ci.yml") file_exists(path) } check_uses_gitlab_ci <- function(base_path = proj_get()) { if (uses_gitlab_ci(base_path)) { return(invisible()) } ui_stop( " Cannot detect that package {ui_value(project_name(base_path))} already uses GitLab CI. Do you need to run {ui_code('use_gitlab_ci()')}? " ) } #' @section `use_circleci()`: #' Adds a basic `.circleci/config.yml` to the top-level directory of a package. This is a #' configuration file for the [CircleCI](https://circleci.com/) continuous #' integration service. #' @param image The Docker image to use for build. Must be available on #' [DockerHub](https://hub.docker.com). The #' [rocker/verse](https://hub.docker.com/r/rocker/verse) image includes TeX #' Live, pandoc, and the tidyverse packages. For a minimal image, try #' [rocker/r-ver](https://hub.docker.com/r/rocker/r-ver). To specify a version #' of R, change the tag from `latest` to the version you want, e.g. #' `rocker/r-ver:3.5.3`. #' @export #' @rdname ci use_circleci <- function(browse = interactive(), image = "rocker/verse:latest") { check_uses_github() use_directory(".circleci") new <- use_template( "circleci-config.yml", ".circleci/config.yml", data = list(package = project_name(), image = image), ignore = TRUE ) if (!new) { return(invisible(FALSE)) } circleci_activate(browse) use_circleci_badge() invisible(TRUE) } use_circleci_badge <- function() { check_uses_github() url <- glue("https://circleci.com/gh/{github_repo_spec()}") img <- glue("{url}.svg?style=svg") use_badge("CircleCI build status", url, img) } circleci_activate <- function(browse = interactive()) { url <- glue("https://circleci.com/add-projects/gh/{github_owner()}") ui_todo("Turn on CircleCI for your repo at {url}") if (browse) { utils::browseURL(url) } } uses_circleci <- function(base_path = proj_get()) { path <- glue("{base_path}/.circleci/config.yml") file_exists(path) } check_uses_circleci <- function(base_path = proj_get()) { if (uses_circleci(base_path)) { return(invisible()) } ui_stop( " Cannot detect that package {ui_field(project_name(base_path))} already uses CircleCI. Do you need to run {ui_code('use_circleci()')}? " ) } usethis/R/addin.R0000644000176200001440000000164713453664176013370 0ustar liggesusers#' Add minimal RStudio Addin binding #' #' This function helps you add a minimal #' [RStudio Addin](https://rstudio.github.io/rstudioaddins/) binding to #' `inst/rstudio/addins.dcf`. #' #' @param addin Name of the addin function, which should be defined in the #' `R` folder. #' @inheritParams use_template #' #' @export use_addin <- function(addin = "new_addin", open = interactive()) { addin_dcf_path <- proj_path("inst", "rstudio", "addins.dcf") if (!file_exists(addin_dcf_path)) { create_directory(proj_path("inst", "rstudio")) file_create(addin_dcf_path) ui_done("Creating {ui_path(addin_dcf_path)}") } addin_info <- render_template("addins.dcf", data = list(addin = addin)) addin_info[length(addin_info) + 1] <- "" write_utf8(addin_dcf_path, addin_info, append = TRUE) ui_done("Adding binding to {ui_code(addin)} to addins.dcf.") if (open) { edit_file(addin_dcf_path) } invisible(TRUE) } usethis/R/usethis-defunct.R0000644000176200001440000000074113453664176015415 0ustar liggesusers#' Defunct functions in usethis #' #' These functions are marked as defunct and have been removed from usethis. #' #' @name usethis-defunct #' @keywords internal NULL #' This function is defunct #' @rdname usethis-defunct #' @export use_depsy_badge <- function() { msg <- glue( "The Depsy project has officially concluded and is no longer ", "being maintained. Therefore {ui_code('use_depsy_badge()')}", " has been removed from usethis." ) .Defunct(msg = msg) } usethis/R/rmarkdown.R0000644000176200001440000000322413453664176014306 0ustar liggesusers#' Add an RMarkdown Template #' #' Adds files and directories necessary to add a custom rmarkdown template to #' RStudio. It creates: #' * `inst/rmarkdown/templates/{{template_dir}}`. Main directory. #' * `skeleton/skeleton.Rmd`. Your template Rmd file. #' * `template.yml` with basic information filled in. #' #' @param template_name The name as printed in the template menu. #' @param template_dir Name of the directory the template will live in within #' `inst/rmarkdown/templates`. #' @param template_description Sets the value of `description` in #' `template.yml`. #' @param template_create_dir Sets the value of `create_dir` in `template.yml`. #' #' @export #' @examples #' \dontrun{ #' use_rmarkdown_template() #' } use_rmarkdown_template <- function(template_name = "Template Name", template_dir = tolower(asciify(template_name)), template_description = "A description of the template", template_create_dir = FALSE) { # Process some of the inputs template_create_dir <- as.character(template_create_dir) template_dir <- path("inst", "rmarkdown", "templates", template_dir) # Scaffold files use_directory(path(template_dir, "skeleton")) use_template( "rmarkdown-template.yml", data = list( template_dir = template_dir, template_name = template_name, template_description = template_description, template_create_dir = template_create_dir ), save_as = path(template_dir, "template.yaml") ) use_template( "rmarkdown-template.Rmd", path(template_dir, "skeleton", "skeleton.Rmd") ) invisible(TRUE) } usethis/README.md0000644000176200001440000001373313507207664013236 0ustar liggesusers # usethis [![Travis build status](https://travis-ci.org/r-lib/usethis.svg?branch=master)](https://travis-ci.org/r-lib/usethis) [![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/r-lib/usethis?branch=master&svg=true)](https://ci.appveyor.com/project/r-lib/usethis) [![Codecov test coverage](https://codecov.io/gh/r-lib/usethis/branch/master/graph/badge.svg)](https://codecov.io/gh/r-lib/usethis?branch=master) [![CRAN status](https://www.r-pkg.org/badges/version/usethis)](https://CRAN.R-project.org/package=usethis) [![Lifecycle: stable](https://img.shields.io/badge/lifecycle-stable-brightgreen.svg)](https://www.tidyverse.org/lifecycle/#stable) usethis is a workflow package: it automates repetitive tasks that arise during project setup and development, both for R packages and non-package projects. ## Installation Install the released version of usethis from CRAN: ``` r install.packages("usethis") ``` Or install the development version from GitHub with: ``` r # install.packages("devtools") devtools::install_github("r-lib/usethis") ``` ## Usage Most `use_*()` functions operate on the *active project*: literally, a directory on your computer. If you’ve just used usethis to create a new package or project, that will be the active project. Otherwise, usethis verifies that current working directory is or is below a valid project directory and that becomes the active project. Use `proj_get()` or `proj_sitrep()` to manually query the project and [read more in the docs](https://usethis.r-lib.org/reference/proj_utils.html). A few usethis functions have no strong connections to projects and will expect you to provide a path. usethis is quite chatty, explaining what it’s doing and assigning you tasks. `✔` indicates something usethis has done for you. `●` indicates that you’ll need to do some work yourself. Below is a quick look at how usethis can help to set up a package. But remember, many usethis functions are also applicable to analytical projects that are not packages. ``` r library(usethis) # Create a new package ------------------------------------------------- path <- file.path(tempdir(), "mypkg") create_package(path) #> ✔ Creating '/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg/' #> ✔ Setting active project to '/private/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg' #> ✔ Creating 'R/' #> ✔ Writing 'DESCRIPTION' #> Package: mypkg #> Title: What the Package Does (One Line, Title Case) #> Version: 0.0.0.9000 #> Authors@R (parsed): #> * First Last [aut, cre] () #> Description: What the package does (one paragraph). #> License: What license it uses #> Encoding: UTF-8 #> LazyData: true #> ✔ Writing 'NAMESPACE' #> ✔ Setting active project to '' # only needed since this session isn't interactive proj_activate(path) #> ✔ Changing working directory to '/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg/' #> ✔ Setting active project to '/private/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg' # Modify the description ---------------------------------------------- use_mit_license("My Name") #> ✔ Setting License field in DESCRIPTION to 'MIT + file LICENSE' #> ✔ Writing 'LICENSE.md' #> ✔ Adding '^LICENSE\\.md$' to '.Rbuildignore' #> ✔ Writing 'LICENSE' use_package("MASS", "Suggests") #> ✔ Adding 'MASS' to Suggests field in DESCRIPTION #> ● Use `requireNamespace("MASS", quietly = TRUE)` to test if package is installed #> ● Then directly refer to functons like `MASS::fun()` (replacing `fun()`). # Set up various packages --------------------------------------------- use_roxygen_md() #> ✔ Setting Roxygen field in DESCRIPTION to 'list(markdown = TRUE)' #> ✔ Setting RoxygenNote field in DESCRIPTION to '6.1.1' #> ● Run `devtools::document()` use_rcpp() #> ✔ Creating 'src/' #> ✔ Adding '*.o', '*.so', '*.dll' to 'src/.gitignore' #> ● Copy and paste the following lines into '/private/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg/R/mypkg-package.R': #> ## usethis namespace: start #> #' @useDynLib mypkg, .registration = TRUE #> ## usethis namespace: end #> NULL #> ✔ Adding 'Rcpp' to LinkingTo field in DESCRIPTION #> ✔ Adding 'Rcpp' to Imports field in DESCRIPTION #> ● Copy and paste the following lines into '/private/var/folders/yx/3p5dt4jj1019st0x90vhm9rr0000gn/T/RtmpWNMVxG/mypkg/R/mypkg-package.R': #> ## usethis namespace: start #> #' @importFrom Rcpp sourceCpp #> ## usethis namespace: end #> NULL use_revdep() #> ✔ Creating 'revdep/' #> ✔ Adding '^revdep$' to '.Rbuildignore' #> ✔ Adding 'checks', 'library', 'checks.noindex', 'library.noindex', 'data.sqlite', '*.html' to 'revdep/.gitignore' #> ✔ Writing 'revdep/email.yml' #> ● Run checks with `revdepcheck::revdep_check(num_workers = 4)` # Set up other files ------------------------------------------------- use_readme_md() #> ✔ Writing 'README.md' use_news_md() #> ✔ Writing 'NEWS.md' use_test("my-test") #> ✔ Adding 'testthat' to Suggests field in DESCRIPTION #> ✔ Creating 'tests/testthat/' #> ✔ Writing 'tests/testthat.R' #> ● Call `use_test()` to initialize a basic test file and open it for editing. #> ✔ Increasing 'testthat' version to '>= 2.1.0' in DESCRIPTION #> ✔ Writing 'tests/testthat/test-my-test.R' x <- 1 y <- 2 use_data(x, y) #> ✔ Creating 'data/' #> ✔ Saving 'x', 'y' to 'data/x.rda', 'data/y.rda' # Use git ------------------------------------------------------------ use_git() #> ✔ Initialising Git repo #> ✔ Adding '.Rhistory', '.RData', '.Rproj.user' to '.gitignore' ``` Please note that the usethis project is released with a [Contributor Code of Conduct](https://usethis.r-lib.org/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms. usethis/MD50000644000176200001440000003253613507356065012271 0ustar liggesusers93a4f9ca73d823263662e66ce3d7d000 *DESCRIPTION 939d2d0edf2f140fe6c0abfe2ccd0512 *NAMESPACE a8b8214dc002b4d00b212f3460567832 *NEWS.md 824aaed701517cfe5350d286226c6d9d *R/addin.R cbf44a429e3d7593ceb1021970862c54 *R/badge.R cb8043b278acf1dfac177a041b9ac2a3 *R/block.R a8121675dbebf2258b7e062706da6d48 *R/browse.R ad969ec8f56c9cc1fd886b82b4d594c1 *R/ci.R b6fde1f297a1dbf0ea0a0a8e5c4e9959 *R/citation.R fadcc34e9982addb3d3a0934459dd0bc *R/code-of-conduct.R d5346909807bfd089c8d5004ec874f91 *R/course.R 580135757a337c7e5099db31a1eae16f *R/coverage.R fa925b01385ed55635f4231d9ffc98dd *R/cran.R 6bdd3969c22697104a7f9759688f613f *R/create.R 1df18f368aaa3d15c1ae2786026cc7ba *R/data.R 0635ba2dfac13b56723da96e847797ca *R/description.R abba531e3b8d6360b6e55b08b33e35a0 *R/directory.R e5f55f9893cedffc8939fae1656e95ff *R/documentation.R cce401873da24feddde149bc9ff4c4e2 *R/edit.R 64a35e9f0a569d7687e83573654b7717 *R/git-utils.R 3b9b1e14822de1dcf3bdedabed960719 *R/git.R 7413c3b3b39caeaf2b9934ffa8dcc536 *R/github-labels.R 3d67544ac12e86f9a5cadc8ba4cc5b56 *R/github-utils.R a3eb1ad1c2e3ca5837a2c9236586f463 *R/github.R 9e3bb611bad487ee2ba1211547c356ea *R/helpers.R fe34af16e347af75d2b1fd6d837f18d0 *R/ignore.R 96fc43c7114b1cc079378f7388bc3b75 *R/jenkins.R 05a8684e231086fb9e599de70a61bf63 *R/license.R 2ccf637fd8d0e98b4ee8df38ec0df4a0 *R/logo.R a3db667d573964801406fb0e2da0d952 *R/make.R 2e791a37d29a70b4dd7ff51a1882b4bd *R/namespace.R 639364571f5bf349a7234f07493421bf *R/news.R 6cceab9119ec0f8fc3b336a4a0b6f9c4 *R/package.R aeb01feb83d1a9b5be3da4bbf442d7b9 *R/pipe.R 8ff466fd30287a34ed0e9518b286e810 *R/pkgdown.R b7d51f1177c6ac0c47454736a5e4e2e0 *R/pr.R a11d3fb62145008f162e60162634c22e *R/proj.R fda3d8f99f4af1cfb8df48b9445ff7e5 *R/r.R 9a7c8a60eb7185fa09b34c3ade7f26da *R/rcpp.R 54162d37d9ee1862304baed25f37a48c *R/readme.R d249888636001e57a9da8522f7da6c04 *R/release.R cc52d198083544cd012ad311913ec9c9 *R/revdep.R c0793208a4cf7a755ae7e1fe6475a112 *R/rmarkdown.R 953b0923c3a087cd8d0ea133bf284ed3 *R/roxygen.R 336af4ec19efc6c4fce808a6b63dd264 *R/rprofile.R d6389851b1e4f851248ce2073ad095dd *R/rstudio.R 99981dbb6d8642a3168ddc4b29b0b1c2 *R/sitrep.R 121ff2088851a7f59e73239a673e6eca *R/spelling.R 0500c2d11da211966372894d39fed3e2 *R/template.R cfc9d4785b99cf7590a533f102cc660b *R/test.R 748621695c9007364b955a38358ab2ed *R/tibble.R 38d5537dc702fa376a5647276c237ef5 *R/tidyverse.R 76d351a5ffa5e1d93eab57a929db55e6 *R/tutorial.R d268bbe05f62deff3b18717652d4ab16 *R/ui.R 34bfa46a15e4bb06463344d48d384d0f *R/usethis-defunct.R 237b693e9efad5b5c059af1099b4b54e *R/usethis-package.R d821e9505dec04810216f4532b4068f8 *R/utils.R 0724c7d9aa7b658253b14bf267bfb311 *R/version.R 2f5022544b934e4080f5bc3d25d55231 *R/vignette.R 23a05bb37b6c431ebd4223451ea8cae0 *R/write.R 56f13d7ee79d99a12cc9a3765ffdba5e *README.md 459fee5fcfee4cba068de4aeccbf3b1d *inst/WORDLIST 20e86f8af6308e3f2e49f9fa5a498444 *inst/templates/CODE_OF_CONDUCT.md 3012f896ad62324283af46ec288ca3b5 *inst/templates/Jenkinsfile c2a231bd25f2ba9739a92964e562c834 *inst/templates/Makefile f4952a5a758aaeaa98846f193e878264 *inst/templates/NAMESPACE 47c71dc87a79d8c52c8964d6b7c0e45c *inst/templates/NEWS.md 2ef78790c51e3159c7e067a9c4565291 *inst/templates/addins.dcf fd61b39adbd7fe113ffe01719429ebff *inst/templates/appveyor.yml 2fc4bbb9a984818ed8018545119b31a3 *inst/templates/article.Rmd 24eaed5f2833384e085516138d939fbf *inst/templates/circleci-config.yml a7ce42a527c5410eb1b40307f4aa78c4 *inst/templates/citation-template.R ea9234ef2e8fae457c79094c018603f7 *inst/templates/code.c 2950d8e59ca018b7632ef0a21c00fc23 *inst/templates/code.cpp 3c1f164b48399ad2d235a731e5096f6b *inst/templates/codecov.yml b8a931fbcb9da33245cc7c21567451f1 *inst/templates/cran-comments.md 44c4b1df8df8ac69891ec238311f299c *inst/templates/gitlab-ci.yml 39c68b5810cd9f96abf945e6c6bc96c2 *inst/templates/license-GPL-3.md 94ae249606572895b8f4940f340c9a58 *inst/templates/license-LGPL-2.1.md 9da4d8b04d24d2605f303ebb823e96c0 *inst/templates/license-apache-2.0.md 3bedcaeda57cf8e31f791dd9e127eb0f *inst/templates/license-cc0.md 3e19557ffd5cbc68a1fd63ac8d687a95 *inst/templates/license-ccby-4.md 8aef26b4cc5064dcf1714a28f7c68592 *inst/templates/license-mit.md 6570b66b5bc17c1a7a24c4ef558734be *inst/templates/license-mit.txt bcf762088486892fd192c3acc0b47d5e *inst/templates/package-README 5cb612217218049729b2ebc8f2aebdb4 *inst/templates/packagename-data-prep.R e0ef681901465d24f47f9139cb2c086a *inst/templates/packagename-package.R 65cef5e0674056f6fc07dd2b3ca85c13 *inst/templates/pipe.R 62b727f5e21f2f078a83ecb56b0c0ef7 *inst/templates/project-README 8c4b3f14fb3d6ffc74a28f361771b9c9 *inst/templates/readme-rmd-pre-commit.sh 34952a5944548ea4fc132a9899f8e6ab *inst/templates/revdep-email.yml 7fa100ac70c48d6f71765ac00943b3cd *inst/templates/rmarkdown-template.Rmd 10d8de4f671a94595a1aacce4ac35620 *inst/templates/rmarkdown-template.yml a22ea92b08e06a4bbbb38cfd5693e080 *inst/templates/template.Rproj 225e3812b897786befc574f805c96dc2 *inst/templates/test-example-2.1.R 997109045736c35a03cfe4e74f14611e *inst/templates/test-example.R b112494cb8925006b418b0d4634063be *inst/templates/testthat.R d006793ca2b02af9702fb06441bbc894 *inst/templates/tidy-contributing.md 0a47553ce8fe0c8e9cfd58cad4b2a1ff *inst/templates/tidy-eval.R 109c4ec68b4d737028313abcdf39e91b *inst/templates/tidy-issue.md 0aacd62502695c1d60f2e049638516c6 *inst/templates/tidy-support.md d0503678f52f9a3046f3417328ce6b73 *inst/templates/tidy-travis.yml be16f48dbc391aad2794c60f48a0b8d8 *inst/templates/travis.yml 5208572ed77e349e0d80c8d545ecb158 *inst/templates/tutorial-template.Rmd ed229c502d26f6c2d4de018e0f48ea66 *inst/templates/vignette.Rmd c346638ab376a468e444044401cb18a7 *man/badges.Rd 3ea662438a9def19084142b6ab22f21b *man/browse-this.Rd 93de478c53a834a93f2f774e3676c8cc *man/browse_github_token.Rd 273489747193ba627275628d71fc54da *man/ci.Rd d7cf6356a88aa086186a8c7a8a093d39 *man/create_from_github.Rd d5de14ce8fdc26643d46c967fbba2e98 *man/create_package.Rd 046ae98ec23fdef0bd195d4c6346642b *man/edit.Rd 834bd6443dfcb15595298528cd72427d *man/edit_file.Rd 553f7d586d7d13e1d9a51c6a1ca7d0f2 *man/figures/logo.png 8a0134f0ea31f1f4012c8d8d754a88d4 *man/figures/usethis-full-logo.png 89e6d0501877f08b662307c7dcbaa038 *man/figures/usethis-og-1280x640.png 8ba36062f4db443d47d392de165fc786 *man/git_credentials.Rd a2af957e8419d7292348f665fd50a5a8 *man/git_protocol.Rd 47c744be1a0f3a43eed224d79e81ce51 *man/git_sitrep.Rd 7648f120b2a10d17b7bcc0e0036c39da *man/git_vaccinate.Rd 6462adc5b99c8f9116fc3aeeb5490387 *man/licenses.Rd ff2247567d7071152466c67eb29d2f41 *man/pr_init.Rd 6f7b59931da730d9ffae7a04b9b2c275 *man/proj_activate.Rd da239b98ee5993cd31890ccd06289c44 *man/proj_sitrep.Rd 48c58958edd0d9a289e6066d44b40108 *man/proj_utils.Rd 2897e5397ce17f4ea2a18eeeeecad53a *man/rprofile-helper.Rd 0cf29b19fb306e7ef3e6322c2533fe61 *man/tidyverse.Rd 48c3920dbe08baf6b871346da6fc622c *man/ui.Rd 8b7d63a6d911f05e91ca6809ec27efad *man/use_addin.Rd fb3547272a650e8525d4e34773e3d8a8 *man/use_blank_slate.Rd 05eb68e732571a8a00c85540347d2a21 *man/use_build_ignore.Rd 5e970fc688b95c93593b334347b003b5 *man/use_citation.Rd e2aebdfbead51294934e84030b82da6c *man/use_code_of_conduct.Rd 1280a2c3329b05af83587d8e42ae5ccf *man/use_course_details.Rd 791ec5dd1b008f7b7227d0e2410912e7 *man/use_coverage.Rd ad9160fe913304ee0faa24438f70eba2 *man/use_cran_comments.Rd 39c38a4de83d5c77f225de2accbd014e *man/use_data.Rd ae6e0bdcccfebc9b3fcb7524d627e1fe *man/use_description.Rd bb84842ca4e3ab9906d17bfe2fe31362 *man/use_directory.Rd dc91ba9a5db42167b006512f43e04252 *man/use_git.Rd 94bffa37177103be9e1e3c76b8ab4f28 *man/use_git_config.Rd 9af6e12cf6ada058ea02d7b4a2ef2e59 *man/use_git_hook.Rd 8e4f50db7cd1dc5d4fc10acbcc224632 *man/use_git_ignore.Rd 31d4017c4209d276b68e0087b2872af7 *man/use_git_remote.Rd 798e8c6cea2840d92366766b47c25640 *man/use_github.Rd b2992c8763fa3d305b73175f1ea58c97 *man/use_github_labels.Rd 271152ab2bd7cd6d0d5f091efc20e17f *man/use_github_links.Rd 8173721aa71b549f6b98c43f09212f55 *man/use_github_release.Rd a3fd6638e55e56d149805bc32eb89aed *man/use_jenkins.Rd 1fefdf5cb71771db91e7b297788ac281 *man/use_logo.Rd fbf239d9185e6341d6b7915eb59dc7fc *man/use_make.Rd fc651bd24381bf1ac1770e669e322177 *man/use_namespace.Rd 1a688241dedfdfafed00aaf4fa134300 *man/use_news_md.Rd 80cc53d42a46d81ac0305707ad7a7612 *man/use_package.Rd 78820fa3d3d7e8375409c9b9818d2565 *man/use_package_doc.Rd 286583559b826aa153f17adbcb1a6119 *man/use_pipe.Rd f176014bb36006c15da59dbf84764fde *man/use_pkgdown.Rd ae1c9a5cdd2a674fdfebb80e9530b1ca *man/use_r.Rd 055bd75c1a744a465fa9e72a7c3fab5c *man/use_rcpp.Rd 92c6d2a115d4cea9965d182f56cfbe26 *man/use_readme_rmd.Rd efaf1931d68eb733c59a9545892d505d *man/use_release_issue.Rd 28efdcd91c2af1186cb94076232d1c3a *man/use_revdep.Rd cf851ceb4e185b73b8b56351ec35a76a *man/use_rmarkdown_template.Rd f05044642a1d6ac9362c6f6a3bd8ca0b *man/use_roxygen_md.Rd 46ebe35efc8da020fe0493e48a658265 *man/use_rstudio.Rd 02fc6546bddeef7f918834d03419caf3 *man/use_spell_check.Rd a6b12a3757cfb337cd11308ad2925f03 *man/use_template.Rd a03b7995644acf8beb90faeffb16a709 *man/use_testthat.Rd 38eb289fb8ad4d21e2a09be1dd55b3c7 *man/use_tibble.Rd f877fc27201ffd1058ca1930d2666a0a *man/use_tidy_thanks.Rd 4073ce332d1e4a260add31cc8b0bd68e *man/use_tutorial.Rd f739f825ed133671f3274867bb54e429 *man/use_version.Rd e4dd467da419646995fa49542c1edfa3 *man/use_vignette.Rd 00fecd03a38cb4b785e3a8ebeb81aad9 *man/usethis-defunct.Rd bac130ec1ea8a1922d586d359d0d008f *man/usethis-package.Rd eb7ad640cbd9e5df9267649674008c50 *man/write-this.Rd ad54b5da49b36b075661f44c412beb4f *man/zip-utils.Rd d4bbddb01053b52c56f14f47a306e0c1 *tests/spelling.R 3d8bfd8d9e35decfeadde3ffa53fbffd *tests/testthat.R 1f302e68726ed00f647028836d07532b *tests/testthat/helper.R d366efbfb2f266fbe9c4d8f865dd4e95 *tests/testthat/ref/README.Rmd d199ede5d0cecc098985a0186167b3d4 *tests/testthat/ref/README.md bf89b424b9fbb8d488d29e701d174437 *tests/testthat/ref/foo-loose-dropbox.zip 6ab595f90421218fd607c5a5aff55fc0 *tests/testthat/ref/foo-loose-regular.zip 0e0b018a02ceaaa6a28498d8571aebe1 *tests/testthat/ref/foo-not-loose.zip 44f3b3cab6cbfc399258c007e0a1359f *tests/testthat/ref/foo/file.txt 67f5e8d94d8c417642d28f4ed96adc06 *tests/testthat/ref/yo-loose-dropbox.zip 352346fd102a8e978a35279f93bb077c *tests/testthat/ref/yo-loose-regular.zip 31dfd4a6b6a7233abacb8028e408805d *tests/testthat/ref/yo-not-loose.zip 58a1423de7e870c98b9fb948ea4d9f9c *tests/testthat/ref/yo/subdir1/file1.txt a783d3efd49413330a902d71111392f8 *tests/testthat/ref/yo/subdir2/file2.txt b3c7bc65e6499201f8c1105a827f48e2 *tests/testthat/setup.R f773d2b1f06201c96d541ce025e4ab13 *tests/testthat/teardown.R 438d406e30ef45b3baaea16d0b8585ef *tests/testthat/test-addin.R b96107f1b7d7586ed241afae5ede839f *tests/testthat/test-browse.R 2ae9eb487e6cf5a32c9f61473c5449b1 *tests/testthat/test-create.R 0be964a92e31316eba4c128b0177d04d *tests/testthat/test-directory.R b45db403020fe40698d2ad9c75fd16cd *tests/testthat/test-edit.R ed4487ebf64fd4f218683d09f18c637f *tests/testthat/test-git-utils.R a9845b50ad663cd6ed7531f1d32b70b4 *tests/testthat/test-github-utils.R bab39bf4a9a074979237b803cfc90ee4 *tests/testthat/test-helpers.R 5f8a040f500cf98fbfa430f181452650 *tests/testthat/test-proj.R 37e052947a6700db25eeebc51ea894ca *tests/testthat/test-roxygen.R 430fb256021e9fa481bec50d0184ef11 *tests/testthat/test-ui.R 578566a9294981d4b0cd1767627b7268 *tests/testthat/test-use-badge.R 58712a268645131a6fb20d0a7b1e031a *tests/testthat/test-use-build-ignore.R 9766b4218bce1e2785538096bf473a00 *tests/testthat/test-use-circleci.R fa2ca774f5100c86cb3d0be73b7a02c2 *tests/testthat/test-use-code-of-conduct.R d044506cbd6b78a97b228e3bde0fc541 *tests/testthat/test-use-course.R af963c9cf7f8005f47100c5302842b34 *tests/testthat/test-use-cran-comments.R b4595419bb35f96fc2e287f6435e4a7a *tests/testthat/test-use-data.R ae270dbc8b331449ff0c7bb3b1896f32 *tests/testthat/test-use-dependency.R 034cc02adffa835d809c292d7eafebf1 *tests/testthat/test-use-description.R edcdacf064835dccd2b9c0e7d1154550 *tests/testthat/test-use-git.R f741bc20093eac5a8f56b4721a9b4437 *tests/testthat/test-use-jenkins.R a34083becb2f7d066bdde8bde8d710b0 *tests/testthat/test-use-license.R 0cb4f188123659b95621d9f72d2f152a *tests/testthat/test-use-logo.R b7e8a9211cfce52373dac913abab64c1 *tests/testthat/test-use-make.R d9b21f84b63d9a252c2d0ff102406116 *tests/testthat/test-use-package-doc.R d29133f3b5b694c710aa824c7b605100 *tests/testthat/test-use-package.R 7ab932148889386a5419888acbd58a52 *tests/testthat/test-use-pipe.R 6aae392534e80e755d7a1399769ca1ee *tests/testthat/test-use-pkgdown.R 2b8f1dcddcab55db97d2219122017a93 *tests/testthat/test-use-r.R 1f8f72353d1f6f6615a10be4844324a8 *tests/testthat/test-use-rcpp.R b4025148b7c5b0aaaa741d1e4763de09 *tests/testthat/test-use-readme.R d9eaab52e2e463362fd4c6ea65a70eef *tests/testthat/test-use-revdep.R 1ebb12a1fd59952d612d426832f5c632 *tests/testthat/test-use-rmarkdown.R 5a758e43494464eeda770567ed592dff *tests/testthat/test-use-roxygen.R fea2aecb5e5cdef77c712abdc42b05ea *tests/testthat/test-use-rstudio.R 986afe9dea6d8e6097f27009483c3a94 *tests/testthat/test-use-template.R c0b35ea049c1b95fd5476cdc8cc629c4 *tests/testthat/test-use-testthat.R 2ccf5670af7ed25326e82c5f23945bf2 *tests/testthat/test-use-tibble.R bdc042a4506685905a9fb9a9632d8b46 *tests/testthat/test-use-tidy-style.R cf461cb8d825381daa90337d8250cd4a *tests/testthat/test-use-tidy.R 4e205a0ffa906b4c59ca64a5d6cb90df *tests/testthat/test-use-tutorial.R 2c298d1f31595f5910423fc82c89ce0f *tests/testthat/test-use-version.R 63dc2493e231ee3b092c4b1ac40eece2 *tests/testthat/test-use-vignette.R f0525063ee438859fda1f33ffc9f60cc *tests/testthat/test-utils.R cf60ca90124991152116fa30ee0d7ded *tests/testthat/test-write.R usethis/DESCRIPTION0000644000176200001440000000302213507356065013453 0ustar liggesusersPackage: usethis Title: Automate Package and Project Setup Version: 1.5.1 Authors@R: c( person("Hadley", "Wickham", , "hadley@rstudio.com", role = "aut", comment = c(ORCID = "0000-0003-4757-117X") ), person("Jennifer", "Bryan", , "jenny@rstudio.com", c("aut", "cre"), comment = c(ORCID = "0000-0002-6983-2759") ), person("RStudio", role = c("cph", "fnd")) ) Description: Automate package and project setup tasks that are otherwise performed manually. This includes setting up unit testing, test coverage, continuous integration, Git, 'GitHub', licenses, 'Rcpp', 'RStudio' projects, and more. License: GPL-3 URL: https://usethis.r-lib.org, https://github.com/r-lib/usethis BugReports: https://github.com/r-lib/usethis/issues Depends: R (>= 3.2) Imports: clipr (>= 0.3.0), clisymbols, crayon, curl (>= 2.7), desc, fs (>= 1.3.0), gh, git2r (>= 0.23), glue (>= 1.3.0), purrr, rlang, rprojroot (>= 1.2), rstudioapi, stats, utils, whisker, withr, yaml Suggests: covr, knitr, magick, pkgdown (>= 1.1.0), rmarkdown, roxygen2, spelling (>= 1.2), styler (>= 1.0.2), testthat (>= 2.1.0) Encoding: UTF-8 Language: en-US LazyData: true RoxygenNote: 6.1.1 NeedsCompilation: no Packaged: 2019-07-04 07:03:22 UTC; jenny Author: Hadley Wickham [aut] (), Jennifer Bryan [aut, cre] (), RStudio [cph, fnd] Maintainer: Jennifer Bryan Repository: CRAN Date/Publication: 2019-07-04 11:00:05 UTC usethis/man/0000755000176200001440000000000013507207664012523 5ustar liggesusersusethis/man/proj_sitrep.Rd0000644000176200001440000000157113453664176015363 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sitrep.R \name{proj_sitrep} \alias{proj_sitrep} \title{Report working directory and usethis/RStudio project} \usage{ proj_sitrep() } \value{ A named list, with S3 class \code{sitrep} (for printing purposes), reporting current working directory, active usethis project, and active RStudio Project } \description{ \code{proj_sitrep()} reports \itemize{ \item current working directory \item the active usethis project \item the active RStudio Project } Call this function if things seem weird and you're not sure what's wrong or how to fix it. Usually, all three of these should coincide (or be unset) and \code{proj_sitrep()} provides suggested commands for getting back to this happy state. } \examples{ proj_sitrep() } \seealso{ Other project functions: \code{\link{proj_utils}} } \concept{project functions} usethis/man/use_rstudio.Rd0000644000176200001440000000155313453664176015370 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rstudio.R \name{use_rstudio} \alias{use_rstudio} \title{Add RStudio Project infrastructure} \usage{ use_rstudio() } \description{ It is likely that you want to use \code{\link[=create_project]{create_project()}} or \code{\link[=create_package]{create_package()}} instead of \code{use_rstudio()}! Both \code{create_*()} functions can add RStudio Project infrastructure to a pre-existing project or package. \code{use_rstudio()} is mostly for internal use or for those creating a usethis-like package for their organization. It does the following in the current project, often after executing \code{proj_set(..., force = TRUE)}: \itemize{ \item Creates an \code{.Rproj} file \item Adds RStudio files to \code{.gitignore} \item Adds RStudio files to \code{.Rbuildignore}, if project is a package } } usethis/man/zip-utils.Rd0000644000176200001440000000522413507207664014755 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/course.R \name{zip-utils} \alias{zip-utils} \alias{use_course} \alias{use_zip} \title{Download and unpack a ZIP file} \usage{ use_course(url, destdir = NULL) use_zip(url, destdir = getwd(), cleanup = if (interactive()) NA else FALSE) } \arguments{ \item{url}{Link to a ZIP file containing the materials. Various short forms are accepted, to reduce the typing burden in live settings:\preformatted{* bit.ly or rstd.io shortlinks: "bit.ly/xxx-yyy-zzz" or "rstd.io/foofy" * GitHub repo spec: "OWNER/REPO" } Function works well with DropBox folders and GitHub repos, but should work for ZIP files generally. See examples and \link{use_course_details} for more.} \item{destdir}{The new folder is stored here. If \code{NULL}, defaults to user's Desktop or some other conspicuous place.} \item{cleanup}{Whether to delete the original ZIP file after unpacking its contents. In an interactive setting, \code{NA} leads to a menu where user can approve the deletion (or decline).} } \value{ Path to the new directory holding the unpacked ZIP file, invisibly. } \description{ Functions to download and unpack a ZIP file into a local folder of files, with very intentional default behaviour. Useful in pedagogical settings or anytime you need a large audience to download a set of files quickly and actually be able to find them. } \section{Functions}{ \itemize{ \item \code{use_course}: Designed with live workshops in mind. Includes intentional friction to highlight the download destination. Workflow: \itemize{ \item User executes, e.g., \code{use_course("bit.ly/xxx-yyy-zzz")}. \item User is asked to notice and confirm the location of the new folder. Specify \code{destdir} to prevent this. \item User is asked if they'd like to delete the ZIP file. \item If new folder contains an \code{.Rproj} file, a new instance of RStudio is launched. Otherwise, the folder is opened in the file manager, e.g. Finder or File Explorer. } \item \code{use_zip}: More useful in day-to-day work. Downloads in current working directory, by default, and allows \code{cleanup} behaviour to be specified. }} \examples{ \dontrun{ # download the source of usethis from GitHub, behind a bit.ly shortlink use_course("bit.ly/usethis-shortlink-example") use_course("http://bit.ly/usethis-shortlink-example") ## download the source of rematch2 package, from CRAN and GitHub use_course("https://cran.r-project.org/bin/windows/contrib/3.4/rematch2_2.0.1.zip") ## from GitHub, 3 ways use_course("r-lib/rematch2") use_course("https://github.com/r-lib/rematch2/archive/master.zip") use_course("https://api.github.com/repos/r-lib/rematch2/zipball/master") } } usethis/man/use_roxygen_md.Rd0000644000176200001440000000076513507207664016051 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/roxygen.R \name{use_roxygen_md} \alias{use_roxygen_md} \title{Use roxygen with markdown} \usage{ use_roxygen_md() } \description{ You'll need to manually re-document once enabled. If you are already using roxygen2, but not with markdown, the \href{https://roxygen2md.r-lib.org}{roxygen2md} package will be used to convert many Rd expressions to markdown. The package uses heuristics, so you'll need to check the results. } usethis/man/figures/0000755000176200001440000000000013507207664014167 5ustar liggesusersusethis/man/figures/logo.png0000644000176200001440000006601413453664176015651 0ustar liggesusersPNG  IHDRX?gAMA a cHRMz&u0`:pQ<bKGD pHYs!7!73XztIMEӬ\jIDATxwx$u:G44&CN`Τ + eYN%w>?Z7؏한:ȟeْ-kESLbs搓fFꪺՍAnF~@#nA ת3|0QkB 6z-4~P hxE-Y 8mަ+W"F[~({][E䭉 f܃c.(8 8Wt-"o-0 pq+<|,0PZg.~0ѤS$/ Reț-ob#n ',1`?_y"&,z˷ᄅx#k@Z$ެhxaqp I@`R?~ E͆7  M9p7ZERJn7B@d4A_hx1:pi_hF-JWgE(1>9I\FU=r xǬP7-oW̸+=EQtwvPeot)l^-s7pE @yY,зc^:4 )圿 !,ɩ$#dsf\NpBP@ *U<)%.DDG{qCA0`tlbUπI ZD^ƨ!4fcJ)QUX4JWW߿`EQ@la*|(SZ"8队%[\7FXoɐR"  I$FU9iqqN<3r{vkU޻KGJmۤGHX%[\dBy1Oo~E%EE2@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(P8g=3*V|T8eM2{CdxLP>(2 6N*6`4uvvpE@M]-&$t˄O;9L`b5ud#jْ&v{!xM],-9Wi'J`j4u5H2LP8,'t{!'1<JSWIFIn9%u{!/JM]}vZ|! 0՚8et+:^Wax\M] ,NyI^T:uFSW+II-9iG'{C^ p4uvZl&Y[CN pa5uv\0c;^3ax\hM]-&$~Q87'Lhj%(G&t{sY37N:8'Ljj=en;ɰowL `f5udW㕑:,2<f^SW+I6v7+'[g0 O4uv|_:ɠ;$fx7&$Y?O;8(0 O~BSWIFI$,ɨ,'_`:J Ox%'^ W"DIENDB`usethis/man/figures/usethis-og-1280x640.png0000644000176200001440000066747513507207664020027 0ustar liggesusersPNG  IHDRc gAMA a cHRMz&u0`:pQ<bKGD X pHYs!7!73XztIME tIDATxwtTR AfGD(bvEQ{EQ{Off sr/PZY@=gΙ5}m3m"""""""""""""""""""SPDDDDDDDDDDDDDDDDDDd>H@}""""""""""""""""""" EDDDDDDDDDDDDDDDDDDA )(""""""""""""""""""RPDDDDDDDDDDDDDDDDDDd>H@}""""""""""""""""""" EDDDDDDDDDDDDDDDDDDA )(""""""""""""""""""RPDDDDDDDDDDDDDDDDDDd>H@}usqAݍܸv"""""""""0U[x;zm (8: rXw{$?\ₔ5)=SGM@H~^{zDDDDDDDDD_X,`0гs.\glE_^Zpx2<ٞ_ŅP'(Y]R]dd~9t/_h7/79͋j=)pGqNTRIؾ= [NH\ fu0΃#j/Y̏m"""""""""((""""""""78q[V|r7d5g=y:Mu@݅uVXZ` Weks Y: M 7`ݸq.\/"""""""""Ҷi E( (g:"_4Iޞ`oR @fnaW iB'+S\wqȞH[!y,{V3_qg2t#/^~|5PX{=W:noM/h bbZp|ޑ< eٓvkjUm)ξ7h:S60O99`9??7bC+?BɛS!#uWi{7n܀ >"""""""""{4(SY3>ʊ8OoO;0FN|AILd5߱ "AbJv~&"""""""""9G[>`ծ`m^ >`e%GXzowBSbB e *>^VbEœf=W_ z/Aať-f{W}EDDDDDDDD(""""""""p[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o{~륿3b@x%1!pƭ5Yv?~AYOlgˤMK\ϔ$ySޔWI_┤rv¦ ~g7nsأ͡MřICnKdͫlյ+j$5uIҖW)-IJKJ%8'':gd >T]y_Ӄ?(O~SWNVxyO^t/DS=uʚےȐ|$2<óbIgqdݗL3i_Jv˔Ӧ gCCwr@x-RK-I%T>|6t.蘺WɊ7xdjoH Ԝ&<?,mY Y6dyIqm7!جgߕ _2|ӈ7^s@x=m#p̆뿝t_~ŲI'zv%[nynO҃_Mρy~^U#zr)o}\[Wݟⱞ?yxٺݙ#%*W$iN{wܚ(N/NIF^2GNN4we2Ӷ_Ҳ!9ןvD6޻q?M:8ld+ M6^F&w% y4NrUI5͋'mmo_2cN2QF? 4^`ϒg}C&~[/.git} \item \code{protocol = "https"} implies \code{https://github.com//.git} } \item The strategy for creating \code{credentials} when none are given. See \code{\link[=git_credentials]{git_credentials()}} for details. Two helper functions are available: \item \code{git_protocol()} returns the user's preferred protocol, if known, and, otherwise, asks the user (interactive session) or defaults to SSH (non-interactive session). \item \code{use_git_protocol()} allows the user to set the git protocol, which is stored in the \code{usethis.protocol} option. Any interactive choice re: \code{protocol} comes with a reminder of how to set the protocol at startup by setting an option in \code{.Rprofile}: }\preformatted{options(usethis.protocol = "ssh") ## or options(usethis.protocol = "https") } } \examples{ \dontrun{ ## consult the option and maybe get an interactive menu git_protocol() ## explicitly set the protocol use_git_protocol("ssh") use_git_protocol("https") } } usethis/man/pr_init.Rd0000644000176200001440000000713513507207664014464 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pr.R \name{pr_init} \alias{pr_init} \alias{pr_fetch} \alias{pr_push} \alias{pr_pull} \alias{pr_pull_upstream} \alias{pr_sync} \alias{pr_view} \alias{pr_pause} \alias{pr_finish} \title{Helpers for GitHub pull requests} \usage{ pr_init(branch) pr_fetch(number, owner = NULL) pr_push() pr_pull() pr_pull_upstream() pr_sync() pr_view() pr_pause() pr_finish() } \arguments{ \item{branch}{branch name. Should usually consist of lower case letters, numbers, and \code{-}.} \item{number}{Number of PR to fetch.} \item{owner}{Name of the owner of the repository that is the target of the pull request. Default of \code{NULL} tries to identify the source repo and uses the owner of the \code{upstream} remote, if present, or the owner of \code{origin} otherwise.} } \description{ The \code{pr_*} family of functions is designed to make working with GitHub PRs as painless as possible for both contributors and package maintainers. They are designed to support the git and GitHub best practices described in \href{https://happygitwithr.com}{Happy Git and GitHub for the useR}. } \section{Set up advice}{ These functions make heavy use of git2r and the GitHub API. You'll need a GitHub personal access token (PAT); see \code{\link[=browse_github_token]{browse_github_token()}} for help with that. If git2r does not seem to be finding your git credentials, read \code{\link[=git_credentials]{git_credentials()}} for troubleshooting advice. The transport protocol (SSH vs HTTPS) is determined from the existing remote URL(s) of the repo. } \section{For contributors}{ To contribute to a package, first use \code{create_from_github(owner/repo)} to fork the source repository, and then check out a local copy. Next use \code{pr_init()} to create a branch for your PR (\strong{never} submit a PR from the \code{master} branch). You'll then work locally, making changes to files and checking them into git. Once you're ready to submit, run \code{pr_push()} to push your local branch to GitHub, and open a webpage that lets you initiate the PR. If you are lucky, your PR will be perfect, and the maintainer will accept it. You can then run \code{pr_finish()} to close and delete your PR branch. In most cases, however, the maintainer will ask you to make some changes. Make the changes, then run \code{pr_push()} to sync back up to GitHub. It's also possible that the maintainer will contribute some code to your PR: you get that code back to your computer, run \code{pr_pull()}. It's also possible that other changes have occurred to the package while you've been working on your PR, and you need to "merge master". Do that by running \code{pr_pull_upstream()}: this makes sure that your copy of the package is up-to-date with the maintainer's latest changes. Either of the pull functions may cause merge conflicts, so be prepared to resolve before continuing. } \section{For maintainers}{ To download a PR locally so that you can experiment with it, run \code{pr_fetch()}. If you make changes, run \code{pr_push()} to push them back to GitHub. After you have merged the PR, run \code{pr_finish()} to delete the local branch. } \section{Other helpful functions}{ \itemize{ \item \code{pr_sync()} is a shortcut for \code{pr_pull()}, \code{pr_pull_upstream()}, and \code{pr_push()} \item \code{pr_pause()} makes sure you're synced with the PR and then switches back to master. \item \code{pr_view()} opens the PR in the browser } } \examples{ \dontrun{ ## scenario: current project is a local copy of fork of a repo owned by ## 'tidyverse', not you pr_fetch(123, owner = "tidyverse") } } usethis/man/rprofile-helper.Rd0000644000176200001440000000157513453664176016126 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rprofile.R \name{rprofile-helper} \alias{rprofile-helper} \alias{use_conflicted} \alias{use_reprex} \alias{use_usethis} \alias{use_devtools} \alias{use_partial_warnings} \title{Helpers to make useful changes to \code{.Rprofile}} \usage{ use_conflicted() use_reprex() use_usethis() use_devtools() use_partial_warnings() } \description{ All functions open your \code{.Rprofile} and give you the code you need to paste in. \itemize{ \item \code{use_devtools()}: makes devtools available in interactive sessions. \item \code{use_usethis()}: makes usethis available in interactive sessions. \item \code{use_reprex()}: makes reprex available in interactive sessions. \item \code{use_conflicted()}: makes conflicted available in interactive sessions. \item \code{use_partial_warning()}: warns on partial matches. } } usethis/man/use_github.Rd0000644000176200001440000000452113453664176015157 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/github.R \name{use_github} \alias{use_github} \title{Connect a local repo with GitHub} \usage{ use_github(organisation = NULL, private = FALSE, protocol = git_protocol(), credentials = NULL, auth_token = github_token(), host = NULL) } \arguments{ \item{organisation}{If supplied, the repo will be created under this organisation, instead of the account of the user associated with the \code{auth_token}. You must have permission to create repositories.} \item{private}{If \code{TRUE}, creates a private repository.} \item{protocol}{Optional. Should be "ssh" or "https", if specified. Defaults to the option \code{usethis.protocol} and, if unset, to an interactive choice or, in non-interactive sessions, "ssh". \code{NA} triggers the interactive menu.} \item{credentials}{A git2r credential object produced with \code{\link[git2r:cred_env]{git2r::cred_env()}}, \code{\link[git2r:cred_ssh_key]{git2r::cred_ssh_key()}}, \code{\link[git2r:cred_token]{git2r::cred_token()}}, or \code{\link[git2r:cred_user_pass]{git2r::cred_user_pass()}}.} \item{auth_token}{GitHub personal access token (PAT).} \item{host}{GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3".} } \description{ \code{use_github()} takes a local project, creates an associated repo on GitHub, adds it to your local repo as the \code{origin} remote, and makes an initial push to synchronize. \code{use_github()} requires that your project already be a Git repository, which you can accomplish with \code{\link[=use_git]{use_git()}}, if needed. See the Authentication section below for other necessary setup. } \section{Authentication}{ A new GitHub repo will be created via the GitHub API, therefore you must make a \href{https://github.com/settings/tokens}{GitHub personal access token (PAT)} available. You can either provide this directly via the \code{auth_token} argument or store it for retrieval with \code{\link[=github_token]{github_token()}}. } \examples{ \dontrun{ pkgpath <- file.path(tempdir(), "testpkg") create_package(pkgpath) # creates package below temp directory proj_set(pkgpath) ## now, working inside "testpkg", initialize git repository use_git() ## create github repository and configure as git remote use_github() } } usethis/man/use_git.Rd0000644000176200001440000000112513453664176014455 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{use_git} \alias{use_git} \title{Initialise a git repository} \usage{ use_git(message = "Initial commit") } \arguments{ \item{message}{Message to use for first commit.} } \description{ \code{use_git()} initialises a Git repository and adds important files to \code{.gitignore}. If user consents, it also makes an initial commit. } \examples{ \dontrun{ use_git() } } \seealso{ Other git helpers: \code{\link{use_git_config}}, \code{\link{use_git_hook}}, \code{\link{use_git_ignore}} } \concept{git helpers} usethis/man/use_git_config.Rd0000644000176200001440000000173313453664176016007 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{use_git_config} \alias{use_git_config} \title{Configure Git} \usage{ use_git_config(scope = c("user", "project"), ...) } \arguments{ \item{scope}{Edit globally for the current \strong{user}, or locally for the current \strong{project}} \item{...}{Name-value pairs.} } \value{ Invisibly, the previous values of the modified components. } \description{ Sets Git options, for either the user or the project ("global" or "local", in Git terminology). } \examples{ \dontrun{ # set the user's global user.name and user.email use_git_config(user.name = "Jane", user.email = "jane@example.org") # set the user.name and user.email locally, i.e. for current repo/project use_git_config( scope = "project", user.name = "Jane", user.email = "jane@example.org" ) } } \seealso{ Other git helpers: \code{\link{use_git_hook}}, \code{\link{use_git_ignore}}, \code{\link{use_git}} } \concept{git helpers} usethis/man/use_version.Rd0000644000176200001440000000213113507307512015341 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/version.R \name{use_version} \alias{use_version} \alias{use_dev_version} \title{Increment package version} \usage{ use_version(which = NULL) use_dev_version() } \arguments{ \item{which}{A string specifying which level to increment, one of: "major", "minor", "patch", "dev". If \code{NULL}, user can choose interactively.} } \description{ \code{use_version()} increments the "Version" field in \code{DESCRIPTION}, adds a new heading to \code{NEWS.md} (if it exists), and commits those changes (if package uses Git). \code{use_dev_version()} increments to a development version, e.g. from 1.0.0 to 1.0.0.9000. If the existing version is already a development version with four components, it does nothing. Thin wrapper around \code{use_version()}. } \examples{ \dontrun{ ## for interactive selection, do this: use_version() ## request a specific type of increment use_version("minor") use_dev_version() } } \seealso{ The \href{https://r-pkgs.org/description.html#version}{version section} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/browse_github_token.Rd0000644000176200001440000000467213453664176017073 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/github.R \name{browse_github_token} \alias{browse_github_token} \alias{browse_github_pat} \alias{github_token} \title{Create and retrieve a GitHub personal access token} \usage{ browse_github_token(scopes = c("repo", "gist"), description = "R:GITHUB_PAT", host = "https://github.com") browse_github_pat(scopes = c("repo", "gist"), description = "R:GITHUB_PAT", host = "https://github.com") github_token() } \arguments{ \item{scopes}{Character vector of token scopes, pre-selected in the web form. Final choices are made in the GitHub form. Read more about GitHub API scopes at \url{https://developer.github.com/apps/building-oauth-apps/scopes-for-oauth-apps/}.} \item{description}{Short description or nickname for the token. It helps you distinguish various tokens on GitHub.} \item{host}{GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3".} } \value{ \code{github_token()} returns a string, a GitHub PAT or \code{""}. } \description{ A \href{https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line}{personal access token} (PAT) is needed for git operations via the GitHub API. Two helper functions are provided: \itemize{ \item \code{browse_github_token()} is synonymous with \code{browse_github_pat()}: Both open a browser window to the GitHub form to generate a PAT. See below for advice on how to store this. \item \code{github_token()} retrieves a stored PAT by consulting, in this order: \itemize{ \item \code{GITHUB_PAT} environment variable \item \code{GITHUB_TOKEN} environment variable \item the empty string \code{""} } } } \section{}{ Get and store a PAT: Sign up for a free \href{https://github.com/}{GitHub.com} account and sign in. Call \code{browse_github_token()}. Verify the scopes and click "Generate token". Copy the token right away! A common approach is to store in \code{.Renviron} as the \code{GITHUB_PAT} environment variable. \code{\link[=edit_r_environ]{edit_r_environ()}} opens this file for editing. } \examples{ \dontrun{ browse_github_token() ## COPY THE PAT!!! ## almost certainly to be followed by ... edit_r_environ() ## which helps you store the PAT as an env var } # for safety's sake, just reveal first 4 characters substr(github_token(), 1, 4) } \seealso{ \code{\link[gh:gh_whoami]{gh::gh_whoami()}} for information on an existing token. } usethis/man/use_make.Rd0000644000176200001440000000054113507207664014603 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/make.R \name{use_make} \alias{use_make} \title{Create Makefile} \usage{ use_make() } \description{ \code{use_make()} adds a basic Makefile to the project root directory. } \seealso{ The \href{https://www.gnu.org/software/make/manual/html_node}{documentation for GNU Make}. } usethis/man/use_blank_slate.Rd0000644000176200001440000000204613453664176016154 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rstudio.R \name{use_blank_slate} \alias{use_blank_slate} \title{Don't save/load user workspace between sessions} \usage{ use_blank_slate(scope = c("user", "project")) } \arguments{ \item{scope}{Edit globally for the current \strong{user}, or locally for the current \strong{project}} } \description{ R can save and reload the user's workspace between sessions via an \code{.RData} file in the current directory. However, long-term reproducibility is enhanced when you turn this feature off and clear R's memory at every restart. Starting with a blank slate provides timely feedback that encourages the development of scripts that are complete and self-contained. More detail can be found in the blog post \href{https://www.tidyverse.org/articles/2017/12/workflow-vs-script/}{Project-oriented workflow}. } \details{ Only \code{use_blank_slate("project")} is automated so far, since RStudio currently only supports modification of user-level or global options via the user interface. } usethis/man/usethis-defunct.Rd0000644000176200001440000000052513453664176016133 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/usethis-defunct.R \name{usethis-defunct} \alias{usethis-defunct} \alias{use_depsy_badge} \title{Defunct functions in usethis} \usage{ use_depsy_badge() } \description{ These functions are marked as defunct and have been removed from usethis. } \keyword{internal} usethis/man/use_git_hook.Rd0000644000176200001440000000135013453664176015475 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{use_git_hook} \alias{use_git_hook} \title{Add a git hook} \usage{ use_git_hook(hook, script) } \arguments{ \item{hook}{Hook name. One of "pre-commit", "prepare-commit-msg", "commit-msg", "post-commit", "applypatch-msg", "pre-applypatch", "post-applypatch", "pre-rebase", "post-rewrite", "post-checkout", "post-merge", "pre-push", "pre-auto-gc".} \item{script}{Text of script to run} } \description{ Sets up a git hook using specified script. Creates hook directory if needed, and sets correct permissions on hook. } \seealso{ Other git helpers: \code{\link{use_git_config}}, \code{\link{use_git_ignore}}, \code{\link{use_git}} } \concept{git helpers} usethis/man/edit.Rd0000644000176200001440000000333113453664176013744 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/edit.R \name{edit} \alias{edit} \alias{edit_r_profile} \alias{edit_r_environ} \alias{edit_r_buildignore} \alias{edit_r_makevars} \alias{edit_rstudio_snippets} \alias{edit_git_config} \alias{edit_git_ignore} \title{Open configuration files} \usage{ edit_r_profile(scope = c("user", "project")) edit_r_environ(scope = c("user", "project")) edit_r_buildignore(scope = c("user", "project")) edit_r_makevars(scope = c("user", "project")) edit_rstudio_snippets(type = "R") edit_git_config(scope = c("user", "project")) edit_git_ignore(scope = c("user", "project")) } \arguments{ \item{scope}{Edit globally for the current \strong{user}, or locally for the current \strong{project}} \item{type}{Snippet type. One of: "R", "markdown", "C_Cpp", "Tex", "Javascript", "HTML", "SQL"} } \value{ Path to the file, invisibly. } \description{ \itemize{ \item \code{edit_r_profile()} opens \code{.Rprofile} \item \code{edit_r_environ()} opens \code{.Renviron} \item \code{edit_r_makevars()} opens \code{.R/Makevars} \item \code{edit_git_config()} opens \code{.gitconfig} or \code{.git/config} \item \code{edit_git_ignore()} opens \code{.gitignore} \item \code{edit_rstudio_snippets(type)} opens \code{.R/snippets/{type}.snippets} } } \details{ The \code{edit_r_*()} and \code{edit_rstudio_*()} functions consult R's notion of user's home directory. The \code{edit_git_*()} functions -- and \pkg{usethis} in general -- inherit home directory behaviour from the \pkg{fs} package, which differs from R itself on Windows. The \pkg{fs} default is more conventional in terms of the location of user-level Git config files. See \code{\link[fs:path_home]{fs::path_home()}} for more details. } usethis/man/badges.Rd0000644000176200001440000000420713507306607014237 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/badge.R \name{badges} \alias{badges} \alias{use_badge} \alias{use_cran_badge} \alias{use_bioc_badge} \alias{use_lifecycle_badge} \alias{use_binder_badge} \title{README badges} \usage{ use_badge(badge_name, href, src) use_cran_badge() use_bioc_badge() use_lifecycle_badge(stage) use_binder_badge(urlpath = NULL) } \arguments{ \item{badge_name}{Badge name. Used in error message and alt text} \item{href, src}{Badge link and image src} \item{stage}{Stage of the package lifecycle} \item{urlpath}{An optional \code{urlpath} component to add to the link, e.g. \code{"rstudio"} to open an RStudio IDE instead of a Jupyter notebook. See the \href{https://mybinder.readthedocs.io/en/latest/howto/user_interface.html}{binder documentation} for additional examples.} } \description{ These helpers produce the markdown text you need in your README to include badges that report information, such as the CRAN version or test coverage, and link out to relevant external resources. To add badges automatically ensure your badge block starts with a line containing only \code{} and ends with a line containing only \code{}. } \details{ \itemize{ \item \code{use_badge()}: a general helper used in all badge functions \item \code{use_bioc_badge()}: badge indicates \href{https://bioconductor.org/developers/}{BioConductor build status} \item \code{use_cran_badge()}: badge indicates what version of your package is available on CRAN, powered by \url{https://www.r-pkg.org} \item \code{use_lifecycle_badge()}: badge declares the developmental stage of a package, according to \url{https://www.tidyverse.org/lifecycle/}: \itemize{ \item Experimental \item Maturing \item Stable \item Retired \item Archived \item Dormant \item Questioning } \item \code{use_binder_badge()}: badge indicates that your repository can be launched in an executable environment on \url{https://mybinder.org/} } } \examples{ \dontrun{ use_cran_badge() use_lifecycle_badge("stable") } } \seealso{ The \link[=use_travis]{functions that set up continuous integration services} also create badges. } usethis/man/browse-this.Rd0000644000176200001440000000322713453664176015271 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/browse.R \name{browse-this} \alias{browse-this} \alias{browse_github} \alias{browse_github_issues} \alias{browse_github_pulls} \alias{browse_travis} \alias{browse_cran} \title{Quickly browse to important package webpages} \usage{ browse_github(package = NULL) browse_github_issues(package = NULL, number = NULL) browse_github_pulls(package = NULL, number = NULL) browse_travis(package = NULL, ext = c("org", "com")) browse_cran(package = NULL) } \arguments{ \item{package}{Name of package; leave as \code{NULL} to use current package} \item{number}{For GitHub issues and pull requests. Can be a number or \code{"new"}.} \item{ext}{Version of travis to use.} } \description{ These functions take you to various webpages associated with a package and return the target URL invisibly. Some URLs are formed from first principles and there is no guarantee there will be content at the destination. } \details{ \itemize{ \item \code{browse_github()}: Looks for a GitHub URL in the URL field of \code{DESCRIPTION}. \item \code{browse_github_issues()}: Visits the GitHub Issues index or one specific issue. \item \code{browse_github_pulls()}: Visits the GitHub Pull Request index or one specific pull request. \item \code{browse_travis()}: Visits the package's page on \href{https://travis-ci.org}{Travis CI}. \item \code{browse_cran()}: Visits the package on CRAN, via the canonical URL. } } \examples{ browse_github("gh") browse_github_issues("backports") browse_github_issues("backports", 1) browse_github_pulls("rprojroot") browse_github_pulls("rprojroot", 3) browse_travis("usethis") browse_cran("MASS") } usethis/man/proj_utils.Rd0000644000176200001440000000717113507306607015207 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proj.R \name{proj_utils} \alias{proj_utils} \alias{proj_get} \alias{proj_set} \alias{proj_path} \alias{with_project} \alias{local_project} \title{Utility functions for the active project} \usage{ proj_get() proj_set(path = ".", force = FALSE) proj_path(..., ext = "") with_project(path = ".", code, force = FALSE, quiet = getOption("usethis.quiet", default = FALSE)) local_project(path = ".", force = FALSE, quiet = getOption("usethis.quiet", default = FALSE), .local_envir = parent.frame()) } \arguments{ \item{path}{Path to set. This \code{path} should exist or be \code{NULL}.} \item{force}{If \code{TRUE}, use this path without checking the usual criteria for a project. Use sparingly! The main application is to solve a temporary chicken-egg problem: you need to set the active project in order to add project-signalling infrastructure, such as initialising a Git repo or adding a \code{DESCRIPTION} file.} \item{...}{character vectors, if any values are NA, the result will also be NA.} \item{ext}{An optional extension to append to the generated path.} \item{code}{Code to run with temporary active project.} \item{quiet}{Whether to suppress user-facing messages, while operating in the temporary active project.} \item{.local_envir}{The environment to use for scoping. Defaults to current execution environment.} } \description{ Most \code{use_*()} functions act on the \strong{active project}. If it is unset, usethis uses \href{https://rprojroot.r-lib.org}{rprojroot} to find the project root of the current working directory. It establishes the project root by looking for a \code{.here} file, an RStudio Project, a package \code{DESCRIPTION}, Git infrastructure, a \code{remake.yml} file, or a \code{.projectile} file. It then stores the active project for use for the remainder of the session. } \details{ In general, end user scripts should not contain direct calls to \code{usethis::proj_*()} utility functions. They are internal functions that are exported for occasional interactive use or use in packages that extend usethis. End user code should call functions in \href{https://rprojroot.r-lib.org}{rprojroot} or its simpler companion, \href{https://here.r-lib.org}{here}, to programmatically detect a project and build paths within it. } \section{Functions}{ \itemize{ \item \code{proj_get}: Retrieves the active project and, if necessary, attempts to set it in the first place. \item \code{proj_set}: Sets the active project. \item \code{proj_path}: Builds a path within the active project returned by \code{proj_get()}. Thin wrapper around \code{\link[fs:path]{fs::path()}}. \item \code{with_project}: Runs code with a temporary active project. It is an example of the \code{with_*()} functions in \href{https://withr.r-lib.org}{withr}. \item \code{local_project}: Sets an active project until the current execution environment goes out of scope, e.g. the end of the current function or test. It is an example of the \code{local_*()} functions in \href{https://withr.r-lib.org}{withr}. }} \examples{ \dontrun{ ## see the active project proj_get() ## manually set the active project proj_set("path/to/target/project") ## build a path within the active project (both produce same result) proj_path("R/foo.R") proj_path("R", "foo", ext = "R") ## build a path within SOME OTHER project with_project("path/to/some/other/project", proj_path("blah.R")) ## convince yourself that with_project() temporarily changes the project with_project("path/to/some/other/project", print(proj_sitrep())) } } \seealso{ Other project functions: \code{\link{proj_sitrep}} } \concept{project functions} usethis/man/use_citation.Rd0000644000176200001440000000044213453664176015505 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/citation.R \name{use_citation} \alias{use_citation} \title{Create a CITATION template} \usage{ use_citation() } \description{ Use this if you want to encourage users of your package to cite an article or book. } usethis/man/use_git_ignore.Rd0000644000176200001440000000104013453664176016014 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{use_git_ignore} \alias{use_git_ignore} \title{Tell git to ignore files} \usage{ use_git_ignore(ignores, directory = ".") } \arguments{ \item{ignores}{Character vector of ignores, specified as file globs.} \item{directory}{Directory relative to active project to set ignores} } \description{ Tell git to ignore files } \seealso{ Other git helpers: \code{\link{use_git_config}}, \code{\link{use_git_hook}}, \code{\link{use_git}} } \concept{git helpers} usethis/man/use_pkgdown.Rd0000644000176200001440000000153113453664176015344 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pkgdown.R \name{use_pkgdown} \alias{use_pkgdown} \alias{use_pkgdown_travis} \title{Use pkgdown} \usage{ use_pkgdown(config_file = "_pkgdown.yml", destdir = "docs") use_pkgdown_travis() } \arguments{ \item{config_file}{Path to the pkgdown yaml config file} \item{destdir}{Target directory for pkgdown docs} } \description{ \href{https://pkgdown.r-lib.org}{pkgdown} makes it easy to turn your package into a beautiful website. There are two helper functions: \itemize{ \item \code{use_pkgdown()}: creates a pkgdown config file and adds the file and destination directory to \code{.Rbuildignore}. \item \code{use_pkgdown_travis()}: helps you set up pkgdown for automatic deployment on Travis-CI. } } \seealso{ \url{https://pkgdown.r-lib.org/articles/pkgdown.html#configuration} } usethis/man/usethis-package.Rd0000644000176200001440000000176613453664176016106 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/usethis-package.R \docType{package} \name{usethis-package} \alias{usethis} \alias{usethis-package} \title{usethis: Automate Package and Project Setup} \description{ \if{html}{\figure{logo.png}{options: align='right'}} Automate package and project setup tasks that are otherwise performed manually. This includes setting up unit testing, test coverage, continuous integration, Git, 'GitHub', licenses, 'Rcpp', 'RStudio' projects, and more. } \seealso{ Useful links: \itemize{ \item \url{https://usethis.r-lib.org} \item \url{https://github.com/r-lib/usethis} \item Report bugs at \url{https://github.com/r-lib/usethis/issues} } } \author{ \strong{Maintainer}: Jennifer Bryan \email{jenny@rstudio.com} (0000-0002-6983-2759) Authors: \itemize{ \item Hadley Wickham \email{hadley@rstudio.com} (0000-0003-4757-117X) } Other contributors: \itemize{ \item RStudio [copyright holder, funder] } } \keyword{internal} usethis/man/use_tidy_thanks.Rd0000644000176200001440000000357013453664176016221 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tidyverse.R \name{use_tidy_thanks} \alias{use_tidy_thanks} \title{Identify contributors via GitHub activity} \usage{ use_tidy_thanks(repo_spec = github_repo_spec(), from = releases(repo_spec)[[1]], to = NULL) } \arguments{ \item{repo_spec}{GitHub repo specification in this form: \code{owner/repo}. Default is to infer from Git remotes of active project.} \item{from, to}{GitHub ref (i.e., a SHA, tag, or release) or a timestamp in ISO 8601 format, specifying the start or end of the interval of interest. Examples: "08a560d", "v1.3.0", "2018-02-24T00:13:45Z", "2018-05-01". \code{NULL} means there is no bound on that end of the interval.} } \value{ A character vector of GitHub usernames, invisibly. } \description{ Derives a list of GitHub usernames, based on who has opened issues or pull requests. Used to populate the acknowledgment section of package release blog posts at \url{https://www.tidyverse.org/articles/}. All arguments can potentially be determined from the active project, if the project follows standard practices around the GitHub remote and GitHub releases. Unexported helper functions, \code{releases()} and \code{ref_df()} can be useful interactively to get a quick look at release tag names and a data frame about refs (defaulting to releases), respectively. } \examples{ \dontrun{ ## active project, interval = since the last release use_tidy_thanks() ## active project, interval = since a specific datetime use_tidy_thanks(from = "2018-02-24T00:13:45Z") ## r-lib/usethis, inteval = since a certain date use_tidy_thanks("r-lib/usethis", from = "2018-05-01") ## r-lib/usethis, up to a specific release use_tidy_thanks("r-lib/usethis", from = NULL, to = "v1.3.0") ## r-lib/usethis, since a specific commit, up to a specific date use_tidy_thanks("r-lib/usethis", from = "08a560d", to = "2018-05-14") } } usethis/man/use_pipe.Rd0000644000176200001440000000164213507207664014626 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pipe.R \name{use_pipe} \alias{use_pipe} \title{Use magrittr's pipe in your package} \usage{ use_pipe(export = TRUE) } \arguments{ \item{export}{If \code{TRUE}, the file \code{R/utils-pipe.R} is added, which provides the roxygen template to import and re-export \code{\%>\%}. If \code{FALSE}, the necessary roxygen directive is added, if possible, or otherwise instructions are given.} } \description{ Does setup necessary to use magrittr's pipe operator, \code{\%>\%} in your package. This function requires the use roxygen. \itemize{ \item Adds magrittr to "Imports" in \code{DESCRIPTION}. \item Imports the pipe operator specifically, which is necessary for internal use. \item Exports the pipe operator, if \code{export = TRUE}, which is necessary to make \code{\%>\%} available to the users of your package. } } \examples{ \dontrun{ use_pipe() } } usethis/man/use_news_md.Rd0000644000176200001440000000111713507307512015313 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/news.R \name{use_news_md} \alias{use_news_md} \title{Create a simple \code{NEWS.md}} \usage{ use_news_md(open = interactive()) } \arguments{ \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ This creates a basic \code{NEWS.md} in the root directory. } \seealso{ The \href{https://r-pkgs.org/release.html#important-files}{important files section} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_data.Rd0000644000176200001440000000416413507307512014575 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \name{use_data} \alias{use_data} \alias{use_data_raw} \title{Create package data} \usage{ use_data(..., internal = FALSE, overwrite = FALSE, compress = "bzip2", version = 2) use_data_raw(name = "DATASET", open = interactive()) } \arguments{ \item{...}{Unquoted names of existing objects to save.} \item{internal}{If \code{FALSE}, saves each object in its own \code{.rda} file in the \code{data/} directory. These data files bypass the usual export mechanism and are available whenever the package is loaded (or via \code{\link[=data]{data()}} if \code{LazyData} is not true). If \code{TRUE}, stores all objects in a single \code{R/sysdata.rda} file. Objects in this file follow the usual export rules. Note that this means they will be exported if you are using the common \code{exportPattern()} rule which exports all objects except for those that start with \code{.}.} \item{overwrite}{By default, \code{use_data()} will not overwrite existing files. If you really want to do so, set this to \code{TRUE}.} \item{compress}{Choose the type of compression used by \code{\link[=save]{save()}}. Should be one of "gzip", "bzip2", or "xz".} \item{version}{The serialization format version to use. The default, 2, was the default format from R 1.4.0 to 3.5.3. Version 3 became the default from R 3.6.0 and can only be read by R versions 3.5.0 and higher.} \item{name}{Name of the dataset to be prepared for inclusion in the package.} \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ \code{use_data()} makes it easy to save package data in the correct format. I recommend you save scripts that generate package data in \code{data-raw}: use \code{use_data_raw()} to set it up. } \examples{ \dontrun{ x <- 1:10 y <- 1:100 use_data(x, y) # For external use use_data(x, y, internal = TRUE) # For internal use } \dontrun{ use_data_raw("daisy") } } \seealso{ The \href{https://r-pkgs.org/data.html}{data chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_github_links.Rd0000644000176200001440000000147413453664176016363 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/github.R \name{use_github_links} \alias{use_github_links} \title{Use GitHub links in URL and BugReports} \usage{ use_github_links(auth_token = github_token(), host = "https://api.github.com", overwrite = FALSE) } \arguments{ \item{auth_token}{GitHub personal access token (PAT).} \item{host}{GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3".} \item{overwrite}{By default, \code{use_github_links()} will not overwrite existing fields. Set to \code{TRUE} to overwrite existing links.} } \description{ Populates the \code{URL} and \code{BugReports} fields of a GitHub-using R package with appropriate links. } \examples{ \dontrun{ use_github_links() } } usethis/man/use_build_ignore.Rd0000644000176200001440000000130613453664176016335 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ignore.R \name{use_build_ignore} \alias{use_build_ignore} \title{Add files to \code{.Rbuildignore}} \usage{ use_build_ignore(files, escape = TRUE) } \arguments{ \item{files}{Character vector of path names.} \item{escape}{If \code{TRUE}, the default, will escape \code{.} to \code{\\.} and surround with \code{^} and \code{$}.} } \description{ \code{.Rbuildignore} has a regular expression on each line, but it's usually easier to work with specific file names. By default, \code{use_build_ignore} will (crudely) turn a filename into a regular expression that will only match that path. Repeated entries will be silently removed. } usethis/man/tidyverse.Rd0000644000176200001440000000776613507306607015045 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tidyverse.R \name{tidyverse} \alias{tidyverse} \alias{create_tidy_package} \alias{use_tidy_ci} \alias{use_tidy_description} \alias{use_tidy_versions} \alias{use_tidy_eval} \alias{use_tidy_contributing} \alias{use_tidy_issue_template} \alias{use_tidy_support} \alias{use_tidy_coc} \alias{use_tidy_github} \alias{use_tidy_style} \alias{use_tidy_release_test_env} \title{Helpers for tidyverse development} \usage{ create_tidy_package(path, name = "RStudio") use_tidy_ci(browse = interactive()) use_tidy_description() use_tidy_versions(overwrite = FALSE, source = c("local", "CRAN")) use_tidy_eval() use_tidy_contributing() use_tidy_issue_template() use_tidy_support() use_tidy_coc() use_tidy_github() use_tidy_style(strict = TRUE) use_tidy_release_test_env() } \arguments{ \item{path}{A path. If it exists, it is used. If it does not exist, it is created, provided that the parent path exists.} \item{name}{Name of the copyright holder or holders. Separate multiple individuals with \code{;}. You can supply a global default with \code{options(usethis.full_name = "My name")}.} \item{browse}{Open a browser window to enable automatic builds for the package.} \item{overwrite}{By default (\code{FALSE}), only dependencies without version specifications will be modified. Set to \code{TRUE} to modify all dependencies.} \item{source}{Use "local" or "CRAN" package versions.} \item{strict}{Boolean indicating whether or not a strict version of styling should be applied. See \code{\link[styler:tidyverse_style]{styler::tidyverse_style()}} for details.} } \description{ These helpers follow tidyverse conventions which are generally a little stricter than the defaults, reflecting the need for greater rigor in commonly used packages. } \details{ \itemize{ \item \code{create_tidy_package()}: creates a new package, immediately applies as many of the tidyverse conventions as possible, issues a few reminders, and activates the new package. \item \code{use_tidy_ci()}: sets up \href{https://travis-ci.org}{Travis CI} and \href{https://codecov.io}{Codecov}, ensuring that the package is actively tested on the versions of R officially supported by the Tidyverse (current release, devel, and four previous versions). It also ignores \code{compat-} and \code{deprec-} files from code coverage. \item \code{use_tidy_description()}: puts fields in standard order and alphabetises dependencies. \item \code{use_tidy_eval()}: imports a standard set of helpers to facilitate programming with the tidy eval toolkit. \item \code{use_tidy_style()}: styles source code according to the \href{https://style.tidyverse.org}{tidyverse style guide}. This function will overwrite files! See below for usage advice. \item \code{use_tidy_versions()}: pins all dependencies to require at least the currently installed version. \item \code{use_tidy_contributing()}: adds standard tidyverse contributing guidelines. \item \code{use_tidy_issue_template()}: adds a standard tidyverse issue template. \item \code{use_tidy_release_test_env()}: updates the test environment section in \code{cran-comments.md}. \item \code{use_tidy_support()}: adds a standard description of support resources for the tidyverse. \item \code{use_tidy_coc()}: equivalent to \code{use_code_of_conduct()}, but puts the document in a \code{.github/} subdirectory. \item \code{use_tidy_github()}: convenience wrapper that calls \code{use_tidy_contributing()}, \code{use_tidy_issue_template()}, \code{use_tidy_support()}, \code{use_tidy_coc()}. } } \section{\code{use_tidy_style()}}{ Uses the \href{https://styler.r-lib.org}{styler package} package to style all code in a package, project, or directory, according to the \href{https://style.tidyverse.org}{tidyverse style guide}. \strong{Warning:} This function will overwrite files! It is strongly suggested to only style files that are under version control or to first create a backup copy. Invisibly returns a data frame with one row per file, that indicates whether styling caused a change. } usethis/man/use_description.Rd0000644000176200001440000000352013507307512016202 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/description.R \name{use_description} \alias{use_description} \alias{use_description_defaults} \title{Create or modify a DESCRIPTION file} \usage{ use_description(fields = NULL) use_description_defaults() } \arguments{ \item{fields}{A named list of fields to add to \code{DESCRIPTION}, potentially overriding default values. See \code{\link[=use_description]{use_description()}} for how you can set personalized defaults using package options} } \description{ usethis consults the following sources, in this order, to set \code{DESCRIPTION} fields: \itemize{ \item \code{fields} argument of \code{\link[=create_package]{create_package()}} or \code{\link[=use_description]{use_description()}}. \item \code{getOption("usethis.description")} or \code{getOption("devtools.desc")}. The devtools option is consulted only for backwards compatibility and it's recommended to switch to an option named "usethis.description". \item Defaults built into usethis. } The fields discovered via options or the usethis package can be viewed with \code{use_description_defaults()}. If you create a lot of packages, consider storing personalized defaults as a named list in an option named \code{"usethis.description"}. Here's an example of code to include in \code{.Rprofile}:\preformatted{options( usethis.description = list( `Authors@R` = 'person("Jane", "Doe", email = "jane@example.com", role = c("aut", "cre"), comment = c(ORCID = "YOUR-ORCID-ID"))', License = "MIT + file LICENSE", Language = "es" ) ) } } \examples{ \dontrun{ use_description() use_description(fields = list(Language = "es")) use_description_defaults() } } \seealso{ The \href{https://r-pkgs.org/description.html#dependencies}{description chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_release_issue.Rd0000644000176200001440000000132713453664176016526 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/release.R \name{use_release_issue} \alias{use_release_issue} \title{Create a release issue checklist} \usage{ use_release_issue(version = NULL) } \arguments{ \item{version}{Version number for release} } \description{ When preparing to release a package there are quite a few steps that need to be performed, and some of the steps can take multiple hours. This function creates an issue checklist so that you can keep track of where you are in the process, and feel a sense of satisfaction as you progress. It also helps watchers of your package stay informed about where you are in the process. } \examples{ \dontrun{ use_release_issue("2.0.0") } } usethis/man/use_readme_rmd.Rd0000644000176200001440000000217513507307512015763 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readme.R \name{use_readme_rmd} \alias{use_readme_rmd} \alias{use_readme_md} \title{Create README files} \usage{ use_readme_rmd(open = interactive()) use_readme_md(open = interactive()) } \arguments{ \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ Creates skeleton README files with sections for \itemize{ \item a high-level description of the package and its goals \item R code to install from GitHub, if GitHub usage detected \item a basic example } Use \code{Rmd} if you want a rich intermingling of code and data. Use \code{md} for a basic README. \code{README.Rmd} will be automatically added to \code{.Rbuildignore}. The resulting README is populated with default YAML frontmatter and R fenced code blocks (\code{md}) or chunks (\code{Rmd}). } \examples{ \dontrun{ use_readme_rmd() use_readme_md() } } \seealso{ The \href{https://r-pkgs.org/release.html#important-files}{important files section} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_rcpp.Rd0000644000176200001440000000116213453664176014637 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rcpp.R \name{use_rcpp} \alias{use_rcpp} \alias{use_rcpp_armadillo} \alias{use_rcpp_eigen} \alias{use_c} \title{Use C, C++, RcppArmadillo, or RcppEigen} \usage{ use_rcpp(name = NULL) use_rcpp_armadillo(name = NULL) use_rcpp_eigen(name = NULL) use_c(name = NULL) } \arguments{ \item{name}{If supplied, creates and opens \code{src/name.{c,cpp}}.} } \description{ Creates \code{src/}, adds required packages to \code{DESCRIPTION}, optionally creates \code{.c} or \code{.cpp} files, and where needed, \code{Makevars} and \code{Makevars.win} files. } usethis/man/use_package.Rd0000644000176200001440000000231713507307512015255 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/package.R \name{use_package} \alias{use_package} \alias{use_dev_package} \title{Depend on another package} \usage{ use_package(package, type = "Imports", min_version = NULL) use_dev_package(package, type = "Imports") } \arguments{ \item{package}{Name of package to depend on.} \item{type}{Type of dependency: must be one of "Imports", "Depends", "Suggests", "Enhances", or "LinkingTo" (or unique abbreviation). Matching is case insensitive.} \item{min_version}{Optionally, supply a minimum version for the package. Set to \code{TRUE} to use the currently installed version.} } \description{ \code{use_package()} adds a CRAN package dependency to \code{DESCRIPTION} and offers a little advice about how to best use it. \code{use_dev_package()} adds a versioned dependency on an in-development GitHub package, adding the repo to \code{Remotes} so it will be automatically installed from the correct location. } \examples{ \dontrun{ use_package("ggplot2") use_package("dplyr", "suggests") use_dev_package("glue") } } \seealso{ The \href{https://r-pkgs.org/description.html#dependencies}{dependencies section} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/proj_activate.Rd0000644000176200001440000000103513453664176015650 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/proj.R \name{proj_activate} \alias{proj_activate} \title{Activate a project} \usage{ proj_activate(path) } \arguments{ \item{path}{Project directory} } \value{ Single logical value indicating if current session is modified. } \description{ Activates a project in usethis, R session, and (if relevant) RStudio senses. If you are in RStudio, this will open a new RStudio session. If not, it will change the working directory and \link[=proj_set]{active project}. } usethis/man/use_r.Rd0000644000176200001440000000105213507307512014116 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/r.R \name{use_r} \alias{use_r} \title{Create or edit a .R file} \usage{ use_r(name = NULL) } \arguments{ \item{name}{File name, without extension; will create if it doesn't already exist. If not specified, and you're currently in a test file, will guess name based on test name.} } \description{ Create or edit a .R file } \seealso{ \code{\link[=use_test]{use_test()}}, and also the \href{https://r-pkgs.org/r.html}{R code chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_github_release.Rd0000644000176200001440000000141213453664176016653 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/release.R \name{use_github_release} \alias{use_github_release} \title{Draft a GitHub release} \usage{ use_github_release(host = NULL, auth_token = github_token()) } \arguments{ \item{host}{GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3".} \item{auth_token}{GitHub personal access token (PAT).} } \description{ Creates a \strong{draft} GitHub release for the current package using the current version and \code{NEWS.md}. If you are comfortable that it is correct, you will need to publish the release from GitHub. It also deletes \code{CRAN-RELEASE} and checks that you've pushed all commits to GitHub. } usethis/man/use_code_of_conduct.Rd0000644000176200001440000000155013507305047016776 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/code-of-conduct.R \name{use_code_of_conduct} \alias{use_code_of_conduct} \title{Add a code of conduct} \usage{ use_code_of_conduct(path = NULL) } \arguments{ \item{path}{Path of the directory to put \code{CODE_OF_CONDUCT.md} in, relative to the active project. Passed along to \code{\link[=use_directory]{use_directory()}}. Default is to locate at top-level, but \code{.github/} is also common.} } \description{ Adds a \code{CODE_OF_CONDUCT.md} file to the active project and lists in \code{.Rbuildignore}, in the case of a package. The goal of a code of conduct is to foster an environment of inclusiveness, and to explicitly discourage inappropriate behaviour. The template comes from \url{https://contributor-covenant.org}, version 1: \url{https://contributor-covenant.org/version/1/0/0}. } usethis/man/use_course_details.Rd0000644000176200001440000001077113507207664016701 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/course.R \name{use_course_details} \alias{use_course_details} \title{Helpers to download and unpack a ZIP file} \arguments{ \item{url}{Download link for the ZIP file, possibly behind a shortlink or other redirect. See Details.} \item{destdir}{Path to existing local directory where the ZIP file will be stored. Defaults to current working directory, but note that \code{\link[=use_course]{use_course()}} has different default behavior.} \item{zipfile}{Path to local ZIP file.} } \description{ Details on the internal functions that power \code{\link[=use_course]{use_course()}} and \code{\link[=use_zip]{use_zip()}}. These helpers are currently unexported but a course instructor may want more details. } \section{tidy_download()}{ \preformatted{## function signature tidy_download(url, destdir = getwd()) ## as called inside use_course() tidy_download( url, ## after post-processing with normalize_url() # conspicuous_place() = Desktop or home directory or working directory destdir = destdir \%||\% conspicuous_place() ) } Special-purpose function to download a ZIP file and automatically determine the file name, which often determines the folder name after unpacking. Developed with DropBox and GitHub as primary targets, possibly via shortlinks. Both platforms offer a way to download an entire folder or repo as a ZIP file, with information about the original folder or repo transmitted in the \code{Content-Disposition} header. In the absence of this header, a filename is generated from the input URL. In either case, the filename is sanitized. Returns the path to downloaded ZIP file, invisibly. \strong{DropBox:} To make a folder available for ZIP download, create a shared link for it: \itemize{ \item \url{https://www.dropbox.com/help/files-folders/view-only-access} } A shared link will have this form:\preformatted{https://www.dropbox.com/sh/12345abcde/6789wxyz?dl=0 } Replace the \code{dl=0} at the end with \code{dl=1} to create a download link. The ZIP download link will have this form:\preformatted{https://www.dropbox.com/sh/12345abcde/6789wxyz?dl=1 } This download link (or a shortlink that points to it) is suitable as input for \code{tidy_download()}. After one or more redirections, this link will eventually lead to a download URL. For more details, see \url{https://www.dropbox.com/help/desktop-web/force-download} and \url{https://www.dropbox.com/en/help/desktop-web/download-entire-folders}. \strong{GitHub:} Click on the repo's "Clone or download" button, to reveal a "Download ZIP" button. Capture this URL, which will have this form:\preformatted{https://github.com/r-lib/usethis/archive/master.zip } This download link (or a shortlink that points to it) is suitable as input for \code{tidy_download()}. After one or more redirections, this link will eventually lead to a download URL. Here's an alternative link that also leads to ZIP download, albeit with a different filenaming scheme:\preformatted{https://api.github.com/repos/r-lib/usethis/zipball/master } } \section{tidy_unzip()}{ Special-purpose function to unpack a ZIP file and (attempt to) create the directory structure most people want. When unpacking an archive, it is easy to get one more or one less level of nesting than you expected. It's especially important to finesse the directory structure here: we want the same local result when unzipping the same content from either GitHub or DropBox ZIP files, which pack things differently. Here is the intent: \itemize{ \item If the ZIP archive \code{foo.zip} does not contain a single top-level directory, i.e. it is packed as "loose parts", unzip into a directory named \code{foo}. Typical of DropBox ZIP files. \item If the ZIP archive \code{foo.zip} has a single top-level directory (which, by the way, is not necessarily called "foo"), unpack into said directory. Typical of GitHub ZIP files. } Returns path to the directory holding the unpacked files, invisibly. \strong{DropBox:} The ZIP files produced by DropBox are special. The file list tends to contain a spurious directory \code{"/"}, which we ignore during unzip. Also, if the directory is a Git repo and/or RStudio Project, we unzip-ignore various hidden files, such as \code{.RData}, \code{.Rhistory}, and those below \code{.git/} and \code{.Rproj.user}. } \examples{ \dontrun{ tidy_download("https://github.com/r-lib/rematch2/archive/master.zip") } \dontrun{ tidy_download("https://github.com/r-lib/rematch2/archive/master.zip") tidy_unzip("rematch2-master.zip") } } \keyword{internal} usethis/man/write-this.Rd0000644000176200001440000000361213453664176015120 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write.R \name{write-this} \alias{write-this} \alias{write_union} \alias{write_over} \title{Write into or over a file} \usage{ write_union(path, lines, quiet = FALSE) write_over(path, lines, quiet = FALSE) } \arguments{ \item{path}{Path to target file. It is created if it does not exist, but the parent directory must exist.} \item{lines}{Character vector of lines. For \code{write_union()}, these are lines to add to the target file, if not already present. For \code{write_over()}, these are the exact lines desired in the target file.} \item{quiet}{Logical. Whether to message about what is happening.} \item{contents}{Character vector of lines.} } \value{ Logical indicating whether a write occurred, invisibly. } \description{ Helpers to write into or over a new or pre-existing file. Designed mostly for for internal use. File is written with UTF-8 encoding. } \section{Functions}{ \itemize{ \item \code{write_union}: writes lines to a file, taking the union of what's already there, if anything, and some new lines. Note, there is no explicit promise about the line order. Designed to modify simple config files like \code{.Rbuildignore} and \code{.gitignore}. \item \code{write_over}: writes a file with specific lines, creating it if necessary or overwriting existing, if proposed contents are not identical and user is available to give permission. }} \examples{ \dontshow{.old_wd <- setwd(tempdir())} write_union("a_file", letters[1:3]) readLines("a_file") write_union("a_file", letters[1:5]) readLines("a_file") write_over("another_file", letters[1:3]) readLines("another_file") write_over("another_file", letters[1:3]) \dontrun{ ## will error if user isn't present to approve the overwrite write_over("another_file", letters[3:1]) } ## clean up file.remove("a_file", "another_file") \dontshow{setwd(.old_wd)} } \keyword{internal} usethis/man/use_template.Rd0000644000176200001440000000421613453664176015511 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/template.R \name{use_template} \alias{use_template} \title{Use a usethis-style template} \usage{ use_template(template, save_as = template, data = list(), ignore = FALSE, open = FALSE, package = "usethis") } \arguments{ \item{template}{Path to template file relative to \code{templates/} directory within \code{package}; see details.} \item{save_as}{Path of file to create, relative to root of active project. Defaults to \code{template}} \item{data}{A list of data passed to the template.} \item{ignore}{Should the newly created file be added to \code{.Rbuildignore}?} \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} \item{package}{Name of the package where the template is found.} } \value{ A logical vector indicating if file was modified. } \description{ Creates a file from data and a template found in a package. Provides control over file name, the addition to \code{.Rbuildignore}, and opening the file for inspection. } \details{ This function can be used as the engine for a templating function in other packages. The \code{template} argument is used along with the \code{package} argument to derive the path to your template file; it will be expected at \code{fs::path_package(package = package, "templates", template)}. We use \code{fs::path_package()} instead of \code{base::system.file()} so that path construction works even in a development workflow, e.g., works with \code{devtools::load_all()} or \code{pkgload::load_all()}. \emph{Note this describes the behaviour of \code{fs::path_package()} in fs v1.2.7.9001 and higher.} To interpolate your data into the template, supply a list using the \code{data} argument. Internally, this function uses \code{\link[whisker:whisker.render]{whisker::whisker.render()}} to combine your template file with your data. } \examples{ \dontrun{ # Note: running this will write `NEWS.md` to your working directory use_template( template = "NEWS.md", data = list(Package = "acme", Version = "1.2.3"), package = "usethis" ) } } usethis/man/use_cran_comments.Rd0000644000176200001440000000144213453664176016524 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cran.R \name{use_cran_comments} \alias{use_cran_comments} \title{CRAN submission comments} \usage{ use_cran_comments(open = interactive()) } \arguments{ \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ Creates \code{cran-comments.md}, a template for your communications with CRAN when submitting a package. The goal is to clearly communicate the steps you have taken to check your package on a wide range of operating systems. If you are submitting an update to a package that is used by other packages, you also need to summarize the results of your \link[=use_revdep]{reverse dependency checks}. } usethis/man/use_namespace.Rd0000644000176200001440000000064113507307512015614 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/namespace.R \name{use_namespace} \alias{use_namespace} \title{Use a basic \code{NAMESPACE}} \usage{ use_namespace() } \description{ This \code{NAMESPACE} exports everything, except functions that start with a \code{.}. } \seealso{ The \href{https://r-pkgs.org/namespace.html}{namespace chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/use_jenkins.Rd0000644000176200001440000000117713507207664015335 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/jenkins.R \name{use_jenkins} \alias{use_jenkins} \title{Create Jenkinsfile for Jenkins CI Pipelines} \usage{ use_jenkins() } \description{ \code{use_jenkins()} adds a basic Jenkinsfile for R packages to the project root directory. The Jenkinsfile stages take advantage of calls to \code{make}, and so calling this function will also run \code{use_make()} if a Makefile does not already exist at the project root. } \seealso{ The \href{https://jenkins.io/doc/book/pipeline/jenkinsfile}{documentation on Jenkins Pipelines}. \code{\link[=use_make]{use_make()}} } usethis/man/use_revdep.Rd0000644000176200001440000000120613453664176015157 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/revdep.R \name{use_revdep} \alias{use_revdep} \title{Reverse dependency checks} \usage{ use_revdep() } \description{ Performs set up for checking the reverse dependencies of an R package, as implemented by the revdepcheck package: \itemize{ \item Adds \code{revdep} directory and adds it to \code{.Rbuildignore} \item Populates \code{revdep/.gitignore} to prevent tracking of various revdep artefacts \item Creates \code{revdep/email.yml} for use with \code{revdepcheck::revdep_email()} \item Prompts user to run the checks with \code{revdepcheck::revdep_check()} } } usethis/man/use_package_doc.Rd0000644000176200001440000000164413507307512016104 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/documentation.R \name{use_package_doc} \alias{use_package_doc} \title{Package-level documentation} \usage{ use_package_doc() } \description{ Adds a dummy \code{.R} file that will prompt roxygen to generate basic package-level documentation. If your package is named "foo", this will make help available to the user via \code{?foo} or \code{package?foo}. Once you call \code{devtools::document()}, roxygen will flesh out the \code{.Rd} file using data from the \code{DESCRIPTION}. That ensures you don't need to repeat the same information in multiple places. This \code{.R} file is also a good place for roxygen directives that apply to the whole package (vs. a specific function), such as global namespace tags like \code{@importFrom}. } \seealso{ The \href{https://r-pkgs.org/man.html}{documentation chapter} of \href{https://r-pkgs.org}{R Packages} } usethis/man/use_tutorial.Rd0000644000176200001440000000247313453664176015544 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tutorial.R \name{use_tutorial} \alias{use_tutorial} \title{Create a learnr tutorial} \usage{ use_tutorial(name, title, open = interactive()) } \arguments{ \item{name}{Base for file name to use for new \code{.Rmd} tutorial. Should consist only of numbers, letters, \code{_} and \code{-}. We recommend using lower case.} \item{title}{The human-facing title of the tutorial.} \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ Creates a new tutorial below \code{inst/tutorials/}. Tutorials are interactive R Markdown documents built with the \href{https://rstudio.github.io/learnr/index.html}{learnr package}. \code{use_tutorial()} does this setup: \itemize{ \item Adds learnr to Suggests in \code{DESCRIPTION}. \item Gitignores \code{inst/tutorials/*.html} so you don't accidentally track rendered tutorials. \item Creates a new \code{.Rmd} tutorial from a template and, optionally, opens it for editing. \item Adds new \code{.Rmd} to \code{.Rbuildignore}. } } \examples{ \dontrun{ use_tutorial("learn-to-do-stuff", "Learn to do stuff") } } \seealso{ The \href{https://rstudio.github.io/learnr/index.html}{learnr package documentation}. } usethis/man/use_logo.Rd0000644000176200001440000000154113453664176014634 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/logo.R \name{use_logo} \alias{use_logo} \title{Use a package logo} \usage{ use_logo(img, geometry = "240x278", retina = TRUE) } \arguments{ \item{img}{The path to an existing image file} \item{geometry}{a \link[magick:geometry]{magick::geometry} string specifying size. The default assumes that you have a hex logo using spec from \url{http://hexb.in/sticker.html}.} \item{retina}{\code{TRUE}, the default, scales the image on the README, assuming that geometry is double the desired size.} } \description{ This function helps you use a logo in your package: \itemize{ \item Enforces a specific size \item Stores logo image file at \code{man/figures/logo.png} \item Produces the markdown text you need in README to include the logo } } \examples{ \dontrun{ use_logo("usethis.png") } } usethis/man/use_git_remote.Rd0000644000176200001440000000410413453664176016030 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{use_git_remote} \alias{use_git_remote} \alias{git_remotes} \title{Configure and report Git remotes} \usage{ use_git_remote(name = "origin", url, overwrite = FALSE) git_remotes() } \arguments{ \item{name}{A string giving the short name of a remote.} \item{url}{A string giving the url of a remote.} \item{overwrite}{Logical. Controls whether an existing remote can be modified.} } \value{ Named list of Git remotes. } \description{ Two helpers are available: \itemize{ \item \code{use_git_remote()} sets the remote associated with \code{name} to \code{url}. \item \code{git_remotes()} reports the configured remotes, similar to \code{git remote -v}. } } \examples{ \dontrun{ # see current remotes git_remotes() # add new remote named 'foo', a la `git remote add ` use_git_remote(name = "foo", url = "https://github.com//.git") # remove existing 'foo' remote, a la `git remote remove ` use_git_remote(name = "foo", url = NULL, overwrite = TRUE) # change URL of remote 'foo', a la `git remote set-url ` use_git_remote( name = "foo", url = "https://github.com//.git", overwrite = TRUE ) # Scenario: Fix remotes when you cloned someone's repo, but you should # have fork-and-cloned (in order to make a pull request). # Store origin = main repo's URL, e.g., "git@github.com:/.git" upstream_url <- git_remotes()[["origin"]] # IN THE BROWSER: fork the main GitHub repo and get your fork's remote URL my_url <- "git@github.com:/.git" # Rotate the remotes use_git_remote(name = "origin", url = my_url) use_git_remote(name = "upstream", url = upstream_url) git_remotes() # Scenario: Add upstream remote to a repo that you fork-and-cloned, so you # can pull upstream changes. # Note: If you fork-and-clone via `usethis::create_from_github()`, this is # done automatically! # Get URL of main GitHub repo, probably in the browser upstream_url <- "git@github.com:/.git" use_git_remote(name = "upstream", url = upstream_url) } } usethis/man/use_coverage.Rd0000644000176200001440000000111113453664176015460 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/coverage.R \name{use_coverage} \alias{use_coverage} \alias{use_covr_ignore} \title{Test coverage} \usage{ use_coverage(type = c("codecov", "coveralls")) use_covr_ignore(files) } \arguments{ \item{type}{Which web service to use for test reporting. Currently supports \href{https://codecov.io}{Codecov} and \href{https://coveralls.io}{Coveralls}.} \item{files}{Character vector of file globs.} } \description{ \code{use_coverage()} Adds test coverage reports to a package that is already using Travis CI. } usethis/man/use_spell_check.Rd0000644000176200001440000000175713453664176016161 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spelling.R \name{use_spell_check} \alias{use_spell_check} \title{Use spell check} \usage{ use_spell_check(vignettes = TRUE, lang = "en-US", error = FALSE) } \arguments{ \item{vignettes}{Logical, \code{TRUE} to spell check all \code{rmd} and \code{rnw} files in the \code{vignettes/} folder.} \item{lang}{Preferred spelling language. Usually either \code{"en-US"} or \code{"en-GB"}.} \item{error}{Logical, indicating whether the unit test should fail if spelling errors are found. Defaults to \code{FALSE}, which does not error, but prints potential spelling errors} } \description{ Adds a unit test to automatically run a spell check on documentation and, optionally, vignettes during \code{R CMD check}, using the \link[spelling:spell_check_package]{spelling} package. Also adds a \code{WORDLIST} file to the package, which is a dictionary of whitelisted words. See \link[spelling:wordlist]{spelling::wordlist} for details. } usethis/man/use_vignette.Rd0000644000176200001440000000230513507307512015504 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/vignette.R \name{use_vignette} \alias{use_vignette} \alias{use_article} \title{Create a vignette or article.} \usage{ use_vignette(name, title = name) use_article(name, title = name) } \arguments{ \item{name}{Base for file name to use for new vignette. Should consist only of numbers, letters, \code{_} and \code{-}. Lower case is recommended.} \item{title}{The title of the vignette.} } \description{ Creates a new vignette or article in \code{vignettes/}. Articles are a special type of vignette that appear on pkgdown websites, but are not included in the package itself (because they are added to \code{.Rbuildignore} automatically). } \section{General setup}{ \itemize{ \item Adds needed packages to \code{DESCRIPTION}. \item Adds \code{inst/doc} to \code{.gitignore} so built vignettes aren't tracked. \item Adds \code{vignettes/*.html} and \code{vignettes/*.R} to \code{.gitignore} so you never accidentally track rendered vignettes. } } \examples{ \dontrun{ use_vignette("how-to-do-stuff", "How to do stuff") } } \seealso{ The \href{https://r-pkgs.org/vignettes.html}{vignettes chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/git_credentials.Rd0000644000176200001440000001104413507207664016152 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{git_credentials} \alias{git_credentials} \alias{use_git_credentials} \title{Produce or register git credentials} \usage{ git_credentials(protocol = git_protocol(), auth_token = github_token()) use_git_credentials(credentials) } \arguments{ \item{protocol}{Optional. Should be "ssh" or "https", if specified. Defaults to the option \code{usethis.protocol} and, if unset, to an interactive choice or, in non-interactive sessions, "ssh". \code{NA} triggers the interactive menu.} \item{auth_token}{GitHub personal access token (PAT).} \item{credentials}{A git2r credential object produced with \code{\link[git2r:cred_env]{git2r::cred_env()}}, \code{\link[git2r:cred_ssh_key]{git2r::cred_ssh_key()}}, \code{\link[git2r:cred_token]{git2r::cred_token()}}, or \code{\link[git2r:cred_user_pass]{git2r::cred_user_pass()}}.} } \value{ Either \code{NULL} or a git2r credential object, invisibly, i.e. something to be passed to git2r as \code{credentials}. } \description{ Credentials are needed for git operations like \code{git push} that address a remote, typically GitHub. usethis uses the git2r package. git2r tries to use the same credentials as command line git, but sometimes fails. usethis tries to increase the chance that things "just work" and, when they don't, to provide the user a way to intervene: \itemize{ \item \code{git_credentials()} returns any \code{credentials} that have been registered with \code{use_git_credentials()} and, otherwise, implements usethis's default strategy. \item \code{use_git_credentials()} allows you to register \code{credentials} explicitly for use in all usethis functions in an R session. Do this only after proven failure of the defaults. } } \section{Default credentials}{ If the default behaviour of usethis + git2r works, rejoice and leave well enough alone. Keep reading if you need more control or understanding. } \section{SSH credentials}{ For \code{protocol = "ssh"}, by default, usethis passes \code{NULL} credentials to git2r. This will work if you have the exact configuration expected by git2r: \enumerate{ \item Your public and private keys are in the default locations, \code{~/.ssh/id_rsa.pub} and \code{~/.ssh/id_rsa}, respectively. \item All the relevant software agrees on the definition of \code{~/}, i.e. your home directory. This is harder than it sounds on Windows. \item Your \code{ssh-agent} is configured to manage your SSH passphrase, if you have one. This too can be a problem on Windows. Read more about SSH setup in \href{https://happygitwithr.com/ssh-keys.html}{Happy Git and GitHub for the useR}, especially the \href{https://happygitwithr.com/ssh-keys.html#ssh-troubleshooting}{troubleshooting section}. } If the \code{NULL} default doesn't work, you can make \code{credentials} explicitly with \code{\link[git2r:cred_ssh_key]{git2r::cred_ssh_key()}} and register that with \code{use_git_credentials()} for the rest of the session:\preformatted{my_cred <- git2r::cred_ssh_key( publickey = "path/to/your/id_rsa.pub", privatekey = "path/to/your/id_rsa", # include / omit passphrase as appropriate to your situation passphrase = askpass::askpass() ) use_git_credentials(credentials = my_cred) } For the remainder of the session, \code{git_credentials()} will return \code{my_cred}. } \section{HTTPS credentials}{ For \code{protocol = "https"}, we must send username and password. It is possible that your OS has cached this and git2r will successfully use that. However, usethis can offer even more chance of success in the HTTPS case. GitHub also accepts a personal access token (PAT) via HTTPS. If \code{credentials = NULL} and a PAT is available, we send it. Preference is given to any \code{auth_token} that is passed explicitly. Otherwise, \code{\link[=github_token]{github_token()}} is called. If a PAT is found, we make an HTTPS credential with \code{\link[git2r:cred_user_pass]{git2r::cred_user_pass()}}. The PAT is sent as the password and dummy text is sent as the username (the PAT is what really matters in this case). You can also register an explicit credential yourself in a similar way:\preformatted{my_cred <- git2r::cred_user_pass( username = "janedoe", password = askpass::askpass() ) use_git_credentials(credentials = my_cred) } For the remainder of the session, \code{git_credentials()} will return \code{my_cred}. } \examples{ git_credentials() git_credentials(protocol = "ssh") \dontrun{ # these calls look for a GitHub PAT git_credentials(protocol = "https") git_credentials(protocol = "https", auth_token = "MY_GITHUB_PAT") } } usethis/man/edit_file.Rd0000644000176200001440000000114413453664176014743 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/edit.R \name{edit_file} \alias{edit_file} \title{Open file for editing} \usage{ edit_file(path) } \arguments{ \item{path}{Path to target file.} } \value{ Target path, invisibly. } \description{ Opens a file for editing in RStudio, if that is the active environment, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise. If the file does not exist, it is created. If the parent directory does not exist, it is also created. } \examples{ \dontrun{ edit_file("DESCRIPTION") edit_file("~/.gitconfig") } } \keyword{internal} usethis/man/use_directory.Rd0000644000176200001440000000127113453664176015700 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/directory.R \name{use_directory} \alias{use_directory} \title{Use a directory} \usage{ use_directory(path, ignore = FALSE) } \arguments{ \item{path}{Path of the directory to create, relative to the project.} \item{ignore}{Should the newly created file be added to \code{.Rbuildignore}?} } \description{ \code{use_directory()} creates a directory (if it does not already exist) in the project's top-level directory. This function powers many of the other \code{use_} functions such as \code{\link[=use_data]{use_data()}} and \code{\link[=use_vignette]{use_vignette()}}. } \examples{ \dontrun{ use_directory("inst") } } usethis/man/create_package.Rd0000644000176200001440000000353213453664176015740 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create.R \name{create_package} \alias{create_package} \alias{create_project} \title{Create a package or project} \usage{ create_package(path, fields = NULL, rstudio = rstudioapi::isAvailable(), open = interactive()) create_project(path, rstudio = rstudioapi::isAvailable(), open = interactive()) } \arguments{ \item{path}{A path. If it exists, it is used. If it does not exist, it is created, provided that the parent path exists.} \item{fields}{A named list of fields to add to \code{DESCRIPTION}, potentially overriding default values. See \code{\link[=use_description]{use_description()}} for how you can set personalized defaults using package options} \item{rstudio}{If \code{TRUE}, calls \code{\link[=use_rstudio]{use_rstudio()}} to make the new package or project into an \href{https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects}{RStudio Project}. If \code{FALSE} and a non-package project, a sentinel \code{.here} file is placed so that the directory can be recognized as a project by the \href{https://here.r-lib.org}{here} or \href{https://rprojroot.r-lib.org}{rprojroot} packages.} \item{open}{If \code{TRUE}, \link[=proj_activate]{activates} the new project: \itemize{ \item If RStudio desktop, the package is opened in a new session. \item If on RStudio server, the current RStudio project is activated. \item Otherwise, the working directory and active project is changed. }} } \value{ Path to the newly created project or package, invisibly. } \description{ These functions create an R project: \itemize{ \item \code{create_package()} creates an R package \item \code{create_project()} creates a non-package project, i.e. a data analysis project } Both functions can be called on an existing project; you will be asked before any existing files are changed. } usethis/man/use_tibble.Rd0000644000176200001440000000226713453664176015143 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tibble.R \name{use_tibble} \alias{use_tibble} \title{Prepare to return a tibble} \usage{ use_tibble() } \description{ Does minimum setup such that a tibble returned by your package is handled using the tibble method for generics like \code{print()} or \code{[}. Presumably you care about this if you've chosen to store and expose an object with class \code{tbl_df}. Specifically: \itemize{ \item Check that the active package uses roxygen2 \item Add the tibble package to "Imports" in \code{DESCRIPTION} \item Reveal the roxygen directive necessary to import at least one function from tibble. \item Offer support re: where to put this directive. Preferred location is in the roxygen snippet produced by \code{\link[=use_package_doc]{use_package_doc()}}. } This is necessary when your package returns a stored data object that has class \code{tbl_df}, but the package code does not make direct use of functions from the tibble package. If you do nothing, the tibble namespace is not necessarily loaded and your tibble may therefore be printed and subsetted like a base \code{data.frame}. } \examples{ \dontrun{ use_tibble() } } usethis/man/git_sitrep.Rd0000644000176200001440000000065613507207664015172 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/git.R \name{git_sitrep} \alias{git_sitrep} \title{git/GitHub sitrep} \usage{ git_sitrep() } \description{ Get a situation report on your current git/GitHub status. Useful for diagnosing problems. \code{\link[=git_vaccinate]{git_vaccinate()}} adds some basic R- and RStudio-related entries to the user-level git ignore file. } \examples{ git_sitrep() } usethis/man/use_testthat.Rd0000644000176200001440000000211613453664176015533 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/test.R \name{use_testthat} \alias{use_testthat} \alias{use_test} \title{Create tests} \usage{ use_testthat() use_test(name = NULL, open = interactive()) } \arguments{ \item{name}{Base of test file name. If \code{NULL}, and you're using RStudio, will be based on the name of the file open in the source editor.} \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ There are two helper functions: \itemize{ \item \code{use_testthat()} sets up overall testing infrastructure: creates \code{tests/testthat/}, \code{tests/testthat.R}, and adds testthat to Suggests. \item \code{use_test()} sets up individual test files: creates \code{tests/testthat/test-.R} and, optionally, opens it for editing. } } \examples{ \dontrun{ use_testthat() use_test() use_test("something-management") } } \seealso{ The \href{https://r-pkgs.org/tests.html}{testing chapter} of \href{https://r-pkgs.org}{R Packages}. } usethis/man/create_from_github.Rd0000644000176200001440000001054313507207664016645 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create.R \name{create_from_github} \alias{create_from_github} \title{Create a project from a GitHub repo} \usage{ create_from_github(repo_spec, destdir = NULL, fork = NA, rstudio = NULL, open = interactive(), protocol = git_protocol(), credentials = NULL, auth_token = github_token(), host = NULL) } \arguments{ \item{repo_spec}{GitHub repo specification in this form: \code{owner/repo}. The \code{repo} part will be the name of the new local repo.} \item{destdir}{The new folder is stored here. If \code{NULL}, defaults to user's Desktop or some other conspicuous place.} \item{fork}{If \code{TRUE}, we create and clone a fork. If \code{FALSE}, we clone \code{repo_spec} itself. Will be set to \code{FALSE} if no \code{auth_token} (a.k.a. PAT) is provided or preconfigured. Otherwise, defaults to \code{FALSE} if you can push to \code{repo_spec} and \code{TRUE} if you cannot. In the case of a fork, the original target repo is added to the local repo as the \code{upstream} remote, using the preferred \code{protocol}. The \code{master} branch is set to track \code{upstream/master} and is immediately pulled, which matters in the case of a pre-existing, out-of-date fork.} \item{rstudio}{Initiate an \href{https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects}{RStudio Project}? Defaults to \code{TRUE} if in an RStudio session and project has no pre-existing \code{.Rproj} file. Defaults to \code{FALSE} otherwise.} \item{open}{If \code{TRUE}, \link[=proj_activate]{activates} the new project: \itemize{ \item If RStudio desktop, the package is opened in a new session. \item If on RStudio server, the current RStudio project is activated. \item Otherwise, the working directory and active project is changed. }} \item{protocol}{Optional. Should be "ssh" or "https", if specified. Defaults to the option \code{usethis.protocol} and, if unset, to an interactive choice or, in non-interactive sessions, "ssh". \code{NA} triggers the interactive menu.} \item{credentials}{A git2r credential object produced with \code{\link[git2r:cred_env]{git2r::cred_env()}}, \code{\link[git2r:cred_ssh_key]{git2r::cred_ssh_key()}}, \code{\link[git2r:cred_token]{git2r::cred_token()}}, or \code{\link[git2r:cred_user_pass]{git2r::cred_user_pass()}}.} \item{auth_token}{GitHub personal access token (PAT).} \item{host}{GitHub API host to use. Override with the endpoint-root for your GitHub enterprise instance, for example, "https://github.hostname.com/api/v3".} } \description{ Creates a new local Git repository from a repository on GitHub. It is highly recommended that you pre-configure or pass a GitHub personal access token (PAT), which is facilitated by \code{\link[=browse_github_token]{browse_github_token()}}. In particular, a PAT is required in order for \code{create_from_github()} to do \href{https://help.github.com/articles/fork-a-repo/}{"fork and clone"}. It is also required by \code{\link[=use_github]{use_github()}}, which connects existing local projects to GitHub. } \section{Using SSH Keys on Windows}{ If you are a Windows user who connects to GitHub using SSH, as opposed to HTTPS, you may need to explicitly specify the paths to your keys and register this credential in the current R session. This helps if git2r, which usethis uses for Git operations, does not automatically find your keys or handle your passphrase. In the snippet below, do whatever is necessary to make the paths correct, e.g., replace \code{} with your Windows username. Omit the \code{passphrase} part if you don't have one. Replace \code{} with the appropriate GitHub specification. You get the idea.\preformatted{creds <- git2r::cred_ssh_key( publickey = "C:/Users//.ssh/id_rsa.pub", privatekey = "C:/Users//.ssh/id_rsa", passphrase = character(0) ) use_git_protocol("ssh") use_git_credentials(credentials = creds) create_from_github( repo_spec = "", ... ) } } \examples{ \dontrun{ create_from_github("r-lib/usethis") } } \seealso{ \code{\link[=use_github]{use_github()}} for GitHub setup advice. \code{\link[=git_protocol]{git_protocol()}} and \code{\link[=git_credentials]{git_credentials()}} for background on \code{protocol} and \code{credentials}. \code{\link[=use_course]{use_course()}} for one-time download of all files in a Git repo, without any local or remote Git operations. } usethis/man/use_addin.Rd0000644000176200001440000000121013453664176014744 0ustar liggesusers% Generated by roxygen2: do not edit by hand % Please edit documentation in R/addin.R \name{use_addin} \alias{use_addin} \title{Add minimal RStudio Addin binding} \usage{ use_addin(addin = "new_addin", open = interactive()) } \arguments{ \item{addin}{Name of the addin function, which should be defined in the \code{R} folder.} \item{open}{Open the newly created file for editing? Happens in RStudio, if applicable, or via \code{\link[utils:file.edit]{utils::file.edit()}} otherwise.} } \description{ This function helps you add a minimal \href{https://rstudio.github.io/rstudioaddins/}{RStudio Addin} binding to \code{inst/rstudio/addins.dcf}. }