Skip to content

statsim/port

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
css
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Port.js

Port is a highly opinionated GUI wrapper for processing tasks. Not even close to R's shiny or Python's streamlit. Mostly used in StatSim Apps.

Conceptual model

Port takes a schema object that contains four main blocks:

  • model - defines a computation part
  • render - visualization part (optional)
  • design - overall appearance (optional)
  • inputs - list of inputs and their descriptions (optional)
  • outputs - list of outputs and their descriptions (optional)

Config/schema object

  • model - Contains main parameters of the model/script
    • url (string) - URL of a JS/Python file to load, or:
    • code (function) - It's possible to pass code to a Port object instead of an url
    • name (string) - Name of the callable object. Default value is taken from url or code
    • autorun (boolean, default - false) - Defines if the script should be evaluated on each input change
    • type (string) - What kind of script is loaded. Influences how the code is initializated. Possible values:
      • function (default)
      • class
      • async-function
      • async-init
      • py
      • tf
    • method (string) - If type is class, defines the name of the class method to call during evaluation
    • container (string) - How input values are passed to the function/method:
      • object (default) - Pass inputs wrapped in an object, i.e. {'x': 1, 'y': 2}
      • args - Pass inputs as separate arguments
    • worker (boolean) - If true the script will be run in a Web Worker

About

Port. Web UI for JavaScript methods, Python scripts and ML models

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published