-
Notifications
You must be signed in to change notification settings - Fork 119
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
Docstrings API examples #648
Conversation
… little mistake I made in outlier_remover
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.
The difference between the two keywords Example
and Examples
is subtle but:
Examples
is a keyword in mkdocstring griffe and has the example as a section, always displayedExample
is a keyword in mkdocs material and adopts the boxed colored layout.
I would opt for the first one as it is numpydoc compliant. However I can see why the second option is also nice and appealing.
If we go for that, maybe I would suggest to use the a collapsible blocks
??? example
...
so that it is closed by default and lowers the clutter in the page, yet easy to access for a user.
@koaning thoughts?
sklego/model_selection.py
Outdated
|
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.
How did that survive lint CI/CD in the first place? 🙈
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.
Ach so! Thank you for explaining, I also fell for this little test tube in the corner. Just to make sure, the "example" also allows for collapsing, isn't?
Waiting for your decision and will adjust it accordingly
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.
Yes, for "example" it is just a matter of default (expanded vs collapsed).
Let's wait for Vincent feedback/preference to weight on this 🙃
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.
Maybe go for usage instead?
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.
I thought Usage
keyword was google-style specific, but at least from the griffe docs it seems it is neither google or numpy.
At the end of the day I believe the only difference is that keywords get bold-ed (example in screenshot).
I think for now the safest way to proceed is to use Examples
keyword as it would have the lowest impact and require less changes.
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.
Okay, I'll do Examples then, if you change your mind, just ping me
I didn't add preprocessing.intervalencoder.IntervalEncoder because I need to delve more into what is it exactly doing. According to the docs strings it's "bending" / "smoothing" the values in X . I checked what "smoothing" in math is doing, and I have my doubts if you meant IntervalEncoder to do smoothing or you meant a monotonic transformation. If you could give me a hint what to research, I'd be really grateful |
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.
Thanks for fixing that everywhere 👌✨
@anopsy I hope that the Interval Encoders user guide and the examples there help. If it doesn't, feel free to reach out to me on socials as well, since user guide would also need some improvements. Disclaimer: I personally never used the feature |
Description
Added examples to: