Set up, or migrate to a muggle project. Wraps the following steps, if the respective files or configuration do not already exist:
Package Structure:
Sets up scaffolding via usethis::create_package()
and asks the user to complete the DESCRIPTION
.
Editors/IDEs: Sets up vscode and RStudio as editors.
Git/GitHub:
Initialises a git repo via usethis::use_git()
,
creates a repo on GitHub and sets it as an origin remote.
README:
Adds a README.md
via usethis::use_readme_md()
and asks the user to complete it.
Quality Control:
Sets up the project for unit tests via usethis::use_testthat()
and test coverage via usethis::use_coverage()
.
Documentation:
Sets up markdown support in roxygen via usethis::use_roxygen_md()
,
package documentation via usethis::use_package_doc()
and adds a pkgdown website via usethis::use_pkgdown()
.
Workflow Automation: sets up caching at lib_cache_path and tba.
Compute Environment: tba.
create_muggle_package( path, fields = list(), license = usethis::use_mit_license, license_holder = character(), organisation = NULL, private = FALSE )
path | A path. If it exists, it is used. If it does not exist, it is created, provided that the parent path exists. |
---|---|
fields | A named list of fields to add to |
license | one of the license functions in usethis |
license_holder | giving the license holder, used as |
organisation | If supplied, the repo will be created under this
organisation, instead of the login associated with the GitHub token
discovered for this |
private | If |
Must not be run inside a package, but at the root of all packages
If run on an existing project, the project should be under version control, with a clean working tree. The user should check all changes.