-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
executable file
·76 lines (69 loc) · 2.13 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
68
69
70
71
72
73
74
75
76
[tox]
envlist = test
; isolated_build = true
skip_missing_interpreters = false
minversion = 3.14
requires =
virtualenv >= 20.0.34
setuptools < 72.0.0
[testenv]
passenv = *
setenv =
# It will overide variables in passenv in case of collision
PYTHONHASHSEED = 2577074909
PYTHONBUFFERED = yes
DEFAULT_REQS_FILE = reqs.txt
### POETRY EXPORT
[testenv:pin-deps]
description = Pin dependencies from poetry lock. Use the REQS_FILE var to override default
basepython = {env:TOXPYTHON:python3}
passenv = REQS_FILE
skip_install = true
deps =
poetry
poetry-plugin-export
commands =
python -m poetry export -f requirements.txt -o {env:REQS_FILE:{env:DEFAULT_REQS_FILE}} {posargs}
python -c 'print( "\n Generated requirements file: " + "{env:REQS_FILE:{env:DEFAULT_REQS_FILE}}" );'
## BUILD DOCUMENTATION PAGES ##
# tox -e pin-deps -- -E docs && tox -e docs
[testenv:docs]
description = 'Build the documentation, leveraging Mkocs as a Static Site Generator (SSG).'
basepython = {env:TOXPYTHON:python3}
setenv =
{[testenv]setenv}
SPELLCHECK=1
deps =
; setuptools==71.0.0
-r {env:REQS_FILE:{env:DEFAULT_REQS_FILE:reqs.txt}}
skip_install = true
; pre_commands =
; pip install setuptools==71.0.0
; pip install -r {env:REQS_FILE:{env:DEFAULT_REQS_FILE:reqs.txt}}
commands =
; python -m pip install setuptools==71.0.0
; python -m pip install -r {env:REQS_FILE:{env:DEFAULT_REQS_FILE:reqs.txt}}
mkdocs build
[testenv:docs-build]
description = 'Build the documentation, leveraging Mkocs as a Static Site Generator (SSG).'
basepython = {env:TOXPYTHON:python3}
setenv =
{[testenv]setenv}
SPELLCHECK=1
deps =
setuptools==71.0.0
-r {env:REQS_FILE:{env:DEFAULT_REQS_FILE:reqs.txt}}
skip_install = true
commands =
mkdocs build
## SERVE LIVE DOCUMENTATION ##
# tox -e pin-deps -- -E docs && tox -e docs-live
[testenv:docs-live]
description = Start documentation dev-server (with hot-reloading) for browser preview
basepython = {env:TOXPYTHON:python3}
setenv =
{[testenv]setenv}
SPELLCHECK=1
deps = -r {env:REQS_FILE:{env:DEFAULT_REQS_FILE:reqs.txt}}
skip_install = true
commands = mkdocs serve {posargs}