forked from snowflakedb/snowflake-sqlalchemy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
78 lines (70 loc) · 2.76 KB
/
tox.ini
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
[tox]
envlist = fix_lint,
py{35,36,37}{-pandas,},
coverage
skipdist = true
skip_missing_interpreters = true
requires =
tox-external-wheels>=0.1.6
[testenv]
description = run the tests with pytest under {basepython}
extras = development
deps = pip
external_wheels =
!pandas-py35: ../../dist/docker/repaired_wheels/*35*.whl[development] ../../dist/*sqlalchemy*.whl
pandas-py35: ../../dist/docker/repaired_wheels/*35*.whl[pandas,development] ../../dist/*sqlalchemy*.whl
!pandas-py36: ../../dist/docker/repaired_wheels/*36*.whl[development] ../../dist/*sqlalchemy*.whl
pandas-py36: ../../dist/docker/repaired_wheels/*36*.whl[pandas,development] ../../dist/*sqlalchemy*.whl
!pandas-py37: ../../dist/docker/repaired_wheels/*37*.whl[development] ../../dist/*sqlalchemy*.whl
pandas-py37: ../../dist/docker/repaired_wheels/*37*.whl[pandas,development] ../../dist/*sqlalchemy*.whl
setenv =
COVERAGE_FILE = {env:COVERAGE_FILE:{toxworkdir}/.coverage.{envname}}
commands = pytest \
--cov "snowflake.sqlalchemy" \
--junitxml {toxworkdir}/junit.{envname}.xml \
{posargs} test
[testenv:coverage]
description = [run locally after tests]: combine coverage data and create report;
generates a diff coverage against origin/master (can be changed by setting DIFF_AGAINST env var)
deps = {[testenv]deps}
coverage >= 4.4.1, < 5
diff_cover
skip_install = True
passenv = DIFF_AGAINST
setenv = COVERAGE_FILE={toxworkdir}/.coverage
commands = coverage combine
coverage report -m
coverage xml -o {toxworkdir}/coverage.xml
coverage html -d {toxworkdir}/htmlcov
diff-cover --compare-branch {env:DIFF_AGAINST:origin/master} {toxworkdir}/coverage.xml
depends = py35, py36, py37, pypy, pypy3
[testenv:flake8]
description = check code style with flake8
skip_install = true
deps = flake8
commands = flake8 {posargs}
[testenv:fix_lint]
description = format the code base to adhere to our styles, and complain about what we cannot do automatically
passenv =
PROGRAMDATA
deps =
{[testenv]deps}
pre-commit >= 1.14.4, < 2
skip_install = True
commands = /bin/bash -c 'pre-commit run --files **/*'
python -c 'import pathlib; print("hint: run \{\} install to add checks as pre-commit hook".format(pathlib.Path(r"{envdir}") / "bin" / "pre-commit"))'
[testenv:dev]
description = create dev environment
extras = pandas, development
usedevelop = True
commands = python -m pip list --format=columns
python -c "print(r'{envpython}')"
[pytest]
addopts = -ra
junit_family=legacy
[isort]
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
line_length = 120
known_third_party =conftest,mock,numpy,pandas,parameters,pytest,pytz,setuptools,six,snowflake,sqlalchemy