Skip to content

Commit

Permalink
Merge pull request #44 from s-weigand/add-flake8-testing
Browse files Browse the repository at this point in the history
Add code quality testing to the test suite
  • Loading branch information
s-weigand committed Oct 23, 2019
2 parents 46c42c3 + 98e9064 commit 61c33a5
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ cache: pip
jobs:
fast_finish: true
include:
# - python: 3.6
# name: flake8
# env: TOXENV=flake8
# after_success:
# - echo "done"
- python: 3.6
name: flake8-nb
env: TOXENV=flake8-nb
after_success:
- echo "done"

- language: generic
python: 3.6
Expand Down
1 change: 0 additions & 1 deletion docs/material.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Chapters
========

.. toctree::

:maxdepth: 2

notebooks/1_jupyter/1_jupyter
22 changes: 12 additions & 10 deletions material/1_Using-Jupyter-Lab/1_Using-Jupyter-Lab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,8 @@
"execution_count": 2,
"metadata": {
"tags": [
"nbval-ignore-output"
"nbval-ignore-output",
"flake8-noqa-cell"
]
},
"outputs": [
Expand All @@ -390,10 +391,10 @@
"output_type": "stream",
"text": [
"total 32\n",
"drwxrwxrwx 1 root root 4096 Sep 30 12:09 .\n",
"drwxrwxrwx 1 root root 4096 Sep 30 12:05 ..\n",
"-rwxrwxrwx 1 root root 29365 Sep 30 12:09 1_Using-Jupyter-Lab.ipynb\n",
"drwxrwxrwx 1 root root 4096 Sep 30 12:05 images\n",
"drwxrwxrwx 1 root root 4096 Oct 23 02:44 .\n",
"drwxrwxrwx 1 root root 4096 Oct 5 18:29 ..\n",
"-rwxrwxrwx 1 root root 29419 Oct 23 02:44 1_Using-Jupyter-Lab.ipynb\n",
"drwxrwxrwx 1 root root 4096 Oct 5 18:29 images\n",
"drwxrwxrwx 1 root root 4096 Sep 25 20:03 .ipynb_checkpoints\n"
]
},
Expand Down Expand Up @@ -439,11 +440,11 @@
"output_type": "stream",
"text": [
"total 32\n",
"drwxr-xr-x 1 dafuq 197121 0 Sep 30 12:09 .\n",
"drwxr-xr-x 1 dafuq 197121 0 Sep 30 12:05 ..\n",
"drwxr-xr-x 1 dafuq 197121 0 Okt 23 02:44 .\n",
"drwxr-xr-x 1 dafuq 197121 0 Okt 5 18:29 ..\n",
"drwxr-xr-x 1 dafuq 197121 0 Sep 25 20:03 .ipynb_checkpoints\n",
"-rw-r--r-- 1 dafuq 197121 29365 Sep 30 12:09 1_Using-Jupyter-Lab.ipynb\n",
"drwxr-xr-x 1 dafuq 197121 0 Sep 30 12:05 images\n"
"-rw-r--r-- 1 dafuq 197121 29419 Okt 23 02:44 1_Using-Jupyter-Lab.ipynb\n",
"drwxr-xr-x 1 dafuq 197121 0 Okt 5 18:29 images\n"
]
}
],
Expand Down Expand Up @@ -652,7 +653,8 @@
"execution_count": 6,
"metadata": {
"tags": [
"raises-exception"
"raises-exception",
"flake8-noqa-cell-E402-F401"
]
},
"outputs": [
Expand Down
3 changes: 2 additions & 1 deletion requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ bump2version>=0.5.10
tox>=3.4.0
pytest>=5.1.3
nbval>=0.9.2
flake8-nb>=0.1.0

# documentation
Sphinx>=2.2.0
Expand All @@ -18,4 +19,4 @@ nbsphinx>=0.4.2
nbsphinx-link>=1.3.0
ipykernel>=5.1.2
ipython>=7.8.0
sphinxcontrib-svg2pdfconverter>=1.0.1
# sphinxcontrib-svg2pdfconverter>=1.0.1
9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
[tox]
minversion = 3.4.0
skipsdist = True
envlist = py{36,37}, docs, docs-links
#, flake8
envlist = py{36,37}, docs, docs-links, flake8-nb

[flake8]
max-line-length = 99
Expand All @@ -19,10 +18,10 @@ commands =
make --directory=docs clean linkcheck


[testenv:flake8]
[testenv:flake8-nb]
basepython=python
deps=flake8
commands=flake8 pytest_localftpserver tests
deps=flake8-nb
commands=flake8_nb material


[testenv]
Expand Down

0 comments on commit 61c33a5

Please sign in to comment.