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

Adding a CONTRIBUTING.md #47

Closed
AndreasBackx opened this issue Sep 3, 2016 · 3 comments
Closed

Adding a CONTRIBUTING.md #47

AndreasBackx opened this issue Sep 3, 2016 · 3 comments

Comments

@AndreasBackx
Copy link
Collaborator

I noticed that in the project single and double quotes are used interchangeably. (The majority is single quotes it seems.) This together with adding documentation would be beneficial to the project and I think we should start put all of this information in CONTRIBUTING.md so we and other can refer to it.

The choice for docstrings is Numpy or Google style? I've always used the Google one, what do you think?

Then I would just say that the code has to conform with PEP8 but not with the max 80 character rule. Rather I would say conform with a ~90 char rule. I would love to refer you to this talk from Raymond Hettinger about PEP8 that talks about this.

@jrief
Copy link
Owner

jrief commented Sep 4, 2016

Hi @AndreasBackx ,
this may seem weird, but I'm using the quoting style formerly proposed by Douglas Crockford:
"Single quotes for internal strings and double quotes for strings readable by humans".
This can be a big advantage, whenever one has to search for strings visible in other natural languages.
You therefore might see statements in my code such as:

color = ChoiceField(choices=[('red', "Red"), ('green', "Green"), ('blue', "Blue")])

This of course also applies to docstrings:

def foo():
    """Do foo stuff"""

About the line length, I follow the guideline from Django, which allows 119 characters, but I use a soft limit of 100, which means that I try to stay below, if otherwise I would have to use a \ character.

I fully agree, that this should be added to a contributing file.

@AndreasBackx
Copy link
Collaborator Author

Good to know that you use that quoting style. I don't really mind and will do what has been done in the past on the project. Mine were only suggestions in case there weren't any.

I would also suggest using isort for imports.

@jrief jrief closed this as completed Feb 6, 2017
@AndreasBackx
Copy link
Collaborator Author

No CONTRIBUTING.md I guess?

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

No branches or pull requests

2 participants