Skip to content

Latest commit

 

History

History
78 lines (51 loc) · 2.14 KB

README.md

File metadata and controls

78 lines (51 loc) · 2.14 KB

Experiment utilities

build codecov license: MIT GitHub release version

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).

Installation

Python version: 3.7+

python3 -m pip install git+https://github.com/snkas/exputilpy.git@v1.8.2

Getting started

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())

Development

Requirements:

python3 -m pip install pytest coverage

Install latest development version:

  1. Clone the GitHub repository:

    git clone git@github.com:snkas/exputilpy.git
  2. 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