-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Description
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.Index
Lines 182 to 230 in c468028
-i "pandas.Index PR07" \ | |
-i "pandas.Index.T SA01" \ | |
-i "pandas.Index.append PR07,RT03,SA01" \ | |
-i "pandas.Index.astype SA01" \ | |
-i "pandas.Index.copy PR07,SA01" \ | |
-i "pandas.Index.difference PR07,RT03,SA01" \ | |
-i "pandas.Index.drop PR07,SA01" \ | |
-i "pandas.Index.drop_duplicates RT03" \ | |
-i "pandas.Index.droplevel RT03,SA01" \ | |
-i "pandas.Index.dropna RT03,SA01" \ | |
-i "pandas.Index.dtype SA01" \ | |
-i "pandas.Index.duplicated RT03" \ | |
-i "pandas.Index.empty GL08" \ | |
-i "pandas.Index.equals SA01" \ | |
-i "pandas.Index.fillna RT03" \ | |
-i "pandas.Index.get_indexer PR07,SA01" \ | |
-i "pandas.Index.get_indexer_for PR01,SA01" \ | |
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \ | |
-i "pandas.Index.get_loc PR07,RT03,SA01" \ | |
-i "pandas.Index.get_slice_bound PR07" \ | |
-i "pandas.Index.hasnans SA01" \ | |
-i "pandas.Index.identical PR01,SA01" \ | |
-i "pandas.Index.inferred_type SA01" \ | |
-i "pandas.Index.insert PR07,RT03,SA01" \ | |
-i "pandas.Index.intersection PR07,RT03,SA01" \ | |
-i "pandas.Index.item SA01" \ | |
-i "pandas.Index.join PR07,RT03,SA01" \ | |
-i "pandas.Index.map SA01" \ | |
-i "pandas.Index.memory_usage RT03" \ | |
-i "pandas.Index.name SA01" \ | |
-i "pandas.Index.names GL08" \ | |
-i "pandas.Index.nbytes SA01" \ | |
-i "pandas.Index.ndim SA01" \ | |
-i "pandas.Index.nunique RT03" \ | |
-i "pandas.Index.putmask PR01,RT03" \ | |
-i "pandas.Index.ravel PR01,RT03" \ | |
-i "pandas.Index.reindex PR07" \ | |
-i "pandas.Index.shape SA01" \ | |
-i "pandas.Index.size SA01" \ | |
-i "pandas.Index.slice_indexer PR07,RT03,SA01" \ | |
-i "pandas.Index.slice_locs RT03" \ | |
-i "pandas.Index.str PR01,SA01" \ | |
-i "pandas.Index.symmetric_difference PR07,RT03,SA01" \ | |
-i "pandas.Index.take PR01,PR07" \ | |
-i "pandas.Index.to_list RT03" \ | |
-i "pandas.Index.union PR07,RT03,SA01" \ | |
-i "pandas.Index.unique RT03" \ | |
-i "pandas.Index.value_counts RT03" \ | |
-i "pandas.Index.view GL08" \ |
The task is:
-
take 1-5 methods
-
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
-
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.
-
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.
-
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 for the inspiration for this issue!