Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds the .frequency_id argument required by rlang::warn #152

Merged
merged 19 commits into from
Aug 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .Rprofile

This file was deleted.

2 changes: 2 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

# - uses: r-lib/actions/setup-renv@v2

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
Expand Down
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ Suggests:
devtools,
fledge,
fs,
httpgd,
httr,
janitor,
knitr,
languageserver,
lifecycle,
lintr,
readr,
Expand Down
3 changes: 1 addition & 2 deletions R/ojo_civ_cases.R
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ ojo_add_issues <- function(data, vars = NULL, ...) {
if (is.null(vars)) {
issues <- issues |>
dplyr::select(
.data$case_id, .data$rank, .data$description,
.data$disposition, .data$disposition_date
case_id, rank, description, disposition, disposition_date
)
} else {
if (vars != "all") {
Expand Down
3 changes: 2 additions & 1 deletion R/ojo_collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ ojo_collect <- function(.data, ..., .silent = !rlang::is_interactive()) {
if ("n" %in% names(.data)) {
rlang::warn(
"The tbl you are requesting has a variable named `n`. This can cause issues with progress bar rendering and status updates. This message won't be shown again this session.",
.frequency = "once"
.frequency = "once",
.frequency_id = "ojo_collect_n_warning"
)
}

Expand Down
10 changes: 6 additions & 4 deletions R/ojo_county_population.R
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ ojo_county_population <- function(years) {
}

d <- d |>
dplyr::mutate(court = .data$NAME |>
stringr::str_remove(" County.*") |>
stringr::str_to_upper() |>
stringr::str_remove_all(" ")) |>
dplyr::mutate(
court = .data$NAME |>
stringr::str_remove(" County.*") |>
stringr::str_to_upper() |>
stringr::str_remove_all(" ")
) |>
dplyr::select(.data$court, .data$year, pop = .data$value)

return(d)
Expand Down
2 changes: 1 addition & 1 deletion R/ojo_list_schemas.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ ojo_list_schemas <- function(..., .con = NULL) {
.con = .con
) |>
dplyr::as_tibble() |>
dplyr::rename(schema = .data$schema_name) |>
dplyr::rename(schema = schema_name) |>
dplyr::filter(!.data$schema %in% c("pg_catalog", "information_schema")) |>
dplyr::arrange(.data$schema)
}
2 changes: 1 addition & 1 deletion R/ojo_list_tables.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ ojo_list_tables <- function(schema = "public", ..., .con = NULL) {

pool::dbGetQuery(.con, query) |>
dplyr::as_tibble() |>
dplyr::select(table = .data$table_name)
dplyr::select(table = table_name)
}

if (schema == "all") {
Expand Down
2 changes: 1 addition & 1 deletion R/ojo_list_vars.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ ojo_list_vars <- function(table, schema = "public", ..., .con = NULL) {
.data$table_schema == schema,
.data$table_name == table
) |>
dplyr::select(.data$column_name) |>
dplyr::select(column_name) |>
dplyr::arrange(.data$column_name)
}
2 changes: 1 addition & 1 deletion docs/404.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/LICENSE.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions docs/authors.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions docs/pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
pandoc: 3.0.1
pandoc: 3.1.1
pkgdown: 2.0.7
pkgdown_sha: ~
articles:
vignette-connecting-to-ojo: vignette-connecting-to-ojo.html
vignette-pulling-data: vignette-pulling-data.html
last_built: 2023-04-18T21:47Z

last_built: 2023-08-24T21:19Z

2 changes: 1 addition & 1 deletion docs/reference/get_connection_object.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading