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

DOC: fix PR01 errors in docstrings #57438

Closed
jordan-d-murphy opened this issue Feb 15, 2024 · 12 comments
Closed

DOC: fix PR01 errors in docstrings #57438

jordan-d-murphy opened this issue Feb 15, 2024 · 12 comments
Labels
CI Continuous Integration Docs good first issue

Comments

@jordan-d-murphy
Copy link
Contributor

Pandas has a script for validating docstrings:

pandas/ci/code_checks.sh

Lines 144 to 467 in 719e4a6

MSG='Partially validate docstrings (PR01)' ; echo $MSG
$BASE_DIR/scripts/validate_docstrings.py --format=actions --errors=PR01 --ignore_functions \
pandas.Categorical\
pandas.Categorical.__array__\
pandas.CategoricalIndex.equals\
pandas.CategoricalIndex.map\
pandas.DataFrame.at_time\
pandas.DataFrame.backfill\
pandas.DataFrame.get\
pandas.DataFrame.pad\
pandas.DataFrame.sem\
pandas.DataFrame.sparse\
pandas.DataFrame.std\
pandas.DataFrame.swapaxes\
pandas.DataFrame.var\
pandas.DatetimeIndex.indexer_at_time\
pandas.DatetimeIndex.snap\
pandas.DatetimeIndex.std\
pandas.ExcelFile\
pandas.ExcelFile.parse\
pandas.Grouper\
pandas.HDFStore.append\
pandas.HDFStore.put\
pandas.Index.get_indexer_for\
pandas.Index.identical\
pandas.Index.putmask\
pandas.Index.ravel\
pandas.Index.str\
pandas.Index.take\
pandas.IntervalDtype\
pandas.MultiIndex\
pandas.Period.strftime\
pandas.RangeIndex.from_range\
pandas.Series.at_time\
pandas.Series.backfill\
pandas.Series.cat.add_categories\
pandas.Series.cat.as_ordered\
pandas.Series.cat.as_unordered\
pandas.Series.cat.remove_categories\
pandas.Series.cat.remove_unused_categories\
pandas.Series.cat.rename_categories\
pandas.Series.cat.reorder_categories\
pandas.Series.cat.set_categories\
pandas.Series.dt.ceil\
pandas.Series.dt.day_name\
pandas.Series.dt.floor\
pandas.Series.dt.month_name\
pandas.Series.dt.normalize\
pandas.Series.dt.round\
pandas.Series.dt.strftime\
pandas.Series.dt.to_period\
pandas.Series.dt.total_seconds\
pandas.Series.dt.tz_convert\
pandas.Series.dt.tz_localize\
pandas.Series.get\
pandas.Series.pad\
pandas.Series.sem\
pandas.Series.sparse\
pandas.Series.std\
pandas.Series.str\
pandas.Series.str.wrap\
pandas.Series.var\
pandas.Timedelta.to_numpy\
pandas.TimedeltaIndex\
pandas.Timestamp.combine\
pandas.Timestamp.fromtimestamp\
pandas.Timestamp.strptime\
pandas.Timestamp.to_numpy\
pandas.Timestamp.to_period\
pandas.Timestamp.to_pydatetime\
pandas.Timestamp.utcfromtimestamp\
pandas.api.extensions.ExtensionArray._pad_or_backfill\
pandas.api.extensions.ExtensionArray.interpolate\
pandas.api.indexers.BaseIndexer\
pandas.api.indexers.FixedForwardWindowIndexer\
pandas.api.indexers.VariableOffsetWindowIndexer\
pandas.api.types.is_bool\
pandas.api.types.is_complex\
pandas.api.types.is_float\
pandas.api.types.is_hashable\
pandas.api.types.is_integer\
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.cummax\
pandas.core.groupby.SeriesGroupBy.cummin\
pandas.core.groupby.SeriesGroupBy.cumprod\
pandas.core.groupby.SeriesGroupBy.cumsum\
pandas.core.groupby.SeriesGroupBy.filter\
pandas.core.groupby.SeriesGroupBy.nunique\
pandas.core.groupby.SeriesGroupBy.pct_change\
pandas.core.groupby.SeriesGroupBy.rolling\
pandas.core.resample.Resampler.max\
pandas.core.resample.Resampler.min\
pandas.core.resample.Resampler.quantile\
pandas.core.resample.Resampler.transform\
pandas.core.window.expanding.Expanding.corr\
pandas.core.window.expanding.Expanding.count\
pandas.core.window.rolling.Rolling.max\
pandas.core.window.rolling.Window.std\
pandas.core.window.rolling.Window.var\
pandas.errors.AbstractMethodError\
pandas.errors.UndefinedVariableError\
pandas.get_option\
pandas.io.formats.style.Styler.to_excel\
pandas.melt\
pandas.option_context\
pandas.read_fwf\
pandas.reset_option\
pandas.tseries.offsets.BQuarterBegin.is_month_end\
pandas.tseries.offsets.BQuarterBegin.is_month_start\
pandas.tseries.offsets.BQuarterBegin.is_quarter_end\
pandas.tseries.offsets.BQuarterBegin.is_quarter_start\
pandas.tseries.offsets.BQuarterBegin.is_year_end\
pandas.tseries.offsets.BQuarterBegin.is_year_start\
pandas.tseries.offsets.BQuarterEnd.is_month_end\
pandas.tseries.offsets.BQuarterEnd.is_month_start\
pandas.tseries.offsets.BQuarterEnd.is_quarter_end\
pandas.tseries.offsets.BQuarterEnd.is_quarter_start\
pandas.tseries.offsets.BQuarterEnd.is_year_end\
pandas.tseries.offsets.BQuarterEnd.is_year_start\
pandas.tseries.offsets.BYearBegin.is_month_end\
pandas.tseries.offsets.BYearBegin.is_month_start\
pandas.tseries.offsets.BYearBegin.is_quarter_end\
pandas.tseries.offsets.BYearBegin.is_quarter_start\
pandas.tseries.offsets.BYearBegin.is_year_end\
pandas.tseries.offsets.BYearBegin.is_year_start\
pandas.tseries.offsets.BYearEnd.is_month_end\
pandas.tseries.offsets.BYearEnd.is_month_start\
pandas.tseries.offsets.BYearEnd.is_quarter_end\
pandas.tseries.offsets.BYearEnd.is_quarter_start\
pandas.tseries.offsets.BYearEnd.is_year_end\
pandas.tseries.offsets.BYearEnd.is_year_start\
pandas.tseries.offsets.BusinessDay.is_month_end\
pandas.tseries.offsets.BusinessDay.is_month_start\
pandas.tseries.offsets.BusinessDay.is_quarter_end\
pandas.tseries.offsets.BusinessDay.is_quarter_start\
pandas.tseries.offsets.BusinessDay.is_year_end\
pandas.tseries.offsets.BusinessDay.is_year_start\
pandas.tseries.offsets.BusinessHour.is_month_end\
pandas.tseries.offsets.BusinessHour.is_month_start\
pandas.tseries.offsets.BusinessHour.is_quarter_end\
pandas.tseries.offsets.BusinessHour.is_quarter_start\
pandas.tseries.offsets.BusinessHour.is_year_end\
pandas.tseries.offsets.BusinessHour.is_year_start\
pandas.tseries.offsets.BusinessMonthBegin.is_month_end\
pandas.tseries.offsets.BusinessMonthBegin.is_month_start\
pandas.tseries.offsets.BusinessMonthBegin.is_quarter_end\
pandas.tseries.offsets.BusinessMonthBegin.is_quarter_start\
pandas.tseries.offsets.BusinessMonthBegin.is_year_end\
pandas.tseries.offsets.BusinessMonthBegin.is_year_start\
pandas.tseries.offsets.BusinessMonthEnd.is_month_end\
pandas.tseries.offsets.BusinessMonthEnd.is_month_start\
pandas.tseries.offsets.BusinessMonthEnd.is_quarter_end\
pandas.tseries.offsets.BusinessMonthEnd.is_quarter_start\
pandas.tseries.offsets.BusinessMonthEnd.is_year_end\
pandas.tseries.offsets.BusinessMonthEnd.is_year_start\
pandas.tseries.offsets.CustomBusinessDay.is_month_end\
pandas.tseries.offsets.CustomBusinessDay.is_month_start\
pandas.tseries.offsets.CustomBusinessDay.is_quarter_end\
pandas.tseries.offsets.CustomBusinessDay.is_quarter_start\
pandas.tseries.offsets.CustomBusinessDay.is_year_end\
pandas.tseries.offsets.CustomBusinessDay.is_year_start\
pandas.tseries.offsets.CustomBusinessHour.is_month_end\
pandas.tseries.offsets.CustomBusinessHour.is_month_start\
pandas.tseries.offsets.CustomBusinessHour.is_quarter_end\
pandas.tseries.offsets.CustomBusinessHour.is_quarter_start\
pandas.tseries.offsets.CustomBusinessHour.is_year_end\
pandas.tseries.offsets.CustomBusinessHour.is_year_start\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_month_end\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_month_start\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_quarter_end\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_quarter_start\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_year_end\
pandas.tseries.offsets.CustomBusinessMonthBegin.is_year_start\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_month_end\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_month_start\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_quarter_end\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_quarter_start\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_year_end\
pandas.tseries.offsets.CustomBusinessMonthEnd.is_year_start\
pandas.tseries.offsets.DateOffset.is_month_end\
pandas.tseries.offsets.DateOffset.is_month_start\
pandas.tseries.offsets.DateOffset.is_quarter_end\
pandas.tseries.offsets.DateOffset.is_quarter_start\
pandas.tseries.offsets.DateOffset.is_year_end\
pandas.tseries.offsets.DateOffset.is_year_start\
pandas.tseries.offsets.Day.is_month_end\
pandas.tseries.offsets.Day.is_month_start\
pandas.tseries.offsets.Day.is_quarter_end\
pandas.tseries.offsets.Day.is_quarter_start\
pandas.tseries.offsets.Day.is_year_end\
pandas.tseries.offsets.Day.is_year_start\
pandas.tseries.offsets.Easter.is_month_end\
pandas.tseries.offsets.Easter.is_month_start\
pandas.tseries.offsets.Easter.is_quarter_end\
pandas.tseries.offsets.Easter.is_quarter_start\
pandas.tseries.offsets.Easter.is_year_end\
pandas.tseries.offsets.Easter.is_year_start\
pandas.tseries.offsets.FY5253.is_month_end\
pandas.tseries.offsets.FY5253.is_month_start\
pandas.tseries.offsets.FY5253.is_quarter_end\
pandas.tseries.offsets.FY5253.is_quarter_start\
pandas.tseries.offsets.FY5253.is_year_end\
pandas.tseries.offsets.FY5253.is_year_start\
pandas.tseries.offsets.FY5253Quarter.is_month_end\
pandas.tseries.offsets.FY5253Quarter.is_month_start\
pandas.tseries.offsets.FY5253Quarter.is_quarter_end\
pandas.tseries.offsets.FY5253Quarter.is_quarter_start\
pandas.tseries.offsets.FY5253Quarter.is_year_end\
pandas.tseries.offsets.FY5253Quarter.is_year_start\
pandas.tseries.offsets.Hour.is_month_end\
pandas.tseries.offsets.Hour.is_month_start\
pandas.tseries.offsets.Hour.is_quarter_end\
pandas.tseries.offsets.Hour.is_quarter_start\
pandas.tseries.offsets.Hour.is_year_end\
pandas.tseries.offsets.Hour.is_year_start\
pandas.tseries.offsets.LastWeekOfMonth.is_month_end\
pandas.tseries.offsets.LastWeekOfMonth.is_month_start\
pandas.tseries.offsets.LastWeekOfMonth.is_quarter_end\
pandas.tseries.offsets.LastWeekOfMonth.is_quarter_start\
pandas.tseries.offsets.LastWeekOfMonth.is_year_end\
pandas.tseries.offsets.LastWeekOfMonth.is_year_start\
pandas.tseries.offsets.Micro.is_month_end\
pandas.tseries.offsets.Micro.is_month_start\
pandas.tseries.offsets.Micro.is_quarter_end\
pandas.tseries.offsets.Micro.is_quarter_start\
pandas.tseries.offsets.Micro.is_year_end\
pandas.tseries.offsets.Micro.is_year_start\
pandas.tseries.offsets.Milli.is_month_end\
pandas.tseries.offsets.Milli.is_month_start\
pandas.tseries.offsets.Milli.is_quarter_end\
pandas.tseries.offsets.Milli.is_quarter_start\
pandas.tseries.offsets.Milli.is_year_end\
pandas.tseries.offsets.Milli.is_year_start\
pandas.tseries.offsets.Minute.is_month_end\
pandas.tseries.offsets.Minute.is_month_start\
pandas.tseries.offsets.Minute.is_quarter_end\
pandas.tseries.offsets.Minute.is_quarter_start\
pandas.tseries.offsets.Minute.is_year_end\
pandas.tseries.offsets.Minute.is_year_start\
pandas.tseries.offsets.MonthBegin.is_month_end\
pandas.tseries.offsets.MonthBegin.is_month_start\
pandas.tseries.offsets.MonthBegin.is_quarter_end\
pandas.tseries.offsets.MonthBegin.is_quarter_start\
pandas.tseries.offsets.MonthBegin.is_year_end\
pandas.tseries.offsets.MonthBegin.is_year_start\
pandas.tseries.offsets.MonthEnd.is_month_end\
pandas.tseries.offsets.MonthEnd.is_month_start\
pandas.tseries.offsets.MonthEnd.is_quarter_end\
pandas.tseries.offsets.MonthEnd.is_quarter_start\
pandas.tseries.offsets.MonthEnd.is_year_end\
pandas.tseries.offsets.MonthEnd.is_year_start\
pandas.tseries.offsets.Nano.is_month_end\
pandas.tseries.offsets.Nano.is_month_start\
pandas.tseries.offsets.Nano.is_quarter_end\
pandas.tseries.offsets.Nano.is_quarter_start\
pandas.tseries.offsets.Nano.is_year_end\
pandas.tseries.offsets.Nano.is_year_start\
pandas.tseries.offsets.QuarterBegin.is_month_end\
pandas.tseries.offsets.QuarterBegin.is_month_start\
pandas.tseries.offsets.QuarterBegin.is_quarter_end\
pandas.tseries.offsets.QuarterBegin.is_quarter_start\
pandas.tseries.offsets.QuarterBegin.is_year_end\
pandas.tseries.offsets.QuarterBegin.is_year_start\
pandas.tseries.offsets.QuarterEnd.is_month_end\
pandas.tseries.offsets.QuarterEnd.is_month_start\
pandas.tseries.offsets.QuarterEnd.is_quarter_end\
pandas.tseries.offsets.QuarterEnd.is_quarter_start\
pandas.tseries.offsets.QuarterEnd.is_year_end\
pandas.tseries.offsets.QuarterEnd.is_year_start\
pandas.tseries.offsets.Second.is_month_end\
pandas.tseries.offsets.Second.is_month_start\
pandas.tseries.offsets.Second.is_quarter_end\
pandas.tseries.offsets.Second.is_quarter_start\
pandas.tseries.offsets.Second.is_year_end\
pandas.tseries.offsets.Second.is_year_start\
pandas.tseries.offsets.SemiMonthBegin.is_month_end\
pandas.tseries.offsets.SemiMonthBegin.is_month_start\
pandas.tseries.offsets.SemiMonthBegin.is_quarter_end\
pandas.tseries.offsets.SemiMonthBegin.is_quarter_start\
pandas.tseries.offsets.SemiMonthBegin.is_year_end\
pandas.tseries.offsets.SemiMonthBegin.is_year_start\
pandas.tseries.offsets.SemiMonthEnd.is_month_end\
pandas.tseries.offsets.SemiMonthEnd.is_month_start\
pandas.tseries.offsets.SemiMonthEnd.is_quarter_end\
pandas.tseries.offsets.SemiMonthEnd.is_quarter_start\
pandas.tseries.offsets.SemiMonthEnd.is_year_end\
pandas.tseries.offsets.SemiMonthEnd.is_year_start\
pandas.tseries.offsets.Tick.is_month_end\
pandas.tseries.offsets.Tick.is_month_start\
pandas.tseries.offsets.Tick.is_quarter_end\
pandas.tseries.offsets.Tick.is_quarter_start\
pandas.tseries.offsets.Tick.is_year_end\
pandas.tseries.offsets.Tick.is_year_start\
pandas.tseries.offsets.Week.is_month_end\
pandas.tseries.offsets.Week.is_month_start\
pandas.tseries.offsets.Week.is_quarter_end\
pandas.tseries.offsets.Week.is_quarter_start\
pandas.tseries.offsets.Week.is_year_end\
pandas.tseries.offsets.Week.is_year_start\
pandas.tseries.offsets.WeekOfMonth.is_month_end\
pandas.tseries.offsets.WeekOfMonth.is_month_start\
pandas.tseries.offsets.WeekOfMonth.is_quarter_end\
pandas.tseries.offsets.WeekOfMonth.is_quarter_start\
pandas.tseries.offsets.WeekOfMonth.is_year_end\
pandas.tseries.offsets.WeekOfMonth.is_year_start\
pandas.tseries.offsets.YearBegin.is_month_end\
pandas.tseries.offsets.YearBegin.is_month_start\
pandas.tseries.offsets.YearBegin.is_quarter_end\
pandas.tseries.offsets.YearBegin.is_quarter_start\
pandas.tseries.offsets.YearBegin.is_year_end\
pandas.tseries.offsets.YearBegin.is_year_start\
pandas.tseries.offsets.YearEnd.is_month_end\
pandas.tseries.offsets.YearEnd.is_month_start\
pandas.tseries.offsets.YearEnd.is_quarter_end\
pandas.tseries.offsets.YearEnd.is_quarter_start\
pandas.tseries.offsets.YearEnd.is_year_end\
pandas.tseries.offsets.YearEnd.is_year_start # There should be no backslash in the final line, please keep this comment in the last ignored function
RET=$(($RET + $?)) ; echo $MSG "DONE"

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
Copy link
Contributor Author

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

  • CI
  • Docs
  • good first issue

