WoSIT is an automation tool made to replace make in many instances.
Project description
WoSIT (Workflow Script Interpreter Tool)
WoSIT is an automation tool made to replace make in many instances. It is written in pure Python and is built to ease integration of other Python scripts in automation workflows.
Using WoSIT
Similarly to Makefiles, WoSIT's way of describing automation workflows is through buildconfig.py files. Those are Python files, and as such allow for the use of the full scripting capabilities offered by Python and its packages. This fact makes it closer to generating automation workflows based on the given script, compared to make which uses workflows descriptions.
Basic Usage
Executing a WoSIT workflow is as simple as typing wosit in a directory where a buildconfig.py file is present. By default, WoSIT will execute the all rule.
Similarly to Make, parallel execution can be achieved with the -j flag followed by the maximum number of processes to use.
Basic Example
The following script defines a Python function named genMyRules() to generate a number of rules. Each rule depends on the previous one, and will use the shell echo command to print its own id in the terminal.
The script then generates those rules by calling the function.
The rule with target all is added with its source set to the last generated rule. This target is special as it is executed by default when no other target is specified.
from wosit.builder import *
def genMyRules(nbrules):
addRule(
target = f"rule_0",
command = f"echo This is a rule with id 0"
)
for i in range(1, nbrules):
addRule(
target = f"rule_{i}",
source = f"rule_{i-1}",
command = f"echo This is a rule with id {i}"
)
nb_rules = 10
genMyRules(nb_rules)
addRule(
target = "all",
source = f"rule_{nb_rules-1}"
)
addRule(
target="clean",
command=f"""
echo Clean commands should go here.
"""
)
Python Functions Example
WoSIT is capable of executing Python functions. The syntax is the same as defining any other rule, with the exception that the function must be passed to the command argument through WoSIT's Function() object.
from wosit.builder import *
addRule(
target = "rule_0",
command = Function(print, args=("This is rule 0.",))
)
addRule(
target = "rule_1",
command = Function(print, args=("This is rule 1.",))
)
addRule(
target = "all",
source = ["rule_0", "rule_1"]
)
More Examples
More examples are available in the examples folder of this repository.
Project details
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 wosit-1.0.0.tar.gz.
File metadata
- Download URL: wosit-1.0.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0b6de170066a6974d01fd3c04e40fe21cc94775d936142599efbc83b89cb70a
|
|
| MD5 |
31f817a9a569e622c73c8f061dcaa68a
|
|
| BLAKE2b-256 |
8c49980578f105b9a18162ea51dbbfd3f48babf7eb9ca59b3700fd7e10fddc61
|
Provenance
The following attestation bundles were made for wosit-1.0.0.tar.gz:
Publisher:
python-publish.yml on mgraschevalier/WoSIT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wosit-1.0.0.tar.gz -
Subject digest:
d0b6de170066a6974d01fd3c04e40fe21cc94775d936142599efbc83b89cb70a - Sigstore transparency entry: 1216825725
- Sigstore integration time:
-
Permalink:
mgraschevalier/WoSIT@a1feb879205a51db9ebb3dba7b6c0ae16ba2e469 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mgraschevalier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a1feb879205a51db9ebb3dba7b6c0ae16ba2e469 -
Trigger Event:
release
-
Statement type:
File details
Details for the file wosit-1.0.0-py3-none-any.whl.
File metadata
- Download URL: wosit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a632fd44ae1c20f2c10c71a3313b4efa87ec966d512726de10adc0cbafd1285b
|
|
| MD5 |
1af4785e1fe858f682b23081d2775eed
|
|
| BLAKE2b-256 |
aa821559d1ef6ea5f8c83dc920c6573a848cecae14759bd67ff724f597b3acc9
|
Provenance
The following attestation bundles were made for wosit-1.0.0-py3-none-any.whl:
Publisher:
python-publish.yml on mgraschevalier/WoSIT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wosit-1.0.0-py3-none-any.whl -
Subject digest:
a632fd44ae1c20f2c10c71a3313b4efa87ec966d512726de10adc0cbafd1285b - Sigstore transparency entry: 1216825961
- Sigstore integration time:
-
Permalink:
mgraschevalier/WoSIT@a1feb879205a51db9ebb3dba7b6c0ae16ba2e469 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/mgraschevalier
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@a1feb879205a51db9ebb3dba7b6c0ae16ba2e469 -
Trigger Event:
release
-
Statement type: