Skip to content

DOC: Fix docstrings with the sections in the wrong order #24280

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 Dec 14, 2018 · 2 comments · Fixed by #24288
Closed

DOC: Fix docstrings with the sections in the wrong order #24280

datapythonista opened this issue Dec 14, 2018 · 2 comments · Fixed by #24288

Comments

@datapythonista
Copy link
Member

After #24132 is merged, we'll have few docstrings where the order of the sections is wrong:

pandas.Series.agg: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.Series.aggregate: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.DataFrame.agg: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.DataFrame.aggregate: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.window.Rolling.aggregate: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.window.Expanding.aggregate: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.groupby.GroupBy.head: Sections are in the wrong order. Correct order is: See Also, Examples
pandas.core.groupby.GroupBy.mean: Sections are in the wrong order. Correct order is: Returns, See Also, Examples
pandas.core.groupby.GroupBy.nth: Sections are in the wrong order. Correct order is: Parameters, See Also, Examples
pandas.core.groupby.GroupBy.tail: Sections are in the wrong order. Correct order is: See Also, Examples
pandas.core.groupby.DataFrameGroupBy.agg: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.resample.Resampler.apply: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.resample.Resampler.aggregate: Sections are in the wrong order. Correct order is: Parameters, Returns, See Also, Notes, Examples
pandas.core.resample.Resampler.mean: Sections are in the wrong order. Correct order is: Returns, See Also, Examples

We should fix the order of those, and add to ci/code_checks.py, in the part where scripts/validate_docstrings.py is called, the error GL07, so when docstrings are created or modified, the CI validates that all the pandas docstrings still have the right order.

The next command can be used to see if all the cases are fixed: $ ./scripts/validate_docstrings.py --errors=GL07, but before #24132 is merged, it will also return the cases already fixed in theat PR.

@benjaminr
Copy link
Contributor

Happy to have a look at this one.

@datapythonista
Copy link
Member Author

thanks @benjaminr

as it says in the description, make sure you just fixed the ones listed, otherwise you'll get conflicts when we merge #24132

@jreback jreback added this to the 0.24.0 milestone Dec 19, 2018
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