diff --git a/README.md b/README.md index 3489a36b8..df800854d 100644 --- a/README.md +++ b/README.md @@ -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