-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
55 lines (44 loc) · 1.27 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
# Tox is a generic virtualenv management and test command line tool. Its goal is to
# standardize testing in Python. We will be using it extensively in this course.
# Using Tox we can (on multiple operating systems):
# + Eliminate PYTHONPATH challenges when running scripts/tests
# + Eliminate virtualenv setup confusion
# + Streamline steps such as model training, model publishing
[tox]
min_version = 4
envlist = test_package, checks
skipsdist = True
[testenv]
basepython = python
install_command = pip install {opts} {packages}
allowlist_externals = train
setenv =
PYTHONPATH=.
PYTHONHASHSEED=0
[testenv:test_package]
envdir = {toxworkdir}/test_package
deps =
-r{toxinidir}/requirements/test_requirements.txt
commands=
python classification_model/train_pipeline.py
pytest \
-s \
-vv \
{posargs:tests/}
[testenv:train]
envdir = {toxworkdir}/test_package
deps =
{[testenv:test_package]deps}
commands=
python classification_model/train_pipeline.py
[testenv:checks]
envdir = {toxworkdir}/checks
deps =
-r{toxinidir}/requirements/typing_requirements.txt
commands =
flake8 classification_model tests
isort classification_model tests
{posargs:mypy classification_model}
[flake8]
exclude = .git,env
max-line-length = 100