-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
DOC Skip @property on classes in the auto generated API reference #30989
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
Conversation
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.
There are some properties that are not "attributes", for example ConstantKernel.hyperparameters
:
We can recognise fitted attributes based on their nameing convention
Of course there is legit uses of properties in auto docs :D I changed the condition to look at the name of a property and skip it if it follows the convention for "fitted attributes". I thought about inspecting the class name that owns the property and having a list of classes and properties to skip for each class. Could go with that but it seems like maintaining the list would be "another thing to do" compared to inferring that we should hide a property based on its name. WDYT? |
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.
LGTM
Let's merge this one, thanks! |
Reference Issues/PRs
Closes #30957
What does this implement/fix? Explain your changes.
This sets up a function to determine what should be automatically documented and what not. We skip over
@property
as these get documented manually in the Attributes section already.Any other comments?
I asked perplexity how to do this and this is the suggestion. Let's see if this works 🤞