Skip to content
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

Merged
merged 23 commits into from
Oct 22, 2024

Conversation

MarieSacksick
Copy link
Contributor

@MarieSacksick MarieSacksick commented Oct 18, 2024

Add docstrings to the functions in the project class.

Verified

This commit was signed with the committer’s verified signature.
BerndKue Bernd
@MarieSacksick MarieSacksick linked an issue Oct 18, 2024 that may be closed by this pull request
@MarieSacksick MarieSacksick marked this pull request as draft October 18, 2024 14:29
@MarieSacksick MarieSacksick changed the title (doc) add docstrings to functions in project docs(project): add docstrings to functions in project Oct 18, 2024
@MarieSacksick MarieSacksick changed the title docs(project): add docstrings to functions in project docs(project): Add docstrings to functions in project Oct 18, 2024
@MarieSacksick MarieSacksick marked this pull request as ready for review October 18, 2024 14:49
Copy link
Member

@tuscland tuscland left a 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).

augustebaum pushed a commit that referenced this pull request Oct 21, 2024
Copy link
Contributor

@augustebaum augustebaum left a 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 type A, it makes sense to just say it returns an A and document in a specific place what an A 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)

Copy link
Contributor

@augustebaum augustebaum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@thomass-dev thomass-dev merged commit 20721cf into main Oct 22, 2024
4 checks passed
@thomass-dev thomass-dev deleted the 535-docstring_project branch October 22, 2024 09:53
thomass-dev added a commit that referenced this pull request Dec 2, 2024
Add docstrings to the functions in the project class.

---------

Co-authored-by: Auguste Baum <[email protected]>
Co-authored-by: Thomas S. <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

doc: improve the docstring on the project class
4 participants