.usethis.R

#' @title
#' Package development process' history.
#'
#' @description
#' Audit trail of various functions calls related to the development process
#' of the package. It can be used to (partially) re-generate this package's
#' source code programmatically. It primarily focuses on `usethis`.


# Initialize package's skeleton ------------------------------------------------


usethis::create_package(".")
usethis::create_project(".")

# Remove name from .Rproj. It is useless.
file.rename("gather.Rproj", ".Rproj")


# Initialize Git repository ----------------------------------------------------


usethis::git_default_branch_configure(name = "main")
usethis::use_git()
usethis::use_git_remote(
    name = "origin",
    url  = "git@github.com:jeanmathieupotvin/gather.git")


# Create an entry point for developers -----------------------------------------


usethis::use_devtools()
usethis::use_usethis()


# Add records to .Rbuildignore -------------------------------------------------


usethis::use_build_ignore(".usethis.R")


# Build DESCRIPTION file -------------------------------------------------------


usethis::use_description(check_name = TRUE, roxygen = TRUE, fields = list(
    Package          = "gather",
    Title            = "Manage Magic: The Gathering® collections",
    License          = "MIT + file LICENSE",
    Language         = "en",
    Encoding         = "UTF-8",
    LazyData         = "true",
    ByteCompile      = "true",
    NeedsCompilation = "no",
    Roxygen          = "list(markdown = TRUE, r6 = TRUE)",
    URL              = "https://github.com/jeanmathieupotvin/gather",
    BugReports       = "https://github.com/jeanmathieupotvin/gather/issues/new",
    `Authors@R`      = 'utils::person(
        given   = "Jean-Mathieu",
        family  = "Potvin",
        email   = "jm@potvin.xyz",
        role    = c("aut", "cre"),
        comment = c(ORCID = "0000-0002-8237-422X"))',
    Description = "
        Manage your Magic: The Gathering® collections easily with R.
        It relies on Scryfall's REST API to fetch data. See Disclaimer
        for more information.",
    Disclaimer = "
        This package complies with Wizards of the Coast's Fan Content Policy,
        is copyleft (see LICENSE), and distributed free of charge. It is an
        unofficial tool not related in any way to Wizards of the Coast and
        Scryfall. If you believe it breaks any existing rules, and/or if you
        have any bad feelings towards it, please contact the maintainer. Magic:
        The Gathering® and Wizards of the Coast® are registered trademarks
        owned by Hasbro, Inc."
))


# Bump version field -----------------------------------------------------------


usethis::use_version(which = "dev")


# Choose license and create underlying files -----------------------------------


usethis::use_mit_license("Jean-Mathieu Potvin")


# Create a news file -----------------------------------------------------------


usethis::use_news_md()


# Create a read-me file --------------------------------------------------------


usethis::use_readme_md()
usethis::use_cran_badge()
usethis::use_lifecycle_badge(stage = "experimental")


# Setup dependencies -----------------------------------------------------------


# Required dependencies.
usethis::use_package("R", type = "Depends", min_version = "4.1.0")

# Imported packages.
usethis::use_data_table()
usethis::use_package("httr", type = "Imports", min_version = NULL)

# Suggested packages.
usethis::use_package("covr", type = "Suggests", min_version = NULL)


# Setup testing framework / environment ----------------------------------------


usethis::use_testthat(edition = 3L, parallel = TRUE)


# Setup continuous integration framework / environment (CI) --------------------


usethis::use_github_action_check_standard()


# Setup source files -----------------------------------------------------------


# Here.
jeanmathieupotvin/gather documentation built on Dec. 20, 2021, 10:08 p.m.