-
Notifications
You must be signed in to change notification settings - Fork 3
/
tox.ini
51 lines (45 loc) · 1.44 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
[pytest]
script_launch_mode = subprocess
[tox]
# check: https://tox.readthedocs.io/en/latest/config.html#generating-environments-conditional-settings
envlist = py{37,38,39,py3}-allennlp{2.5.0,2.8.0,2.9.3},lint
[testenv]
passenv = WANDB_API_KEY
setenv = DATA_PATH = {toxinidir}/tests/data
deps =
{toxinidir}
pytest
pytest-console-scripts
allennlp2.5.0: allennlp==2.5.0
allennlp2.5.0: wandb==0.10.11
allennlp2.8.0: allennlp==2.8.0
allennlp2.8.0: wandb==0.12.10
allennlp2.9.3: allennlp==2.9.3
allennlp2.9.3: wandb==0.12.15
changedir={toxinidir}/tests
# based the nltk download is based on https://github.com/allenai/allennlp/pull/5540/files
# it can be removed after the support for older versions of allennlp is dropped.
commands =
python -c 'import nltk; [nltk.download(p) for p in ("wordnet", "wordnet_ic", "sentiwordnet", "omw", "omw-1.4")]'
pytest
[testenv:lint]
basepython = python3.8
changedir = {toxinidir}
deps =
# check-manifest
# readme_renderer[md]
flake8
# flake8-docstrings
# flake8-commas
# pep8-naming
# twine
commands =
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# check-manifest --ignore *.ini,tests*,.*.yml,demo*
# twine check .tox/dist/*
# flake8 pytest_console_scripts.py setup.py tests
[flake8]
exclude = .tox,*.egg,build
select = E,W,F
ignore = W503,W504