-
Notifications
You must be signed in to change notification settings - Fork 8
Description
Is your feature request related to a problem? Please describe.
Juturna currently uses the same import approach for both built-in and plugin nodes. Whilst convenient on many levels, this poses some limitations on both groups that, as it is, cannot be solved. In particular:
- built-in nodes could be imported statically: as core nodes are bound to the library lifecycle, there is no real need to discover their paths, classes and resources like it is done for plugin nodes. A core node is a static entity, embedded in the library, hence its namespace can be treated as such. In short, the classes of all built-in nodes can be imported from their corresponding modules, without the need for discovery.
- plugin nodes are not trivial to manage: when it comes to versioning, development and distribution, plugin nodes can be tricky to handle. Having as only requirement the presence of a node code on the filesystem started to be quite flexible, but can ultimately result in a mess of copies and uncertain sources.
Describe the solution you'd like
Nodes can be implemented as separate python packages, all sharing the same namespace and exposing a single class. In short, a node would an installable python entity, with its own resources and dependencies, hosted on the filesystem, on git, or published on pypi. This node could then be installed with pip:
$ pip install ./node_location
$ pip install https://node/repo.git
$ pip install published_nodeThey could later be used like so:
from juturna_plugins.some_node import SomeNode
from juturna_plugins.other_node import OtherNodeThe node location can easily be included in the pipe configuration file, so that, when present, nodes could be automatically installed when a pipeline is launched.
{
"name": "node_name",
"type": "node_type",
"mark": "node_mark",
"source": "https://node/repo.git",
"configuration": { }
}