From de64e42dfc0e809a513e31947f44930ca31804b8 Mon Sep 17 00:00:00 2001 From: Matthias Volk Date: Sun, 11 Oct 2020 17:44:58 +0200 Subject: [PATCH] Update pytest and sphinx generation for new Jupyter notebooks --- setup.cfg | 2 +- setup.py | 3 ++- travis/build-helper.sh | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/setup.cfg b/setup.cfg index 6c8c25e..98f9043 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ test=pytest [tool:pytest] -addopts = --doctest-glob='*.rst' +addopts = --doctest-glob='*.rst' --nbval testpaths = tests/ examples/ doc/ python_files = test*.py examples/*.py python_functions = *_test test_* example_* diff --git a/setup.py b/setup.py index 977d354..a532d7e 100755 --- a/setup.py +++ b/setup.py @@ -275,9 +275,10 @@ setup( zip_safe=False, install_requires=['pycarl>=2.0.4'], setup_requires=['pytest-runner'], - tests_require=['pytest'], + tests_require=['pytest', 'nbval'], extras_require={ "numpy": ["numpy"], + "doc": ["sphinx", "sphinx_bootstrap_theme", "nbsphinx", "ipython", "ipykernel"], # also requires pandoc to be installed }, python_requires='>=3', ) diff --git a/travis/build-helper.sh b/travis/build-helper.sh index ea04b46..bd987b9 100755 --- a/travis/build-helper.sh +++ b/travis/build-helper.sh @@ -70,8 +70,10 @@ run() { if [[ "$TASK" == *Documentation* ]] then + # Install dependencies for documentation + apt-get install -qq -y pandoc + python setup.py easy_install "stormpy[doc]" # Generate documentation - pip install sphinx sphinx_bootstrap_theme cd doc make html touch build/html/.nojekyll