-
Notifications
You must be signed in to change notification settings - Fork 160
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
Degree centrality implementation #1306
Degree centrality implementation #1306
Conversation
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.
Thanks for making your first contribution. I left some comments, but some things to note:
- Add release notes: https://github.com/Qiskit/rustworkx/blob/main/CONTRIBUTING.md#release-notes
- Add a universal function so your code works with both
PyGraph
andPyDiGraph
. Here is a good example:rustworkx/rustworkx/__init__.py
Line 1273 in 8774ccd
def katz_centrality( - You probably want to implement this centrality for
PyDiGraph
as well - Format your code. It is an automated process, see https://github.com/Qiskit/rustworkx/blob/main/CONTRIBUTING.md#style
Also, I noticed from the CLA bot that this PR has two authors. This is quite unusual for a first contribution so please let me know if you are:
- Working on a college assignment together
- One of the users flagged by the bot is an AI Assistant
There is nothing wrong with either, but it can help me review the PR accordingly.
Also, we can handle |
Hi, thank you for the swift feedback! I just wanted to note that this was in fact a college assignment, with the other contributor being my classmate. However we are now moving on to individual work, so I will be responsible for the next steps. I will be begin addressing your suggestions shortly. |
Sounds good to me, just remember to ask your classmate(s) to sign the CLA otherwise the bot will not let it get merged |
8def920
to
19548f3
Compare
I tried to rebase to amend a commit my friend made, but I think I inadvertently added things to the PR that should not be there. What is the course of action here? |
Keep "Maintainers are allowed to edit this pull request." active as it is right now and don't do further pushes. I will do a force push with the diff only and take it from here. I will add you as an author and your classmate as co-author. |
Co-authored-by: Gohlub [email protected] Co-authored-by: onsali [email protected]
51d6196
to
0ff1242
Compare
Just to let you know about the changes I made:
Nevertheless, thanks for getting this started it was a lot of help |
Pull Request Test Coverage Report for Build 11885136415Details
💛 - Coveralls |
* Add release notes for #1292 * Add release notes for degree centrality * Add centrality entries to the docs * Update releasenotes/notes/accept-generators-31f080871015233c.yaml Co-authored-by: Matthew Treinish <[email protected]> * Update releasenotes/notes/accept-generators-31f080871015233c.yaml --------- Co-authored-by: Matthew Treinish <[email protected]>
Proposed a solution for #1129. The implementation is straightforward, though I wonder whether I should add a flag to support in-degree and out-degree centrality, and support for weighted graphs (since the current implementation assumes an unweighted graph). Let me know what you think!