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
How to Avoid Pandera Doc Injection? #1564
Comments
Thanks for bringing this up @kernelpernel, would it be possible to provide some screenshots and a minimally reproducible example? Don't really understand what you mean by docs being injected. |
No screenshots due to possible IP conflicts, but I put together this quick example: For example, if I write this class:
I get this output for the sphinx-generated docs:
Where I would expect to only see this:
And the docs appear to be the same as those from here: |
Thanks for the quick response @cosmicBboy ! |
It's probably because of the Can you try overriding that method and seeing if it happens? |
@kernelpernel any updates on this issue? |
Question about pandera
We use pandera where I work for our dataframe schema. We also use sphinx to generate docs for our python libraries. Unfortunately, the documentation for pandera.pandera.api.pandas.container.DataFrameSchema keeps getting injected into our sphinx-generated documentation. As a work around, we have made most of our schema classes private to prevent doc importing.
We have also tried to write decorators for our own classes to sanitize the docs, but this has been challenging as well. Looking at the entire attribute stack for a class that inherits from pa.DataFrameSchema, most of the doc attributes appear empty. When we try to scrub docs from pandera modules, we end up without any of our own documentation and only have the cat, dog, duck example from pa.DataFrameSchema.
Is this a pandera bug? If not, is there a way that we could suppress the doc injection without removing our own documentation?
TL;DR: pandera is injecting documentation into our own documentation (especially from pandera.pandera.api.pandas.container.DataFrameSchema). Is there a way to prevent this from happening?
The text was updated successfully, but these errors were encountered: