Skip to content

DOC: Add missing documentation for top-level functions #10106

Closed

Description

@eric-wieser

Exposed are:

Steps to document many of these:

  1. Find the long-form of the name, such as np.core.multiarray.uint16
  2. Add the documentation to numpy/add_newdocs.py in the appropriate place
  3. Find an appropriate place to link to the function within :/doc/source/reference/routines.*.rst - look at existing files to see how
Script to generate the above
from collections.abc import Callable
ndoc = set(
    v
    for k, v in vars(np).items()
    if isinstance(v, Callable) and v.__doc__ is None
)
ndoc = sorted(
    ndoc,
    key=lambda v: (isinstance(v, type) and issubclass(v, np .generic), v.__qualname__)
)
print('\n'.join(
   '* [ ] `{!r}` ({})'.format(
        v,
       ', '.join('`np.{}`'.format(k) for k, v2 in vars(np).items() if v2 is v)
    )
    for v in ndoc
))

Activity

  1. mohdsanadzakirizvi commented on Dec 24, 2017

    @mohdsanadzakirizvi

    I would like to work on this as my first contribution, is it open? :)

  2. mattip commented on May 23, 2018

    @mattip
    Member

    It seems the basic classes are documented, no?

  3. eric-wieser commented on May 24, 2018

    @eric-wieser
    MemberAuthor

    np.float16.__doc__ is None on my machine. Are you testing with PyPy? I think this might be another case of things happening after PyType_Ready.

  4. eric-wieser commented on Sep 19, 2018

    @eric-wieser
    MemberAuthor

    Thanks @YannickJadoul for knocking out a whole bunch of these!

  5. added a commit that references this issue on Nov 13, 2018
  6. smellslikekeenspirit commented on Mar 24, 2019

    @smellslikekeenspirit

    Hi, can I work on the documentation for the unticked functions? Or have they been done already?

  7. 5 remaining items

  8. rgommers commented on Dec 10, 2019

    @rgommers
    Member

    Hmm, that PR looks a little complicated. @engineerlisa please have a look if that PR makes sense to you (@ghost is someone who disappeared from GitHub); the weird formatting stuff in the PR is because the docstring goes through some machinery that generates the __config__.py file so simply """ ... """ content won't work.

    @eric-wieser I removed the "good first issue" label, the left overs aren't a matter of writing docs anymore. I think a maintainer should finish the last bits here.

  9. engineerlisa commented on Dec 14, 2019

    @engineerlisa

    Thank you for getting back to me. I understand some parts of that PR. Based on your removing the tag, I'm going to find another candidate for my first contribution.

  10. eric-wieser commented on Oct 12, 2020

    @eric-wieser
    MemberAuthor

    Just two left here

    Both of these should be easy to document, so I'm going to add back the "good first issue" label

  11. kumudlakara commented on Nov 23, 2020

    @kumudlakara
    Contributor

    Hey, I'm a first time contributor and I would like to take up the remaining two functions if they are still open. Any guidance would be appreciated. Thanks!

  12. mattip commented on Nov 23, 2020

    @mattip
    Member

    Hi @kumudlakara. You should start with the contributor guide for an overview, especially the section on documentation and then the development workflow for the details. We don't assign issues, so be sure to mark your PR with xref gh-10106 to get a cross-reference to show up here, that way people will know you are working on it.

  13. kumudlakara commented on Nov 24, 2020

    @kumudlakara
    Contributor

    Alright, Thank you @mattip .

  14. Radhika14soni commented on Dec 16, 2020

    @Radhika14soni

    Hi, I'm a first time contributor and I would like to work on this issue if they are still open. Any guidance would be appreciated. Thanks!

  15. mattip commented on Dec 17, 2020

    @mattip
    Member

    Hi @Radhika14soni and welcome. I commented above on how to get familiar with the process. Since deprecate_with_doc is underway, the only remaining function lacking documentation is np.TooHardError. It is raised only by https://numpy.org/doc/stable/reference/generated/numpy.shares_memory.html, which should give you a hint as to the needed docstring.

  16. Radhika14soni commented on Dec 17, 2020

    @Radhika14soni

    @mattip Hello I'd like to work on it. Am I supposed to make changes in _add_newdocs.py?

  17. mattip commented on Dec 17, 2020

    @mattip
    Member

    Since this is a pure-python class, the change would be to add a docstring to the class definition like for the other exception classes in that file.

  18. mugunthanramesh commented on Feb 24, 2021

    @mugunthanramesh

    Is there any works pending on this issue that I can take ? I am new to numpy contribution and looking for anything to work on

  19. melissawm commented on Feb 24, 2021

    @melissawm
    Member

    From the comments above it looks like this issue is taken care of, @mugunthanramesh . But feel free to browse other Documentation-related issues and ping me if you need help getting started. Cheers!

  20. mattip commented on Feb 24, 2021

    @mattip
    Member

    Closing then. Please open a new issue if there are still missing docstrings, this one is too difficult to navigate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions