Skip to main content

Visual dataflow programming between parameterized objects.

Project description

# Boxflow

*Visual dataflow programming between parameterized objects*

Boxflow allows visual programming by connecting and visualizing
parameterized objects. Examples of types of parameterized objects that
Boxflow aims to support include param parameters and number generators,
[Imagen](http://ioam.github.io/imagen/) patterns and eventually
[HoloViews](http://www.holoviews.org) elements in future.

Currently work-in-progress but many of the essential features are now in place. Note that development may be slow as this is currently a personal project that I am working on in my free time.

[![Example-use-style='width:600px'](./boxflow/assets/example.png)](index.html)

*Recommended browser: Chrome with ES6 enabled (chrome://flags/#enable-javascript-harmony)*

## Interaction

+ Scroll up/down: Zoom in/out
+ '+'/'-' : Zoom in/out
+ Drag empty space: Pan view.
+ 'H' : Hide GUI panel.
+ Click node: View node parameters.
+ Drag node: Move node.
+ Drag output port: Create connection.
+ 'd'/'Backspace' over highlighted (red outline): Delete object


## Features

- Visual dataflow programming
- Client/Server architecture allowing deployment online.
- Extensible both on the client- and server-side.
- Compose and manipulate imagen pattern generators visually.

## Developer instructions

- Launch server.

```sh
$ python server.py
```

To serve ES5 Javascript from the es5 directory (needs to be updated with Babel):

```sh
$ python server.py -es5
```

- Alternatively:

```
$ python -c "from boxflow.server import main; main('js')"
```

### Babel and ES5

This project is written in ES6 using Chrome (with these experimental language features enabled). Recent versions of Firefox support ES6 but for everything else, ES5 is required. To update the ``es5`` directory:

- Install babel globally:

```sh
sudo npm install -g babel-cli
```
- Install ES5 'preset':

```sh
npm install babel-preset-es2015
```

- Update the contents of the es5 folder:

```
babel ./boxflow/js/ --out-dir ./boxflow/es5/
```

## About the code

- Written in modern Javascript (ES6)
- Minimal JS dependencies: [fabric](http://fabricjs.com/), [watch.js](https://github.com/melanke/Watch.JS/), [underscore.js](http://underscorejs.org/) and [dat.gui](https://github.com/dataarts/dat.gui).
- Minimal Python dependencies: [tornado](http://www.tornadoweb.org/en/stable/), [pillow](https://python-pillow.org/), [Imagen](https://ioam.github.io/imagen/)


## Goals

+ Offer an alternative to the Jupyter notebook environment.
+ Offer a rich, visual way of manipulate parameterized objects:
+ Param: Number generators, parameterized classes. Possible alternative to paramnb.
+ HoloViews: Elements, HoloMaps, Layouts, Operations.
+ Imagen: PatternGenerators.
+ Declarative specification (JSON) that can be loaded from Python or into the browser.
+ Allow custom nodes to be defined on the client (by defining a parameterized class).
+ Personal goal: learn ES6 and modern, idiomatic Javascript.

## TODO

- JQuery used for a single line of code (dependency can be removed).
- Enforce DAG graph + port type checking.
- Save/Load functionality.
- Ensure Python 3 compatibility.
- Personal goal: learn ES6 and modern, idiomatic Javascript.

License
----

BSD 3-clause license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

boxflow-0.0.4.tar.gz (1.4 MB view details)

Uploaded Source

File details

Details for the file boxflow-0.0.4.tar.gz.

File metadata

  • Download URL: boxflow-0.0.4.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.5

File hashes

Hashes for boxflow-0.0.4.tar.gz
Algorithm Hash digest
SHA256 69d869e17d552d500281ec593ba4df8f5a8581b4c48b5bec46a094ca609dd890
MD5 422f011f1b855c584cfc31f366b8bd2f
BLAKE2b-256 c3cef323e5e2fb8eb8d8f37387ca1351561d1437e2cc6f4115275d4839487cd0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page