-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
WIP: document our guidelines/coding conventions #2616
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
base: main
Are you sure you want to change the base?
Conversation
GUIDELINES.txt
Outdated
@@ -0,0 +1,7 @@ | |||
Guidelines |
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.
Guidelines & Coding Conventions, perhaps?
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.
Coding conventions would be great. Especially naming conventions.
@@ -0,0 +1,7 @@ | |||
Guidelines | |||
========== | |||
|
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.
Now just to figure out what common pieces of advice we give contributors :)
GUIDELINES.rst.txt
Outdated
|
||
from skimage import data | ||
|
||
img = data.coins() |
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.
This has to be image
:)
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.
@soupault Please, read my comment: #2538 (comment) and add your point of view :)
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.
Works fine to me either way. :)
@sciunto I wouldn't consider this dead, just dormant, thanks for awakening it. =) As a first step, I would remove all the copied sections from NumPyDoc and just link to the official guide: https://numpydoc.readthedocs.io/en/latest/format.html Overall I think this is a great addition! But I think use |
I abandon this PR, I'm not motivated to continue on this. If someone else wants to document that, I'll be glad. |
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.
I feel like most of this is or should be upstreamed. No need to duplicate it here.
GUIDELINES.rst.txt
Outdated
Docstring | ||
--------- | ||
|
||
documentation string (docstring) is a string that describes a module, |
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.
Capitalization. Leading space
GUIDELINES.rst.txt
Outdated
output. Rather than sacrificing the readability of the docstrings, we | ||
have written pre-processors to assist Sphinx_ in its task. | ||
|
||
The length of docstring lines should be kept to 75 characters to |
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.
I think this should be removed. This has fallen out of favor in recent years... Let's move on from the 70s
GUIDELINES.rst.txt
Outdated
If it is not necessary to specify a keyword argument, use | ||
``optional``:: | ||
|
||
x : int, optional |
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.
I know you all have been adding optional, but I feel like this is the expected default from a keyword argument that has been specified in the signature.
GUIDELINES.rst.txt
Outdated
demonstrated function, must be explicit. | ||
|
||
|
||
cumenting classes |
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.
Typo
If you want to continue this PR, feel free! :) |
Not particularly. I guess I didn't see the point that you abbandoned it too. |
Totally into this PR, but there are quite a few changes I'd make. As @hmaarrfk, anything that can be upstreamed, should, by pointing to PEP257 and NumPy's docstring formatting guidelines. I don't have time to do it now but let's leave it open so the work is ready to be picked up by someone. |
I'm slowly going through the 1.0 milestone. Removing this from 1.0 as this is more a general documentation improvement and not specific to a release. |
Description
As discussed on the ML, in this PR, we will start to list our guidelines related to our API.
https://mail.python.org/archives/list/scikit-image@python.org/thread/QKGR7YSC34MMXWFWLZNHHL3HJCBSAXN3/
TODO
multichannel
parameter handling #2613References