-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add methods to API docs and use typehints #167
Conversation
# Conflicts: # docs/Makefile # docs/requirements.txt # docs/source/api.rst
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.
I've just stumbled upon this change, because I wanted to know how sphinx-autodoc-typehints can be used in a napoleon project.
Bind socket to this port. | ||
log_level : str | ||
log_level : |
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.
FYI The colon after the parameter name can be removed. This is already the case in some parts of the project.
@@ -131,9 +167,9 @@ def register_plugin( | |||
Register a plugin with the xpublish system | |||
|
|||
Args: |
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.
Shouldn't this be converted to a
Parameters
----------------
section?
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.
I've just stumbled upon this change, because I wanted to know how you use sphinx-autodoc-typehints in a napoleon project.
friendly ping @abkfenris
"""Initialize and load plugins from entry_points""" | ||
"""Initialize and load plugins from entry_points unless explicitly provided | ||
|
||
Parameters: |
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.
I've seen that currently there are 4 occurences of
Parameters:
and 4 occurences of
Parameters
----------
in the docs. I think this should be consolidated. As a napoleon user, I would expect
Parameters
----------
as the style of the sections in the docstrings. The same is true for the other section types (Returns, Raises, ...)
Hi @Thisch, thanks for the feedback and suggestions on how to better get autodoc-typehints and napoleon to play together. I haven't gotten much time to work on Xpublish for the last few weeks due to fighting various fires, but I'll make an issue to work on cleaning up the docstrings. |
Currently the API docs are missing a bunch of
xpublish.Rest
methods, so this fills them out. It also switches to using type hints directly in the docs rather than requiring them to be specified in the docstrings.Closes #160 #161
I'm headed out on vacation, so feel free to edit or merge away, otherwise if there aren't any complaints I'll land it when I get back.