Skip to content

DOC: Validate the order of the sections in the docstrings #23133

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

Closed
datapythonista opened this issue Oct 13, 2018 · 2 comments · Fixed by #23607
Closed

DOC: Validate the order of the sections in the docstrings #23133

datapythonista opened this issue Oct 13, 2018 · 2 comments · Fixed by #23607
Labels
CI Continuous Integration Docs good first issue

Comments

@datapythonista
Copy link
Member

scripts/validate_docstrings.py validates that the content of a docstring follows our standards. There are still some of those standards that the script does not validate, and this gives the users the wrong impression that the docstring is all right, when it's not really the case. All the missing validations are listed in #20298.

In the docstrings, the order of the sections should be:

  • Short summary
  • Summary
  • Parameters
  • Returns or Yields
  • See Also
  • Notes
  • Examples

This is described in:

For this issue is required:

  • Change scripts/validate_docstings.py
  • Add tests in scripts/tests/test_validate_docstrings.py
  • Run the script for all docstrings (i.e. ./scripts/validate_docstings.py) and check in the resulting report how many of the docstrings in pandas have the sections in the wrong order (add that information to this issue)
  • Test manually that running the validation for one of the wrong cases, produces an output that is useful for the users (the script can be run for one docstring using for example ./scripts/validate_docstings.py pandas.DataFrame.head, and the output is a user-friendly explanation of the errors).
@ryankarlos
Copy link
Contributor

ryankarlos commented Oct 15, 2018

@datapythonista Assuming this is not taken - ill work on this - any other similar ones I can work on - looking to hit my target of 5 PRs this month for the Hacktoberfest t-shirt :)

@datapythonista
Copy link
Member Author

Shouldn't be taken, thanks. Everything is in the issue tracker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI Continuous Integration Docs good first issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants