From b43fcdb3c98b44fd29f935b4f38f937bde48a2a7 Mon Sep 17 00:00:00 2001 From: Alexander Goscinski Date: Tue, 27 Feb 2024 11:10:56 +0100 Subject: [PATCH] add tox.ini with envs lint, format, run-notebooks --- tox.ini | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 0000000..868e74a --- /dev/null +++ b/tox.ini @@ -0,0 +1,33 @@ +[tox] +lint_folders = + "{toxinidir}/notebooks" + +[testenv] + +[testenv:run-notebooks] +deps = + numpy + scipy + matplotlib + ipywidgets + jupyter +commands = + jupyter execute {toxinidir}/notebooks/01-BasisExpansion.ipynb + +[testenv:format] +# formats project source code files +skip_install = true +deps = + black[jupyter] +commands = + black {[tox]lint_folders} + +[testenv:lint] +skip_install = true +deps = + flake8-nb +commands = + flake8_nb {[tox]lint_folders} + +[flake8_nb] +max_line_length = 88