Skip to content

Commit

Permalink
Merge 061a6c2 into 69652a1
Browse files Browse the repository at this point in the history
  • Loading branch information
mitkin committed Dec 2, 2015
2 parents 69652a1 + 061a6c2 commit 8db1a6c
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions GUIDELINES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Pytroll coding guidelines
=========================

“It is not the strongest of the species that survives, nor the most intelligent that survives.
It is the one that is most adaptable to change.”
Charles Darwin

“It seems that perfection is attained,
not when there is nothing more to add,
but when there is nothing more to take away.”
Antoine de Saint Exupéry


Language is US English.

We generally follow the pep-8

Max line length is set to 120 chars, 80 chars is ok too.

Indentation is 4 spaces (no tabs!)

Global constants are written in capital letters, eg. PLANK_CONSTANT if they are not modified in the module.

About docstrings, pep 257 https://www.python.org/dev/peps/pep-0257/

Versionning: http://semver.org/

Prepare to be Python3 compatible.

Commit messages:
http://chris.beams.io/posts/git-commit/
http://who-t.blogspot.de/2009/12/on-commit-messages.html


The Zen of Python (PEP20)
-------------------------
* Beautiful is better than ugly.
* Explicit is better than implicit.
* Simple is better than complex.
* Complex is better than complicated.
* Flat is better than nested.
* Sparse is better than dense.
* Readability counts.
* Special cases aren't special enough to break the rules.
* Although practicality beats purity.
* Errors should never pass silently.
* Unless explicitly silenced.
* In the face of ambiguity, refuse the temptation to guess.
* There should be one-- and preferably only one --obvious way to do it.
* Although that way may not be obvious at first unless you're Dutch.
* Now is better than never.
* Although never is often better than *right* now.
* If the implementation is hard to explain, it's a bad idea.
* If the implementation is easy to explain, it may be a good idea.
* Namespaces are one honking great idea -- let's do more of those!

0 comments on commit 8db1a6c

Please sign in to comment.