From df92fdec7f3471264d35cdb70a9c7ae9460fbe37 Mon Sep 17 00:00:00 2001 From: Jorge Blanco Alonso Date: Thu, 24 Oct 2024 16:32:27 +0200 Subject: [PATCH] Restore tox.ini --- tox.ini | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..6672f454 --- /dev/null +++ b/tox.ini @@ -0,0 +1,64 @@ +[base] +name = neurodamus + +[tox] +envlist = flake8, unit + +[testenv] +deps = + -r tests/requirements.txt + + +[testenv:unit] +commands = + pytest tests/unit + + +[testenv:integration] +deps = + NEURON + morphio + -r tests/requirements.txt +passenv = NEURODAMUS_NEOCORTEX_ROOT +setenv = + # build_ndcore.sh will install into _lib + HOC_LIBRARY_PATH={toxinidir}/_lib + NRNMECH_LIB_PATH={toxinidir}/_lib/libnrnmech.so + NEURON_INIT_MPI=0 + PYTHONPATH = {toxinidir}/core/python +allowlist_externals = + {toxinidir}/ci/build_ndcore.sh +commands = + {toxinidir}/ci/build_ndcore.sh {toxinidir}/neurodamus/data + pytest -x --forked tests/integration + + +[testenv:bbp-model] +# Please module load neurodamus-neocortex py-neurodamus beforehand +passenv = * +setenv = + PYTHONPATH={toxinidir}:{env:PYTHONPATH} + HOC_LIBRARY_PATH={toxinidir}/core/hoc:{env:HOC_LIBRARY_PATH} + NEURON_INIT_MPI=1 +commands = + python -c "import os; print(os.environ.get('HOC_LIBRARY_PATH', ''))" + pytest -s -x --forked --durations=5 --durations-min=15 {posargs:tests/integration-e2e} + + +[testenv:flake8] +changedir = {toxinidir} +deps = flake8-pyproject +skip_install = True +commands = flake8 + + +[testenv:docs] +changedir = {toxinidir} +deps = + sphinx<5.1.0 + sphinx-bluebrain-theme +setenv = + PYTHONPATH = {toxinidir} + PIP_INDEX_URL = https://bbpteam.epfl.ch/repository/devpi/simple +commands = + sphinx-build -T -W docs docs/_build