tox.ini
author Philippe Pepiot <ph@itsalwaysdns.eu>
Tue, 31 Mar 2020 18:22:05 +0200
changeset 12966 6cd938c29ca3
parent 12793 752de3f8cb3e
permissions -rw-r--r--
[server] Make connection pooler configurable and set better default values Drop the configuration connections-pool-size and add new configurations options: * connections-pool-min-size. Set to 0 by default so we open connections only when needed. This avoid opening min-size*processes connections at startup, which is, it think, a good default. * connections-pool-max-size. Set to 0 (unlimited) by default, so we move the bottleneck to postgresql. * connections-idle-timeout. Set to 10 minutes. I don't have arguments about this except that this is the default in pgbouncer.

[tox]
envlist =
  check-manifest,flake8,
  py3-{server,web,misc},
  doc8

[testenv]
basepython=python3
deps =
  -r{toxinidir}/requirements/dev.txt
  misc: -r{toxinidir}/requirements/test-misc.txt
  server: -r{toxinidir}/requirements/test-server.txt
  web: -r{toxinidir}/requirements/test-web.txt
commands =
  misc: {envpython} -m pip install --upgrade --no-deps --quiet https://github.com/logilab/yapps/tarball/master#egg=yapps
  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
  server: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/server/test
  web: {envpython} -m pytest {posargs} {toxinidir}/cubicweb/web/test

[testenv:flake8]
skip_install = true
deps =
  flake8 >= 3.6
whitelist_externals =
  /bin/sh
commands = /bin/sh -c "flake8 `xargs -a {toxinidir}/flake8-ok-files.txt`"

[testenv:doc]
skip_install = true
changedir = doc
deps =
  sphinx
  -r{toxinidir}/requirements/doc.txt
commands =
  {envpython} -m sphinx -b html -d {envtmpdir}/doctrees .  {envtmpdir}/html

[testenv:check-manifest]
skip_install = true
deps =
  check-manifest
commands =
  {envpython} -m check_manifest {toxinidir}

[testenv:doc8]
skip_install = true
commands=
    doc8 --ignore-path doc/_build --ignore-path .tox --ignore-path .hg doc

[pytest]
python_files = *test_*.py
log_print = false

[flake8]
format = pylint
ignore = W503
max-line-length = 100
exclude = doc/*,.tox/*

[doc8]
#max-line-length=199
#ignore-path-errors=SOURCES.txt;D005
# D000 - Interpreted text role "index" everywhere
# D001 - line too long... to much of it right now
ignore=D000,D001,D005
# FIXME - can't get ignore-path-error to ignore D000, so ignoring files
ignore-path=doc/_build
extension=.rst

# vim: wrap sts=2 sw=2