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

Homogenize docstring syntax and layout #338

Closed
rhugonnet opened this issue Jan 20, 2023 · 2 comments · Fixed by #351
Closed

Homogenize docstring syntax and layout #338

rhugonnet opened this issue Jan 20, 2023 · 2 comments · Fixed by #351
Labels
architecture Need to re-organize or re-structure something

Comments

@rhugonnet
Copy link
Member

Right now, docstrings have a syntax and layout that is quite variable, both in the code, and after rendering in the API.
It would be nice to homogenize all of that.

1/ For the code side, maybe we could have a linter that enforces a specific layout?

2/ For the rendering side, we could decide what we think is best (including references, details about default parameters in the function description or in the parameters, or both? etc), and then open a Wiki with guidelines to write the docstring of a function consistently in the first go.

         I don't know what is the good practice, but I always remove the tab here, because in other places with different lengths (I believe e.g. when displaying the docstring from a Python console), the empty block shows up in the middle of a sentence...

Originally posted by @adehecq in #335 (comment)

@rhugonnet
Copy link
Member Author

A reminder on this subject: we should remove camel-case cropGeom and use crop_geometry or similar.

@rhugonnet
Copy link
Member Author

rhugonnet commented Feb 3, 2023

When refering to parameters in docstrings, we should probably always use ` to write for example:

"dst_ref" as dst_ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Need to re-organize or re-structure something
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant