Home

Awesome

pipen-board

Visualize configuration and running of pipen pipelines on the web.

pipen-board

Installation

pip install pipen-board

Usage

$ pipen board --help
Usage: pipen board [options] <pipeline> -- [pipeline options]

Configure and run pipen pipelines from the web

Required Arguments:
  pipeline              The pipeline and the CLI arguments to run the pipeline. For the
                        pipeline either `/path/to/pipeline.py:<pipeline>` or
                        `<module.submodule>:<pipeline>` `<pipeline>` must be an instance of
                        `Pipen` and running the pipeline should be called under `__name__ ==
                        '__main__'.

Optional Arguments:
  -h, --help            show help message and exit
  -p PORT, --port PORT  Port to serve the UI wizard [default: 18521]
  -a FILE, --additional FILE
                        Additional arguments for the pipeline, in YAML, INI, JSON or TOML
                        format. Can have sections `ADDITIONAL_OPTIONS` and `RUNNING_OPTIONS`.
                        It can also have other sections and items to override the
                        configurations generated from the pipeline. If the pipeline is
                        provided as a python script, such as
                        `/path/to/pipeline.py:<pipeline>`, and `<pipeline>` runs under
                        `__name__ == '__main__'`, the additional file can also be specified
                        as `auto` to generate a `RUNNING OPTIONS/Local` section to run the
                        pipeline locally.
  --loglevel {auto,debug,info,warning,error,critical}
                        The logging level. If `auto`, it will be set to `debug` if `--dev` is
                        set, otherwise `info`. [default: auto]
  --dev                 Run the pipeline in development/debug mode. This will reload the
                        server when changes are made to this package and reload the pipeline
                        when page reloads for new configurations. Page cache is also disabled
                        in this mode.
  -w WORKDIR, --workdir WORKDIR
                        The working directory of the pipeline. [default: .pipen]
  -s SCHEMA_DIR, --schema-dir SCHEMA_DIR
                        The directory to store the configuration schemas. [default: ~/.pipen-
                        board]

Describing arguments in docstring

Docstring schema

class ProcessOrProcessGroup:
    """Short summary

    Long description
    Long description

    Args:
        arg1 (<metadata>): description
            - subarg1 (<metadata>): description
            - subarg2 (<metadata>): description
        arg2 (<metadata>): description

    <Other Sections>:
        <content>
    """

The metadata can have multiple attributes, separated by semicolon (;). For example:

arg1 (action=ns;required): description

Marks

You can mark a process using pipen.utils.mark(<mark>=<value>) as a decorator to decorate a process. For example:

from pipen import Proc
from pipen.utils import mark

@mark(board_config_no_input=True)
class MyProc(Proc):
    pass

Available marks:

Metadata for arguments

NameDescriptionAllowed values
actionLike the action argument in argx*.store_true, store_false, ns, namespace, append, extend, clear_append, clear_extend (other values are allowed but ignore, they may be effective for CLI use)
btypeBoard type (option type specified directly). If specified, action will be ignoredns, choice, mchoice, array, list, json, int, float, bool, str, text, auto*
typeFallback for action and btypeSame as btype
flagFallback for action=store_trueNo values needed
text/mline/mlinesShortcut for btype=textNo values needed
ns/namespaceShortcut for btype=nsNo values needed
choices/choiceShortcut for btype=choiceNo values needed
mchoices/mchoiceShortcut for btype=mchoiceNo values needed
array/listShortcut for btype=array/btype=listNo values needed
choices/choiceShortcut for btype=choiceNo values needed
mchoices/mchoiceShortcut for btype=mchoiceNo values needed
orderThe order of the argument in the UI.Any integer
readonlyWhether the argument is readonly.No values needed (True if specified, otherwise False)
requiredWhether the argument is required.No values needed (True if specified, otherwise False)
placeholderThe placeholder in the UI for the argument.Any string
bitypeThe type of the elements in an array or list.int, float, bool, str, json, auto*
itypeFallback for bitypeSame as bitype

Types of options in the UI

The type of an option in the UI is determined by the btype, action or type metadata. If neither is specified, a PlainText will be used.