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: Enforce Numpy Docstring Validation for pandas.tseries.offsets.Week.name #58634

Merged
merged 2 commits into from
May 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BQuarterBegin PR02" \
-i "pandas.tseries.offsets.BQuarterBegin.freqstr SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.BQuarterBegin.kwds SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.n GL08" \
-i "pandas.tseries.offsets.BQuarterBegin.name SA01" \
-i "pandas.tseries.offsets.BQuarterBegin.nanos GL08" \
Expand All @@ -593,7 +592,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BQuarterEnd PR02" \
-i "pandas.tseries.offsets.BQuarterEnd.freqstr SA01" \
-i "pandas.tseries.offsets.BQuarterEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.BQuarterEnd.kwds SA01" \
-i "pandas.tseries.offsets.BQuarterEnd.n GL08" \
-i "pandas.tseries.offsets.BQuarterEnd.name SA01" \
-i "pandas.tseries.offsets.BQuarterEnd.nanos GL08" \
Expand All @@ -603,7 +601,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BYearBegin PR02" \
-i "pandas.tseries.offsets.BYearBegin.freqstr SA01" \
-i "pandas.tseries.offsets.BYearBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.BYearBegin.kwds SA01" \
-i "pandas.tseries.offsets.BYearBegin.month GL08" \
-i "pandas.tseries.offsets.BYearBegin.n GL08" \
-i "pandas.tseries.offsets.BYearBegin.name SA01" \
Expand All @@ -613,7 +610,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BYearEnd PR02" \
-i "pandas.tseries.offsets.BYearEnd.freqstr SA01" \
-i "pandas.tseries.offsets.BYearEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.BYearEnd.kwds SA01" \
-i "pandas.tseries.offsets.BYearEnd.month GL08" \
-i "pandas.tseries.offsets.BYearEnd.n GL08" \
-i "pandas.tseries.offsets.BYearEnd.name SA01" \
Expand All @@ -625,7 +621,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BusinessDay.freqstr SA01" \
-i "pandas.tseries.offsets.BusinessDay.holidays GL08" \
-i "pandas.tseries.offsets.BusinessDay.is_on_offset GL08" \
-i "pandas.tseries.offsets.BusinessDay.kwds SA01" \
-i "pandas.tseries.offsets.BusinessDay.n GL08" \
-i "pandas.tseries.offsets.BusinessDay.name SA01" \
-i "pandas.tseries.offsets.BusinessDay.nanos GL08" \
Expand All @@ -638,7 +633,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BusinessHour.freqstr SA01" \
-i "pandas.tseries.offsets.BusinessHour.holidays GL08" \
-i "pandas.tseries.offsets.BusinessHour.is_on_offset GL08" \
-i "pandas.tseries.offsets.BusinessHour.kwds SA01" \
-i "pandas.tseries.offsets.BusinessHour.n GL08" \
-i "pandas.tseries.offsets.BusinessHour.name SA01" \
-i "pandas.tseries.offsets.BusinessHour.nanos GL08" \
Expand All @@ -649,7 +643,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BusinessMonthBegin PR02" \
-i "pandas.tseries.offsets.BusinessMonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.BusinessMonthBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.BusinessMonthBegin.kwds SA01" \
-i "pandas.tseries.offsets.BusinessMonthBegin.n GL08" \
-i "pandas.tseries.offsets.BusinessMonthBegin.name SA01" \
-i "pandas.tseries.offsets.BusinessMonthBegin.nanos GL08" \
Expand All @@ -658,7 +651,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.BusinessMonthEnd PR02" \
-i "pandas.tseries.offsets.BusinessMonthEnd.freqstr SA01" \
-i "pandas.tseries.offsets.BusinessMonthEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.BusinessMonthEnd.kwds SA01" \
-i "pandas.tseries.offsets.BusinessMonthEnd.n GL08" \
-i "pandas.tseries.offsets.BusinessMonthEnd.name SA01" \
-i "pandas.tseries.offsets.BusinessMonthEnd.nanos GL08" \
Expand All @@ -672,7 +664,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.CustomBusinessDay.freqstr SA01" \
-i "pandas.tseries.offsets.CustomBusinessDay.holidays GL08" \
-i "pandas.tseries.offsets.CustomBusinessDay.is_on_offset GL08" \
-i "pandas.tseries.offsets.CustomBusinessDay.kwds SA01" \
-i "pandas.tseries.offsets.CustomBusinessDay.n GL08" \
-i "pandas.tseries.offsets.CustomBusinessDay.name SA01" \
-i "pandas.tseries.offsets.CustomBusinessDay.nanos GL08" \
Expand All @@ -685,7 +676,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.CustomBusinessHour.freqstr SA01" \
-i "pandas.tseries.offsets.CustomBusinessHour.holidays GL08" \
-i "pandas.tseries.offsets.CustomBusinessHour.is_on_offset GL08" \
-i "pandas.tseries.offsets.CustomBusinessHour.kwds SA01" \
-i "pandas.tseries.offsets.CustomBusinessHour.n GL08" \
-i "pandas.tseries.offsets.CustomBusinessHour.name SA01" \
-i "pandas.tseries.offsets.CustomBusinessHour.nanos GL08" \
Expand All @@ -698,7 +688,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.holidays GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.is_on_offset SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.kwds SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.m_offset GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.n GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.name SA01" \
Expand All @@ -711,7 +700,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.freqstr SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.holidays GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.is_on_offset SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.kwds SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.m_offset GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.n GL08" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.name SA01" \
Expand All @@ -722,7 +710,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.DateOffset PR02" \
-i "pandas.tseries.offsets.DateOffset.freqstr SA01" \
-i "pandas.tseries.offsets.DateOffset.is_on_offset GL08" \
-i "pandas.tseries.offsets.DateOffset.kwds SA01" \
-i "pandas.tseries.offsets.DateOffset.n GL08" \
-i "pandas.tseries.offsets.DateOffset.name SA01" \
-i "pandas.tseries.offsets.DateOffset.nanos GL08" \
Expand All @@ -731,7 +718,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Day PR02" \
-i "pandas.tseries.offsets.Day.freqstr SA01" \
-i "pandas.tseries.offsets.Day.is_on_offset GL08" \
-i "pandas.tseries.offsets.Day.kwds SA01" \
-i "pandas.tseries.offsets.Day.n GL08" \
-i "pandas.tseries.offsets.Day.name SA01" \
-i "pandas.tseries.offsets.Day.nanos SA01" \
Expand All @@ -740,7 +726,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Easter PR02" \
-i "pandas.tseries.offsets.Easter.freqstr SA01" \
-i "pandas.tseries.offsets.Easter.is_on_offset GL08" \
-i "pandas.tseries.offsets.Easter.kwds SA01" \
-i "pandas.tseries.offsets.Easter.n GL08" \
-i "pandas.tseries.offsets.Easter.name SA01" \
-i "pandas.tseries.offsets.Easter.nanos GL08" \
Expand All @@ -751,7 +736,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.FY5253.get_rule_code_suffix GL08" \
-i "pandas.tseries.offsets.FY5253.get_year_end GL08" \
-i "pandas.tseries.offsets.FY5253.is_on_offset GL08" \
-i "pandas.tseries.offsets.FY5253.kwds SA01" \
-i "pandas.tseries.offsets.FY5253.n GL08" \
-i "pandas.tseries.offsets.FY5253.name SA01" \
-i "pandas.tseries.offsets.FY5253.nanos GL08" \
Expand All @@ -765,7 +749,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.FY5253Quarter.get_rule_code_suffix GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.get_weeks GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.is_on_offset GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.kwds SA01" \
-i "pandas.tseries.offsets.FY5253Quarter.n GL08" \
-i "pandas.tseries.offsets.FY5253Quarter.name SA01" \
-i "pandas.tseries.offsets.FY5253Quarter.nanos GL08" \
Expand All @@ -779,7 +762,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Hour PR02" \
-i "pandas.tseries.offsets.Hour.freqstr SA01" \
-i "pandas.tseries.offsets.Hour.is_on_offset GL08" \
-i "pandas.tseries.offsets.Hour.kwds SA01" \
-i "pandas.tseries.offsets.Hour.n GL08" \
-i "pandas.tseries.offsets.Hour.name SA01" \
-i "pandas.tseries.offsets.Hour.nanos SA01" \
Expand All @@ -788,7 +770,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.LastWeekOfMonth PR02,SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.freqstr SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.is_on_offset GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.kwds SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.n GL08" \
-i "pandas.tseries.offsets.LastWeekOfMonth.name SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.nanos GL08" \
Expand All @@ -799,7 +780,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Micro PR02" \
-i "pandas.tseries.offsets.Micro.freqstr SA01" \
-i "pandas.tseries.offsets.Micro.is_on_offset GL08" \
-i "pandas.tseries.offsets.Micro.kwds SA01" \
-i "pandas.tseries.offsets.Micro.n GL08" \
-i "pandas.tseries.offsets.Micro.name SA01" \
-i "pandas.tseries.offsets.Micro.nanos SA01" \
Expand All @@ -808,7 +788,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Milli PR02" \
-i "pandas.tseries.offsets.Milli.freqstr SA01" \
-i "pandas.tseries.offsets.Milli.is_on_offset GL08" \
-i "pandas.tseries.offsets.Milli.kwds SA01" \
-i "pandas.tseries.offsets.Milli.n GL08" \
-i "pandas.tseries.offsets.Milli.name SA01" \
-i "pandas.tseries.offsets.Milli.nanos SA01" \
Expand All @@ -817,7 +796,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Minute PR02" \
-i "pandas.tseries.offsets.Minute.freqstr SA01" \
-i "pandas.tseries.offsets.Minute.is_on_offset GL08" \
-i "pandas.tseries.offsets.Minute.kwds SA01" \
-i "pandas.tseries.offsets.Minute.n GL08" \
-i "pandas.tseries.offsets.Minute.name SA01" \
-i "pandas.tseries.offsets.Minute.nanos SA01" \
Expand All @@ -826,7 +804,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.MonthBegin PR02" \
-i "pandas.tseries.offsets.MonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.MonthBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.MonthBegin.kwds SA01" \
-i "pandas.tseries.offsets.MonthBegin.n GL08" \
-i "pandas.tseries.offsets.MonthBegin.name SA01" \
-i "pandas.tseries.offsets.MonthBegin.nanos GL08" \
Expand All @@ -835,7 +812,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.MonthEnd PR02" \
-i "pandas.tseries.offsets.MonthEnd.freqstr SA01" \
-i "pandas.tseries.offsets.MonthEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.MonthEnd.kwds SA01" \
-i "pandas.tseries.offsets.MonthEnd.n GL08" \
-i "pandas.tseries.offsets.MonthEnd.name SA01" \
-i "pandas.tseries.offsets.MonthEnd.nanos GL08" \
Expand All @@ -844,7 +820,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Nano PR02" \
-i "pandas.tseries.offsets.Nano.freqstr SA01" \
-i "pandas.tseries.offsets.Nano.is_on_offset GL08" \
-i "pandas.tseries.offsets.Nano.kwds SA01" \
-i "pandas.tseries.offsets.Nano.n GL08" \
-i "pandas.tseries.offsets.Nano.name SA01" \
-i "pandas.tseries.offsets.Nano.nanos SA01" \
Expand All @@ -853,7 +828,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.QuarterBegin PR02" \
-i "pandas.tseries.offsets.QuarterBegin.freqstr SA01" \
-i "pandas.tseries.offsets.QuarterBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.QuarterBegin.kwds SA01" \
-i "pandas.tseries.offsets.QuarterBegin.n GL08" \
-i "pandas.tseries.offsets.QuarterBegin.name SA01" \
-i "pandas.tseries.offsets.QuarterBegin.nanos GL08" \
Expand All @@ -863,7 +837,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.QuarterEnd PR02" \
-i "pandas.tseries.offsets.QuarterEnd.freqstr SA01" \
-i "pandas.tseries.offsets.QuarterEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.QuarterEnd.kwds SA01" \
-i "pandas.tseries.offsets.QuarterEnd.n GL08" \
-i "pandas.tseries.offsets.QuarterEnd.name SA01" \
-i "pandas.tseries.offsets.QuarterEnd.nanos GL08" \
Expand All @@ -873,7 +846,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Second PR02" \
-i "pandas.tseries.offsets.Second.freqstr SA01" \
-i "pandas.tseries.offsets.Second.is_on_offset GL08" \
-i "pandas.tseries.offsets.Second.kwds SA01" \
-i "pandas.tseries.offsets.Second.n GL08" \
-i "pandas.tseries.offsets.Second.name SA01" \
-i "pandas.tseries.offsets.Second.nanos SA01" \
Expand All @@ -883,7 +855,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.SemiMonthBegin.day_of_month GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.freqstr SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.kwds SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.n GL08" \
-i "pandas.tseries.offsets.SemiMonthBegin.name SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.nanos GL08" \
Expand All @@ -893,7 +864,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.SemiMonthEnd.day_of_month GL08" \
-i "pandas.tseries.offsets.SemiMonthEnd.freqstr SA01" \
-i "pandas.tseries.offsets.SemiMonthEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.SemiMonthEnd.kwds SA01" \
-i "pandas.tseries.offsets.SemiMonthEnd.n GL08" \
-i "pandas.tseries.offsets.SemiMonthEnd.name SA01" \
-i "pandas.tseries.offsets.SemiMonthEnd.nanos GL08" \
Expand All @@ -902,7 +872,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Tick GL08" \
-i "pandas.tseries.offsets.Tick.freqstr SA01" \
-i "pandas.tseries.offsets.Tick.is_on_offset GL08" \
-i "pandas.tseries.offsets.Tick.kwds SA01" \
-i "pandas.tseries.offsets.Tick.n GL08" \
-i "pandas.tseries.offsets.Tick.name SA01" \
-i "pandas.tseries.offsets.Tick.nanos SA01" \
Expand All @@ -911,7 +880,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.Week PR02" \
-i "pandas.tseries.offsets.Week.freqstr SA01" \
-i "pandas.tseries.offsets.Week.is_on_offset GL08" \
-i "pandas.tseries.offsets.Week.kwds SA01" \
-i "pandas.tseries.offsets.Week.n GL08" \
-i "pandas.tseries.offsets.Week.name SA01" \
-i "pandas.tseries.offsets.Week.nanos GL08" \
Expand All @@ -921,7 +889,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.WeekOfMonth PR02,SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.freqstr SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.is_on_offset GL08" \
-i "pandas.tseries.offsets.WeekOfMonth.kwds SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.n GL08" \
-i "pandas.tseries.offsets.WeekOfMonth.name SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.nanos GL08" \
Expand All @@ -932,7 +899,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.YearBegin PR02" \
-i "pandas.tseries.offsets.YearBegin.freqstr SA01" \
-i "pandas.tseries.offsets.YearBegin.is_on_offset GL08" \
-i "pandas.tseries.offsets.YearBegin.kwds SA01" \
-i "pandas.tseries.offsets.YearBegin.month GL08" \
-i "pandas.tseries.offsets.YearBegin.n GL08" \
-i "pandas.tseries.offsets.YearBegin.name SA01" \
Expand All @@ -942,7 +908,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.tseries.offsets.YearEnd PR02" \
-i "pandas.tseries.offsets.YearEnd.freqstr SA01" \
-i "pandas.tseries.offsets.YearEnd.is_on_offset GL08" \
-i "pandas.tseries.offsets.YearEnd.kwds SA01" \
-i "pandas.tseries.offsets.YearEnd.month GL08" \
-i "pandas.tseries.offsets.YearEnd.n GL08" \
-i "pandas.tseries.offsets.YearEnd.name SA01" \
Expand Down
6 changes: 6 additions & 0 deletions pandas/_libs/tslibs/offsets.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,12 @@ cdef class BaseOffset:
"""
Return a dict of extra parameters for the offset.

See Also
--------
tseries.offsets.DateOffset : The base class for all pandas date offsets.
tseries.offsets.WeekOfMonth : Represents the week of the month.
tseries.offsets.LastWeekOfMonth : Represents the last week of the month.

Examples
--------
>>> pd.DateOffset(5).kwds
Expand Down