Run bash commands with python multiprocessing according to a csv file edgelist.
Project description
workforce
Run bash commands with python multiprocessing according to a csv file edgelist.
Free software: MIT license
Documentation: https://workforce.readthedocs.io.
Installation
Installation can be done with
pip install workforce
Running workforce
To try a sample plan, run with:
workforce example_plan.csv
To view the program graph, networkx and matplotlib are required. The -g flag is required to produce a dot file of the network:
workforce -g example_plan.csv
To import and use in a python shell, use the following command:
from workforce.workforce import worker
steve = worker("<PLAN.CSV>")
steve.run()
Graph print
Converting the graph to a dot can be done using an online dot viewer or using Graphviz software with the example command:
dot -Tpng -Kdot -o <DOT_FILENAME>.png <DOT_FILENAME>
The schema should be in the format of a csv with two columns. On the left and right column is the source and target command respectively (see example). Produces a logfile for each run.
Testing
Testing can be done within this directory by running:
python -m unittest -v
History
0.1.0 (2021-01-16)
First release on PyPI.
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
File details
Details for the file workforce-1.0.5.tar.gz
.
File metadata
- Download URL: workforce-1.0.5.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c6c712773826901632fe4a1fc70535665f7edc0da3372a17b15764a1ab6932e |
|
MD5 | 1a0f8b21c6c4614c53b8b30cdce26420 |
|
BLAKE2b-256 | f0ccda88bf44a336462f0a1e4c02bc2a76d6a65bc3749cae83f9d4a28ee6580a |
File details
Details for the file workforce-1.0.5-py3-none-any.whl
.
File metadata
- Download URL: workforce-1.0.5-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.17
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b7e675d9cb80cb036b01f14818872f03fe5b23651e2f5c281b1685f2166f1da |
|
MD5 | f0fd94e31e4c7b1667a4d5ee788269a1 |
|
BLAKE2b-256 | 60a19371e2d1e23e59697cbf0b202218165ce0f8836c37ae85e634665bd5688f |