Add networkx stubs#10544
Merged
Merged
Conversation
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.
networkx is a widely used library for graph analysis in scientific computing. It is a great candidate for type checking because it is absolutely full to the brim of container types. It is also unlikely to have types merged into upstream anytime soon. See discussion in the staging repository for this PR: fmagin/networkx-stubs#8
These stubs are by no means complete. They are complete for my personal use case (digraphs) and I spent about 3 hours trying to bang out correct stubs for everything else, but this library is gigantic. Everything I didn't get to remains the stubgen defaults. If this isn't the convention and I just just delete the unmodified stuff, please let me know!
The main concern I have is that this library has a few optional dependencies and has public interfaces which take types from these dependencies. These dependencies are declared as extras, so I believe the CI machinery here should be able to handle it, but some of them do not themselves have types available through any venue. I am not adding types to scipy. This triggers some type errors, and I don't know if those will be an issue. Please advise :)
cc @fmagin @Avasam