pandas icon indicating copy to clipboard operation
pandas copied to clipboard

DOC: Enforce Numpy Docstring Validation | pandas.tseries.offsets.Week to YearEnd

Open Nrezhang opened this issue 9 months ago • 3 comments

DOC: Enforce Numpy Docstring Validation (Parent Issue) #58063

Documentation problem

Pandas has a script for validating docstrings in code_checks.sh. Currently, some methods fail some of these checks.

pandas.tseries

https://github.com/pandas-dev/pandas/blob/c468028f5c2398c04d355cef7a8b6a3952620de2/ci/code_checks.sh#L1217-L1261

The task is:

  1. take 1-5 methods

  2. run: scripts/validate_docstrings.py --format=actions <method-name>

example command: scripts/validate_docstrings.py --format=actions pandas.Categorical.__array__ example output:

################################################################################
################################## Validation ##################################
################################################################################

2 Errors found for `pandas.Categorical.__array__`:
    ES01    No extended summary found
    SA01    See Also section not found
  1. check if validation docstrings passes for those methods, and if it’s necessary fix the docstrings according to whatever error is reported. Note: We've chosen to ignore ES01 errors, these are not required to be fixed.

  2. remove those methods from code_checks.sh if all errors are cleared and the docstring is correct, otherwise, remove the specific error that was fixed from the list of errors for that method.

  3. 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

thanks @datapythonista @jordan-d-murphy for the inspiration for this

Nrezhang avatar May 02 '24 18:05 Nrezhang

working on

 -i "pandas.tseries.offsets.Week.copy SA01" \

tuhinsharma121 avatar May 07 '24 07:05 tuhinsharma121

working on

        -i "pandas.tseries.offsets.BusinessDay PR02,SA01" \
        -i "pandas.tseries.offsets.BDay PR02,SA01" \

tuhinsharma121 avatar May 18 '24 05:05 tuhinsharma121

working on

pandas.tseries.offsets.Day PR02

tuhinsharma121 avatar May 18 '24 05:05 tuhinsharma121