Skip to content

refactor: {lifecycle} instead of current deprecations#984

Closed
maelle wants to merge 48 commits intoigraph:mainfrom
maelle:zzz-smarter
Closed

refactor: {lifecycle} instead of current deprecations#984
maelle wants to merge 48 commits intoigraph:mainfrom
maelle:zzz-smarter

Conversation

@maelle
Copy link
Copy Markdown
Contributor

@maelle maelle commented Dec 4, 2023

No description provided.

@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Dec 4, 2023

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 closed without merging. If you still want to merge this PR, re-open it.


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.

@maelle
Copy link
Copy Markdown
Contributor Author

maelle commented Dec 4, 2023

@krlmlr this will all fail because of test failures, before we merge the other PRs
#983
#982
#981
#980
#979

and then rebase.

I haven't yet taken into account the revdeps but the smaller commits might help?

Comment thread R/aaa-a-deprecate.R Outdated
@@ -0,0 +1,29 @@

# IGraph R package
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had to rename it so it'd be loaded first! 🤯

I needed the deprecated() calls to live inside the corresponding scripts otherwise later I couldn't have commits that corresponded to modifying one single R script and running document().

Comment thread tools/deprecate.R
@@ -0,0 +1,348 @@
# parse script ----
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it wasn't directly sourced(), I ran it partly line by line and had to fix some Git mistakes I made, but it's a rough guide...

@aviator-app aviator-app Bot force-pushed the zzz-smarter branch 10 times, most recently from 1c8c60c to 766eaf9 Compare December 6, 2023 12:53
Copy link
Copy Markdown
Contributor

@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.

Thanks! I like how we now can cherry-pick changes.

I saw issues with the spacing, and 1.6.0 is out already. Can you please regenerate?

Comment thread R/attributes.R
Comment on lines +222 to +223
get.edge.attribute <- function(graph , name , index = E(graph)) { # nocov start
lifecycle::deprecate_soft("1.6.0", "get.edge.attribute()", "edge_attr()")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
get.edge.attribute <- function(graph , name , index = E(graph)) { # nocov start
lifecycle::deprecate_soft("1.6.0", "get.edge.attribute()", "edge_attr()")
get.edge.attribute <- function(graph, name, index = E(graph)) { # nocov start
lifecycle::deprecate_soft("2.0.0", "get.edge.attribute()", "edge_attr()")

Comment thread R/adjacency.R
#' @inheritParams graph_from_adjacency_matrix
#' @keywords internal
#' @export
graph.adjacency <- function(adjmatrix , mode = c("directed","undirected","max","min","upper","lower","plus") , weighted = NULL , diag = TRUE , add.colnames = NULL , add.rownames = NA) { # nocov start
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
graph.adjacency <- function(adjmatrix , mode = c("directed","undirected","max","min","upper","lower","plus") , weighted = NULL , diag = TRUE , add.colnames = NULL , add.rownames = NA) { # nocov start
graph.adjacency <- function(adjmatrix, mode = c("directed", "undirected", "max", "min", "upper", "lower", "plus"), weighted = NULL, diag = TRUE, add.colnames = NULL, add.rownames = NA) { # nocov start

@maelle maelle closed this Dec 11, 2023
@maelle
Copy link
Copy Markdown
Contributor Author

maelle commented Dec 11, 2023

(I'll open a new PR)

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Dec 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants