Pyexperiment

Peter Duerr

対象レベル:
初級
カテゴリ:
Science

説明

Pyexperiment is a library that facilitates the development of small, reproducible experiments with minimal boilerplate code. With my poster, I would like to introduce the main ideas behind pyexperiment and demonstrate its core concepts with a few simple examples and use-cases.

概要

There is no shortage of great Python libraries for command line interfaces, logging, configuration file management, persistent state, or plotting. When writing small scripts for quick experiments though, it's often too much effort to configure these components, and one ends up rewriting the same setup code over and over again. Pyexperiment fixes this by providing a simple way to jump start a short experiment. Importing pyexperiment will give you: - A basic command line interface that allows calling arbitrary functions (and passing arguments) from the command prompt, providing help text derived from the functions' docstrings and zsh/bash autocompletion (based on the standard library's argparse and argcomplete). - A simple configuration management with an easy way to provide default values (based on the excellent configobj library). - A thread-safe logger with configurable logging levels, timing utilities with statistics, and rotating log files (based on the standard library's logging module). - Persistent state with platform independent, configurable, (optionally rotating) state files that are compatible with many other programs (based on h5py). - Parallel execution of replicates. - A sensible setup for plotting (based on matplotlib, and optionally seaborn), with configurable defaults and asynchronous plotting. - Many other bits and pieces that might come in handy... Pyexperiment is tested against Python 2.7, 3.2, 3.3 and 3.4 and can be installed from PyPi or downloaded from [github][1]. [1]: https://github.com/duerrp/pyexperiment
  • このエントリーをはてなブックマークに追加