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
DOC: Add docstrings to Filter mapping views #7075
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 this!
I think the only issue here is white-space changes identified in the linting check.
The indentation should match on each line, and there might be some space at the end of a line or two.
Running black locally on this file should fix it too if your prefer.
Do these doc_strings show up anywhere in the online documentation? I don't think we've hooked into that. The way to do that is to add lines to the doc/reference
collection of rst
files. Maybe with a section of the classes
that tries to cover all the view
s. That is perhaps beyond the scope of this PR. We can merge this to get the doc_strings in there and then do the other stuff in another PR. Or... if you want to take a stab at an rst file about views in this PR that's fine too.
First step is to get the tests to pass.
Good news - they do indeed! The Similarly the class docs are autorendered as well: this PR vs. devdocs There's certainly some tweaking that could be done; starting with formatting with cleanup, but the overall approach is good! |
Thanks @rossbar! That's great!! @akshayamadhuri Let us know if you want to keep going with this PR. We can use a separate PR if you prefer. |
@dschult @rossbar thanks for the review, sure! i am also working here class Docs |
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.
Having read more about how the Filter*
classes are used in NetworkX, I couldn't help but wonder whether it might be better to remove them from the documentation instead. I get the sense that the filter views are really only intended to be used internally to implement subgraph views instead of being used in user-code directly.
@dschult @MridulS any thoughts on this? Are there applications where users would be expected/benefit from creating Filter*
objects directly?
The way I remember it, the filter classes were created to enable us to implement subgraph views, etc. And the Filter functions (in That said, the other "core views" like I'm open to suggestions for how to proceed. It makes sense to me to get this PR clean and formatted, but not to worry about including full doc_strings or the "core views" (including |
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 the insight @dschult ! In that case I took the liberty of pushing up a few minor changes to get this over the line; namely:
- Use literal formatting for the
NODE/EDGE_OK
references, and - Remove the summary lines from the See Also listings (the links go directly to these summaries)
Thanks for the improvements @akshayamadhuri !
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 @akshayamadhuri !
I think this is "good enough" for docs for internal Views implementation. Anyone who is using this will have to jump into the codebase anyway. This PR gives a good enough starting point (IMO) if someone ends up on the documentation page of |
* Update coreviews.py * Update coreviews.py * Update coreviews.py * Update coreviews.py * Update coreviews.py * Update coreviews.py * Update coreviews.py * Rm summary lines from see-alsos. --------- Co-authored-by: Ross Barnowski <rossbar@caltech.edu>
issue no: #4433