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 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431
|
# This tox file is intended for use with any generic development feed. The only requirement is that the development feed
# contain azure* prefixed packages. It does this by assuming that `PIP_INDEX_URL` environment variable is set to target the dev feed
# specifically. Notice that in the [testenv] config, we explicitly set PIP_EXTRA_INDEX_URL to pypi.
# In all cases, whenever we install an azure-* package from a requirement (read: not a specific file), the only source will be from the dev feed.
# once we've downloaded these dependencies, only then do we install other packages from pypi.
[tox]
# note that this envlist is the default set of environments that will run if a target environment is not selected.
envlist = whl,sdist
[tools]
deps =
-r ../../../eng/test_tools.txt
[coverage:paths]
source =
azure
**/azure
microsoft
**/microsoft
[base]
deps =
-rdev_requirements.txt
{[tools]deps}
[dependencytools]
deps =
-r ../../../eng/dependency_tools.txt
[packaging]
pkgs =
wheel==0.37.0
packaging==20.4
urllib3==1.26.12
[testenv]
ignore_args=--ignore=.tox --ignore=build --ignore=.eggs
default_pytest_params = --junitxml={toxinidir}/test-junit-{envname}.xml --verbose --durations=10 --ignore=azure {[testenv]ignore_args}
parallel_show_output =True
skip_install = true
skipsdist = true
usedevelop = false
platform = linux: linux
macos: darwin
windows: win32
passenv = *
download=true
requires=
{[packaging]pkgs}
setenv =
SPHINX_APIDOC_OPTIONS=members,undoc-members,inherited-members
PIP_EXTRA_INDEX_URL=https://pypi.python.org/simple
PROXY_URL=http://localhost:5000
VIRTUALENV_WHEEL=0.37.0
VIRTUALENV_PIP=20.3.3
VIRTUALENV_SETUPTOOLS=59.6.0
deps = {[base]deps}
changedir = {toxinidir}
install_command = python -m pip install {opts} {packages} --cache-dir {toxinidir}/../.tox_pip_cache_{envname} --ignore-installed
commands =
{envbindir}/python -m pip --version
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} -w {envtmpdir}
{envbindir}/python -m pip freeze
pytest \
{[testenv]default_pytest_params} \
{posargs} \
{toxinidir}
[testenv:pylint]
skipsdist = true
skip_install = true
usedevelop = false
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5002
deps =
{[base]deps}
commands =
{envbindir}/python -m pip install pylint-guidelines-checker==0.0.5 --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {distdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python {toxinidir}/../../../eng/tox/run_pylint.py -t {toxinidir}
[testenv:mypy]
skipsdist = true
skip_install = true
usedevelop = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5003
deps =
{[base]deps}
mypy==0.931
types-chardet==4.0.3
types-requests==2.27.9
types-six==1.16.10
types-redis==4.3.21.2
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {distdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python {toxinidir}/../../../eng/tox/run_mypy.py -t {toxinidir}
[testenv:pyright]
skipsdist = true
skip_install = true
usedevelop = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5018
deps =
{[base]deps}
pyright==1.1.274
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {distdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python {toxinidir}/../../../eng/tox/run_pyright.py -t {toxinidir}
[testenv:verifytypes]
skipsdist = true
skip_install = true
usedevelop = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5019
deps =
{[base]deps}
pyright==1.1.274
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/run_verifytypes.py -t {toxinidir}
[testenv:whl_no_aio]
skipsdist = true
skip_install = true
changedir = {toxinidir}
deps =
{[base]deps}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5004
commands =
- {envbindir}/python -m pip uninstall aiohttp --yes
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} -w {envtmpdir}
{envbindir}/python {toxinidir}/../../../eng/tox/try_import.py aiohttp -p {toxinidir}
{envbindir}/python -m pip freeze
pytest \
{[testenv]default_pytest_params} \
--ignore-glob='*async*.py' \
{posargs} \
{toxinidir}
[testenv:sdist]
skipsdist = true
skip_install = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5005
deps =
{[base]deps}
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {envtmpdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python -m pip freeze
pytest \
{posargs} \
--no-cov \
{[testenv]ignore_args} \
{toxinidir}
[testenv:develop]
skipsdist = false
skip_install = false
usedevelop = true
changedir = {toxinidir}
deps =
{[base]deps}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5006
commands =
pytest \
{posargs} \
--ignore=.tox \
{toxinidir}
[testenv:sphinx]
skipsdist = true
skip_install = true
changedir = {toxinidir}
passenv = *
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5007
deps =
{[base]deps}
sphinx==3.5.4
sphinx_rtd_theme==1.0.0
recommonmark==0.6.0
mistune<2.0.0
m2r==0.2.1
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {distdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python {toxinidir}/../../../eng/tox/prep_sphinx_env.py -d {distdir} -t {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/run_sphinx_apidoc.py \
-w {distdir} \
-r {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/run_sphinx_build.py \
-w {distdir}/unzipped/docgen \
-o {distdir}/site \
-r {toxinidir}
[testenv:depends]
platform = linux: linux
macos: darwin
windows: win32
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5008
deps =
{[packaging]pkgs}
cryptography<4
commands =
{envbindir}/python -m pip install {toxinidir}/../../../tools/azure-sdk-tools --no-deps
{envbindir}/python {toxinidir}/../../../eng/tox/sanitize_setup.py -t {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {envtmpdir} \
-p {toxinidir} \
-w {envtmpdir} \
--force-create true
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/import_all.py -t {toxinidir}
[testenv:verifywhl]
skipsdist = true
skip_install = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5009
deps =
{[packaging]pkgs}
commands =
{envbindir}/python -m pip install {toxinidir}/../../../tools/azure-sdk-tools --no-deps
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} --skip-install True
{envbindir}/python {toxinidir}/../../../eng/tox/verify_whl.py -d {envtmpdir} -t {toxinidir}
[testenv:verifysdist]
skipsdist = true
skip_install = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5010
deps =
{[packaging]pkgs}
commands =
{envbindir}/python -m pip install {toxinidir}/../../../tools/azure-sdk-tools --no-deps
{envbindir}/python {toxinidir}/setup.py --q sdist --format zip -d {envtmpdir}
{envbindir}/python {toxinidir}/../../../eng/tox/verify_sdist.py -d {envtmpdir} -t {toxinidir}
[testenv:devtest]
deps = {[base]deps}
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5011
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir}
{envbindir}/python {toxinidir}/../../../eng/tox/install_dev_build_dependency.py -t {toxinidir}
pytest \
{[testenv]default_pytest_params} \
--ignore=.tox \
{posargs} \
{toxinidir}
[deptestcommands]
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/install_depend_packages.py -t {toxinidir} -d {env:DEPENDENCY_TYPE:} -w {envtmpdir}
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py -d {envtmpdir} -p {toxinidir} -w {envtmpdir} --pre-download-disabled
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/verify_installed_packages.py --packages-file {envtmpdir}/packages.txt
pytest {[testenv]default_pytest_params} {posargs} --no-cov {toxinidir}
[testenv:latestdependency]
deps =
{[dependencytools]deps}
{[tools]deps}
changedir =
{toxinidir}
passenv = *
setenv =
{[testenv]setenv}
DEPENDENCY_TYPE=Latest
PROXY_URL=http://localhost:5012
commands =
{[deptestcommands]commands}
[testenv:mindependency]
deps =
azure-mgmt-keyvault<7.0.0
azure-mgmt-resource<15.0.0
azure-mgmt-storage<15.0.0
{[dependencytools]deps}
{[tools]deps}
changedir = {toxinidir}
passenv = *
setenv =
{[testenv]setenv}
DEPENDENCY_TYPE=Minimum
PROXY_URL=http://localhost:5013
commands =
{[deptestcommands]commands}
[testenv:apistub]
skipsdist = true
skip_install = true
usedevelop = false
changedir = {envtmpdir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5014
deps =
{[base]deps}
commands =
# install API stub generator
{envbindir}/python -m pip install -r {toxinidir}/../../../eng/apiview_reqs.txt --index-url="https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-python/pypi/simple/"
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/run_apistubgen.py -t {toxinidir} -w {envtmpdir} {posargs}
[testenv:bandit]
skipsdist = true
skip_install = true
usedevelop = false
changedir = {envtmpdir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5015
deps =
{[base]deps}
importlib-metadata<5.0
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {envtmpdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../eng/tox/run_bandit.py -t {toxinidir}
[testenv:samples]
skipsdist = false
skip_install = false
usedevelop = false
changedir = {envtmpdir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5016
deps =
{[base]deps}
subprocess32; python_version < '3.5'
commands =
{envbindir}/python -m pip freeze
{envbindir}/python {toxinidir}/../../../scripts/devops_tasks/test_run_samples.py -t {toxinidir}
[testenv:breaking]
skipsdist = true
skip_install = true
usedevelop = true
changedir = {toxinidir}
setenv =
{[testenv]setenv}
PROXY_URL=http://localhost:5017
deps =
{[base]deps}
jsondiff==1.2.0
-e {toxinidir}/../../scripts/breaking_changes_checker
commands =
{envbindir}/python {toxinidir}/../../../eng/tox/create_package_and_install.py \
-d {distdir} \
-p {toxinidir} \
-w {envtmpdir} \
--package-type sdist
{envbindir}/python {toxinidir}/../../../scripts/breaking_changes_checker/detect_breaking_changes.py -t {toxinidir}
|