-
Notifications
You must be signed in to change notification settings - Fork 2.6k
docs: Add inherited methods to API reference documentation #5273
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
Conversation
Pull Request Test Coverage Report for Build 5456810715
💛 - Coveralls |
anakin87
left a comment
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.
In general, this PR looks good to me. 👍
Let's just figure out if we want to use this opportunity to hide abstract classes/methods and avoid duplication...
I would tackle this in a separate PR. |
|
Let's wait until @dfokina is back to get her view on this topic. |
# Conflicts: # docs/pydoc/config/document-store.yml # haystack/preview/pipeline.py
… into inherited_methods_api_reference # Conflicts: # docs/pydoc/config/document-store.yml
|
This is how the DocumentStore API docs would look like if we would merge this PR now: document_store_api.md |
anakin87
left a comment
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.
LGTM!
…i#5273) * Add inherited methods to API reference documentation * Fix typing
Related Issues
Proposed Changes:
This PR adds the custom loader
CustomPythonLoaderforpydoc-markdownand sets it as the loader for all documentation config files.CustomPythonLoaderextendsPythonLoaderin such a way that the loaded classes not only contain the methods that are directly defined in them, but also their inherited methods from parent classes. The inherited methods are added recursively to make sure to display methods from all inheritance levels, not just direct inheritance.As an example, here is the generated file for DocumentStore API docs: document_store_api.md
How did you test it?
I manually ran the
pydoc-markdown.shscript.Notes for the reviewer
There was a formatting error in
Pipeline.rundocstring, so I needed to fix that.Checklist
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:.