forked from recommenders-team/recommenders
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
67 lines (59 loc) · 2.22 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]
# py will use whatever the basepython `python` maps to from PATH
# you can use py38, for example, to chosse a different version
# See https://tox.readthedocs.io/en/latest/config.html#tox-environments
envlist = py
[testenv]
# Reading additional dependencies to run the test
# https://tox.readthedocs.io/en/latest/example/basic.html#depending-on-requirements-txt-or-defining-constraints
; deps = -rrequirements-dev.txt
# similar to 'pip install recommenders-*.whl[test]'
extras = all
commands =
# {posargs} will be substituded by arguments after the `--` when running.
# This will allow running subset of the test suite via tox.
#
# EX: tox -- -m "not spark and not gpu"
# will pass {-m "not spark and not gpu"} to `pytest`
# See https://tox.readthedocs.io/en/latest/example/general.html for more details
pytest {posargs}
[testenv:flake8]
deps = flake8
skip_install = True
commands = flake8 .
# Configurations for running pytest
[pytest]
log_cli = False
log_format = %(asctime)s %(levelname)s %(message)s
junit_family = xunit2
# This enable custom marker as decorator "@pytest.mark.gpu"
markers =
# markers allow to us to run faster subset of the test:
# EX: pytest -m "not spark and not gpu"
# See https://docs.pytest.org/en/stable/example/markers.html#registering-markers
deeprec: test deeprec model
sequential: test sequential model
notebooks: mark a test as notebooks test
smoke: mark a test as smoke test
integration: mark a test as integration test
gpu: mark a test as gpu test
spark: mark a test as spark test
vw: mark a test as vowpal wabbit test
testpaths =
tests
addopts =
# reports all (except passed tests). See https://docs.pytest.org/en/latest/usage.html#detailed-summary-report
-ra
--durations 0
--cov-append --cov=recommenders --cov-report=term-missing --cov-report=xml --junitxml=junit/test-results.xml
[flake8]
; # Configs for flake8-import-order, see https://pypi.org/project/flake8-import-order/ for more info.
; import-order-style=edited
; application-import-names=recommenders, tests
# Native flake8 configs
max-line-length = 140
exclude =
build, dist, docs, examples,
tests
.env*,.venv* # local virtual environments
.tox