nltk
/
tox.ini
122 строки · 2.4 Кб
1[tox]
2envlist =
3py{38,39,310,311,312}
4pypy
5py{38,39,310,311,312}-nodeps
6py{38,39,310,311,312}-jenkins
7py-travis
8
9[testenv]
10; simplify numpy installation
11setenv =
12LAPACK=
13ATLAS=None
14PYTHONWARNINGS=ignore
15
16; Copy all environment variables to the tox test environment
17passenv = *
18
19deps =
20numpy
21text-unidecode
22twython
23pyparsing
24pytest
25pytest-cov
26pytest-mock
27python-crfsuite
28regex
29click
30joblib
31tqdm
32matplotlib
33markdown-it-py
34mdit-py-plugins
35mdit-plain
36pyyaml
37
38changedir = nltk/test
39commands =
40; scipy and scikit-learn requires numpy even to run setup.py so
41; they can't be installed in one command
42pip install scipy scikit-learn
43
44; pytest --cov=nltk --cov-report html:{envdir}/docs nltk/test/
45pytest
46
47[testenv:pypy]
48; numpy is bundled with pypy; coverage is extra slow and
49; the coverage results are not that different from CPython.
50deps =
51pytest
52pytest-mock
53twython
54
55commands =
56pytest
57
58[testenv:py38-nodeps]
59basepython = python3.8
60deps =
61pytest
62pytest-mock
63commands = pytest
64
65[testenv:py39-nodeps]
66basepython = python3.9
67deps =
68pytest
69pytest-mock
70commands = pytest
71
72[testenv:py310-nodeps]
73basepython = python3.10
74deps =
75pytest
76pytest-mock
77commands = pytest
78
79[testenv:py311-nodeps]
80basepython = python3.11
81deps =
82pytest
83pytest-mock
84commands = pytest
85
86[testenv:py312-nodeps]
87basepython = python3.12
88deps =
89pytest
90pytest-mock
91commands = pytest
92
93# Use minor version agnostic basepython, but specify testenv
94# control Python2/3 versions using jenkins' user-defined matrix instead.
95# Available Python versions: http://repository-cloudbees.forge.cloudbees.com/distributions/ci-addons/python/fc25/
96
97[testenv:py-travis]
98extras = all
99setenv =
100NLTK_DATA = {homedir}/nltk_data/
101commands = {toxinidir}/tools/travis/coverage-pylint.sh
102
103[testenv:py-travis-third-party]
104extras = all
105setenv =
106STANFORD_MODELS = {homedir}/third/stanford-parser/
107STANFORD_PARSER = {homedir}/third/stanford-parser/
108STANFORD_POSTAGGER = {homedir}/third/stanford-postagger/
109NLTK_DATA = {homedir}/nltk_data/
110
111commands =
112{toxinidir}/tools/travis/third-party.sh
113{toxinidir}/tools/travis/coverage-pylint.sh
114
115[testenv:py3-runtime-check]
116; nltk should be runnable in an env with nothing installed
117basepython = python3
118deps =
119commands = python -c "import nltk"
120
121[isort]
122profile=black
123