docs: Add inherited methods to API reference documentation
Related Issues
- fixes #4598
Proposed Changes:
This PR adds the custom loader CustomPythonLoader for pydoc-markdown and sets it as the loader for all documentation config files. CustomPythonLoader extends PythonLoader in 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.sh script.
Notes for the reviewer
There was a formatting error in Pipeline.run docstring, so I needed to fix that.
Checklist
- I have read the contributors guidelines and the code of conduct
- I have updated the related issue with new insights and changes
- I added unit tests and updated the docstrings
- I've used one of the conventional commit types for my PR title:
fix:,feat:,build:,chore:,ci:,docs:,style:,refactor:,perf:,test:. - I documented my code
- I ran pre-commit hooks and fixed any issue
Pull Request Test Coverage Report for Build 5456810715
- 0 of 0 changed or added relevant lines in 0 files are covered.
- No unchanged relevant lines lost coverage.
- Overall coverage remained the same at 43.864%
| Totals | |
|---|---|
| Change from base Build 5454588927: | 0.0% |
| Covered Lines: | 10094 |
| Relevant Lines: | 23012 |
💛 - Coveralls
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.
This is how the DocumentStore API docs would look like if we would merge this PR now: document_store_api.md