Commit 1cf31b9a authored by Ronny Eichler's avatar Ronny Eichler
Browse files

Version bump

parent fef3b560
......@@ -9,12 +9,13 @@ import argparse
from .lib.constants import LOG_LEVEL_VERBOSE
__version__ = 0.1
__version__ = '0.1.1'
NO_EXIT_CONFIRMATION = True
LOG_LEVEL = logging.INFO
log_level = LOG_LEVEL
class DataMan(cmd.Cmd):
"""Command line tool for quick data documentation."""
......@@ -29,7 +30,7 @@ class DataMan(cmd.Cmd):
def do_ls(self, line):
parser = argparse.ArgumentParser('Recording statistics', prefix_chars='+/')
parser.add_argument('path', help='Relative or absolute path to directory',
default='.', nargs='?')
default='.', nargs='?')
cli_args = parser.parse_args(line.split(' ') if line else '')
path = cli_args.path
......@@ -39,7 +40,7 @@ class DataMan(cmd.Cmd):
def do_stats(self, line):
parser = argparse.ArgumentParser('Recording statistics', prefix_chars='+/')
parser.add_argument('path', help='Relative or absolute path to directory',
default='.', nargs='?')
default='.', nargs='?')
cli_args = parser.parse_args(line.split(' ') if line else '')
path = cli_args.path
......@@ -53,6 +54,9 @@ class DataMan(cmd.Cmd):
def do_convert(self, line):
pass
def do_check(self, line):
pass
def do_proc(self, line):
print(sys.argv)
......@@ -72,7 +76,7 @@ def main():
# Command line parsing
parser = argparse.ArgumentParser(prog="DataMan")
parser.add_argument('-d', '--debug', action='store_true',
help='Debug mode -- verbose output, no confirmations.')
help='Debug mode -- verbose output, no confirmations.')
parser.add_argument('--version', action='version', version='%(prog)s {version}'.format(version=__version__))
# sub-parsers
......@@ -82,9 +86,9 @@ def main():
parser_stats = subparsers.add_parser('stats', help='Recording stats (number channels, duration, sampling rate...')
parser_ls = subparsers.add_parser('ls', help='Directory listing with basic information (e.g. size)')
parser_vis = subparsers.add_parser('vis', help='Launch simple visualizer on data')
parser_proc = subparsers.add_parser('proc', help='(Pre-)processing [NI}')
parser_proc = subparsers.add_parser('proc', help='(Pre-)processing [NI]')
parser_doc = subparsers.add_parser('doc', help='Documentation for prosperity [NI}')
parser_check = subparsers.add_parser('check', help='Check/verify data and documentation integrity [NI}')
parser_check = subparsers.add_parser('check', help='Check/verify data and documentation integrity [NI]')
parser_convert = subparsers.add_parser('convert', help='Convert into a different file format. [NI]')
cli_args, cmd_args = parser.parse_known_args()
......@@ -95,7 +99,7 @@ def main():
logging.addLevelName(LOG_LEVEL_VERBOSE, 'VERBOSE')
log_level = LOG_LEVEL_VERBOSE if cli_args.debug else LOG_LEVEL
logging.basicConfig(level=log_level,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
log = logging.getLogger(__name__)
log.debug('CLI_ARGS: {}'.format(cli_args))
......@@ -104,7 +108,7 @@ def main():
# start cli
if cli_args.command in [None, 'cli']:
try:
dm = DataMan().cmdloop()
DataMan().cmdloop()
except KeyboardInterrupt:
pass
......@@ -116,4 +120,3 @@ def main():
if __name__ == "__main__":
main()
......@@ -9,7 +9,7 @@ config = {
'url': '',
'download_url': '',
'author_email': 'ronny.eichler@gmail.com',
'version': '0.0.1',
'version': '0.1.1',
'install_requires': ['nose', 'termcolor', 'vispy', 'numpy'],
'packages': ['dataman'],
'entry_points': """[console_scripts]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment