-
-
Notifications
You must be signed in to change notification settings - Fork 201
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: New largest_component()
returns the largest connected component
#786
Conversation
Thanks. Can you please also commit the changes to the |
So, locally go through the steps we discussed ( |
You know, it helps to read the messages from GitHub. Let me get caught up locally again and push. I'll let you know when it's done. I'm concerned if I compile again that will cause problems for the merge (by creating a bunch of files?), but let's see what happens. |
Ok, locally I opened a new R session in
Strangely, I can access the man page if I open R in the terminal, but not if I'm running R in Emacs/ESS. Regardless, I think it worked so I continued. There are now changes to |
Hmm. That's a lot of angry red 'x' marks. Rookie mistake! I think the problem is failing to include a variable definition in the man page example. Let me fix it and push again. |
largest_component()
returns the largest connected component
Thanks!
|
I wouldn't; |
In the context of igraph we call the graph with zero vertices the null graph. When the argument is a null graph, this function should also return a null graph, for consistency with Python and Mathematica. See igraph/python-igraph#649 |
|
@krlmlr I think the checks are failing because of the documentation organization issue:
I believe all I need to do to fix this is add at least one of
to match the roxygen2 documentation for |
I agree with (2) in the linked issue. I didn't do it on purpose, but this function returns a null graph when the original is null:
I guess that's because of consistency in the behavior of |
@krlmlr I think it should end up in https://r.igraph.org/reference/index.html#connected-components? Note the same help pages turn up in https://r.igraph.org/reference/index.html#structural-properties what do you @szhorvat @ntamas think? |
@ngmaclaren congrats on your first PR! Sharing a (IMHO) useful tip: if you edit your very first comment (screenshot below) to include a line |
Awesome---thank you! I made that change. |
Ok, I have simplified the function as recommended by @szhorvat and updated the documentation as recommended by @maelle . I wound up editing the documentation for @krlmlr I have not added any tests yet. There is no |
I'm afraid I'm not sure what to do with this error. The error is under Check windows-latest > Install R dependencies. Here's the relevant part of the message:
Is this something I can take care of on my end? |
It's probably a bogus error. I triggered a new round of checks. |
We have tests for other functions in that file in other test files. It would be great to have a corresponding |
@krlmlr Do you all need anything else from me to close this out? Would you rather I include the tests in this PR? If so, do you want me to collect the tests for other components functions from other
|
Thanks for the heads-up. Tests in this PR would be great, if you like to align the tests that would be fine too, but not necessary. If you end up moving code, can you please put all such changes in (a) separate commit[s]? |
I don't understand the Windows failures: https://github.com/igraph/rigraph/actions/runs/4765990318/jobs/8472547482 . They don't seem to occur on the main branch. |
It looks like all checks have passed now? https://github.com/igraph/rigraph/actions/runs/5033072387 It looks like new checks ran yesterday. |
Yes, no problem. I will work on this. |
Updates:
I haven't done any other consolidation. |
Thanks! The test failures are from the main branch now. |
Awesome! Thanks for your help! |
Making this a draft pull request in case I've done something wrong.
Fix #785