A simple workflow tool designed to work with EPICS PVs
Project description
CauliFlow
CauliFlow allows you to construct and run workflows by connecting multiple nodes in a YAML-format file. CauliFlow enables the creation of flexible, reusable workflows by utilising three types of variable: Flowdata, Blackboard and Macros. Although CauliFlow is primarily designed to work with EPICS PVs, it can also be used for other purposes. For more details, please refer to Documentation
Installation
CauliFlow requires Python 3.11 or higher.
To install CauliFlow with pip, run the following command:
pip install cauliflow
To confirm that the installation was successful, run:
cauliflow --version
You should see an output like the following:
cauliflow 0.1.0
Usage
CauliFlow loads workflows from a YAML-format file.
Create a file named increment.yml, write the following content into it.
---
sequential:
flows:
- name: "init"
flow:
- message:
name: "increment"
msg: 0
out_bb: yes
- name: "main"
flow:
- interval:
name: "interval"
interval: "{{ macro.interval | float }}"
- message:
name: "add"
msg: "{{ bb.increment + 1 }}"
out_bb: yes
out_field: "increment"
- message:
name: "out_msg"
msg: "{{ 'Count: ' + bb.increment | str }}"
- stdout:
name: "out"
src: "{{ fd.out_msg }}"
macros:
interval: "1"
In the above flows, two flows are executed sequentially.
The init flow runs first and sets the value of the increment key in the blackboard to 0.
After that, the main flow is executed at regular intervals, controlled by an interval node. Each time it runs, the add node increments the value of increment key in the blackboard and updates the value. Next, the out_msg node creates a message string and writes it to the flowdata. This string is then passed and printed to the standard output by the out node.
The interval parameter of the interval node is configured using a macro.
Since the macro value is passed as a string, the filter is used to convert it to a float.
To run the flows, use the cauliflow run command. the incremented value is showed every second.
$ cauliflow run increment.yml
Count: 1
Count: 2
Count: 3
Count: 4
Count: 5
You can change the interval value by specifying the macro at runtime.
$ cauliflow run -m interval 5 increment.yml
Count: 1
Count: 2
Count: 3
Count: 4
Count: 5
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cauliflow-0.2.0.tar.gz.
File metadata
- Download URL: cauliflow-0.2.0.tar.gz
- Upload date:
- Size: 125.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7cc59ed4a3ee4dbe2cba623286ee8a24cbc9701990eeccc726b09a75768dc87a
|
|
| MD5 |
1a40ae4ec45b8a7ea5f0b04e62671976
|
|
| BLAKE2b-256 |
cab217cec3136f782349658fb4f02042dc2113d6e789d6b6ce0bd99a345725b8
|
Provenance
The following attestation bundles were made for cauliflow-0.2.0.tar.gz:
Publisher:
publish.yml on sasaki77/cauliflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cauliflow-0.2.0.tar.gz -
Subject digest:
7cc59ed4a3ee4dbe2cba623286ee8a24cbc9701990eeccc726b09a75768dc87a - Sigstore transparency entry: 319124976
- Sigstore integration time:
-
Permalink:
sasaki77/cauliflow@e20b166c848c43df0637694e42dfbe56eec372e8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/sasaki77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20b166c848c43df0637694e42dfbe56eec372e8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cauliflow-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cauliflow-0.2.0-py3-none-any.whl
- Upload date:
- Size: 29.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bf9889c19f391f857c5b3e4eaa23c95c17d07bb21691ed69f628a990a9da8d6
|
|
| MD5 |
5b90c41d6d8ef1431fce35db98ecabd7
|
|
| BLAKE2b-256 |
36c30124f93fec1ec2815ec0ff747ce90bb0d0be2e2161718e15e3d3586f1e57
|
Provenance
The following attestation bundles were made for cauliflow-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on sasaki77/cauliflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cauliflow-0.2.0-py3-none-any.whl -
Subject digest:
6bf9889c19f391f857c5b3e4eaa23c95c17d07bb21691ed69f628a990a9da8d6 - Sigstore transparency entry: 319124986
- Sigstore integration time:
-
Permalink:
sasaki77/cauliflow@e20b166c848c43df0637694e42dfbe56eec372e8 -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/sasaki77
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20b166c848c43df0637694e42dfbe56eec372e8 -
Trigger Event:
push
-
Statement type: