Skip to content

Rename resolution_parameter to resolution#1015

Merged
maelle merged 9 commits intoigraph:mainfrom
vtraag:fix/883
Jun 4, 2024
Merged

Rename resolution_parameter to resolution#1015
maelle merged 9 commits intoigraph:mainfrom
vtraag:fix/883

Conversation

@vtraag
Copy link
Copy Markdown
Member

@vtraag vtraag commented Dec 19, 2023

Fixes #883. I've only updated the R file and the test, all the rest should follow automatically, if my understanding is correct? If more is needed, let me know.

@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app Bot commented Dec 19, 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 merged manually (without Aviator). Merging manually can negatively impact the performance of the queue. Consider using Aviator next time.


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.

@vtraag vtraag requested a review from krlmlr December 19, 2023 09:22
@maelle
Copy link
Copy Markdown
Contributor

maelle commented Dec 19, 2023

I think we need to temporarily allow the two argument names? https://lifecycle.r-lib.org/articles/communicate.html#renaming-an-argument

@vtraag
Copy link
Copy Markdown
Member Author

vtraag commented Dec 19, 2023

Sure, sounds like a good idea!

I'm not entirely sure why the checks fail. Are the examples from the documentation not updated before being run or something? Should I run something in order to trigger an update of the docs?

@maelle
Copy link
Copy Markdown
Contributor

maelle commented Dec 19, 2023

@vtraag ah yes you need to run devtools::document() to update the Rd files (the manual pages).

Comment thread R/community.R Outdated
n_iterations = 2, vertex_weights = NULL) {

if (lifecycle::is_present(resolution_parameter)) {
lifecycle::deprecate_warn("1.5.0.9006",
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.

the version number here should be 2.0.0 (I think?) to go with the next release. it's only confusing for those who'll install the dev version.

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.

should it be lifecycle::deprecate_soft() for this version?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

the version number here should be 2.0.0 (I think?) to go with the next release. it's only confusing for those who'll install the dev version.

Why would this be confusing? Happy to say 2.0.0 here, but when we release any pre-2.0 release with this in it, it would be incorrect, and might be more confusing. (I now realise that I might have targeted the dev branch due to breaking changes, but they're now no longer breaking). Or am I misunderstanding something here?

@vtraag
Copy link
Copy Markdown
Member Author

vtraag commented Dec 19, 2023

@vtraag ah yes you need to run devtools::document() to update the Rd files (the manual pages).

Unfortunately can't do that now, apparently have to install something still, but R mirrors seem to be down:

image

@vtraag
Copy link
Copy Markdown
Member Author

vtraag commented Dec 19, 2023

I've now updated the docs.

By the way, I'm not sure how the deprecation should be dealt with in the docs? Should the old argument still be there, saying it's deprecated, and point to the new argument? Are there any defaults for this in R (sorry, I almost never work in R)?

Comment thread R/community.R
@szhorvat szhorvat modified the milestones: 2.0, upgrade Dec 30, 2023
@krlmlr krlmlr modified the milestones: upgrade, upgrade-2 Jan 2, 2024
@vtraag
Copy link
Copy Markdown
Member Author

vtraag commented Jan 12, 2024

Feeling like a complete n00b again! Now get Error: Error in deprecated() : argument "old" is missing, with no default in the CI. According to the docs deprecated doesn't have any arguments: https://lifecycle.r-lib.org/reference/deprecated.html. So I'm not sure what the error means or what can be done about it. Any suggestions @maelle ?

@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Jan 13, 2024

I've seen this before, igraph also implements a deprecated() function. Can we rename (in a separate PR), to avoid this kind of confusion?

@vtraag
Copy link
Copy Markdown
Member Author

vtraag commented Jan 13, 2024

Can we for now use lifecycle::deprecated ? What is the igraph::deprecated function used for, and do we need to retain it at all? (Separate PR and/or issue might be good indeed).

@maelle
Copy link
Copy Markdown
Contributor

maelle commented Jan 15, 2024

@vtraag the igraph deprecated() function will soon be removed, by #1014 and #1104 which aren't ready yet (and thanks to other commits).

@krlmlr krlmlr added the lifecycle Deprecating old APIs label Feb 20, 2024
@krlmlr krlmlr self-assigned this Apr 9, 2024
@krlmlr
Copy link
Copy Markdown
Contributor

krlmlr commented Apr 13, 2024

@maelle: I forgot why this is assigned to me. We probably want to add an ellipsis after the second argument and run revdepchecks. Can you please help with the ellipsis?

@maelle
Copy link
Copy Markdown
Contributor

maelle commented May 14, 2024

Sure, I'll do that, but what's our rationale for choosing to put check_dots_empty() in auto-generated vs wrapper code?

@maelle
Copy link
Copy Markdown
Contributor

maelle commented May 14, 2024

the existence of igraph's own deprecated() remains problematic but I used what we did in another function

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.

Nice! Good to go from my end.

Comment thread R/community.R Outdated
check_dots_empty()

if (lifecycle::is_present(resolution_parameter)) {
lifecycle::deprecate_soft("1.5.0.9006",
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.

This now needs to be 2.0.x

@maelle maelle modified the milestones: upgrade-2, 2.0.4 May 23, 2024
@maelle maelle merged commit f3cf605 into igraph:main Jun 4, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jun 5, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

lifecycle Deprecating old APIs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cluster_leiden() resolution_parameter should be renamed to resolution

4 participants