Hynek Schlawack | 2ae675d | 2013-08-07 21:01:07 +0200 | [diff] [blame] | 1 | Process |
| 2 | ======= |
| 3 | |
Laurens Van Houtven | 380a369 | 2013-08-07 11:03:40 +0200 | [diff] [blame] | 4 | This repository has a mandatory code review policy. Contributions |
| 5 | should happen through pull requests. Never commit to ``master`` |
| 6 | directly. |
| 7 | |
Hynek Schlawack | 2ae675d | 2013-08-07 21:01:07 +0200 | [diff] [blame] | 8 | Code |
| 9 | ==== |
Laurens Van Houtven | 380a369 | 2013-08-07 11:03:40 +0200 | [diff] [blame] | 10 | |
Hynek Schlawack | 2ae675d | 2013-08-07 21:01:07 +0200 | [diff] [blame] | 11 | When in doubt, refer to `PEP 8`_ for Python code. |
| 12 | |
Hynek Schlawack | 43f6873 | 2013-08-10 22:13:13 +0200 | [diff] [blame^] | 13 | Every code file must start with the boilerplate notice of the Apache License. |
| 14 | Additionally, every Python code file must contain |
| 15 | |
| 16 | .. code-block:: python |
| 17 | |
| 18 | from __future__ import absolute_import, division, print_function |
| 19 | |
Hynek Schlawack | 2ae675d | 2013-08-07 21:01:07 +0200 | [diff] [blame] | 20 | Docs |
| 21 | ==== |
| 22 | |
| 23 | Write docstrings like this: |
| 24 | |
| 25 | .. code-block:: python |
Laurens Van Houtven | 380a369 | 2013-08-07 11:03:40 +0200 | [diff] [blame] | 26 | |
Hynek Schlawack | 43f6873 | 2013-08-10 22:13:13 +0200 | [diff] [blame^] | 27 | def some_function(some_arg): |
| 28 | """ |
| 29 | Does some things. |
Laurens Van Houtven | 380a369 | 2013-08-07 11:03:40 +0200 | [diff] [blame] | 30 | |
Hynek Schlawack | 43f6873 | 2013-08-10 22:13:13 +0200 | [diff] [blame^] | 31 | :param some_arg: Some argument. |
| 32 | """ |
Laurens Van Houtven | 380a369 | 2013-08-07 11:03:40 +0200 | [diff] [blame] | 33 | |
| 34 | So, specifically: |
| 35 | |
| 36 | - Always use three double quotes. |
| 37 | - Put the three double quotes on their own line. |
| 38 | - No blank line at the end. |
Hynek Schlawack | 2ae675d | 2013-08-07 21:01:07 +0200 | [diff] [blame] | 39 | - Use Sphinx parameter/attribute documentation `syntax`_. |
| 40 | |
| 41 | |
| 42 | .. _`PEP 8`: http://www.peps.io/8/ |
| 43 | .. _`syntax`: http://sphinx-doc.org/domains.html#info-field-lists |