Skip to content

Commit

Permalink
Update embedded pkgdepends
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborcsardi committed Feb 3, 2025
1 parent 683f1be commit 215a2ce
Show file tree
Hide file tree
Showing 42 changed files with 769 additions and 77 deletions.
2 changes: 1 addition & 1 deletion src/library/pkgdepends/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Config/testthat/edition: 3
Encoding: UTF-8
RoxygenNote: 7.3.2
NeedsCompilation: yes
Packaged: 2024-12-18 17:35:36 UTC; gaborcsardi
Packaged: 2025-02-03 12:47:41 UTC; gaborcsardi
Author: Gábor Csárdi [aut, cre],
Posit Software, PBC [cph, fnd]
Maintainer: Gábor Csárdi <[email protected]>
6 changes: 6 additions & 0 deletions src/library/pkgdepends/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ S3method(print,package_build_error)
S3method(print,package_packaging_error)
S3method(print,package_uncompress_error)
S3method(print,pkg_name_check)
S3method(print,pkg_name_check_basics)
S3method(print,pkg_name_check_sentiment)
S3method(print,pkg_name_check_urban)
S3method(print,pkg_name_check_wikipedia)
S3method(print,pkg_name_check_wiktionary)
S3method(print,pkg_scan_deps)
S3method(print,pkg_solution_failures)
S3method(print,pkg_solution_result)
S3method(print,pkg_sysreqs_check_result)
S3method(print,pkginstall_result)
Expand Down
4 changes: 4 additions & 0 deletions src/library/pkgdepends/R/find-package-root.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ find_package_root <- function(path = ".") {
find_project_root(path = path, anchors = "DESCRIPTION")
}

is_package_root <- function(path = ".") {
file.exists(file.path(path, "DESCRIPTION"))
}

find_project_root <- function(path = ".", anchors = project_root_anchors) {
is_root <- function(path) {
identical(
Expand Down
35 changes: 35 additions & 0 deletions src/library/pkgdepends/R/name-check.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ pnc_crandb_process <- function(response) {

#' @export

print.pkg_name_check_basics <- function(x, ...) {
writeLines(format(x, ...))
invisible(x)
}

#' @export

format.pkg_name_check_basics <- function(x, ...) {

cw <- cli::console_width()
Expand Down Expand Up @@ -291,6 +298,13 @@ wikipedia_get_process <- function(

#' @export

print.pkg_name_check_wikipedia <- function(x, ...) {
writeLines(format(x, ...))
invisible(x)
}

#' @export

format.pkg_name_check_wikipedia <- function(x, limit = 6, ...) {
x <- x[1,, drop = FALSE]

Expand Down Expand Up @@ -361,6 +375,13 @@ wiktionary_get_process <- function(terms, resp) {

#' @export

print.pkg_name_check_wiktionary <- function(x, ...) {
writeLines(format(x, ...))
invisible(x)
}

#' @export

format.pkg_name_check_wiktionary <- function(x, limit = 6, ...) {
x <- x[1,, drop = FALSE]

Expand Down Expand Up @@ -498,6 +519,13 @@ sentiment_string <- function(x) {

#' @export

print.pkg_name_check_sentiment <- function(x, ...) {
writeLines(format(x, ...))
invisible(x)
}

#' @export

format.pkg_name_check_sentiment <- function(x, ...) {
if (is.na(x)) x <- 0
str <- sentiment_string(x)
Expand Down Expand Up @@ -544,6 +572,13 @@ urban_get_process <- function(term, resp) {

#' @export

print.pkg_name_check_urban <- function(x, ...) {
writeLines(format(x, ...))
invisible(x)
}

#' @export

format.pkg_name_check_urban <- function(x, limit = 6, ...) {
if (nrow(x) == 0) {
txt <- "No definition found."
Expand Down
Loading

0 comments on commit 215a2ce

Please sign in to comment.