Skip to content
This repository was archived by the owner on Feb 4, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ set -ex

# Install Fiji

export IJ_PATH="$HOME/Fiji.app"
mkdir -p $IJ_PATH/
cd $HOME/
wget --no-check-certificate https://downloads.imagej.net/fiji/latest/fiji-linux64.zip
Expand Down Expand Up @@ -43,4 +44,4 @@ $IJ_LAUNCHER --ij2 --headless --run $JAVA_COMMAND_CLASS "logLevel=\"info\",pytho
jupyter kernelspec list

# Now run the test notebook
#jupyter nbconvert --execute --ExecutePreprocessor.timeout="60" --ExecutePreprocessor.kernel_name="scijava" "$TRAVIS_BUILD_DIR/notebooks/Test.ipynb"
jupyter nbconvert --execute --ExecutePreprocessor.timeout="60" --ExecutePreprocessor.kernel_name="scijava" "$TRAVIS_BUILD_DIR/notebooks/Test.ipynb"
130 changes: 115 additions & 15 deletions notebooks/Test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,27 @@
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"No Outputs"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"// @UIService ui\n",
"ui.setHeadless(true)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"name": "stdout",
Expand All @@ -27,7 +48,7 @@
"No Outputs"
]
},
"execution_count": 1,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -38,7 +59,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -54,7 +75,7 @@
"No Outputs"
]
},
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -73,17 +94,52 @@
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style>table.converted {color: #333; font-family: Helvetica, Arial, sans-serif; border-collapse: collapse; border-spacing: 0;}table.converted td, table.converted th {border: 1px solid #C9C7C7;}table.converted th, table.converted td.rowLabel {background: #626262; color: #FFFFFF; font-weight: bold; text-align: left;}table.converted td {text-align: left;}table.converted tr:nth-child(even) {background: #F3F3F3;}table.converted tr:nth-child(odd) {background: #FFFFFF;}table.converted tbody tr:hover {background: #BDF4B5;}table.converted td.rowLabel, table.converted th.rowLabel {display: none;}</style><table class =\"converted\"><thead><tr><th>Key</th><th>Value</th></tr></thead><tbody><tr><td>a&#8203;_string</td><td>Hello</td></tr><tr><td>a&#8203;_number</td><td>87</td></tr></tbody></table>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"// @NotebookService nb\n",
"a_groovy_dict = [a_string: 'Hello', a_number: 87]\n",
"nb.display(a_groovy_dict)"
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Test python language\n",
"2.7.0 (default:9987c746f838, Apr 29 2015, 02:25:11) \n",
"[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]\n"
]
},
{
"data": {
"text/plain": [
"No Outputs"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#!python\n",
"import sys\n",
Expand All @@ -92,22 +148,66 @@
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"No Outputs"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#!groovy"
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"This is groovy code\n"
]
}
],
"source": [
"println \"This is groovy code\""
]
},
{
"cell_type": "markdown",
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Hello\n",
"87\n"
]
},
{
"data": {
"text/plain": [
"No Outputs"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"#!python\n",
"print(a_groovy_dict[\"a_string\"])\n",
Expand All @@ -119,7 +219,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 12,
"metadata": {},
"outputs": [
{
Expand All @@ -128,7 +228,7 @@
"<style>table.converted {color: #333; font-family: Helvetica, Arial, sans-serif; border-collapse: collapse; border-spacing: 0;}table.converted td, table.converted th {border: 1px solid #C9C7C7;}table.converted th, table.converted td.rowLabel {background: #626262; color: #FFFFFF; font-weight: bold; text-align: left;}table.converted td {text-align: left;}table.converted tr:nth-child(even) {background: #F3F3F3;}table.converted tr:nth-child(odd) {background: #FFFFFF;}table.converted tbody tr:hover {background: #BDF4B5;}table.converted td.rowLabel, table.converted th.rowLabel {display: none;}</style><table class =\"converted\"><thead><tr><th>Key</th><th>Value</th></tr></thead><tbody><tr><td>:a</td><td>4</td></tr><tr><td>:e</td><td>&lt;none&gt;</td></tr></tbody></table>"
]
},
"execution_count": 3,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -140,7 +240,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand All @@ -149,7 +249,7 @@
"<style>table.converted {color: #333; font-family: Helvetica, Arial, sans-serif; border-collapse: collapse; border-spacing: 0;}table.converted td, table.converted th {border: 1px solid #C9C7C7;}table.converted th, table.converted td.rowLabel {background: #626262; color: #FFFFFF; font-weight: bold; text-align: left;}table.converted td {text-align: left;}table.converted tr:nth-child(even) {background: #F3F3F3;}table.converted tr:nth-child(odd) {background: #FFFFFF;}table.converted tbody tr:hover {background: #BDF4B5;}table.converted td.rowLabel, table.converted th.rowLabel {display: none;}</style><table class =\"converted\"><thead><tr><th>Key</th><th>Value</th></tr></thead><tbody><tr><td>a</td><td>4</td></tr><tr><td>e</td><td>&lt;none&gt;</td></tr></tbody></table>"
]
},
"execution_count": 4,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -161,7 +261,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 14,
"metadata": {},
"outputs": [
{
Expand All @@ -170,7 +270,7 @@
"<style>table.converted {color: #333; font-family: Helvetica, Arial, sans-serif; border-collapse: collapse; border-spacing: 0;}table.converted td, table.converted th {border: 1px solid #C9C7C7;}table.converted th, table.converted td.rowLabel {background: #626262; color: #FFFFFF; font-weight: bold; text-align: left;}table.converted td {text-align: left;}table.converted tr:nth-child(even) {background: #F3F3F3;}table.converted tr:nth-child(odd) {background: #FFFFFF;}table.converted tbody tr:hover {background: #BDF4B5;}table.converted td.rowLabel, table.converted th.rowLabel {display: none;}</style><table class =\"converted\"><thead><tr><th>Salutation</th><th>Valediction</th></tr></thead><tbody><tr><td>hello</td><td>goodbye</td></tr><tr><td>hi</td><td>bye</td></tr><tr><td>hey</td><td>&lt;none&gt;</td></tr></tbody></table>"
]
},
"execution_count": 5,
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -184,7 +284,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Scijava",
"display_name": "SciJava",
"language": "groovy",
"name": "scijava"
},
Expand Down