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: use assert_character() instead of as.character() #1365

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

maelle
Copy link
Contributor

@maelle maelle commented May 14, 2024

No description provided.

Copy link
Contributor

aviator-app bot commented May 14, 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 pull request is currently open (not queued).

How to merge

To merge this PR, comment /aviator merge or add the mergequeue label.


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.

@szhorvat
Copy link
Member

I'm not experienced enough with R to be able to follow the code without considerable time investment, but I wanted to point out that in many cases, numerical vertex IDs or vertex names are auto-converted to characters. This is convenient and probably desirable. I do not know if this change breaks any of the relevant use cases, but it's good to pay attention here.

name <- gsub("\\s", "_", name)

on.exit(.Call(R_igraph_finalizer))
res <- .Call(R_igraph_famous, as.character(name))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

what could name be given it's been fed to gsub()

@maelle maelle requested a review from krlmlr May 14, 2024 11:28
@maelle
Copy link
Contributor Author

maelle commented May 14, 2024

@szhorvat thanks! Yes, I'm hoping the revdeps checks would help with that. If this breaks too many things, I won't merge it.

@szhorvat
Copy link
Member

And just another reminder that our users are not just dependent packages, but also individuals who use igraph for research, often interactively. Unfortunately it is difficult to track this second kind of user, even though IMO they are the majority.

@maelle maelle marked this pull request as draft May 14, 2024 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants