Metadata-Version: 2.1
Name: ailab-lite
Version: 0.1.5
Summary: Jupyter Notebook extension GUI node editor
Home-page: https://github.com/fathoms-io/ailab-lite
Author: Michal Zagalski
Author-email: michal.zagalski@logicai.io
License: UNKNOWN
Keywords: ipython,jupyter,widgets
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: IPython
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Multimedia :: Graphics
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: ipywidgets (>=7.6.0)
Requires-Dist: fathom-lib


ailab-lite
===============================

Jupyter Notebook extension GUI node editor

Installation
------------

To install use pip:

    $ pip install ailab_lite

------------

### Instructions:

#### Jupyter Notebook/Lab:
Import node editor widget:
```python
from ailab_lite import NodeEditorWidget
```

Import pandas:
```python
import pandas as pd
```

Decalare dataset:
```python
example = pd.read_csv("example.csv")
```

Run widget:
```python
NodeEditorWidget(env=globals())
```
We initialize it with `globals()` so all previously defined datasets are available in node editor.

We can pass workflow definition directly when initializing widget:
```python
NodeEditorWidget(env=globals(), workflow_definition="definition")
```
#### Buttons
Buttons in editor are revealed after Dataset and at least one Component are used. 

---

### Running example
The `examples` directory contain example of widget usage. It contain predefined workflow.
To run it, simply `cd` to the directory and run `jupyter notebook` or `jupyter lab` command.

(In order to run widget in the example first time it is required to run all cells. Other way the widget won't render)

---

### Development:
For a development installation (requires [Node.js](https://nodejs.org) and [Yarn version 1](https://classic.yarnpkg.com/)),

    $ git clone https://github.com/fathoms-io/ailab-lite.git
    $ cd ailab-lite
    $ pip install -e .
    $ jupyter nbextension install --py --symlink --overwrite --sys-prefix ailab_lite
    $ jupyter nbextension enable --py --sys-prefix ailab_lite

When actively developing your extension for JupyterLab, run the command:

    $ jupyter labextension develop --overwrite ailab_lite

Then you need to rebuild the JS when you make a code change:

    $ cd js
    $ yarn run build

You then need to refresh the JupyterLab page when your javascript changes.


