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 | pandas.Int16Dtype through pandas.IntervalIndex #58498

Closed
tuhinsharma121 opened this issue Apr 30, 2024 · 5 comments · Fixed by #58687

Comments

@tuhinsharma121
Copy link
Contributor

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

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

pandas.Int16Dtype through pandas.IntervalIndex

pandas/ci/code_checks.sh

Lines 231 to 252 in c468028

-i "pandas.Int16Dtype SA01" \
-i "pandas.Int32Dtype SA01" \
-i "pandas.Int64Dtype SA01" \
-i "pandas.Int8Dtype SA01" \
-i "pandas.Interval PR02" \
-i "pandas.Interval.closed SA01" \
-i "pandas.Interval.left SA01" \
-i "pandas.Interval.mid SA01" \
-i "pandas.Interval.right SA01" \
-i "pandas.IntervalDtype PR01,SA01" \
-i "pandas.IntervalDtype.subtype SA01" \
-i "pandas.IntervalIndex.closed SA01" \
-i "pandas.IntervalIndex.contains RT03" \
-i "pandas.IntervalIndex.get_indexer PR07,SA01" \
-i "pandas.IntervalIndex.get_loc PR07,RT03,SA01" \
-i "pandas.IntervalIndex.is_non_overlapping_monotonic SA01" \
-i "pandas.IntervalIndex.left GL08" \
-i "pandas.IntervalIndex.length GL08" \
-i "pandas.IntervalIndex.mid GL08" \
-i "pandas.IntervalIndex.right GL08" \
-i "pandas.IntervalIndex.set_closed RT03,SA01" \
-i "pandas.IntervalIndex.to_tuples RT03,SA01" \

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

@tuhinsharma121
Copy link
Contributor Author

working on

 -i "pandas.Int16Dtype SA01" \ 
 -i "pandas.Int32Dtype SA01" \ 
 -i "pandas.Int64Dtype SA01" \ 
 -i "pandas.Int8Dtype SA01" \ 

@tuhinsharma121
Copy link
Contributor Author

tuhinsharma121 commented May 2, 2024

working on the following

-i "pandas.IntervalDtype PR01,SA01" \ 
 -i "pandas.IntervalDtype.subtype SA01" \ 

@tuhinsharma121
Copy link
Contributor Author

working on

 -i "pandas.Interval.closed SA01" \ 
 -i "pandas.Interval.left SA01" \ 
 -i "pandas.Interval.mid SA01" \ 
 -i "pandas.Interval.right SA01" \ 

@tuhinsharma121
Copy link
Contributor Author

tuhinsharma121 commented May 7, 2024

working on

 -i "pandas.IntervalIndex.closed SA01" \

@tuhinsharma121
Copy link
Contributor Author

worked on

-i "pandas.IntervalIndex.is_non_overlapping_monotonic SA01" \ 
 -i "pandas.IntervalIndex.length GL08" \ 
 -i "pandas.IntervalIndex.to_tuples RT03,SA01" \ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant