Skip to content
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 proper docstrings and documentation to refguide-check #14961

Closed
mattip opened this issue Nov 22, 2019 · 9 comments · Fixed by #15054
Closed

DOC: add proper docstrings and documentation to refguide-check #14961

mattip opened this issue Nov 22, 2019 · 9 comments · Fixed by #15054

Comments

@mattip
Copy link
Member

mattip commented Nov 22, 2019

tools/refguide-check.py needs work documenting the functions. xref gh-14732.

This file is not shipped with NumPy and does not appear on the numpy.org website, but still should be properly documented.

@san7988
Copy link

san7988 commented Nov 27, 2019

Hi,

is this complete?

Thanks

@eric-wieser
Copy link
Member

Unless you can see a PR linked either in a comment or a cross reference, then a safe assumption is to assume not.

So no, this still needs doing :)

@san7988
Copy link

san7988 commented Nov 27, 2019

Sorry but I'm a newbie to OS so please bear with me.
I went through issue #14732 to understand the issue more.

I just wanted to understand this issue clearly so please help me with that.
The above mentioned file has some methods with docstrings and some without them. So we need to add documentation to methods missing docstrings. Is my understanding right?

Thanks

@mattip
Copy link
Member Author

mattip commented Nov 27, 2019

The idea is to use the numpydoc docstring standard to document at least the higher-level functions: main, check_items, check_rst, check_doctests, and perhaps one level lower.

@san7988
Copy link

san7988 commented Nov 27, 2019

So if we take an example, in method check_doctests we have currently:
def check_doctests(module, verbose, ns=None, dots=True, doctest_warnings=False):
"""Check code in docstrings of the module's public symbols.
Returns: list of [(item_name, success_flag, output), ...]
"""

should be something like:

"""
Check code in docstrings of the module's public symbols.

Returns
--------
result : list of [(item_name, success_flag, output), ...]
"""

Is that correct?

@mattip
Copy link
Member Author

mattip commented Nov 27, 2019

Correct, as well we should document the parameters

@san7988
Copy link

san7988 commented Dec 2, 2019

Cool. I'm on it.
Thanks

@san7988
Copy link

san7988 commented Dec 4, 2019

Hi,

I have done changes. Should I go ahead and create the PR?

@mattip
Copy link
Member Author

mattip commented Dec 4, 2019

Yes. Please take a look at the developer workflow around working with git and making a PR.

san7988 pushed a commit to san7988/numpy that referenced this issue Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants