Policies for pull requests. Coding style.

This commit is contained in:
Jakub Warmuz 2014-11-29 21:59:46 +01:00
parent 73137b404a
commit 1a25b3d7cd

View file

@ -53,9 +53,49 @@ sudo ./venv/bin/letsencrypt
## Hacking
1. Bootstrap: `./venv/bin/python setup.py dev`
In order to start hacking, you will first have to create a development
environment:
2. Test code base: `./venv/bin/tox`
`./venv/bin/python setup.py dev`
The code base, including your pull requests, **must have 100% test
statement coverage and be compliant with the [coding
style](#coding-style)**. The following tools are there to help you:
- `./venv/bin/tox` starts a full set of tests. Please make sure you
run it before submitting a new pull request.
- `./venv/bin/tox -e cover` checks the test coverage only.
- `./venv/bin/tox -e lint` checks the style of the whole project,
while `./venv/bin/pylint file` will check a single `file` only.
### Coding style
Most importantly, *be consistent with the rest of the code*, please.
1. Read [PEP 8 - Style Guide for PythonCode]
(https://www.python.org/dev/peps/pep-0008).
2. Follow [Google Python Style Guide]
(https://google-styleguide.googlecode.com/svn/trunk/pyguide.html),
with the following exception that we use
[Sphinx](http://sphinx-doc.org/)-style documentation:
```python
def foo(arg):
"""Short description.
:param int arg: Some number.
:returns: Argument
:rtype: int
"""
return arg
```
3. Remember to use `./venv/bin/pylint`.
## Command line usage