Skip to content

Add new feature to allow editing API Algorithm script in Jyputer. #547

@wildone

Description

@wildone

We need to to make creating the Python code easier.

Lets create a feature that would allow editing/developing API Algorithm code in Jyputer.

When you add API Algorithm you will have a button called "Edit" when you click it:

  • script will post to Jyputer input params as a new file "{id}.input"
  • script will post to Jyputer blank output file "{id}.ouput"
  • script will post to Jyputer updated algorithm as file "{id}.ipynb", reference in [1]
  • script will open a dialog to wait for a user to click "Done" then would pull latest scirpt from Jyputer removing cells it does not need, identifiable by cell ID.
  • a new window will open with Jyputer notebook for editing "{id}.ipynb"
  • allow posting to Jyputer from Flow UI
  • investigate how to and what to do when posting to Jyputer
  • update flow component with reference code
  • Build a new modal dialog that would wait in totaljs untill the editing is done and would pull latest script content into the wiring block. [2]

[1] - API Algorithm - https://github.com/typerefinery-ai/flowcomponents/blob/main/components/api-algorithm.html
[2] - reference for making a dialog that can wait for continue in Flow UI.

FUNC.readme = function(title, md) {

	var winid = 'readme' + HASH(md);
	common.readmewindow = md;

	if (common.windows.findItem('id', winid)) {
		SETTER('windows/focus', winid);
	} else {
		PUSH('common.windows', { id: winid, cache: 'readme', html: '<ui-import config="url:@{#}/forms/readme.html"></ui-import>', title: title, actions: { move: true, autosave: true, close: true, maximize: false, minimize: false }, offset: { x: ((WW / 2) - 275) >> 0, y: ((WH / 2) - 250) >> 0, width: 550, height: 500, minwidth: 200, minheight: 300, maxwidth: 800, maxheight: 1200 }, make: function(el) {
			el.closest('.ui-windows-item').css('z-index', 50);
		}});
	}

};

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions