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.0.tar.gz (12.9 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.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: exputil-1.9.0.tar.gz
  • Upload date:
  • Size: 12.9 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.0.tar.gz
Algorithm Hash digest
SHA256 7624e5117b2deebcb8acf9dbcd3adde829badaed4d2fe51d1fabaab17aacb1d6
MD5 fa13faf5d886711d1f237bdc52019f7e
BLAKE2b-256 210f382265109823af1ac4cd3a93d45696bf033d35ddfbdfaf80fc6cf4c25769

See more details on using hashes here.

File details

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

File metadata

  • Download URL: exputil-1.9.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10d63f355c4ed89705160ce45a6ae1c42271f686516d3d10cdd632254b7fd805
MD5 e1f5fed2546919d7f4d95d69fee84ed4
BLAKE2b-256 32d4c886fa0aaf0df5114d2f1856b6b9b078747f530645cbd93af49bc43e3a3b

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