tox.ini
author Sylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 18 Jan 2017 15:04:27 +0100
branch3.24
changeset 11904 e760c54490b1
parent 11830 535e54210332
child 11911 37726f66ff82
permissions -rw-r--r--
[migration] Fix addition of entity type including boundary constraints on its own attributes This was failing because of the sequence of sql executing when adding an attribute: 1. add entity type <commit> 2. add relation type for attribute 1 <commit> 3. add attribute 1 and associated constraints <commit> etc. In the case of e.g. start/end constraint, we were trying to add the constraint before addition of the constrained attribute (e.g. add constraint on 'start' referencing 'end', but only 'start' has been added yet, not 'end'). This patch fix this by: * adding the relation type to the schema without having to commit, but keeping the operation to revert the addition if necessary - this allows to a single commit for all attributes of the entity type ; * using a LateOperation on constraint operation, so we ensure attributes are actually added before any constraint is added.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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,
11478
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
     4
  py{27,34}-{server,web,misc}
11602
0737f481b358 Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     5
0737f481b358 Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     6
[testenv]
10512
99bdd4bddd77 Add tox.ini file
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     7
sitepackages = True
11179
104d41c99180 [tox] Enable all applicable py34 environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11144
diff changeset
     8
whitelist_externals =
104d41c99180 [tox] Enable all applicable py34 environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11144
diff changeset
     9
  /usr/bin/touch
10975
6615ecb60244 [tox] Use generating environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10900
diff changeset
    10
deps =
11478
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    11
  -r{toxinidir}/requirements/dev.txt
11744
a6dc650bc230 [test] Replace logilab-common's with_tempdir by tempfile.TemporaryDirectory
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11714
diff changeset
    12
  py27: backports.tempfile
11478
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    13
  misc: -r{toxinidir}/requirements/test-misc.txt
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    14
  server: -r{toxinidir}/requirements/test-server.txt
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    15
  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
    16
commands =
11478
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    17
  py34: touch {envdir}/share/cubicweb/cubes/__init__.py
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    18
  misc: {envpython} -m pip install --upgrade --no-deps --quiet git+git://github.com/logilab/yapps@master#egg=yapps
11631
faf279e33298 Merge with pyramid-cubicweb
Yann Voté <yann.vote@logilab.fr>
parents: 11478 11630
diff changeset
    19
  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
    20
  py27-misc: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/etwist/test
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    21
  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
    22
  web: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test
10512
99bdd4bddd77 Add tox.ini file
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
    23
11474
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    24
[testenv:flake8]
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    25
skip_install = true
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    26
deps =
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    27
  flake8 >= 3
11811
f09efeead7f9 Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11744
diff changeset
    28
whitelist_externals =
f09efeead7f9 Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11744
diff changeset
    29
  /bin/sh
f09efeead7f9 Fix broken flake8 configuration
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11744
diff changeset
    30
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
    31
10512
99bdd4bddd77 Add tox.ini file
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
    32
[testenv:doc]
10518
d276e4b332ba [tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10512
diff changeset
    33
changedir = doc
d276e4b332ba [tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10512
diff changeset
    34
deps =
d276e4b332ba [tox] Update doc testenv to account for documentation restructuring
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 10512
diff changeset
    35
  sphinx
11390
e5453b19bc6e [tox] Ensure virtualenv's python is used to build the documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11354
diff changeset
    36
commands =
e5453b19bc6e [tox] Ensure virtualenv's python is used to build the documentation
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11354
diff changeset
    37
  {envpython} -c 'import sphinx; sphinx.main()' -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
    38
11453
3522d2a3389e [pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11419
diff changeset
    39
[testenv:check-manifest]
3522d2a3389e [pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11419
diff changeset
    40
skip_install = true
11630
1400aee10df4 Port to Python3 (closes #14159555)
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11624
diff changeset
    41
deps =
11453
3522d2a3389e [pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11419
diff changeset
    42
  check-manifest
11602
0737f481b358 Add a tox configuration
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
    43
commands =
11830
535e54210332 [tox] Use `python -m check_manifest` instead of check-manifest program
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11811
diff changeset
    44
  {envpython} -m check_manifest {toxinidir} \
11465
10ecd586a9a8 [tox] Exclude symlinks from check-manifest call
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11453
diff changeset
    45
# ignore symlinks that are not recognized by check-manifest, see
10ecd586a9a8 [tox] Exclude symlinks from check-manifest call
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11453
diff changeset
    46
# https://github.com/mgedmin/check-manifest/issues/69
11684
122eacf5210b [tox] Exclude all files in symlinked directories from check-manifest call
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11683
diff changeset
    47
    --ignore cubicweb/devtools/test/data/cubes/i18ntestcube*,cubicweb/test/data/legacy_cubes*
11453
3522d2a3389e [pkg] Add missing entries to MANIFEST.in
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11419
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
11474
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    51
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    52
[flake8]
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    53
format = pylint
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    54
ignore = W503
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    55
max-line-length = 100
28311db7a2a5 [tox] Basic flake8 config
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents: 11465
diff changeset
    56
exclude = setup.py,doc/*,cubicweb/misc/*,cubicweb/test/*,cubicweb/*/test/*,.tox/*
11631
faf279e33298 Merge with pyramid-cubicweb
Yann Voté <yann.vote@logilab.fr>
parents: 11478 11630
diff changeset
    57
11478
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    58
1817f8946c22 [tox] Have less test environments
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11475
diff changeset
    59
# vim: wrap sts=2 sw=2