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

chore!: Hard-deprecate as_adjacency_matrix(edges = ) #1080

Merged
merged 4 commits into from Jan 21, 2024

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Jan 8, 2024

Closes #815.

Copy link
Contributor

aviator-app bot commented Jan 8, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was merged using Aviator.


See the real-time status of this PR on the Aviator webapp.

Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jan 8, 2024

@maelle: This also affects [.igraph(edges = ) . Can you please take over here?

@krlmlr
Copy link
Contributor Author

krlmlr commented Jan 8, 2024

See the failing tests with this PR.

R/conversion.R Show resolved Hide resolved
@krlmlr krlmlr added this to the upgrade milestone Jan 16, 2024
@maelle maelle changed the title chore: Hard-deprecate as_adjacency_matrix(edges = ) chore!: Hard-deprecate as_adjacency_matrix(edges = ) Jan 16, 2024
@maelle maelle marked this pull request as ready for review January 16, 2024 11:36
@maelle
Copy link
Contributor

maelle commented Jan 16, 2024

@krlmlr

  • will the "!" in the commit message (from the current PR title) be enough to ensure this goes into the changelog as breaking change?
  • can you please run revdeps checks for this change?

Copy link
Contributor Author

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll run revdepchecks.

if (!sparse) {
get.adjacency.dense(graph, type = type, attr = attr, weights = NULL, names = names)
} else {
if (sparse) {
get.adjacency.sparse(graph, type = type, attr = attr, edges = edges, names = names)
Copy link
Contributor Author

@krlmlr krlmlr Jan 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing edges now looks like dead code, but get.adjacency.sparse() will be implemented in C anyway, perhaps no need to act.

Comment on lines +320 to 321
#' @param edges `r lifecycle::badge("deprecated")` Logical scalar, whether to return the edge ids in the matrix.
#' For non-existant edges zero is returned.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we just mention that this must be omitted?

if (!missing(edges)) {
warning("The `edges` argument of `as_adjacency_matrix` is deprecated; it will be removed in igraph 1.4.0")
if (!missing(edges) && isTRUE(edges)) {
lifecycle::deprecate_stop("2.0.0", "as_adjacency_matrix(edges = )")
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a deprecate_soft() if edges is FALSE ?

@krlmlr krlmlr force-pushed the f-851-as-adj-edges branch 2 times, most recently from 59ad321 to c85c8f0 Compare January 21, 2024 07:53
@krlmlr
Copy link
Contributor Author

krlmlr commented Jan 21, 2024

revdepchecks look fine.

@aviator-app aviator-app bot merged commit 309ba91 into main Jan 21, 2024
14 checks passed
@aviator-app aviator-app bot deleted the f-851-as-adj-edges branch January 21, 2024 08:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove 'edges' parameter from as_adjacency_matrix()
2 participants