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

Update Best Practices in CONTRIBUTING.md #148

Merged
merged 12 commits into from
Aug 19, 2020

Conversation

cedricconol
Copy link
Contributor

Added two items under Best Practices

7. Maximum docstring line length should be 75 characters. This should be manually done as `black` formatting does not enforce limits on docstring line length.
8. Multiline code in docstring should be enclosed in parenthesis where each line after the first starting with an ellipsis (`...`), like so:

>>> s = (
...     s.pipe(hero.clean)
...      .pipe(hero.tokenize)
...      .pipe(hero.term_frequency)
...      .pipe(hero.flatten)
... )

1. Respect [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html). Look at the code for similarity.
1. Respect [PEP 257 -- Docstring Conventions](https://www.python.org/dev/peps/pep-0257/)
1. Maximum character length should be 88 (default settings of `black`).
1. Maximum docstring line length should be 75 characters. This should be manually done as `black` formatting does not enforce limits on docstring line length.
Copy link
Owner

Choose a reason for hiding this comment

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

This should be manually done... -> done manually ...

1. Respect [numpydoc docstring guide](https://numpydoc.readthedocs.io/en/latest/format.html). Look at the code for similarity.
1. Respect [PEP 257 -- Docstring Conventions](https://www.python.org/dev/peps/pep-0257/)
1. Maximum character length should be 88 (default settings of `black`).
1. Maximum docstring line length should be 75 characters. This should be manually done as `black` formatting does not enforce limits on docstring line length.
1. Multiline code in docstring should be enclosed in parenthesis where each line after the first starting with an ellipsis (`...`), like so:
Copy link
Owner

Choose a reason for hiding this comment

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

Maybe we can replace this sentence with:

"In docstring test, on long pipe, consider enclosing the code in parenthesis like so"

It's a bit shorter and clearer

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Noted, Jonathan. However, I think you meant "In docstring examples.." rather than "In docstring test.." right?

Copy link
Owner

Choose a reason for hiding this comment

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

Yes, sorry!

@jbesomi jbesomi merged commit 8d28bec into jbesomi:master Aug 19, 2020
@jbesomi
Copy link
Owner

jbesomi commented Aug 19, 2020

Thank you @cedricconol, merged! (sorry for my late replay, I'm doing university exams right now)

@cedricconol
Copy link
Contributor Author

@jbesomi sorry, I think i was not clear enough. I actually have not implemented your suggestion to use "In docstring test.." yet, I was waiting for your confirmation.

is there a way to roll back the merge? or should I just open a new PR for that?

@jbesomi
Copy link
Owner

jbesomi commented Aug 20, 2020

Hi Cedric, oh I see, no problem: just open a new PR and make the new changes.
Thanks!

@cedricconol cedricconol deleted the contributing-best-practice branch August 20, 2020 08:20
@cedricconol
Copy link
Contributor Author

here's the new PR #154

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.

2 participants