From 1a25b3d7cdfec93f81cedf095581cb12421744b9 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 29 Nov 2014 21:59:46 +0100 Subject: [PATCH 1/4] Policies for pull requests. Coding style. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 42 insertions(+), 2 deletions(-) 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 From 9bc369f5a9138189e5da77ef76e161bc869b526e Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 29 Nov 2014 22:10:30 +0100 Subject: [PATCH 2/4] Fix markdown bold fail --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df800854d..241e1e8ed 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ style](#coding-style)**. The following tools are there to help you: ### Coding style -Most importantly, *be consistent with the rest of the code*, please. +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). From 49413cb9d239c7fca65931427d1346574cf16ebf Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 29 Nov 2014 22:11:40 +0100 Subject: [PATCH 3/4] README: -following --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 241e1e8ed..2516c79b6 100644 --- a/README.md +++ b/README.md @@ -79,8 +79,8 @@ Most importantly, **be consistent with the rest of the code**, please. 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: +with the exception that we use [Sphinx](http://sphinx-doc.org/)-style +documentation: ```python def foo(arg): From f116a8fc8eac8f60c3a0537fef0247fcbb4bc1de Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 29 Nov 2014 22:12:20 +0100 Subject: [PATCH 4/4] Add missing whitespace to README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2516c79b6..3b763fd58 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ style](#coding-style)**. The following tools are there to help you: Most importantly, **be consistent with the rest of the code**, please. -1. Read [PEP 8 - Style Guide for PythonCode] +1. Read [PEP 8 - Style Guide for Python Code] (https://www.python.org/dev/peps/pep-0008). 2. Follow [Google Python Style Guide]