Skip to content

Commit

Permalink
Merge 7be6c7b into 051f9a3
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanhemani committed Jun 21, 2020
2 parents 051f9a3 + 7be6c7b commit e43e982
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 87 deletions.
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ exclude_lines =
if 0:
if __name__ == .__main__.:

ignore_errors = True
ignore_errors = True
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ before_install:
- ./miniconda.sh -b -f -p $HOME/miniconda
- export PATH=/home/travis/miniconda/bin:$PATH
- conda update --yes conda
# - jupyter kernelspec list

install:
- conda env update -f linux_environment.yml
- source activate datascience
- python3 setup.py install

script:
- coverage run setup.py test
- python3 setup.py test

after_success:
- coveralls
Expand Down
9 changes: 7 additions & 2 deletions linux_environment.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: datascience
dependencies:
- coverage
- coveralls
- cycler
- decorator
Expand All @@ -22,6 +21,7 @@ dependencies:
- pyparsing
- pyqt
- pytest
- pytest-cov
- python
- python-dateutil
- pytz
Expand All @@ -42,10 +42,15 @@ dependencies:
- alabaster
- babel
- docutils
- folium==0.2.1
- folium==0.9.1
- ipython-genutils
- jinja2
- jupyter
- jupyter_client
- markupsafe
- nbval
- nbconvert
- nbformat
- pygments
- snowballstemmer
- sphinx
Expand Down
3 changes: 2 additions & 1 deletion osx_environment.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name: datascience
dependencies:
- appnope
- coverage
- coveralls
- cycler
- decorator
Expand All @@ -20,6 +19,7 @@ dependencies:
- pyparsing
- pyqt
- pytest
- pytest-cov
- python
- python-dateutil
- python.app
Expand All @@ -45,6 +45,7 @@ dependencies:
- ipython-genutils
- jinja2
- markupsafe
- nbval
- pygments
- snowballstemmer
- sphinx
Expand Down
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ class PyTest(TestCommand):

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['tests']
self.pytest_args = ['--nbval-lax', '--cov=datascience', 'tests']

def finalize_options(self):
TestCommand.finalize_options(self)

def pytest_collectstart(collector):
collector.skip_compare += 'text/html'

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
Expand Down
161 changes: 118 additions & 43 deletions tests/Charts.ipynb

Large diffs are not rendered by default.

76 changes: 38 additions & 38 deletions tests/Maps.ipynb

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions tests/notebook_runner.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import nbformat
import sys
from nbconvert.preprocessors import ExecutePreprocessor

with open(sys.argv[1]) as f:
nb = nbformat.read(f, as_version=4)

ep = ExecutePreprocessor(timeout=600)

ep.preprocess(nb, {'metadata': {'path': 'tests/'}})

0 comments on commit e43e982

Please sign in to comment.