Add entry point to tell NetworkX about nx-cugraph without importing it.#3848
Merged
rapids-bot[bot] merged 10 commits intorapidsai:branch-23.10from Sep 28, 2023
Merged
Conversation
This allows NetworkX docstrings to be updated. This needs a companion PR in NetworkX.
eriknw
commented
Sep 7, 2023
Contributor
Author
|
Companion networkx PR is up: networkx/networkx#6911 |
eriknw
commented
Sep 7, 2023
Comment on lines
+36
to
+56
| "functions": { | ||
| # BEGIN: functions | ||
| "betweenness_centrality", | ||
| "edge_betweenness_centrality", | ||
| "louvain_communities", | ||
| # END: functions | ||
| }, | ||
| "extra_docstrings": { | ||
| # BEGIN: extra_docstrings | ||
| "betweenness_centrality": "`weight` parameter is not yet supported.", | ||
| "edge_betweenness_centrality": "`weight` parameter is not yet supported.", | ||
| "louvain_communities": "`threshold` and `seed` parameters are currently ignored.", | ||
| # END: extra_docstrings | ||
| }, | ||
| "extra_parameters": { | ||
| # BEGIN: extra_parameters | ||
| "louvain_communities": { | ||
| "max_level : int, optional": "Upper limit of the number of macro-iterations.", | ||
| }, | ||
| # END: extra_parameters | ||
| }, |
Contributor
Author
There was a problem hiding this comment.
Alternatively, we could organize info like:
"functions": {
# BEGIN: functions
"betweenness_centrality": {
"extra_docstring": "`weight` parameter is not yet supported.",
},
"edge_betweenness_centrality" : {
"extra_docstring": "`weight` parameter is not yet supported.",
},
"louvain_communities": {
"extra_docstring": "louvain_communities": "`threshold` and `seed` parameters are currently ignored.",
"extra_parameters": {
"max_level : int, optional": "Upper limit of the number of macro-iterations.",
},
},
# END: functions
},
rlratzel
reviewed
Sep 27, 2023
Contributor
rlratzel
left a comment
There was a problem hiding this comment.
Looked good, nothing jumped out. I had a couple of questions though.
Comment on lines
+23
to
+27
| # from . import convert_matrix | ||
| # from .convert_matrix import * | ||
|
|
||
| # from . import generators | ||
| # from .generators import * |
Contributor
There was a problem hiding this comment.
Is this dead code we can remove?
Contributor
Author
There was a problem hiding this comment.
It is future code, yet to be born
rlratzel
approved these changes
Sep 27, 2023
raydouglass
approved these changes
Sep 28, 2023
Contributor
Author
Member
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This allows NetworkX docstrings to be updated (among other things).
This will have a companion PR in NetworkX. We still need to determine (and agree) on the dict returned by this entry point, and NetworkX doesn't need to use everything I have here. We should probably add a string for
"description"that gives a very short description of the backend, and maybe"url"or"homepage"or whatever so online docs can have links.Here's how to use the entry point (Python >= 3.10) after installing it:
CC @rlratzel @betochimas