代码拉取完成,页面将自动刷新
[tox]
minversion=3.7
envlist = codemod,black,mypy,flake8,py36,py27,py37,py38,py39,cover
[testenv]
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements_dev.txt
pytest
pytest-cov
pytest-xdist
pytest-flask
pytest-mock<=3.2.0
pytest-timeout
pytest-openfiles
pytest-flakefinder
passenv = USERNAME
setenv =
py{27,35,36,37,38,39}: COVERAGE_FILE={envdir}/.coverage
py{37}: WINDIR=C:\\Windows
# Pytorch installations on non-darwin need the `-f`
whitelist_externals =
mkdir
# Workaround for bug with fastparquet and numpy<0.20 ("numpy.ndarray size changed, may indicate binary incompatibility")
commands_pre =
py{36,37,38}: pip install fastparquet
commands =
py{35,36,37,38,39}: ipython kernel install --user --name=wandb_python
mkdir -p test-results
python -m pytest --junitxml=test-results/junit.xml --cov-config=tox.ini --cov=wandb --cov=tests/ --cov-report= --no-cov-on-fail --ignore=wandb/sweeps --ignore=build/ {posargs:tests/ wandb/sweeps/}
[testenv:py27]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:py35]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:py36]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:py37]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:py38]
install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:py39]
# install_command = pip install -f https://download.pytorch.org/whl/torch_stable.html {opts} {packages}
[testenv:dev]
usedevelop = true
basepython = python3
commands = ipython
[testenv:codemod]
basepython=python3
skip_install = true
deps =
libcst
commands=
/bin/bash -c './tools/strip_type_annotations.sh'
[testenv:bumpversion-to-dev]
basepython=python3
skip_install = true
deps =
bumpversion==0.5.3
commands=
python ./tools/bumpversion-tool.py --to-dev {posargs}
[testenv:bumpversion-from-dev]
basepython=python3
skip_install = true
deps =
bumpversion==0.5.3
commands=
python ./tools/bumpversion-tool.py --from-dev {posargs}
[testenv:codemodcheck]
basepython=python3
skip_install = true
deps =
libcst
commands=
/bin/bash -c './tools/strip_type_annotations.sh --check'
[testenv:protocheck]
basepython=python3
skip_install = true
whitelist_externals =
cp
rm
diff
deps =
grpcio==1.27.2
grpcio-tools==1.27.2
mypy-protobuf==1.23
changedir={toxinidir}/wandb/proto
commands=
rm -rf {toxinidir}/wandb/proto_check/
cp -r {toxinidir}/wandb/proto/ {toxinidir}/wandb/proto_check/
python wandb_internal_codegen.py
diff {toxinidir}/wandb/proto/ {toxinidir}/wandb/proto_check/
[testenv:proto]
basepython=python3
skip_install = true
deps =
grpcio==1.27.2
grpcio-tools==1.27.2
mypy-protobuf==1.23
changedir={toxinidir}/wandb/proto
commands=
python wandb_internal_codegen.py
[testenv:flake8]
basepython=python3
skip_install = true
deps =
flake8
flake8-colors
flake8-bugbear
pep8-naming
flake8-fixme
flake8-typing-imports>=1.1
flake8-import-order>=0.9
flake8-docstrings>=1.3.1
commands =
flake8
[testenv:pylint]
basepython=python3
deps=pylint
commands=
pylint -rn --rcfile={toxinidir}/.pylintrc wandb.sdk
[testenv:mypy]
basepython=python3
skip_install = true
deps=
mypy
lxml
setenv =
MYPYPATH = {toxinidir}
commands=
mypy --show-error-codes --config-file {toxinidir}/mypy.ini -p wandb --html-report mypy-results/
[testenv:coverage]
basepython=python3
deps=
coverage
pytest
commands=
coverage run --source wandb -m pytest
coverage report -m
[testenv:yapf]
basepython=python3
skip_install = true
deps=
yapf
commands=
/bin/bash -c 'yapf -d {toxinidir}/wandb/sdk/*.py'
[testenv:format]
basepython=python3
skip_install = true
deps=
black==19.10b0
commands=
black wandb/ tests/
[testenv:black]
basepython=python3
skip_install = true
deps=
black==19.10b0
commands=
black --check wandb/ tests/
[flake8]
max-line-length = 88
# ignore = D203, W503, E203
ignore =
# TODO()'s are allowed for now
T101,
W503,
# allow long lines, lets use blacks rules
E501,
# ignore space after comma rule, let black rule
E231,
# ignore whitespace before ':' (incompatible with black)
E203,
# select = C,E,F,W,B,B901,I,N
per-file-ignores =
tools/*:D
wandb/*:D
wandb/cli/cli.py:E501,C901,I202,E203,D # conflict with black
wandb/sdk/wandb_watch.py:E501,D
wandb/lib/git.py:E501,D
wandb/wandb_controller.py:N803,N806,D
wandb/apis/public.py:B006,D
wandb/sdk/wandb_run.py:D1,D2,D3,D4
wandb/sdk/wandb_init.py:D1,D2,D3,D4
exclude =
.tox,
.git,
__pycache__,
docs/source/conf.py,
docs/*.py,
build,
dist,
tests/fixtures/*,
tests/,
codemod/,
standalone_tests/,
wandb/__init__.py,
wandb/wandb_torch.py,
wandb/bin,
wandb/data/,
wandb/errors/,
wandb/old/,
wandb/sdk_py27/,
wandb/proto/,
wandb/proto_check/,
wandb/util.py,
wandb/env.py,
wandb/sweeps/,
wandb/integration/magic.py,
wandb/integration/keras/,
wandb/integration/tensorboard/,
wandb/integration/lightgbm/,
wandb/integration/xgboost/,
wandb/integration/fastai/,
wandb/filesync/,
wandb/sdk/internal/internal_api.py,
wandb/sdk/internal/file_pusher.py,
wandb/sdk/internal/file_stream.py,
wandb/keras/,
wandb/compat/,
wandb/superagent/,
wandb/plots/,
wandb/sklearn/,
wandb/viz.py,
vendor/,
wandb/vendor/,
*.pyc,
*.egg-info,
.cache,
.eggs
max-complexity = 18
import-order-style = google
application-import-names = flake8
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
docstring-convention = google
[testenv:covercircle]
skip_install = true
basepython = python3
passenv = CI CIRCLECI CIRCLE_* CODECOV_* TOXENV
deps =
pytest
coverage
codecov
setenv =
CIRCLE_BUILD_NUM={env:CIRCLE_WORKFLOW_ID}
commands =
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage'
coverage report --ignore-errors --skip-covered --omit "wandb/vendor/*"
codecov -e TOXENV
[testenv:cover]
skip_install = true
deps =
pytest
coverage
commands =
/usr/bin/env bash -c '{envpython} -m coverage combine {toxworkdir}/py*/.coverage'
coverage report -m --ignore-errors --skip-covered --omit "wandb/vendor/*"
coverage report --ignore-errors --skip-covered --fail-under 90 --include "tests/*"
coverage report --ignore-errors --skip-covered --fail-under 60 --include "wandb/sdk/"
coverage report --ignore-errors --skip-covered --fail-under 50 --include "wandb/" --exclude "wandb/sdk*"
[coverage:run]
omit =
*/wandb/vendor/*
[coverage:paths]
source =
wandb/sdk/
wandb/sdk_py27/
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。