-
Notifications
You must be signed in to change notification settings - Fork 109
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
[Tidy] Remove docstrings from build methods to harmonize overall #495
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.
Agree we should change this because it currently looks weird, but I think there's probably a better fix than this: leave the docstrings how they are and just edit the settings in models.md
to exclude the build
method:
::: vizro.models.types
options:
filters: ["!^_"] # Don't show dunder methods as well as single underscore ones
merge_init_into_class: false
Presumably just adding build
to the list of filters
or similar would work here.
Tbh then I think all build functions should have a docstring, because they are on equal footing. I think this change is the more consistent and easier one... And I don't think build functions that are never publically used should necessarily need to be documented |
I don't think so - some
Agree they don't necessarily need documenting in general, which is why most of them don't have a docstring. But I don't think this should stop us from adding a docstring in the cases where it is useful. |
Agree, but I think our current docstring choice was at best random. Some of the most complicated build methods have comments, while the two above mentioned are actually fairly simply. So I was more aiming to have a constistant documentation level.
Agreed, and that's maybe the main reason why a filter is good. Still think the current docstring choice is inconsistent, but can change back if you think those two in particular we should keep |
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 🥇
Description
Our API docs looked confusing because two model (Action and Layout) had docstrings for the build method. I converted them to comments, so no info is lost, but now our docs look more streamlined again.
Screenshot
(left before - missed Action, right after)
Notice
I acknowledge and agree that, by checking this box and clicking "Submit Pull Request":