Skip to content

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

Merged
merged 5 commits into from
Aug 18, 2021

Conversation

mroeschke
Copy link
Member

  • Ensure all linting tests pass, see here for how to run them

Also adds a pre-commit check that errors in doc/source/reference/general_utility_functions.rst are synced with pandas/errors/__init__.py

@mroeschke mroeschke added the Docs label Aug 15, 2021
@mroeschke mroeschke added this to the 1.4 milestone Aug 15, 2021
@jreback jreback requested a review from MarcoGorelli August 17, 2021 17:15
@jreback
Copy link
Contributor

jreback commented Aug 17, 2021

lgtm. @MarcoGorelli if any comments.

Copy link
Member

@MarcoGorelli MarcoGorelli left a 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

import sys
from typing import Sequence

API_PATH = "doc/source/reference/general_utility_functions.rst"
Copy link
Member

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call!

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice - does this need doing for other parts of the API?

@mroeschke mroeschke merged commit 483f057 into pandas-dev:master Aug 18, 2021
@mroeschke mroeschke deleted the doc/pandas_errors_sync branch August 18, 2021 15:58
@mroeschke
Copy link
Member Author

Yeah I suspect these types of checks could be done elsewhere. It might be trickier for other API sections depending on the import structure.

feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
… 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants