-
Notifications
You must be signed in to change notification settings - Fork 7
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
docs(project): Add docstrings to functions in project #541
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.
Minor adjustments for more idiomatic english, simplifications, and one fix (view instead of item).
…`skore/` after #440 (#545) We can see in #541 that pre-commit doesn't execute ruff: ![image](https://github.com/user-attachments/assets/3822a0e6-ca08-43a8-934b-0c417d6d7b6e) Now: ![image](https://github.com/user-attachments/assets/c89394dd-5c8c-49d5-ba67-e05724505608)
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 the added precision, this is really welcome. I made a few changes but I realize that not everything was previously agreed upon and we can discuss it. A few notable remarks:
- The
Attributes
is for documenting classes, not functions. When a function returns an object of typeA
, it makes sense to just say it returns anA
and document in a specific place what anA
is, in depth - Each section of the docstring needs to be separated from the others by a blank line (that's for the docs generator to understand that a new paragraph is starting)
- The
Returns
block already explains what is returned, so writing "Returns ..." in the description is redundant (see numpydoc spec) - The
Raises
block already says which exceptions can be raised, so writing "Raises a KeyError" in the description is redundant (see numpydoc spec)
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com>
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.
Nice work!
…`skore/` after #440 (#545) We can see in #541 that pre-commit doesn't execute ruff: ![image](https://github.com/user-attachments/assets/3822a0e6-ca08-43a8-934b-0c417d6d7b6e) Now: ![image](https://github.com/user-attachments/assets/c89394dd-5c8c-49d5-ba67-e05724505608)
Add docstrings to the functions in the project class. --------- Co-authored-by: Auguste Baum <52001167+augustebaum@users.noreply.github.com> Co-authored-by: Thomas S. <thomas@probabl.ai>
Add docstrings to the functions in the project class.