-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
67 lines (62 loc) · 1.82 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
[tox]
; Use default Python interpreter (will run different Python images in CI)
envlist = py #py36,py37,py38
; The build system may have conflicting dependencies: create a separate env. for it.
isolated_build = True
; Configuration for the build environment
[tox:.package]
; Poetry requires python3 to work
basepython = python3
; Configure the core test env. and commands here.
; We use pytest
; Run tests using `tox` directly
; It will:
; - create an env. for the build system, detect it in `pyproject.toml` and install it
; - run the build to produce the package for current module
; - create a test env. and install our packages and its dependencies in it
; - add extra dependencies for testing (`pytest` here)
; - run the test commands
[testenv]
deps =
pytest
commands =
python --version
pytest
; Extra target to facilitate running the linter with appropriate options
; Run using `tox -e lint`
[testenv:lint]
basepython = python3
skip_install = true
deps =
flake8
commands =
python --version
flake8 --version
flake8 directory_annotator_storage
; flake8 configuration
[flake8]
select = F,E7,E9,W1,W6 ;C
exclude =
; No need to traverse our git directory
.git,
; There's no value in checking cache directories
__pycache__,
; This contains builds of flake8 that we don't want to check
dist
; max-complexity = 10
show-source = true
max-line-length = 120
; This may run the server with a quick installation to a dedicated venv
[testenv:serve]
basepython = python3
; skip_install = true
allowlist_externals =
echo
test
; allow external definition of the path to the settings file
passenv =
SODUCO_SETTINGS
commands =
echo "Testing file '{env:SODUCO_SETTINGS}' exists before running (see README.md instructions if this fails)..."
test -e {env:SODUCO_SETTINGS}
python -m flask run