-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Ensure pandas warnings & exceptions are always documented in API docs #43029
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: Ensure pandas warnings & exceptions are always documented in API docs #43029
Conversation
lgtm. @MarcoGorelli if any comments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Small comment but the rest looks good
scripts/pandas_errors_documented.py
Outdated
import sys | ||
from typing import Sequence | ||
|
||
API_PATH = "doc/source/reference/general_utility_functions.rst" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would this work if someone runs this hook on Windows?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I suspect these types of checks could be done elsewhere. It might be trickier for other API sections depending on the import structure. |
… docs (pandas-dev#43029) * DOC: Ensure all pandas.errors are documents in general_utility_functions.rst * Use ast to check for the errors * Use pathlib to ensure Windows support
Also adds a pre-commit check that errors in
doc/source/reference/general_utility_functions.rst
are synced withpandas/errors/__init__.py