This repository has been archived by the owner on Jun 8, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
67 lines (53 loc) · 2.49 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]
envlist =
pylint-{nix,win},
docs-{nix,win},
slow-{nix,win},
yarn-{nix,win},
doctest-{nix,win},
production-{nix,win},
clean-{nix,win},
pytest-{nix,win},
stackoverflow
isolated_build = true
[testenv]
platform =
nix: (darwin|linux)
win: win32
description = Running {envname} with {basepython}
passenv = HOME
setenv =
PIP_DISABLE_VERSION_CHECK = 1
PYTHONPATH = {toxinidir}
whitelist_externals =
poetry
powershell
bash
skip_install = true
commands_pre =
; clean-win: powershell -Command 'Remove-Item -Recurse {toxinidir}\dist -ErrorAction Ignore'
clean-nix: bash -c "rm -r {toxinidir}/dist || true"
clean-win: powershell -Command 'poetry build --format wheel'
clean-nix: bash -c "poetry build --format wheel"
clean: python -m pip uninstall -y pymedphys
commands =
clean-win: powershell -Command 'cd {envtmpdir}; python -m pip install (Get-Item {toxinidir}\dist\*.whl) --no-dependencies'
clean-nix: bash -c "cd {envtmpdir} && python -m pip install {toxinidir}/dist/*.whl --no-dependencies"
clean: pip install -r {toxinidir}/requirements-core.txt
clean: pymedphys --help
clean: python -c "import pymedphys"
stackoverflow: poetry install --no-dev
stackoverflow: poetry run python {toxinidir}/examples/stackoverflow/gamma.py
!clean-!stackoverflow: poetry run pip install -r {toxinidir}/requirements-difficult.txt
docs: poetry install --no-dev -E docs
slow,yarn,pytest,doctest: poetry install --no-dev -E pytest
pylint: poetry install --no-dev -E pytest -E pylint
doctest: poetry run pytest -v --basetemp={envtmpdir} --junitxml=junit/.test.{envname}.xml [] --doctest-modules {toxinidir}
pylint: poetry run pytest --pylint --pylint-jobs=1 {toxinidir}
slow: poetry run pytest -v --run-only-slow --basetemp={envtmpdir} --junitxml=junit/.test.{envname}.xml [] {toxinidir}
yarn: poetry run pytest -v -s --run-only-yarn --basetemp={envtmpdir} --junitxml=junit/.test.{envname}.xml [] {toxinidir}
pytest: poetry run pytest -v --basetemp={envtmpdir} --junitxml=junit/.test.{envname}.xml [] {toxinidir}
docs: poetry run sphinx-build -W docs {toxinidir}/docs/_build/html
; production: poetry install -vvv --no-dev
; production: pip install pymedphys[pytest,pylint,library]==`poetry run python -c "import pymedphys; print(pymedphys.__version__)"`
; production: pytest -v --run-slow --pylint --pylint-jobs=1 --doctest-modules --basetemp={envtmpdir} --junitxml=junit/.test.{envname}.xml []