Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into mariusz/5481
Browse files Browse the repository at this point in the history
* origin/master:
  jarek/groovy autocomplete (#5868)
  add explanation, remove outdated error msg
  remove old text
  #5847 %defaultDatasource crashes SQL kernel fix. (#5851)
  polish docs (#5872)
  #5844 - %import with no arguments - fix (#5852)
  Scala interfaces: List to Seq (#5853)
  add e2e tests for plotFeatures notebook (#5856)
  move conda download links to the main page
  #5845: fix grape, add ivy dependency (#5869)
  Revert "#5481 Update to ipywidgets v7 (#5770)" (#5870)
  #5481 Update to ipywidgets v7 (#5770)
  explain install situation betterg
  • Loading branch information
michalgce committed Aug 24, 2017
2 parents ed689d0 + c339510 commit 093fc6a
Show file tree
Hide file tree
Showing 53 changed files with 2,804 additions and 1,684 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ beakerx/__pycache__/
beakerx/plot/__pycache__/
js/bower_components/
lib/
beakerx/record.txt
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,17 @@ Notebook (source code archive)](https://github.com/twosigma/beaker-notebook-arch

## Install

### Dependencies:

* [conda](https://www.continuum.io/downloads) (any Python 3
environment with [Jupyter Notebook](https://jupyter.org), a
[JDK](http://jdk.java.net/8/), and
[Pandas](http://pandas.pydata.org/) installed should be fine, but
our documentation assumes conda). Right now the easiest way to get
started is to create an environment with conda and then install
BeakerX with pip. A conda package for BeakerX should be ready
soon.

<!-- Install using [conda](https://conda.io/docs/install/quick.html):
```
Expand All @@ -43,6 +54,8 @@ conda install -c beakerx beakerx
Using [pip](https://pypi.python.org/pypi/pip):

```
conda create -y -n beakerx python=3.5 jupyter openjdk pandas
source activate beakerx
pip install beakerx
beakerx-install
```
Expand All @@ -51,7 +64,7 @@ beakerx-install

### Dependencies:

* [conda](https://conda.io/docs/install/quick.html) (any Python 3 environment with [Jupyter Notebook](https://pypi.python.org/pypi/notebook), [Node.js](https://nodejs.org/en/), and [JDK](http://jdk.java.net/8/) installed should be fine, but our documentation assumes conda)
* [conda](https://www.continuum.io/downloads) (any Python 3 environment with [Jupyter Notebook](https://pypi.python.org/pypi/notebook), [Node.js](https://nodejs.org/en/), and [JDK](http://jdk.java.net/8/) installed should be fine, but our documentation assumes conda)
* [yarn](https://yarnpkg.com/lang/en/docs/install/)

### Install
Expand Down
6 changes: 3 additions & 3 deletions doc/StartHere.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
"[JavaScript](contents/plot-js-api.ipynb), [Python](contents/pythonChartingAPI.ipynb), [Scala](contents/scala/plotScalaDemo.ipynb).\n",
"\n",
"### Scala\n",
"[EasyForm](contents/scala/EasyFormScalaDemos.ipynb), [Tables](contents/scala/tableApiScala.ipynb), [Plotting](contents/scala/plotScalaDemo.ipynb).\n",
" \n",
"[Tables](contents/scala/tableApiScala.ipynb), [Plotting](contents/scala/plotScalaDemo.ipynb), [EasyForm](contents/scala/EasyFormScalaDemos.ipynb).\n",
"\n",
"### Media Outputs and Displayer Customization\n",
"\n",
"[Media and MIME Outputs](contents/mimeDemo.ipynb), [Display of Null](contents/showNullExecutionResult.ipynb), [Custom Displayers and `jvm-repr`](contents/JVM_repr_example.ipynb).\n",
Expand Down Expand Up @@ -72,7 +72,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
"version": "3.5.4"
}
},
"nbformat": 4,
Expand Down
4 changes: 2 additions & 2 deletions doc/contents/DisplayVegaInJupyterLab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@
"source": [
"// bar-chart.vg.json from https://gist.github.com/hadim/629b8fde56eac74c587136139a0dd5c2#file-bar-chart-vg-json\n",
"\n",
"import com.twosigma.beakerx.mimetype.MIMEContainer;\n",
"import groovy.json.JsonSlurper;\n",
"import com.twosigma.beakerx.mimetype.MIMEContainer\n",
"import groovy.json.JsonSlurper\n",
" \n",
"fname = \"demoResources/bar-chart.vg.json\"\n",
"fileContents = new File(fname).text\n",
Expand Down
88 changes: 65 additions & 23 deletions doc/contents/EasyFormDemos.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"source": [
"# Easy Form\n",
"\n",
"Beaker has a Groovy API for creating forms that the user can fill in and trigger execution.\n",
"BeakerX has a Groovy API for creating forms that the user can fill in and trigger execution.\n",
"It's easy to create a form with it, and easy to access the values entered.\n",
"Just create a form object, add fields to it, and then return it so it's displayed for the\n",
"user to interact with.\n",
Expand All @@ -19,10 +19,18 @@
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "919ced74-6634-4ab0-a80d-35f2996d09aa"
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"f = new EasyForm(\"Form and Run\")\n",
"f.addTextField(\"first\", 250)\n",
Expand All @@ -42,7 +50,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 2,
"metadata": {
"tags": [
"run"
Expand All @@ -52,10 +60,10 @@
{
"data": {
"text/plain": [
"suilezreB...Beaker"
"tsaL...FirstX"
]
},
"execution_count": 6,
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -73,7 +81,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"outputs": [
{
Expand All @@ -82,7 +90,7 @@
"Berzelius"
]
},
"execution_count": 5,
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -96,6 +104,8 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Event Handlers for Smarter Forms\n",
"\n",
"You can use `onInit` and `onChange` to handle component events. For button events use `actionPerformed` or `addAction`."
]
},
Expand Down Expand Up @@ -188,11 +198,19 @@
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "88ebbf08-14d6-44b8-99b6-a1a3de967fe0"
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"g = new EasyForm(\"Field Types\")\n",
"g.addTextField(\"Short Text Field\", 10)\n",
Expand Down Expand Up @@ -237,6 +255,13 @@
"result"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Dates are"
]
},
{
"cell_type": "code",
"execution_count": 19,
Expand Down Expand Up @@ -270,13 +295,30 @@
"gdp['Date'].getClass()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## JupyterJSWidgets work with EasyForm\n",
"\n",
"The widgets from [JupyterJSWidgets](JavaWidgets.ipynb) are compatible and can appear in forms."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"collapsed": true
},
"outputs": [],
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "561c365f-43cf-40d1-8aad-2b541b8fb5b9"
}
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"import com.twosigma.beakerx.widgets.integers.IntSlider\n",
"\n",
Expand All @@ -290,7 +332,7 @@
},
{
"cell_type": "code",
"execution_count": 24,
"execution_count": 6,
"metadata": {
"tags": [
"widget_test"
Expand All @@ -300,10 +342,10 @@
{
"data": {
"text/plain": [
"42"
"71"
]
},
"execution_count": 24,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
89 changes: 89 additions & 0 deletions doc/contents/GrapeExample.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"ename": "org.codehaus.groovy.control.MultipleCompilationErrorsException",
"evalue": " startup failed",
"output_type": "error",
"traceback": [
"\u001b[0;31morg.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:",
"\u001b[0;31mscript15033056800541660887958.groovy: 1: unable to resolve class org.apache.commons.io.Charsets",
"\u001b[0;31m @ line 1, column 1.",
"\u001b[0;31m import org.apache.commons.io.Charsets",
"\u001b[0;31m ^",
"\u001b[0;31m",
"\u001b[0;31m1 error",
"\u001b[0;31m",
"\u001b[0;31m\tat com.twosigma.beakerx.groovy.evaluator.GroovyCodeRunner.run(GroovyCodeRunner.java:57)"
]
}
],
"source": [
"import org.apache.commons.io.Charsets\n",
"println Charsets.US_ASCII "
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"US-ASCII\n"
]
},
{
"data": {
"text/plain": [
"null"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"// https://mvnrepository.com/artifact/commons-io/commons-io\n",
"@Grapes(\n",
" @Grab(group='commons-io', module='commons-io', version='2.5')\n",
")\n",
"import org.apache.commons.io.Charsets\n",
"println Charsets.US_ASCII "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Groovy",
"language": "groovy",
"name": "groovy"
},
"language_info": {
"codemirror_mode": "groovy",
"file_extension": ".groovy",
"mimetype": "",
"name": "Groovy",
"nbconverter_exporter": "",
"version": "2.4.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading

0 comments on commit 093fc6a

Please sign in to comment.