forked from aiidateam/aiida-restapi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
52 lines (45 loc) · 1.33 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
# To use tox, see https://tox.readthedocs.io
# Simply pip or conda install tox
# If you use conda, you may also want to install tox-conda
# then run `tox` or `tox -- {pytest args}`
# run `tox -r` to recreate the environment
# run e.g. `tox -e serve` to select a particular environment
[tox]
envlist = py38
[testenv]
usedevelop = true
[testenv:py{37,38,39}]
extras =
auth
testing
docs
deps = black
commands_pre = reentry scan -r aiida
commands = pytest {posargs}
# to get started with doing live testing
# first create a database folder {toxinidir}/.tox/.aiida/database
# and run `initdb` in it, then start the postgres server: pg_ctl -D database -l logfile start
# now you can run `tox -e verdi quicksetup`, then `tox -e serve`
[testenv:verdi]
setenv =
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands_pre = reentry scan -r aiida
commands = verdi {posargs}
[testenv:serve]
extras =
auth
setenv =
AIIDA_PATH = {toxinidir}/.tox/.aiida
commands_pre = reentry scan -r aiida
commands = uvicorn aiida_restapi:app {posargs:--reload}
[testenv:docs-{update,clean}]
extras =
auth
docs
whitelist_externals =
rm
echo
commands =
clean: rm -rf docs/_build
sphinx-build -nW --keep-going -b {posargs:html} docs/source/ docs/_build/{posargs:html}
commands_post = echo "open file://{toxinidir}/docs/_build/{posargs:html}/index.html"