Skip to content

Commit

Permalink
Merge afa364b into 35d878d
Browse files Browse the repository at this point in the history
  • Loading branch information
jhprinz committed May 14, 2016
2 parents 35d878d + afa364b commit 0b2e20b
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 46 deletions.
2 changes: 1 addition & 1 deletion devtools/ci/ipythontests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ipynbtest.py --strict "test_snapshot.ipynb" || testfail=1
date
ipynbtest.py "tutorial_storage.ipynb" || testfail=1
date
ipynbtest.py --strict "test_netcdfplus.ipynb" || testfail=1
ipynbtest.py --strict --show-diff "test_netcdfplus.ipynb" || testfail=1
date
ipynbtest.py --strict "test_cv.ipynb" || testfail=1
date
Expand Down
129 changes: 84 additions & 45 deletions examples/ipython/test_netcdfplus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1665,6 +1665,20 @@
{
"cell_type": "code",
"execution_count": 72,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"n1 = NamedNode(1)\n",
"n2 = NamedNode(2)\n",
"n3 = NamedNode(3)\n",
"st.dict['Number1'] = n1"
]
},
{
"cell_type": "code",
"execution_count": 73,
"metadata": {
"collapsed": false
},
Expand All @@ -1673,21 +1687,31 @@
"name": "stdout",
"output_type": "stream",
"text": [
"{'Number1': Node(1)}\n"
"Number1 : Node(1) [0]\n"
]
}
],
"source": [
"n1 = NamedNode(1)\n",
"n2 = NamedNode(2)\n",
"n3 = NamedNode(3)\n",
"st.dict['Number1'] = n1\n",
"print dict(st.dict)"
"for key in sorted(st.dict):\n",
" obj = st.dict[key]\n",
" idxs = sorted(st.dict.name_idx[key])\n",
" print key, ':', str(obj), idxs"
]
},
{
"cell_type": "code",
"execution_count": 73,
"execution_count": 74,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"st.dict['Number2'] = n2"
]
},
{
"cell_type": "code",
"execution_count": 75,
"metadata": {
"collapsed": false
},
Expand All @@ -1696,41 +1720,55 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Number1 : [0]\n",
"Number1 : Node(1)\n",
"Number2 : Node(2)\n",
"Number1 : [0]\n",
"Number2 : [1]\n",
"Number1 : Node(3)\n",
"Number2 : Node(2)\n",
"Number1 : [0, 2]\n",
"Number2 : [1]\n"
"Number1 : Node(1) [0]\n",
"Number2 : Node(2) [1]\n"
]
}
],
"source": [
"for key in sorted(st.dict.name_idx):\n",
" value = sorted(st.dict.name_idx[key])\n",
" print key, ':', value\n",
"st.dict['Number2'] = n2\n",
"for key in sorted(st.dict):\n",
" value = st.dict[key]\n",
" print key, ':', value\n",
"for key in sorted(st.dict.name_idx):\n",
" value = sorted(st.dict.name_idx[key])\n",
" print key, ':', value\n",
"st.dict['Number1'] = n3\n",
" obj = st.dict[key]\n",
" idxs = sorted(st.dict.name_idx[key])\n",
" print key, ':', str(obj), idxs"
]
},
{
"cell_type": "code",
"execution_count": 76,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"st.dict['Number1'] = n3"
]
},
{
"cell_type": "code",
"execution_count": 77,
"metadata": {
"collapsed": false
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Number1 : Node(3) [0, 2]\n",
"Number2 : Node(2) [1]\n"
]
}
],
"source": [
"for key in sorted(st.dict):\n",
" value = st.dict[key]\n",
" print key, ':', value\n",
"for key in sorted(st.dict.name_idx):\n",
" value = sorted(st.dict.name_idx[key])\n",
" print key, ':', value"
" obj = st.dict[key]\n",
" idxs = sorted(st.dict.name_idx[key])\n",
" print key, ':', str(obj), idxs"
]
},
{
"cell_type": "code",
"execution_count": 74,
"execution_count": 78,
"metadata": {
"collapsed": false
},
Expand All @@ -1749,7 +1787,7 @@
},
{
"cell_type": "code",
"execution_count": 75,
"execution_count": 79,
"metadata": {
"collapsed": false
},
Expand All @@ -1768,7 +1806,7 @@
},
{
"cell_type": "code",
"execution_count": 76,
"execution_count": 88,
"metadata": {
"collapsed": false
},
Expand All @@ -1789,7 +1827,7 @@
},
{
"cell_type": "code",
"execution_count": 77,
"execution_count": 87,
"metadata": {
"collapsed": false
},
Expand All @@ -1798,15 +1836,16 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Number1 : [0, 2]\n",
"Number2 : [1]\n"
"Number1 : Node(3) [0, 2]\n",
"Number2 : Node(2) [1]\n"
]
}
],
"source": [
"for key in sorted(st.dict.name_idx):\n",
" value = sorted(st.dict.name_idx[key])\n",
" print key, ':', value"
"for key in sorted(st.dict):\n",
" obj = st.dict[key]\n",
" idxs = sorted(st.dict.name_idx[key])\n",
" print key, ':', str(obj), idxs"
]
},
{
Expand All @@ -1825,7 +1864,7 @@
},
{
"cell_type": "code",
"execution_count": 78,
"execution_count": 82,
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -1868,7 +1907,7 @@
},
{
"cell_type": "code",
"execution_count": 79,
"execution_count": 83,
"metadata": {
"collapsed": false
},
Expand All @@ -1887,7 +1926,7 @@
},
{
"cell_type": "code",
"execution_count": 80,
"execution_count": 84,
"metadata": {
"collapsed": true
},
Expand All @@ -1905,7 +1944,7 @@
},
{
"cell_type": "code",
"execution_count": 81,
"execution_count": 85,
"metadata": {
"collapsed": false
},
Expand All @@ -1923,7 +1962,7 @@
},
{
"cell_type": "code",
"execution_count": 82,
"execution_count": 86,
"metadata": {
"collapsed": false
},
Expand Down

0 comments on commit 0b2e20b

Please sign in to comment.