forked from phurwicz/hover
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
112 lines (97 loc) · 2.29 KB
/
Copy pathtox.ini
File metadata and controls
112 lines (97 loc) · 2.29 KB
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
[tox]
envlist = py38, py39, py310
[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
[testenv:test_api]
deps =
# standard testing
pytest
coverage
# text generation
faker
# pseudo-random str-to-float
shaffle
# common NLP and vectorizers
spacy
# dimensionality reduction
ivis[cpu]>=1.7
# distant supervision
snorkel>=0.9.8
# utility wrappers
wrappy>=0.2.6
# exporting excel files
openpyxl
commands =
# get extra dependencies that deps do not cover
python -m spacy download en_core_web_md
# run tests and get coverage report
coverage run --source=./hover -m pytest {posargs}
coverage xml -o cobertura.xml
install_command =
python -m pip install --upgrade {opts} {packages}
[testenv:test_api_lite]
# low-dependency fast test suite for compatibility
deps =
pytest
faker
shaffle
spacy
snorkel>=0.9.8
wrappy>=0.2.6
openpyxl
commands =
python -m spacy download en_core_web_md
# run tests with "lite" mark
pytest -m lite {posargs}
install_command =
python -m pip install --upgrade {opts} {packages}
[testenv:test_doc_scripts]
allowlist_externals =
git
cp
rm
deps = -rdocs/pipelines/requirements-doc-scripts.txt
commands =
python -m spacy download en_core_web_md
git clone https://github.com/phurwicz/hover-binder
cp -r hover-binder/local_lib ./local_lib
cp -r hover-binder/custom_cache ./custom_cache
rm -rf hover-binder
python docs/pipelines/check_scripts.py
rm -rf local_lib
rm -rf custom_cache
[testenv:test_notebook_generation]
allowlist_externals =
mkdir
deps = -rdocs/pipelines/requirements-doc-scripts.txt
commands =
python -m spacy download en_core_web_md
mkdir custom_cache
python docs/pipelines/generate_notebooks.py
[testenv:install]
commands =
python setup.py install {posargs}
[testenv:publish]
allowlist_externals =
rm
deps =
twine
commands =
python setup.py sdist bdist_wheel
twine check dist/*
twine upload dist/*
rm -rf build dist hover.egg-info
[flake8]
ignore =
# black breaks these
E203,
E501,
W503,
per-file-ignores =
# "imported but unused": intended in __init__ files
__init__.py: F401
exclude = .git,__pycache__,docs,build,dist
max-complexity = 10