diff --git a/dev-requirements.in b/dev-requirements.in index fa8335bc..3097950f 100644 --- a/dev-requirements.in +++ b/dev-requirements.in @@ -1,6 +1,7 @@ -c requirements.txt pytest +nbval pytest-cov pytest-timeout requests @@ -12,3 +13,4 @@ sphinx_rtd_theme ipython tox python-semantic-release +notebook diff --git a/dev-requirements.txt b/dev-requirements.txt index b3ee89cc..57ed6145 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -8,13 +8,15 @@ alabaster==0.7.12 # via sphinx appdirs==1.4.4 # via virtualenv +argon2-cffi==20.1.0 + # via notebook async-generator==1.10 # via nbclient -attrs==20.3.0 +attrs==21.2.0 # via # jsonschema # pytest -babel==2.9.0 +babel==2.9.1 # via sphinx backcall==0.2.0 # via ipython @@ -27,7 +29,9 @@ certifi==2020.12.5 # -c requirements.txt # requests cffi==1.14.5 - # via cryptography + # via + # argon2-cffi + # cryptography chardet==4.0.0 # via # -c requirements.txt @@ -44,7 +48,9 @@ colorama==0.4.4 commonmark==0.9.1 # via recommonmark coverage==5.5 - # via pytest-cov + # via + # nbval + # pytest-cov cryptography==3.4.7 # via secretstorage decorator==4.4.2 @@ -80,7 +86,7 @@ idna==2.10 # requests imagesize==1.2.0 # via sphinx -importlib-metadata==3.10.1 +importlib-metadata==4.0.1 # via # keyring # twine @@ -88,12 +94,19 @@ iniconfig==1.1.1 # via pytest invoke==1.5.0 # via python-semantic-release +ipykernel==5.5.4 + # via + # nbval + # notebook ipython-genutils==0.2.0 # via # nbformat + # notebook # traitlets -ipython==7.22.0 - # via -r dev-requirements.in +ipython==7.23.1 + # via + # -r dev-requirements.in + # ipykernel jedi==0.18.0 # via ipython jeepney==0.6.0 @@ -105,16 +118,22 @@ jinja2==2.11.3 # -c requirements.txt # nbconvert # nbsphinx + # notebook # sphinx jsonschema==3.2.0 # via nbformat jupyter-client==6.1.12 - # via nbclient + # via + # ipykernel + # nbclient + # nbval + # notebook jupyter-core==4.7.1 # via # jupyter-client # nbconvert # nbformat + # notebook jupyterlab-pygments==0.1.2 # via nbconvert keyring==23.0.1 @@ -123,21 +142,32 @@ markupsafe==1.1.1 # via # -c requirements.txt # jinja2 + # sphinx +matplotlib-inline==0.1.2 + # via ipython mistune==0.8.4 # via nbconvert nbclient==0.5.3 # via nbconvert nbconvert==6.0.7 - # via nbsphinx + # via + # nbsphinx + # notebook nbformat==5.1.3 # via # nbclient # nbconvert # nbsphinx -nbsphinx==0.8.3 + # nbval + # notebook +nbsphinx==0.8.4 + # via -r dev-requirements.in +nbval==0.9.6 # via -r dev-requirements.in nest-asyncio==1.5.1 # via nbclient +notebook==6.3.0 + # via -r dev-requirements.in packaging==20.9 # via # bleach @@ -158,19 +188,23 @@ pluggy==0.13.1 # via # pytest # tox +prometheus-client==0.10.1 + # via notebook prompt-toolkit==3.0.18 # via ipython psutil==5.8.0 # via -r dev-requirements.in ptyprocess==0.7.0 - # via pexpect + # via + # pexpect + # terminado py==1.10.0 # via # pytest # tox pycparser==2.20 # via cffi -pygments==2.8.1 +pygments==2.9.0 # via # ipython # jupyterlab-pygments @@ -187,18 +221,19 @@ pytest-cov==2.11.1 # via -r dev-requirements.in pytest-timeout==1.4.2 # via -r dev-requirements.in -pytest==6.2.3 +pytest==6.2.4 # via # -r dev-requirements.in + # nbval # pytest-cov # pytest-timeout python-dateutil==2.8.1 # via # -c requirements.txt # jupyter-client -python-gitlab==2.6.0 +python-gitlab==2.7.1 # via python-semantic-release -python-semantic-release==7.15.3 +python-semantic-release==7.15.4 # via -r dev-requirements.in pytz==2021.1 # via @@ -208,6 +243,7 @@ pyzmq==22.0.3 # via # -c requirements.txt # jupyter-client + # notebook readme-renderer==29.0 # via twine recommonmark==0.7.1 @@ -225,19 +261,23 @@ requests==2.25.1 # requests-toolbelt # sphinx # twine -rfc3986==1.4.0 +rfc3986==1.5.0 # via twine secretstorage==3.3.1 # via keyring semver==2.13.0 # via python-semantic-release +send2trash==1.5.0 + # via notebook setuptools-scm==6.0.1 # via dotty-dict -six==1.15.0 +six==1.16.0 # via # -c requirements.txt + # argon2-cffi # bleach # jsonschema + # nbval # python-dateutil # readme-renderer # tox @@ -248,7 +288,7 @@ snowballstemmer==2.1.0 # via sphinx sphinx-rtd-theme==0.5.2 # via -r dev-requirements.in -sphinx==3.5.4 +sphinx==4.0.1 # via # -r dev-requirements.in # nbsphinx @@ -266,6 +306,8 @@ sphinxcontrib-qthelp==1.0.3 # via sphinx sphinxcontrib-serializinghtml==1.1.4 # via sphinx +terminado==0.9.5 + # via notebook testpath==0.4.4 # via nbconvert toml==0.10.2 @@ -277,8 +319,11 @@ tomlkit==0.7.0 tornado==6.1 # via # -c requirements.txt + # ipykernel # jupyter-client -tox==3.23.0 + # notebook + # terminado +tox==3.23.1 # via -r dev-requirements.in tqdm==4.60.0 # via @@ -286,20 +331,23 @@ tqdm==4.60.0 # twine traitlets==5.0.5 # via + # ipykernel # ipython # jupyter-client # jupyter-core + # matplotlib-inline # nbclient # nbconvert # nbformat # nbsphinx + # notebook twine==3.4.1 # via python-semantic-release urllib3==1.26.4 # via # -c requirements.txt # requests -virtualenv==20.4.3 +virtualenv==20.4.6 # via tox wcwidth==0.2.5 # via prompt-toolkit diff --git a/nbval_sanitization b/nbval_sanitization new file mode 100644 index 00000000..ffac53b4 --- /dev/null +++ b/nbval_sanitization @@ -0,0 +1,7 @@ +[regex1] +regex: \[\d{4}-\d{2}-\d{2}\ \d{2}:\d{2}:\d{2}.\d{6}\] +replace: TIME_STAMP + +[regex2] +regex: (?<=SET STATE: Running\n)(.*\n)* +replace: RUNNING diff --git a/requirements.txt b/requirements.txt index ef9595db..45b2dabe 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ # # pip-compile # -arrow==1.0.3 +arrow==1.1.0 # via jinja2-time binaryornot==0.4.4 # via cookiecutter @@ -89,7 +89,7 @@ networkx==2.5.1 # via # agentMET4FOF (setup.py) # mesa -numpy==1.20.2 +numpy==1.20.3 # via # agentMET4FOF (setup.py) # matplotlib @@ -118,7 +118,7 @@ python-dateutil==2.8.1 # arrow # matplotlib # pandas -python-slugify==4.0.1 +python-slugify==5.0.2 # via cookiecutter pytz==2021.1 # via pandas @@ -128,11 +128,11 @@ requests==2.25.1 # via cookiecutter retrying==1.3.3 # via plotly -scipy==1.6.2 +scipy==1.6.3 # via agentMET4FOF (setup.py) -serpent==1.30.2 +serpent==1.40 # via pyro4 -six==1.15.0 +six==1.16.0 # via # cookiecutter # cycler @@ -143,7 +143,7 @@ text-unidecode==1.3 # via python-slugify time-series-buffer==0.1.4b0 # via agentMET4FOF (setup.py) -time-series-metadata==0.1.0 +time-series-metadata==0.1.1 # via agentMET4FOF (setup.py) tornado==6.1 # via mesa diff --git a/tox.ini b/tox.ini index 5921e7d8..70f3e1f0 100644 --- a/tox.ini +++ b/tox.ini @@ -11,4 +11,5 @@ deps = -rrequirements.txt -rdev-requirements.txt # Run those tests in our virtual environments. -commands = pytest -v --cov=. --junitxml=test-reports/junit.xml . +commands = pytest --nbval --current-env --sanitize-with nbval_sanitization -v --cov=. \ + --junitxml=test-reports/junit.xml .