代码拉取完成,页面将自动刷新
[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, cpu, gpu, spark, all
# Default env settings
[testenv]
# 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:cpu]
# i.e: 'pip install recommenders-*.whl[dev]'
# with this dependency subset, we should be able to run the test markers:
# 1. "not notebooks and not spark and not gpu" (tests for general sdk utilities)
# 2. "notebooks and not spark and not gpu" (tests for notebook example without extra dependencies)
extras = dev,examples
[testenv:gpu]
# with this dependency subset, we should be able to run the test markers:
# 1. "gpu and not notebook and not spark" (tests for gpu utilities)
# 2. "gpu and notebooks and not spark" (tests for notebooks needing gpu resources)
extras = dev,gpu,examples
[testenv:spark]
# with this dependency subset, we should be able to run the test markers:
# 1. "spark and not notebook and not spark" (test for spark utilities)
# 2. "spark and notebooks and not spark" (tests for notebook using spark)
extras = dev,spark,examples
[testenv:all]
# i.e: 'pip install recommenders-*.whl[all]'
# with this, we should be able to run ANY tests
extras = all
[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 10
--cov-append --cov=recommenders --cov-report=term --cov-report=xml --junitxml=junit/test-results.xml
[coverage:report]
skip_empty = true
skip_covered = true
[flake8]
ignore =
W503 # line break before binary operator
E203 # whitespace before ':'
# File-specific flake8 ignore rules
per-file-ignores =
# F403 'from X import *'
# F405 'X' may be undefined, or defined from star imports
recommenders/models/vae/*_vae.py:F403,F405
max-line-length = 180
exclude =
build, dist, docs, examples, contrib,
tests
.env*,.venv* # local virtual environments
.tox
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。