Metadata-Version: 2.4
Name: exputil
Version: 1.9.2
Summary: Experiment utilities
Home-page: https://github.com/yuanlott/exputilpy
Author: snkas
Author-email: snkasdev+exputilpy@gmail.com
License: MIT
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# Experiment utilities

[![build](https://github.com/snkas/exputilpy/workflows/build/badge.svg)](https://github.com/snkas/exputilpy/actions?query=workflow%3Abuild+branch%3Amaster)
[![codecov](https://codecov.io/gh/snkas/exputilpy/branch/master/graph/badge.svg)](https://codecov.io/gh/snkas/exputilpy)
[![license: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/snkas/exputilpy/blob/master/LICENSE)
[![GitHub release version](https://img.shields.io/github/v/release/snkas/exputilpy)](https://github.com/snkas/exputilpy/releases)

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.8+**

```bash
python3 -m pip install exputil
```


## Getting started

**Example usage:**

There are many things to do, for example to check how many screens are running.

```python
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:**

```bash
python3 -m pip install pytest coverage
```

**Install latest development version:**

1. Clone the GitHub repository:

   ```bash
   git clone git@github.com:yuanlott/exputilpy.git
   ```

2. Install locally using `pip`:

   ```bash
   cd exputilpy
   python3 -m pip install .
   ```

**Run tests:**

```bash
python3 -m pytest
```

**Calculate coverage (outputs `.coverage`, `coverage.xml` and `htmlcov/`):**

```bash
python3 -m coverage run --branch --include="exputil/*" -m pytest
python3 -m coverage xml
python3 -m coverage html
```
