Name | workforce JSON |
Version |
1.1.4
JSON |
| download |
home_page | None |
Summary | Run bash commands with python multiprocessing. Includes a Tkinter GUI for workflow editing. |
upload_time | 2025-08-12 23:17:34 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.6 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
networkx
pandas
filelock
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
=========
workforce
=========
.. image:: https://img.shields.io/pypi/v/workforce.svg
:target: https://pypi.python.org/pypi/workforce
.. image:: https://img.shields.io/travis/theoportlock/workforce.svg
:target: https://travis-ci.com/theoportlock/workforce
.. image:: https://readthedocs.org/projects/workforce/badge/?version=latest
:target: https://workforce.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: docs/images/small.png
:alt: Small pipeline example
:align: center
:width: 800px
.. image:: docs/images/complex.png
:alt: Complex pipeline editor view
:align: center
:width: 800px
Build and run a pipeline of bash commands with python multiprocessing according to a graphml file.
* Free software: MIT license
* Documentation: https://workforce-documentation.readthedocs.io.
Installation
------------
Installation can be done with:
.. code-block:: bash
pip install workforce
Building a workforce workflow
-----------------------------
To launch the pipeline editor, run:
.. code-block:: bash
wf
or:
.. code-block:: bash
python -m workforce
To open a previously constructed pipeline, run:
.. code-block:: bash
wf <PIPELINE.graphml>
If a `Workfile` is in the current directory:
.. code-block:: bash
wf
Running workforce plan
----------------------
To run a sample plan from workforce github project from the GUI, click run_all or shift r. Run from cli with:
.. code-block:: bash
wf run Workfile
Prefix and Suffix
-----------------
Adding the following prefix and suffixes to the wf run command (or within gui) will add those prefix and suffixes to each command ran by the pipeline.
+-------------------------------+---------------------------------------------------------------------------------+
| Options | Description |
+===============================+=================================================================================+
| -p "tmux send-keys" -s "C-m" | Sends each command to a tmux session and executes it. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "ssh ADDRESS" | Executes each command remotely on the specified server. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "parallel" -s "FILENAMES" | Runs the pipeline on each specified filename. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "docker run -it" | Executes each command within a Docker container with an interactive terminal. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "echo" -s ">> commands.sh" | Exports the pipeline commands to a bash script named ``commands.sh``. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "conda activate ENV_NAME" | Activates a specified Conda environment before executing the commands. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "nohup" | Runs commands in the background. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "sbatch" | Submits commands to Slurm-managed servers. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "kubectl run" | Executes commands on a Kubernetes cluster. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "sudo" | Executes commands with elevated privileges. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "env VAR1=value1" | Sets environment variables for the command. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "nice -n 10" | Adjusts the process priority. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "/usr/bin/time -v" | Times command execution with resource statistics. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "setsid" | Launches commands in a new session. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "strace -o trace.log" | Traces system calls for debugging. |
+-------------------------------+---------------------------------------------------------------------------------+
| -s ">> logfile 2>&1" | Appends output to log file. |
+-------------------------------+---------------------------------------------------------------------------------+
| -s "| tee output.log" | Shows output in terminal and saves to file. |
+-------------------------------+---------------------------------------------------------------------------------+
| -p "powershell.exe" | Executes commands in Windows PowerShell. |
+-------------------------------+---------------------------------------------------------------------------------+
To run individual process(es) from the editor, select the process(es) in the order that you wish them to be excecuted and click the 'Run' button (or shortcut with r key). Opening the terminal with shortcut t (or on the toolbar), you can see the output of the commands
This is tested on mac, linux, and windows powershell and wsl2.
Raw data
{
"_id": null,
"home_page": null,
"name": "workforce",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Theo Portlock <zn.tportlock@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/92/61/4367b3d2af202f435084fda5efbe07f4c267eafa2f1cc6c6847560cf3298/workforce-1.1.4.tar.gz",
"platform": null,
"description": "=========\nworkforce\n=========\n\n.. image:: https://img.shields.io/pypi/v/workforce.svg\n :target: https://pypi.python.org/pypi/workforce\n\n.. image:: https://img.shields.io/travis/theoportlock/workforce.svg\n :target: https://travis-ci.com/theoportlock/workforce\n\n.. image:: https://readthedocs.org/projects/workforce/badge/?version=latest\n :target: https://workforce.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: docs/images/small.png\n :alt: Small pipeline example\n :align: center\n :width: 800px\n\n.. image:: docs/images/complex.png\n :alt: Complex pipeline editor view\n :align: center\n :width: 800px\n\nBuild and run a pipeline of bash commands with python multiprocessing according to a graphml file.\n\n* Free software: MIT license\n* Documentation: https://workforce-documentation.readthedocs.io.\n\nInstallation\n------------\nInstallation can be done with:\n\n.. code-block:: bash\n\n pip install workforce\n\nBuilding a workforce workflow\n-----------------------------\nTo launch the pipeline editor, run:\n\n.. code-block:: bash\n\n wf\n\nor:\n\n.. code-block:: bash\n\n python -m workforce\n\nTo open a previously constructed pipeline, run:\n\n.. code-block:: bash\n\n wf <PIPELINE.graphml>\n \nIf a `Workfile` is in the current directory:\n\n.. code-block:: bash\n\n wf\n\nRunning workforce plan\n----------------------\nTo run a sample plan from workforce github project from the GUI, click run_all or shift r. Run from cli with:\n\n.. code-block:: bash\n\n wf run Workfile\n\nPrefix and Suffix\n-----------------\nAdding the following prefix and suffixes to the wf run command (or within gui) will add those prefix and suffixes to each command ran by the pipeline.\n\n+-------------------------------+---------------------------------------------------------------------------------+\n| Options | Description |\n+===============================+=================================================================================+\n| -p \"tmux send-keys\" -s \"C-m\" | Sends each command to a tmux session and executes it. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"ssh ADDRESS\" | Executes each command remotely on the specified server. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"parallel\" -s \"FILENAMES\" | Runs the pipeline on each specified filename. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"docker run -it\" | Executes each command within a Docker container with an interactive terminal. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"echo\" -s \">> commands.sh\" | Exports the pipeline commands to a bash script named ``commands.sh``. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"conda activate ENV_NAME\" | Activates a specified Conda environment before executing the commands. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"nohup\" | Runs commands in the background. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"sbatch\" | Submits commands to Slurm-managed servers. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"kubectl run\" | Executes commands on a Kubernetes cluster. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"sudo\" | Executes commands with elevated privileges. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"env VAR1=value1\" | Sets environment variables for the command. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"nice -n 10\" | Adjusts the process priority. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"/usr/bin/time -v\" | Times command execution with resource statistics. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"setsid\" | Launches commands in a new session. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"strace -o trace.log\" | Traces system calls for debugging. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -s \">> logfile 2>&1\" | Appends output to log file. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -s \"| tee output.log\" | Shows output in terminal and saves to file. |\n+-------------------------------+---------------------------------------------------------------------------------+\n| -p \"powershell.exe\" | Executes commands in Windows PowerShell. |\n+-------------------------------+---------------------------------------------------------------------------------+\n\nTo run individual process(es) from the editor, select the process(es) in the order that you wish them to be excecuted and click the 'Run' button (or shortcut with r key). Opening the terminal with shortcut t (or on the toolbar), you can see the output of the commands\n\nThis is tested on mac, linux, and windows powershell and wsl2.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Run bash commands with python multiprocessing. Includes a Tkinter GUI for workflow editing.",
"version": "1.1.4",
"project_urls": {
"Homepage": "https://github.com/theoportlock/workforce"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "32b3ea6f909beb44153255946a90e65a2c50efc63dc17d8a5ad40804d6fee59c",
"md5": "f54a4c363360ae3a47bb425add9160fd",
"sha256": "378df72600ea31147bf62eb2da9ad19366de6eaddf1844097f184fca9d340e5b"
},
"downloads": -1,
"filename": "workforce-1.1.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f54a4c363360ae3a47bb425add9160fd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 3564336,
"upload_time": "2025-08-12T23:17:31",
"upload_time_iso_8601": "2025-08-12T23:17:31.821151Z",
"url": "https://files.pythonhosted.org/packages/32/b3/ea6f909beb44153255946a90e65a2c50efc63dc17d8a5ad40804d6fee59c/workforce-1.1.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "92614367b3d2af202f435084fda5efbe07f4c267eafa2f1cc6c6847560cf3298",
"md5": "23fae17dd9ff16dd865d992d9ab058de",
"sha256": "8654c928588ec3e34f83b2e5918b654e9bebcb43b22ffd4908380a4dbc0b4627"
},
"downloads": -1,
"filename": "workforce-1.1.4.tar.gz",
"has_sig": false,
"md5_digest": "23fae17dd9ff16dd865d992d9ab058de",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3566376,
"upload_time": "2025-08-12T23:17:34",
"upload_time_iso_8601": "2025-08-12T23:17:34.028605Z",
"url": "https://files.pythonhosted.org/packages/92/61/4367b3d2af202f435084fda5efbe07f4c267eafa2f1cc6c6847560cf3298/workforce-1.1.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-12 23:17:34",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "theoportlock",
"github_project": "workforce",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "networkx",
"specs": []
},
{
"name": "pandas",
"specs": []
},
{
"name": "filelock",
"specs": []
}
],
"lcname": "workforce"
}