From 4b0d2fd7b36ee760d88638cf31393619193f1572 Mon Sep 17 00:00:00 2001 From: hrbrmstr Date: Wed, 27 Jan 2021 14:36:01 -0500 Subject: [PATCH] R package repo initialization complete --- .Rbuildignore | 26 +++++++++++++++++++ .codecov.yml | 1 + .github/workflows/R-CMD-check.yaml | 26 +++++++++++++++++++ .gitignore | 9 +++++++ .travis.yml | 12 +++++++++ CONDUCT.md | 25 ++++++++++++++++++ DESCRIPTION | 24 ++++++++++++++++++ NAMESPACE | 4 +++ NEWS.md | 2 ++ R/httr2curl-package.R | 9 +++++++ README.Rmd | 51 +++++++++++++++++++++++++++++++++++++ appveyor.yml | 52 ++++++++++++++++++++++++++++++++++++++ httr2curl.Rproj | 21 +++++++++++++++ inst/tinytest/test_httr2curl.R | 4 +++ man/httr2curl.Rd | 22 ++++++++++++++++ tests/tinytest.R | 5 ++++ 16 files changed, 293 insertions(+) create mode 100644 .Rbuildignore create mode 100644 .codecov.yml create mode 100644 .github/workflows/R-CMD-check.yaml create mode 100644 .gitignore create mode 100644 .travis.yml create mode 100644 CONDUCT.md create mode 100644 DESCRIPTION create mode 100644 NAMESPACE create mode 100644 NEWS.md create mode 100644 R/httr2curl-package.R create mode 100644 README.Rmd create mode 100644 appveyor.yml create mode 100644 httr2curl.Rproj create mode 100644 inst/tinytest/test_httr2curl.R create mode 100644 man/httr2curl.Rd create mode 100644 tests/tinytest.R diff --git a/.Rbuildignore b/.Rbuildignore new file mode 100644 index 0000000..ee83c59 --- /dev/null +++ b/.Rbuildignore @@ -0,0 +1,26 @@ +^.vscode$ +^.*\.Rproj$ +^\.Rproj\.user$ +^\.travis\.yml$ +^README\.*Rmd$ +^README\.*html$ +^NOTES\.*Rmd$ +^NOTES\.*html$ +^\.codecov\.yml$ +^README_files$ +^doc$ +^docs$ +^tmp$ +^notes$ +^CONDUCT.*$ +^CODE.*$ +^\.gitlab-ci\.yml$ +^\.vscode$ +^CRAN-RELEASE$ +^appveyor\.yml$ +^tools$ +^LICENSE\.md$ +^bld$ +^node_modules^ +^package-lock\.json$ +^\.github$ diff --git a/.codecov.yml b/.codecov.yml new file mode 100644 index 0000000..69cb760 --- /dev/null +++ b/.codecov.yml @@ -0,0 +1 @@ +comment: false diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..ba5fc98 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,26 @@ +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + push: + branches: + - batman + pull_request: + branches: + - batmsn + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@master + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..accfbc6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +.Rproj.user +.Rhistory +.RData +.Rproj +README_cache +src/*.o +src/*.so +src/*.dll diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..4a63da7 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: R +sudo: false +cache: packages + +before_install: + - echo "options(repos = c(CRAN = 'https://packagemanager.rstudio.com/all/__linux__/xenial/latest'))" >> ~/.Rprofile.site + - echo "options(HTTPUserAgent = paste0('R/', getRversion(), ' R (', + paste(getRversion(), R.version['platform'], R.version['arch'], R.version['os']), + ')'))" >> ~/.Rprofile.site + +after_success: +- Rscript -e 'covr::codecov()' diff --git a/CONDUCT.md b/CONDUCT.md new file mode 100644 index 0000000..52a673e --- /dev/null +++ b/CONDUCT.md @@ -0,0 +1,25 @@ +# 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 +(http:contributor-covenant.org), version 1.0.0, available at +http://contributor-covenant.org/version/1/0/0/ diff --git a/DESCRIPTION b/DESCRIPTION new file mode 100644 index 0000000..74ea5cc --- /dev/null +++ b/DESCRIPTION @@ -0,0 +1,24 @@ +Package: httr2curl +Type: Package +Title: httr2curl Title Goes Here Otherwise CRAN Checks Fail +Version: 0.1.0 +Date: 2021-01-27 +Authors@R: c( + person("Bob", "Rudis", email = "bob@rud.is", role = c("aut", "cre"), + comment = c(ORCID = "0000-0001-5670-2640")) + ) +Maintainer: Bob Rudis +Description: A good description goes here otherwise CRAN checks fail. +URL: https://git.rud.is/hrbrmstr/httr2curl +BugReports: https://git.rud.is/hrbrmstr/httr2curl/issues +Encoding: UTF-8 +License: AGPL +Suggests: + covr, tinytest +Depends: + R (>= 3.6.0) +Imports: + httr, + jsonlite +Roxygen: list(markdown = TRUE) +RoxygenNote: 7.1.1 diff --git a/NAMESPACE b/NAMESPACE new file mode 100644 index 0000000..5b4b9ae --- /dev/null +++ b/NAMESPACE @@ -0,0 +1,4 @@ +# Generated by roxygen2: do not edit by hand + +import(httr) +importFrom(jsonlite,fromJSON) diff --git a/NEWS.md b/NEWS.md new file mode 100644 index 0000000..9b4679b --- /dev/null +++ b/NEWS.md @@ -0,0 +1,2 @@ +0.1.0 +* Initial release diff --git a/R/httr2curl-package.R b/R/httr2curl-package.R new file mode 100644 index 0000000..8ac42e0 --- /dev/null +++ b/R/httr2curl-package.R @@ -0,0 +1,9 @@ +#' ... +#' +#' @md +#' @name httr2curl +#' @keywords internal +#' @author Bob Rudis (bob@@rud.is) +#' @import httr +#' @importFrom jsonlite fromJSON +"_PACKAGE" diff --git a/README.Rmd b/README.Rmd new file mode 100644 index 0000000..30917b2 --- /dev/null +++ b/README.Rmd @@ -0,0 +1,51 @@ +--- +output: rmarkdown::github_document +editor_options: + chunk_output_type: console +--- +```{r pkg-knitr-opts, include=FALSE} +hrbrpkghelpr::global_opts() +``` + +```{r badges, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::stinking_badges() +``` + +```{r description, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::yank_title_and_description() +``` + +## What's Inside The Tin + +The following functions are implemented: + +```{r ingredients, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::describe_ingredients() +``` + +## Installation + +```{r install-ex, results='asis', echo=FALSE, cache=FALSE} +hrbrpkghelpr::install_block() +``` + +## Usage + +```{r lib-ex} +library(httr2curl) + +# current version +packageVersion("httr2curl") + +``` + +## httr2curl Metrics + +```{r cloc, echo=FALSE} +cloc::cloc_pkg_md() +``` + +## Code of Conduct + +Please note that this project is released with a Contributor Code of Conduct. +By participating in this project you agree to abide by its terms. diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..edc6d2e --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,52 @@ +# DO NOT CHANGE the "init" and "install" sections below + +# Download script file from GitHub +init: + ps: | + = "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 diff --git a/httr2curl.Rproj b/httr2curl.Rproj new file mode 100644 index 0000000..446d9e1 --- /dev/null +++ b/httr2curl.Rproj @@ -0,0 +1,21 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX + +StripTrailingWhitespace: Yes + +BuildType: Package +PackageUseDevtools: Yes +PackageInstallArgs: --no-multiarch --with-keep.source +PackageBuildArgs: --resave-data +PackageRoxygenize: rd,collate,namespace diff --git a/inst/tinytest/test_httr2curl.R b/inst/tinytest/test_httr2curl.R new file mode 100644 index 0000000..aa3f72e --- /dev/null +++ b/inst/tinytest/test_httr2curl.R @@ -0,0 +1,4 @@ + +# Placeholder with simple test +expect_equal(1 + 1, 2) + diff --git a/man/httr2curl.Rd b/man/httr2curl.Rd new file mode 100644 index 0000000..0618673 --- /dev/null +++ b/man/httr2curl.Rd @@ -0,0 +1,22 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/httr2curl-package.R +\docType{package} +\name{httr2curl} +\alias{httr2curl} +\alias{httr2curl-package} +\title{...} +\description{ +A good description goes here otherwise CRAN checks fail. +} +\seealso{ +Useful links: +\itemize{ + \item \url{https://git.rud.is/hrbrmstr/httr2curl} + \item Report bugs at \url{https://git.rud.is/hrbrmstr/httr2curl/issues} +} + +} +\author{ +Bob Rudis (bob@rud.is) +} +\keyword{internal} diff --git a/tests/tinytest.R b/tests/tinytest.R new file mode 100644 index 0000000..a0aed14 --- /dev/null +++ b/tests/tinytest.R @@ -0,0 +1,5 @@ + +if ( requireNamespace("tinytest", quietly=TRUE) ){ + tinytest::test_package("httr2curl") +} +