mirror of
https://github.com/certbot/certbot.git
synced 2026-06-06 15:22:38 -04:00
Policies for pull requests. Coding style.
This commit is contained in:
parent
73137b404a
commit
1a25b3d7cd
1 changed files with 42 additions and 2 deletions
44
README.md
44
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue