Skip to main content

Run bash commands with python multiprocessing according to a csv file edgelist.

Project description

workforce

https://img.shields.io/pypi/v/workforce.svg https://img.shields.io/travis/theoportlock/workforce.svg Documentation Status

Run bash commands with python multiprocessing according to a csv file edgelist.

Features

Installation can be done with

pip install workforce

To try a sample plan, run with:

python workforce.py 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:

python3 workforce.py -g example_plan.csv

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>

example_plan.png

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.

The following bashrc alias is recommended if this repository is in your home directory:

alias wf=”python ~/workforce/workforce.py”

Testing can be done within this directory by running: python -m unittest -v

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.1.0 (2021-01-16)

  • First release on PyPI.

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

workforce-0.0.5.tar.gz (8.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page