Skip to content

Add networkx stubs#10544

Merged
Avasam merged 38 commits into
python:mainfrom
rhelmot:main
Dec 15, 2023
Merged

Add networkx stubs#10544
Avasam merged 38 commits into
python:mainfrom
rhelmot:main

Conversation

@rhelmot
Copy link
Copy Markdown
Contributor

@rhelmot rhelmot commented Aug 8, 2023

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

Loading
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.

3 participants