1 Star 0 Fork 0

shzgamelife / recommenders

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
tox.ini 3.18 KB
一键复制 编辑 原始数据 按行查看 历史
Jianjie Liu 提交于 2021-10-21 20:11 . Shorten code coverage report
[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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shzgamelife/recommenders.git
git@gitee.com:shzgamelife/recommenders.git
shzgamelife
recommenders
recommenders
main

搜索帮助

344bd9b3 5694891 D2dac590 5694891