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

refactor!: change R/par.R #1104

Merged
merged 1 commit into from
Jan 16, 2024
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
41 changes: 36 additions & 5 deletions R/par.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,39 @@

#' Parameters for the igraph package
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' `igraph.options()` was renamed to `igraph_options()` to create a more
#' consistent API.
#' @inheritParams igraph_options
#' @keywords internal
#' @export
igraph.options <- function(...) { # nocov start
lifecycle::deprecate_soft("2.0.0", "igraph.options()", "igraph_options()")
igraph_i_options(...)
} # nocov end

#' Parameters for the igraph package
#'
#' @description
#' `r lifecycle::badge("deprecated")`
#'
#' `getIgraphOpt()` was renamed to `igraph_opt()` to create a more
#' consistent API.
#' @inheritParams igraph_opt
#' @keywords internal
#' @export
getIgraphOpt <- function(x, default = NULL) { # nocov start
lifecycle::deprecate_soft("2.0.0", "getIgraphOpt()", "igraph_opt()")

if (missing(default)) {
get_config(paste0("igraph::", x), .igraph.pars[[x]])
} else {
get_config(paste0("igraph::", x), default)
}
} # nocov end

# IGraph R package
# Copyright (C) 2005-2012 Gabor Csardi <[email protected]>
# 334 Harvard street, Cambridge, MA 02139 USA
Expand Down Expand Up @@ -126,7 +161,7 @@ igraph.pars.callbacks <- list("verbose" = igraph.pars.set.verbose)
#' [attribute.combination()] for details on this.}
#' }
#'
#' @aliases igraph.options igraph_options getIgraphOpt igraph_opt
#' @aliases igraph_options igraph_opt
#' @param \dots A list may be given as the only argument, or any number of
#' arguments may be in the `name=value` form, or no argument at all may be
#' given. See the Value and Details sections for explanation.
Expand Down Expand Up @@ -247,7 +282,3 @@ with_igraph_opt <- function(options, code) {
old <- igraph_options(options)
force(code)
}
#' @export getIgraphOpt
deprecated("getIgraphOpt", igraph_opt)
#' @export igraph.options
deprecated("igraph.options", igraph_options)
22 changes: 22 additions & 0 deletions man/getIgraphOpt.Rd

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

20 changes: 20 additions & 0 deletions man/igraph.options.Rd

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

2 changes: 0 additions & 2 deletions man/igraph_options.Rd

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