Skip to content

Latest commit

 

History

History

simple_example

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Simple External Plugin Example

This is a simple example to show how to write an external greenflow plugin. greenflow take advantage of the entry point inside the setup.py file to register the plugin. greenflow can discover all the plugins that has the entry point group name greenflow.plugin. Check the setup.py file to see details.

Create an new Python enviroment

conda create -n test python=3.8

Install the greenflowlab JupyterLab plugin

To install greenflowlab JupyterLab plugin, make sure nodejs of version [12^14^15] is installed. E.g:

conda install -c conda-forge python-graphviz nodejs=12.4.0 pydot

Then install the greenflowlab:

pip install greenflowlab

Or install greenflowlab at the greenflowlab directory:

pip install .

Install the external example plugin

To install the external plugin, in the plugin diretory, run following command

pip install .

Launch the Jupyter lab

After launching the JupyterLab by,

jupyter-lab --allow-root --ip=0.0.0.0 --no-browser --NotebookApp.token=''

You can see the DistanceNode and PointNode under the name custom_node in the menu.