-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Labels
Description
follow up on issues #56804, #59458 and #58063
pandas has a script for validating docstrings:
Lines 112 to 128 in 2244402
-i "pandas.Timedelta.asm8 SA01" \ | |
-i "pandas.Timedelta.ceil SA01" \ | |
-i "pandas.Timedelta.components SA01" \ | |
-i "pandas.Timedelta.floor SA01" \ | |
-i "pandas.Timedelta.max PR02" \ | |
-i "pandas.Timedelta.min PR02" \ | |
-i "pandas.Timedelta.resolution PR02" \ | |
-i "pandas.Timedelta.round SA01" \ | |
-i "pandas.Timedelta.to_numpy PR01" \ | |
-i "pandas.Timedelta.to_timedelta64 SA01" \ | |
-i "pandas.Timedelta.total_seconds SA01" \ | |
-i "pandas.Timedelta.view SA01" \ | |
-i "pandas.TimedeltaIndex.components SA01" \ | |
-i "pandas.TimedeltaIndex.microseconds SA01" \ | |
-i "pandas.TimedeltaIndex.nanoseconds SA01" \ | |
-i "pandas.TimedeltaIndex.seconds SA01" \ | |
-i "pandas.TimedeltaIndex.to_pytimedelta RT03,SA01" \ |
Currently, some methods fail docstring validation check.
The task here is:
- take 2-4 methods
- run:
scripts/validate_docstrings.py <method-name>
- run
pytest pandas/tests/scalar/test_nat.py::test_nat_doc_strings
- fix the docstrings according to whatever error is reported
- remove those methods from
code_checks.sh
script - commit, push, open pull request
Example:
scripts/validate_docstrings.py pandas.Timedelta.ceil
pandas.Timedelta.ceil fails with the SA01 and ES01 errors
################################################################################
################################## Validation ##################################
################################################################################
2 Errors found for `pandas.Timedelta.ceil`:
ES01 No extended summary found
SA01 See Also section not found
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