Skip to content

Commit

Permalink
disable one cell in a unit test of a notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
sdpython committed Dec 17, 2017
1 parent f856ba3 commit 7ca5fc3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 65 deletions.
88 changes: 23 additions & 65 deletions _doc/notebooks/nlp/completion_profiling.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -198,9 +196,7 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from mlstatpy.data.wikipedia import download_titles\n",
Expand All @@ -210,9 +206,7 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from mlstatpy.data.wikipedia import enumerate_titles\n",
Expand All @@ -222,9 +216,7 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import random\n",
Expand Down Expand Up @@ -277,9 +269,7 @@
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -369,9 +359,7 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from memory_profiler import profile\n",
Expand All @@ -381,9 +369,7 @@
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -400,9 +386,7 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -425,9 +409,7 @@
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -473,9 +455,7 @@
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -564,9 +544,7 @@
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -675,9 +653,7 @@
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"import gprof2dot\n",
Expand All @@ -689,9 +665,7 @@
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from pyquickhelper.helpgen.conf_path_tools import find_graphviz_dot\n",
Expand All @@ -701,9 +675,7 @@
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -722,9 +694,7 @@
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -755,9 +725,7 @@
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand Down Expand Up @@ -811,9 +779,7 @@
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"%load_ext snakeviz"
Expand All @@ -829,9 +795,7 @@
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"# %snakeviz toprofile0(sample1000)"
Expand All @@ -840,9 +804,7 @@
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -875,9 +837,7 @@
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [],
"source": [
"from vprof import profiler\n",
Expand All @@ -889,9 +849,7 @@
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"metadata": {},
"outputs": [
{
"data": {
Expand Down Expand Up @@ -935,9 +893,9 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.2"
"version": "3.6.3"
}
},
"nbformat": 4,
"nbformat_minor": 0
"nbformat_minor": 1
}
2 changes: 2 additions & 0 deletions _unittests/ut_documentation/test_run_notebooks_nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def valid(cell):
return False
if "completion.dot" in cell and is_travis_or_appveyor() == "travis":
return False
if 'Image("completion.png")' in cell and is_travis_or_appveyor() == "travis":
return False
return True

# additionnal path to add
Expand Down

0 comments on commit 7ca5fc3

Please sign in to comment.