Skip to content

arcalot/arcaflow-plugin-utilities

Repository files navigation

Utilities Plugin for Arcaflow

The Utilities plugin is used to store common utility functions used by various plugins/workflows. Where each step of the plugin corresponds to a different utility functionality. Refer to individual step functions in utilities_plugin.py to see what input is expected for each step.

To test:

In order to run the utilities plugin run the following steps:

Containerized

  1. Clone this repository
  2. Create the container with docker build -t arca-utilities -f Dockerfile
  3. Run cat example.yaml | docker run -i arca-utilities -f - to run the plugin

Native

  1. Clone this repository
  2. Create a venv in the current directory with python3 -m venv $(pwd)/venv
  3. Activate the venv by running source venv/bin/activate
  4. Run pip install poetry
  5. Run poetry install
  6. Run ./utilities_plugin.py -f example.yaml to run the plugin

Image Building

You can change this plugin's image version tag in .github/workflows/carpenter.yaml by editing the IMAGE_TAG variable, and pushing that change to the branch designated in that workflow.

Autogenerated Input/Output Documentation by Arcaflow-Docsgen Below

Generate timestamp (timestamp)

Generates a random timestamp in ISO 8601 format with millisecond accuracy

Input

Type:scope
Root object:InputParams
Properties
Objects
InputParams (object)
Type:object
Properties

Outputs

error

Type:scope
Root object:ErrorOutput
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string
Objects
ErrorOutput (object)
Type:object
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string

success

Type:scope
Root object:SuccessOutputTimestamp
Properties
timestamp (string)
Name:timestamp
Description:An ISO 8601 timestamp with millisecond precision
Required:Yes
Type:string
Objects
SuccessOutputTimestamp (object)
Type:object
Properties
timestamp (string)
Name:timestamp
Description:An ISO 8601 timestamp with millisecond precision
Required:Yes
Type:string

Generate UUID (uuid)

Generates a random UUID which can be used for tracking uniqueness

Input

Type:scope
Root object:InputParams
Properties
Objects
InputParams (object)
Type:object
Properties

Outputs

error

Type:scope
Root object:ErrorOutput
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string
Objects
ErrorOutput (object)
Type:object
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string

success

Type:scope
Root object:SuccessOutputUUID
Properties
uuid (string)
Name:UUID
Description:A randomly generated UUID
Required:Yes
Type:string
Objects
SuccessOutputUUID (object)
Type:object
Properties
uuid (string)
Name:UUID
Description:A randomly generated UUID
Required:Yes
Type:string

Wait (wait)

Wait for specified milliseconds

Input

Type:scope
Root object:WaitInput
Properties
wait_time_ms (int)
Name:Wait time
Description:How long to wait in milliseconds
Required:Yes
Type:int
Objects
WaitInput (object)
Type:object
Properties
wait_time_ms (int)
Name:Wait time
Description:How long to wait in milliseconds
Required:Yes
Type:int

Outputs

error

Type:scope
Root object:ErrorOutput
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string
Objects
ErrorOutput (object)
Type:object
Properties
error (string)
Name:Failure Error
Description:Reason for failure
Required:Yes
Type:string

success

Type:scope
Root object:SuccessOutputWait
Properties
waited_ms (float)
Name:waited
Description:Confirmation of milliseconds waited
Required:Yes
Type:float
Objects
SuccessOutputWait (object)
Type:object
Properties
waited_ms (float)
Name:waited
Description:Confirmation of milliseconds waited
Required:Yes
Type:float