author | Philippe Pepiot <ph@itsalwaysdns.eu> |
Tue, 31 Mar 2020 18:12:20 +0200 | |
changeset 12965 | a6d19bc7fed3 |
parent 12793 | 752de3f8cb3e |
permissions | -rw-r--r-- |
11602
0737f481b358
Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
1 |
[tox] |
11144
fd8bf29ed00e
[tox] Generate test environments for Python 2.7 and 3.4
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11072
diff
changeset
|
2 |
envlist = |
11474
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
3 |
check-manifest,flake8, |
12793
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
4 |
py3-{server,web,misc}, |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
5 |
doc8 |
11602
0737f481b358
Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
6 |
|
0737f481b358
Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
7 |
[testenv] |
12567
26744ad37953
Drop python2 support
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12530
diff
changeset
|
8 |
basepython=python3 |
10975
6615ecb60244
[tox] Use generating environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
10900
diff
changeset
|
9 |
deps = |
11478
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
10 |
-r{toxinidir}/requirements/dev.txt |
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
11 |
misc: -r{toxinidir}/requirements/test-misc.txt |
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
12 |
server: -r{toxinidir}/requirements/test-server.txt |
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
13 |
web: -r{toxinidir}/requirements/test-web.txt |
10976
b150016e476c
[tox] Ensure pytest gets run with virtualenv's python
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
10975
diff
changeset
|
14 |
commands = |
12628
7b89cad574f8
Install patched yapps for test from an http archive
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
12567
diff
changeset
|
15 |
misc: {envpython} -m pip install --upgrade --no-deps --quiet https://github.com/logilab/yapps/tarball/master#egg=yapps |
11631 | 16 |
misc: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/test {toxinidir}/cubicweb/dataimport/test {toxinidir}/cubicweb/devtools/test {toxinidir}/cubicweb/entities/test {toxinidir}/cubicweb/ext/test {toxinidir}/cubicweb/hooks/test {toxinidir}/cubicweb/sobjects/test {toxinidir}/cubicweb/wsgi/test {toxinidir}/cubicweb/pyramid/test |
11478
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
17 |
server: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/server/test |
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
18 |
web: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test |
10512 | 19 |
|
11474
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
20 |
[testenv:flake8] |
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
21 |
skip_install = true |
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
22 |
deps = |
12432
2fcb53ee5178
Fix flake8 issues since release 3.6.0
Philippe Pepiot <philippe.pepiot@logilab.fr>
parents:
12354
diff
changeset
|
23 |
flake8 >= 3.6 |
11811
f09efeead7f9
Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11744
diff
changeset
|
24 |
whitelist_externals = |
f09efeead7f9
Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11744
diff
changeset
|
25 |
/bin/sh |
f09efeead7f9
Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11744
diff
changeset
|
26 |
commands = /bin/sh -c "flake8 `xargs -a {toxinidir}/flake8-ok-files.txt`" |
11474
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
27 |
|
10512 | 28 |
[testenv:doc] |
12092
09da91a5077b
[tox] Install "pyramid" dependencies in "doc" environment
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12072
diff
changeset
|
29 |
skip_install = true |
10518
d276e4b332ba
[tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
10512
diff
changeset
|
30 |
changedir = doc |
d276e4b332ba
[tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
10512
diff
changeset
|
31 |
deps = |
d276e4b332ba
[tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
10512
diff
changeset
|
32 |
sphinx |
12092
09da91a5077b
[tox] Install "pyramid" dependencies in "doc" environment
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12072
diff
changeset
|
33 |
-r{toxinidir}/requirements/doc.txt |
11390
e5453b19bc6e
[tox] Ensure virtualenv's python is used to build the documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11354
diff
changeset
|
34 |
commands = |
12102
392d5d09f0ef
[tox] Simplify command line to build the doc
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12092
diff
changeset
|
35 |
{envpython} -m sphinx -b html -d {envtmpdir}/doctrees . {envtmpdir}/html |
11250
597f02c5cf5a
[tox] Use py.test to run tests
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11249
diff
changeset
|
36 |
|
11453
3522d2a3389e
[pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11419
diff
changeset
|
37 |
[testenv:check-manifest] |
3522d2a3389e
[pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11419
diff
changeset
|
38 |
skip_install = true |
11630
1400aee10df4
Port to Python3 (closes #14159555)
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11624
diff
changeset
|
39 |
deps = |
11453
3522d2a3389e
[pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11419
diff
changeset
|
40 |
check-manifest |
11602
0737f481b358
Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff
changeset
|
41 |
commands = |
12714
27ea20b1915f
[tox] Remove --ignore in check-manifest check
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12628
diff
changeset
|
42 |
{envpython} -m check_manifest {toxinidir} |
11453
3522d2a3389e
[pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11419
diff
changeset
|
43 |
|
12793
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
44 |
[testenv:doc8] |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
45 |
skip_install = true |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
46 |
commands= |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
47 |
doc8 --ignore-path doc/_build --ignore-path .tox --ignore-path .hg doc |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
48 |
|
11250
597f02c5cf5a
[tox] Use py.test to run tests
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11249
diff
changeset
|
49 |
[pytest] |
597f02c5cf5a
[tox] Use py.test to run tests
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11249
diff
changeset
|
50 |
python_files = *test_*.py |
12244
6a71cb23f827
Disable pytest's logs reporting
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
12229
diff
changeset
|
51 |
log_print = false |
11474
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
52 |
|
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
53 |
[flake8] |
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
54 |
format = pylint |
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
55 |
ignore = W503 |
28311db7a2a5
[tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
11465
diff
changeset
|
56 |
max-line-length = 100 |
11911
37726f66ff82
[tox] Drop "exclude" option from flake8 config and adjust flake8-ok-files.txt accordingly
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11830
diff
changeset
|
57 |
exclude = doc/*,.tox/* |
11631 | 58 |
|
12793
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
59 |
[doc8] |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
60 |
#max-line-length=199 |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
61 |
#ignore-path-errors=SOURCES.txt;D005 |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
62 |
# D000 - Interpreted text role "index" everywhere |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
63 |
# D001 - line too long... to much of it right now |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
64 |
ignore=D000,D001,D005 |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
65 |
# FIXME - can't get ignore-path-error to ignore D000, so ignoring files |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
66 |
ignore-path=doc/_build |
752de3f8cb3e
[tox] add doc8 target to test documentation
Arthur Lutz <arthur.lutz@logilab.fr>
parents:
12714
diff
changeset
|
67 |
extension=.rst |
11478
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
68 |
|
1817f8946c22
[tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
11475
diff
changeset
|
69 |
# vim: wrap sts=2 sw=2 |