A Python wrapper for utilities to automate running experiments, in particular with relation to bash. For example, to copy over files, run commands, check activity, etc.. Please note that it is written with a Linux bash in mind, so some functionality might not work on e.g., MacOS.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. (see also the MIT License in ./LICENSE).
Python version: 3.7+
python3 -m pip install git+https://github.com/snkas/[email protected]
Example usage:
There are many things to do, for example to check how many screens are running.
import exputil
local_shell = exputil.LocalShell()
print("There are %d screens active." % local_shell.count_screens())
remote_shell = exputil.RemoteShell("user", "example.com")
print("There are %d screens active on the remote." % remote_shell.count_screens())
Requirements:
python3 -m pip install pytest coverage
Install latest development version:
-
Clone the GitHub repository:
git clone [email protected]:snkas/exputilpy.git
-
Install locally using
pip
:cd exputilpy python3 -m pip install .
Run tests:
python3 -m pytest
Calculate coverage (outputs .coverage
, coverage.xml
and htmlcov/
):
python3 -m coverage run --branch --include="exputil/*" -m pytest
python3 -m coverage xml
python3 -m coverage html