-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathtox.ini
83 lines (69 loc) · 2.2 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
79
80
81
82
83
#
# Copyright (C) 2020 Dremio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
[tox]
envlist = py38, py39, py310, py311, py312, format, lint, safety, docs, docs_sync_check
[gh-actions]
python =
# docs needs to run before docs_sync_check
3.8: py38, lint, safety, docs, docs_sync_check
3.9: py39
3.10: py310
3.11: py311
3.12: py312
[testenv:format]
basepython = python
deps =
-r{toxinidir}/requirements_lint.txt
commands =
isort pynessie tests tools
black pynessie tests tools
[testenv:lint]
basepython = python
deps =
-r{toxinidir}/requirements_lint.txt
commands =
# flake8 includes black check due to flake8-black
# flake8 includes isort check which checks for import order due to flake8-isort
flake8 pynessie tests tools
pylint --jobs=0 pynessie tests tools
mypy --install-types --non-interactive -p pynessie -p tests -p tools
[testenv:safety]
basepython = python
deps = safety
commands =
# using separate env because of https://github.com/pyupio/safety/issues/455
# note that requirements_lint.txt imports all other requirement files
safety check --file requirements_lint.txt --ignore 67599
[testenv:docs]
basepython = python
deps =
-r{toxinidir}/requirements_dev.txt
commands =
python tools/generate_docs.py
[testenv:docs_sync_check]
allowlist_externals=
bash
git
commands =
bash -c 'changed_docs=$(git status --porcelain {toxinidir}/docs); if [ -n "$changed_docs" ]; then echo "Docs are out of sync: $changed_docs"; exit 1; fi'
[testenv]
setenv =
PYTHONPATH = {toxinidir}
passenv = TOXENV,CI,CODECOV_*,NESSIE_TEST_IMAGE
deps =
-r{toxinidir}/requirements_basedev.txt
commands =
pytest --cov=pynessie --basetemp={envtmpdir} --cov-report=xml