Package: cwstorm
StormStorm is a Python DSL to generate a graph of task dependencies.InstallFor development, it's best to install ineditablemode in a virtual environment.> git clone git@github.com/ConductorTechnologies/cwstorm.git
> cd cwstorm

# Create a virtual environment
> python3 -m venv cwstorm.venv
> . cwstorm.venv/bin/activate

# Install in editable mode
> pip install -e .

# Optionally install the black formatter and some other dev tools
> pip install -r requirements.txtQuick Start CLIUse thestormCLI command to serialize one of the example jobs. The pretty option generates human readable JSON output.> storm serialize -x simple_qt -f pretty -s default ~/Desktop/simple_qt.json
> cat ~/Desktop/simple_qt.jsonIf using thedefaultserializer and you wantJSONoutput, you can omit the--serializerand--formatoptions.> storm serialize -x simple_qt ~/Desktop/simple_qt.jsonVisualizeYou can visualize graphs on theweb app. In the upper left, you'll see a menu containing some presets and an upload button. Upload the file you just made.~/Desktop/simple_qt.jsonor make a new one.Command-line interfaceThe command-line interface has one subcommand,serialize. It creates the argument parser dynamically based on the available examples and serializers.storm serialize --helpExamplesTheass_comp_normal.pyexample is a more complex script. It builds a graph of tasks that uploads assets, generates ass files, renders them, adds optical motion blur, makes a quicktime, and notifies people.DSL StructureA graph consists of dag nodes with attributes. Look through the examples folder to familiarize yourself with the API.Inheritance hierarchy is as follows:NodeThe base class. Responsible for generating getters and setters for different attributes. The idea is to have a consistent language to build the DAG, add options to nodes, and to quickly see how the graph will look. See the ATTRS lists in Job, Task, and Cmd. The types of attributes that can be added to nodes are:intstrdictCmdlist of intlist of strlist of CmdSetters return self, which allows for chaining.Getters and setters are generated are as follows for Attribute nameatrof Noden:intSetter:n.atr(value) -> selfGettern.atr() -> intstrSetter:n.atr(value) -> selfGettern.atr() -> strdictSetter:n.atr({"key": "VAL", ...}) -> selfUpdatern.update_atr({"key2": "VAL2", ...}) -> selfGettern.atr() -> dictCmdSetter:n.atr(Cmd(*args)) -> selfGettern.atr() -> Cmdlist:intSetter:n.atr(*args) -> selfExtendern.push_atr(*args) -> selfGettern.atr() -> list of intlist:strSetter:n.atr(*args) -> selfExtendern.push_atr(*args) -> selfGettern.atr() -> list of strlist:CmdSetter:n.atr(Cmd(*args), Cmd(*args), ...) -> selfExtendern.push_atr(Cmd(*args), Cmd(*args), ...) -> selfGettern.atr() -> list of Cmdlist:dictSetter:n.atr({"key": "VAL", ...}, {"key": "VAL", ...}, ...) -> selfExtendern.push_atr({"key": "VAL", ...}, {"key": "VAL", ...}, ...) -> selfGettern.atr() -> list of dictDagNode(Node)Any node used for building the DAG - Currently Job, Task, and Upload. DagNode has methods to add children and to manage serialization of the hierarchy.Task(DagNode)Tasks contain commands. They may be added to other Tasks as children or to the Job. A task may be the child of many parents.Upload(DagNode)Uploads contain lists of filepaths. They can be added anywhere a Task can be added. The only difference is their set of properties.Job(DagNode)A job is like a Task, but there can be only one and it cannot have parents. Think of it as a container for all other tasks and uploads.Cmd(Node)Commands currently exist in the "commands" or "cleanup" attributes of tasks. Lists of commands in a task run in serial.ChangelogVersion:0.1.1 -- 23 Jan 2024Schema tweaksRemove environment from jobRemove cleanup from all nodesAdduploadnode typeAddlifecycleproperty to tasksUnreleased:0.0.1-beta.1Initial CICD setup--