pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DOC: fix PR01 errors in docstrings

Open jordan-d-murphy opened this issue 1 year ago • 2 comments

Pandas has a script for validating docstrings:

https://github.com/pandas-dev/pandas/blob/719e4a638a4383b859d684db4ad4f7e471a58aaa/ci/code_checks.sh#L144-L467

Currently, some methods fail the PR01 check.

The task here is:

  • take 2-4 methods
  • run: scripts/validate_docstrings.py --format=actions --errors=PR01 method-name
  • check if validation docstrings passes for those methods, and if it’s necessary fix the docstrings according to whatever error is reported
  • remove those methods from code_checks.sh
  • commit, push, open pull request

Please don't comment take as multiple people can work on this issue. You also don't need to ask for permission to work on this, just comment on which methods are you going to work.

If you're new contributor, please check the contributing guide

jordan-d-murphy avatar Feb 15 '24 19:02 jordan-d-murphy

I don't have permission to add them, but this could probably use some labels:

  • CI
  • Docs
  • good first issue

jordan-d-murphy avatar Feb 15 '24 19:02 jordan-d-murphy

Addresses https://github.com/pandas-dev/pandas/pull/57358

jordan-d-murphy avatar Feb 15 '24 19:02 jordan-d-murphy

Thanks @Deen-dot for fixing

pandas.Grouper
pandas.core.groupby.DataFrameGroupBy.cummax
pandas.core.groupby.DataFrameGroupBy.cummin
pandas.core.groupby.DataFrameGroupBy.cumprod
pandas.core.groupby.DataFrameGroupBy.cumsum
pandas.core.groupby.DataFrameGroupBy.filter
pandas.core.groupby.DataFrameGroupBy.pct_change
pandas.core.groupby.DataFrameGroupBy.rolling
pandas.core.groupby.SeriesGroupBy.nunique
pandas.core.groupby.SeriesGroupBy.cummax
pandas.core.groupby.SeriesGroupBy.cummin
pandas.core.groupby.SeriesGroupBy.cumprod
pandas.core.groupby.SeriesGroupBy.cumsum
pandas.core.groupby.SeriesGroupBy.cumprod

jordan-d-murphy avatar Feb 22 '24 04:02 jordan-d-murphy

I'll take:

pandas.Categorical
pandas.Categorical.__array__

jordan-d-murphy avatar Feb 22 '24 05:02 jordan-d-murphy

Opened a fix for

pandas.CategoricalIndex.equals 
pandas.CategoricalIndex.map

jordan-d-murphy avatar Feb 25 '24 07:02 jordan-d-murphy

I'll take

pandas.ExcelFile
pandas.ExcelFile.parse

iridiium avatar Feb 29 '24 21:02 iridiium

I'll take

pandas.DataFrame.at_time
pandas.DataFrame.backfill

kamlesh-ops avatar Mar 08 '24 18:03 kamlesh-ops

opened a PR for

pandas.melt
pandas.option_context
pandas.read_fwf
pandas.reset_option

jordan-d-murphy avatar Mar 11 '24 00:03 jordan-d-murphy

I would like to work on these if they are not taken: pandas.Index.get_indexer_for
pandas.Index.identical
they are lines 420-421 on pandas/ci/code_checks.sh (I am new to working on open-source repo's so I don't know how to make the format of the above lines look good)

CaelThompson avatar Mar 11 '24 17:03 CaelThompson

Hi all, if CI: speedup docstring check consecutive runs #57826 gets merged in, I might be reworking our approach here; this would look like closing the following issues:

DOC: fix GL08 errors in docstrings DOC: fix PR01 errors in docstrings DOC: fix PR07 errors in docstrings DOC: fix SA01 errors in docstrings DOC: fix RT03 errors in docstrings DOC: fix PR02 errors in docstrings

And opening a new issue to address these based on the new approach.

tl;dr

the work can still be done, but probably under a new ticket once #57826 is merged in

jordan-d-murphy avatar Mar 17 '24 00:03 jordan-d-murphy

Opened DOC: Enforce Numpy Docstring Validation (Parent Issue) #58063 as a parent issue for fixing docstrings based on the refactoring in code_checks.sh

Feel free to swing by and help out! 🙂

jordan-d-murphy avatar Mar 29 '24 06:03 jordan-d-murphy