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
feat: remove deprecated functions before 1.0 #1352
base: main
Are you sure you want to change the base?
Conversation
Current Aviator status
This pull request is currently open (not queued). How to mergeTo merge this PR, comment
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 Is it right that we should just remove deprecated functions? |
I edited the top post and added information on what can / should be done. |
NAMESPACE
Outdated
@@ -483,8 +481,7 @@ export(hrg.fit) | |||
export(hrg.game) | |||
export(hrg.predict) | |||
export(hrg_tree) | |||
export(hub.score) | |||
export(hub_score) | |||
export(hub_and_authority_scores) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest hits_scores()
here, see comment I linked
Thanks! |
Let me know if you need input here, for example on what parameters to set in the new function to get the behaviour of the old one. Regarding hub and authority scores, I expect that removing these without deprecation would cause quite the uproar. What could be done is to implement There will also be another change in these two functions, as well as |
|
Why would it break the interface? As for the |
Because Sorry, I didn't get regarding laplacian. It has also |
This will require a somewhat breaking change (which is why I kept pushing to do this for 2.0...) The big change is not We need to transition from the old boolean |
Re hub and authority scores: Currently the function returns a list with many named elements. The main result is in Is there anything I'm missing that may continue to be a problem? |
I notice you were working on The R interface shouldn't always directly mirror the raw C interface. The |
Sure. I think derpecation of old parameter name is quite easy. Can you clarify please about single logical value or a vector? You mean it should be handled on R side? |
Yes, it should be handled in R. I would not allow
The default should be This is both very convenient (in most cases people will pass a scalar only) and it is compatible with how the old |
In the top post I linked to relevant issues where I tried to describe what's needed for the non-trivial upgrades. If anything's unclear (as in this case) please ask :-) |
R/make.R
Outdated
#' @param circular Logical, if `TRUE` the lattice or ring will be | ||
#' circular. | ||
#' @param periodic Logical vector, Boolean vector, defines whether the generated lattice is | ||
#' periodic along each dimension. This parameter may also be `NULL`, which | ||
#' implies that the lattice will not be periodic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs need an update to match the new interface. The new interface looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@szhorvat Do you mean description in the make.R
of this function? Is current desciption not valid anymore?
#' `make_lattice()` is a flexible function, it can create lattices of
#' arbitrary dimensions, periodic or aperiodic ones. It has two
#' forms. In the first form you only supply `dimvector`, but not
#' `length` and `dim`. In the second form you omit
#' `dimvector` and supply `length` and `dim`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Specifically the change I am commenting on is not valid anymore. It says that the parameter value has to be a logical vector or NULL, but in fact it is either a logical vector or a logical scalar, with specific interpretation for each.
@maelle
I don't get what is missing in documentation, mentioned functions have |
I'll come back to this next week! |
Deprecated
igraph_bipartite_game()
— see Split sample_bipartite() into two functions for the G(n,m) and G(n,p) case #630Updated
igraph_hub_score()
- replaced withigraph_hub_and_authority_scores()
, see Avoid using deprecated functions from igraph/C #1177 (comment)igraph_authority_score()
- replaced withigraph_hub_and_authority_scores()
, see Avoid using deprecated functions from igraph/C #1177 (comment)igraph_lattice()
— replace withigraph_square_lattice()
, see Updatemake_lattice()
/lattice()
#994igraph_laplacian()
— replace byigraph_get_laplacian()
igraph_erdos_renyi_game()
— not used in R.igraph_random_edge_walk()
— functionality merged intoigraph_random_walk()
.R side
hub_score()
- addedhits_scores
.hub_score
is deprecated and usehits_scores
under the hood.authority_score()
- addedhits_scores
.authority_score
is deprecated and usehits_scores
under the hood.make_lattice()
- usesquare_lattice()
.circular
parameter is deprecated. Addedperiodic
parameter.periodic
should be logical vector with same length asdim
or single value which will be converted to vector.laplacian_matrix
- use generatedget_laplacian_sparse_impl
andget_laplacian_impl
instead ofR_igraph_laplacian
.normalized
argument is deprecated with newnormalization
argument.igraph_erdos_renyi_game()
— not used in R.igraph_random_edge_walk()
— updatedrandom_edge_walk
to userandom_walk_impl
withedges
return.