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

Add docstrings to arviz.labels #1575

Open
OriolAbril opened this issue Feb 20, 2021 · 2 comments
Open

Add docstrings to arviz.labels #1575

OriolAbril opened this issue Feb 20, 2021 · 2 comments
Labels
Help Wanted User Documentation Documentation outside of the codebase
Milestone

Comments

@OriolAbril
Copy link
Member

OriolAbril commented Feb 20, 2021

I have set all docstrings to wip in #1201 to trick pydocstyle into accepting the PR, they should be updated with actual info about the classes and methods.

Related to #1574

Notes
There is a label guide available at the docs.

@OriolAbril OriolAbril added Help Wanted User Documentation Documentation outside of the codebase labels Feb 20, 2021
@madhucharan
Copy link
Contributor

Hi @OriolAbril , I have commented my view on #1574 , If it got assigned , I would like to update the information about the functions in the docstrings by referring to the documentation, and please let me know if this is a straight updation or anything else need to keep in mind if I got assigned with #1574

@OriolAbril
Copy link
Member Author

I don't think I understand, sorry. You can work on the docstrings too if you want to work on both tests and docstrings.

The way to go about updating the docstrings would be to start by reading the label guide, and then start with the docstrings. The first one should be the docstrings for the class and methods of BaseLabeller, this one should be detailed and explian what does each method do. And then move to the others. As you have seen, the other classes only implement one or two methods, all the rest are inherited from BaseLabeller, both methods and docstrings will be inherited so the documentation will show everything automatically. It is therefore important to list in the class docstring which methods are the ones that are overwriten by the class. Then in the docstrings of the methods, describe how they differ from the ones in BaseLabeller. Examples are not really important in any of the docstrings, I believe the label guide covers it.

Some extra requirements:

  • All classes should link to the label guide
  • All classes except BaseLabeller need a "See Also" section listing at least BaseLabeller and optionally related labellers (IdxLabeller is related to DimIdxLabeller and viceversa, DimCoordLabeller to DimIdxLabeller and viceversa...)

See the docstrings on sampling wrappers such as https://github.com/arviz-devs/arviz/blob/main/arviz/wrappers/wrap_pystan.py#L8-L22 to get an idea of how the linking requirements above look like.

@OriolAbril OriolAbril added this to the vNext milestone Mar 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help Wanted User Documentation Documentation outside of the codebase
Projects
None yet
Development

No branches or pull requests

2 participants