@jordan-d-murphy
Copy link
Contributor Author

Addresses #57358

@rhshadrach rhshadrach added Docs CI Continuous Integration good first issue labels Feb 15, 2024
Deen-dot added a commit to Deen-dot/pandas that referenced this issue Feb 19, 2024
Fixed PR01 errors (pandas-dev#57438) and added parameter descriptions for:
- `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.cummax`
- `pandas.core.groupby.SeriesGroupBy.cummin`
- `pandas.core.groupby.SeriesGroupBy.cumprod`
- `pandas.core.groupby.SeriesGroupBy.cumsum`
- `pandas.core.groupby.SeriesGroupBy.cumprod`

Fixed functions also removed from code_checks.sh
mroeschke pushed a commit that referenced this issue Feb 21, 2024
* DOC: Fix PR01 errors in multiple files (#57438)

Fixed PR01 errors (#57438) and added parameter descriptions for:
- `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.cummax`
- `pandas.core.groupby.SeriesGroupBy.cummin`
- `pandas.core.groupby.SeriesGroupBy.cumprod`
- `pandas.core.groupby.SeriesGroupBy.cumsum`
- `pandas.core.groupby.SeriesGroupBy.cumprod`

Fixed functions also removed from code_checks.sh

* Updated formatting

* Corrected E501 formatting

* Remove trailing whitespaces

* Fix PR02 error from docstring inheritance for resampler nunique method

Resolved a PR02 documentation error arising from the inherited `nunique` method docstring within `groupby.SeriesGroupBy.nunique`. The issue was due to the `resample.Resampler.nunique` method lacking a `dropna` parameter, which is present in the inherited docstring.

- Introduced `_nunique_extra_params` to dynamically insert parameter documentation only where applicable (i.e. where `groupby.SeriesGroupBy.nunique`is).

* Resolve request

* Undo mistake

* Remove unnecessary import to fix ruff check
@jordan-d-murphy
Copy link
Contributor Author

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
Copy link
Contributor Author

I'll take:

pandas.Categorical
pandas.Categorical.__array__

@jordan-d-murphy
Copy link
Contributor Author

Opened a fix for

pandas.CategoricalIndex.equals 
pandas.CategoricalIndex.map

@iridiium
Copy link

iridiium commented Feb 29, 2024

I'll take

pandas.ExcelFile
pandas.ExcelFile.parse

@kamlesh-ops
Copy link

I'll take

pandas.DataFrame.at_time
pandas.DataFrame.backfill

@jordan-d-murphy
Copy link
Contributor Author

opened a PR for

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

@CaelThompson
Copy link

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)

@jordan-d-murphy
Copy link
Contributor Author

jordan-d-murphy commented Mar 17, 2024

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
Copy link
Contributor Author

@jordan-d-murphy
Copy link
Contributor Author

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! 🙂

pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this issue May 7, 2024
…#57504)

* DOC: Fix PR01 errors in multiple files (pandas-dev#57438)

Fixed PR01 errors (pandas-dev#57438) and added parameter descriptions for:
- `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.cummax`
- `pandas.core.groupby.SeriesGroupBy.cummin`
- `pandas.core.groupby.SeriesGroupBy.cumprod`
- `pandas.core.groupby.SeriesGroupBy.cumsum`
- `pandas.core.groupby.SeriesGroupBy.cumprod`

Fixed functions also removed from code_checks.sh

* Updated formatting

* Corrected E501 formatting

* Remove trailing whitespaces

* Fix PR02 error from docstring inheritance for resampler nunique method

Resolved a PR02 documentation error arising from the inherited `nunique` method docstring within `groupby.SeriesGroupBy.nunique`. The issue was due to the `resample.Resampler.nunique` method lacking a `dropna` parameter, which is present in the inherited docstring.

- Introduced `_nunique_extra_params` to dynamically insert parameter documentation only where applicable (i.e. where `groupby.SeriesGroupBy.nunique`is).

* Resolve request

* Undo mistake

* Remove unnecessary import to fix ruff check
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

No branches or pull requests

5 participants