Skip to main content

Experiment utilities

Project description

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

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

exputil-1.9.1.tar.gz (13.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

exputil-1.9.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file exputil-1.9.1.tar.gz.

File metadata

  • Download URL: exputil-1.9.1.tar.gz
  • Upload date:
  • Size: 13.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for exputil-1.9.1.tar.gz
Algorithm Hash digest
SHA256 f7e6511e868c8341dd7508ad2127b0f77eaaff90428a6c79d6cda819c3f7a716
MD5 6e4a4a17e4e6e1d4f52d60cf8b9bcab7
BLAKE2b-256 72225aa1b17b0336031f097d27894afa39770c2b19f9274e89eb8a27a63d2557

See more details on using hashes here.

File details

Details for the file exputil-1.9.1-py3-none-any.whl.

File metadata

  • Download URL: exputil-1.9.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for exputil-1.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6ca9050bff69afa3953cb4fa3d1a19cfbf521549e70a491a8a97fe73f90f7ba8
MD5 9733752a55ec9789a95a5e408998b82d
BLAKE2b-256 e133dc5911ba09e2e393a23d27aaef1af9cf4e9c7fea547d07d3e58d3f66bd65

See more details on using hashes here.

Supported by

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