Skip to content

Commit b4e77c1

Browse files
Bai-Li-NOAAAndrea-Havron-NOAAmsupernaw
authored andcommitted
fix r cmd check notes
* use utils::globalVariables() to remove the warning about no visible binding for a global variable * update(DESCRIPTION): move httr from Imports to Suggests since it is used in .Rhistory * add devcontainer.json with required R packages * update(.Rbuidignore): add README.html and .devcontainer/ Co-authored-by: Andrea-Havron-NOAA <[email protected]> Co-authored-by: Matthew-Supernaw-NOAA <[email protected]>
1 parent 81c25af commit b4e77c1

File tree

6 files changed

+82
-2
lines changed

6 files changed

+82
-2
lines changed

.Rbuildignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
^\.Rproj\.user$
33
^LICENSE\.md$
44
^README\.Rmd$
5+
^README\.html$
56
^_pkgdown\.yml$
67
^docs$
78
^pkgdown$
89
^\.github$
910
^\.httr-oauth$
11+
^\.devcontainer$

.devcontainer/devcontainer.json

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.234.0/containers/r
3+
{
4+
"name": "R (rocker/r-ver base)",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4.3", //commma needed if other sections are used.
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
// if we want to install r packages using pak
11+
// more info: https://github.com/rocker-org/devcontainer-features/blob/main/src/r-packages/README.md
12+
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
13+
"packages": "clang,clang-format,clang-tidy,cmake,doxygen,g++,gcc,libxt6,libxtst6,make,ninja-build"
14+
},
15+
"ghcr.io/rocker-org/devcontainer-features/r-packages:1": {
16+
"packages": "blastula,dplyr,devtools,ggplot2,jsonlite,kableExtra,methods,mockery,parsedate,Rcpp,RcppEigen,scales,snowfall,TMB,tibble,tidyr,usethis",
17+
"installSystemRequirements": true
18+
},
19+
// option to run rstudio. you can type rserver into the command line to
20+
// get an session going (opens on a port, that you can open as a
21+
// separate browser window).
22+
// more details: https://github.com/rocker-org/devcontainer-features/blob/main/src/rstudio-server/README.md
23+
"ghcr.io/rocker-org/devcontainer-features/rstudio-server:0": {}
24+
},
25+
// // if we want quarto cli
26+
// more info: https://github.com/rocker-org/devcontainer-features/blob/main/src/quarto-cli/README.md
27+
// "ghcr.io/rocker-org/devcontainer-features/quarto-cli:1": {}
28+
// },
29+
30+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
31+
// "forwardPorts": [],
32+
33+
// Use 'postCreateCommand' to run commands after the container is created.
34+
"postCreateCommand": "echo 'options(repos = c(CRAN = \"https://cloud.r-project.org\"))' | sudo sh -c 'cat - >>\"${R_HOME}/etc/Rprofile.site\"'",
35+
36+
// Configure tool-specific properties.
37+
"customizations": {
38+
"vscode": {
39+
// Set *default* container specific settings.json values on container create.
40+
// Add the IDs of extensions you want installed when the container is created.
41+
"extensions": [
42+
// if we want liveshare.
43+
"ms-vsliveshare.vsliveshare",
44+
"ms-vscode.cpptools",
45+
"ms-vscode.cmake-tools",
46+
"GitHub.codespaces",
47+
"bbenoist.Doxygen",
48+
"matepek.vscode-catch2-text-adapter",
49+
"hbenl.vscode-test-explorer",
50+
"reditorsupport.r",
51+
"rdebugger.r-debugger",
52+
"github.vscode-pull-request-github"
53+
]
54+
}
55+
56+
57+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
58+
// "remoteUser": "root"
59+
}
60+
}

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ Imports:
1010
blastula,
1111
dplyr,
1212
gh,
13-
httr,
1413
jsonlite,
1514
kableExtra,
1615
knitr,
@@ -20,7 +19,8 @@ Imports:
2019
tidyr
2120
Suggests:
2221
ggplot2,
23-
testthat (>= 3.0.0)
22+
testthat (>= 3.0.0),
23+
httr
2424
Config/testthat/edition: 3
2525
Encoding: UTF-8
2626
Roxygen: list(markdown = TRUE)

R/calculate_.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# To remove the WARNING
2+
# no visible binding for global variable
3+
utils::globalVariables(c(
4+
"org", "repo", "day", "stars"
5+
))
6+
17
#' Calculate the cumulative number of stars
28
#'
39
#' For each combination of organization and repository, calculate the

R/create_issue_table.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# To remove the WARNING
2+
# no visible binding for global variable
3+
utils::globalVariables(c(
4+
"label_col"
5+
))
6+
17
#' Creates a table of issues
28
#'
39
#' This function takes a \code{json} input table generated from the Github

R/get_.R

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# To remove the WARNING
2+
# no visible binding for global variable
3+
utils::globalVariables(c(
4+
"owner", "starred_at"
5+
))
6+
17
#' Query the Github API for a list of issues associated with a repository
28
#'
39
#' The issues for a given repository and all of their metadata are returned as

0 commit comments

Comments
 (0)