File: tox.ini

package info (click to toggle)
python-etcd3 0.12.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 640 kB
  • sloc: python: 2,111; makefile: 165
file content (50 lines) | stat: -rw-r--r-- 1,755 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[tox]
envlist = py27, py34, py35, py36, flake8
skipsdist=True

[testenv:flake8]
commands=flake8 {posargs}

[testenv]
passenv = ETCD_ENDPOINT TEST_ETCD_VERSION
setenv =
    PYTHONPATH = {toxinidir}:{toxinidir}/etcd3
deps=
    -r{toxinidir}/requirements/base.txt
    -r{toxinidir}/requirements/test.txt
commands =
    pip install -U pip
    pifpaf -e PYTHON run etcd --cluster -- py.test --cov=etcd3 --cov-report= --basetemp={envtmpdir} {posargs}

[testenv:coverage]
deps=
    -r{toxinidir}/requirements/base.txt
    -r{toxinidir}/requirements/test.txt
commands = py.test --cov=etcd3 tests/

[testenv:genproto]
whitelist_externals = sed
deps = grpcio-tools
commands =
    sed -i -e '/gogoproto/d' etcd3/proto/rpc.proto
    sed -i -e 's/etcd\/mvcc\/mvccpb\/kv.proto/kv.proto/g' etcd3/proto/rpc.proto
    sed -i -e 's/etcd\/auth\/authpb\/auth.proto/auth.proto/g' etcd3/proto/rpc.proto
    sed -i -e '/google\/api\/annotations.proto/d' etcd3/proto/rpc.proto
    sed -i -e '/option (google.api.http)/,+3d' etcd3/proto/rpc.proto
    python -m grpc.tools.protoc -Ietcd3/proto \
        --python_out=etcd3/etcdrpc/ \
        --grpc_python_out=etcd3/etcdrpc/ \
        etcd3/proto/rpc.proto etcd3/proto/auth.proto etcd3/proto/kv.proto
    sed -i -e 's/import auth_pb2/from etcd3.etcdrpc import auth_pb2/g' etcd3/etcdrpc/rpc_pb2.py
    sed -i -e 's/import kv_pb2/from etcd3.etcdrpc import kv_pb2/g' etcd3/etcdrpc/rpc_pb2.py
    sed -i -e 's/import rpc_pb2/from etcd3.etcdrpc import rpc_pb2/g' etcd3/etcdrpc/rpc_pb2_grpc.py

[flake8]
exclude =  .venv,.git,.tox,dist,docs,*lib/python*,*egg,build,etcd3/etcdrpc/
application-import-names = etcd3
max-complexity = 10
# TODO add docstrings for public methods, modules, etc
ignore = D1

[travis]
python = 3.6: py36, flake8