Mercurial > hg > numerics
changeset 162:28215de61342
more stubbing
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Fri, 15 May 2015 16:30:34 -0700 |
parents | 31b246a267fe |
children | 8508dbeb9759 |
files | numerics/normalize.py setup.py |
diffstat | 2 files changed, 2 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/numerics/normalize.py Fri May 15 16:24:28 2015 -0700 +++ b/numerics/normalize.py Fri May 15 16:30:34 2015 -0700 @@ -6,38 +6,10 @@ """ # imports -import argparse -import os -import subprocess import sys -import time - -# python requirements -# (key, value) = (module, PyPI name) -requirements = () -for module, package in requirements: - try: - globals()[module] = __import__(module) - except ImportError: - # install requirement and try again - subprocess.check_call(['pip', 'install', package]) - args = [sys.executable] + sys.argv - os.execl(sys.executable, *args) # module globals -__all__ = ['main', 'Parser'] -here = os.path.dirname(os.path.realpath(__file__)) -string = (str, unicode) - -def ensure_dir(directory): - """ensure a directory exists""" - if os.path.exists(directory): - if not os.path.isdir(directory): - raise OSError("Not a directory: '{}'".format(directory)) - return directory - os.makedirs(directory) - return directory - +__all__ = ['main', 'NormalizationParser'] class Parser(argparse.ArgumentParser): """CLI option parser"""
--- a/setup.py Fri May 15 16:24:28 2015 -0700 +++ b/setup.py Fri May 15 16:30:34 2015 -0700 @@ -28,6 +28,7 @@ histogram = numerics.histogram:main interpolate = numerics.interpolation:main manipulate = numerics.manipulate:main + normalize = numerics.normalize:main mean = numerics.mean:main median = numerics.median:main plot = numerics.plot:main