Patch group of option : types must be callable not a string
This commit is contained in:
@ -13,14 +13,14 @@ def __addInputOption(optionManager):
|
|||||||
action="store", dest="obi:skip",
|
action="store", dest="obi:skip",
|
||||||
metavar='<N>',
|
metavar='<N>',
|
||||||
default=None,
|
default=None,
|
||||||
type='int',
|
type=int,
|
||||||
help="skip the N first sequences")
|
help="skip the N first sequences")
|
||||||
|
|
||||||
group.add_argument('--only',
|
group.add_argument('--only',
|
||||||
action="store", dest="obi:only",
|
action="store", dest="obi:only",
|
||||||
metavar='<N>',
|
metavar='<N>',
|
||||||
default=None,
|
default=None,
|
||||||
type='int',
|
type=int,
|
||||||
help="treat only N sequences")
|
help="treat only N sequences")
|
||||||
|
|
||||||
|
|
||||||
@ -115,19 +115,19 @@ def __addTabularInputOption(optionManager):
|
|||||||
group.add_argument('--sep',
|
group.add_argument('--sep',
|
||||||
action="store", dest="obi:sep",
|
action="store", dest="obi:sep",
|
||||||
default=None,
|
default=None,
|
||||||
type="bytes",
|
type=bytes,
|
||||||
help="Column separator")
|
help="Column separator")
|
||||||
|
|
||||||
group.add_argument('--dec',
|
group.add_argument('--dec',
|
||||||
action="store", dest="obi:dec",
|
action="store", dest="obi:dec",
|
||||||
default=b".",
|
default=b".",
|
||||||
type="bytes",
|
type=bytes,
|
||||||
help="Decimal separator")
|
help="Decimal separator")
|
||||||
|
|
||||||
group.add_argument('--na-string',
|
group.add_argument('--na-string',
|
||||||
action="store", dest="obi:nastring",
|
action="store", dest="obi:nastring",
|
||||||
default=b"NA",
|
default=b"NA",
|
||||||
type="bytes",
|
type=bytes,
|
||||||
help="String associated to Non Available (NA) values")
|
help="String associated to Non Available (NA) values")
|
||||||
|
|
||||||
group.add_argument('--strip-white',
|
group.add_argument('--strip-white',
|
||||||
@ -143,10 +143,10 @@ def __addTabularInputOption(optionManager):
|
|||||||
group.add_argument('--comment-char',
|
group.add_argument('--comment-char',
|
||||||
action="store", dest="obi:commentchar",
|
action="store", dest="obi:commentchar",
|
||||||
default=b"#",
|
default=b"#",
|
||||||
type="bytes",
|
type=bytes,
|
||||||
help="Lines starting by this char are considered as comment")
|
help="Lines starting by this char are considered as comment")
|
||||||
|
|
||||||
def addMinimalOption(optionManager):
|
def addMinimalInputOption(optionManager):
|
||||||
__addInputOption(optionManager)
|
__addInputOption(optionManager)
|
||||||
|
|
||||||
def addSequenceInputOption(optionManager):
|
def addSequenceInputOption(optionManager):
|
||||||
|
@ -5,7 +5,7 @@ from obitools3.dms.dms import DMS # TODO cimport doesn't work
|
|||||||
from obitools3.dms.view.view import View, Line_selection # TODO cimport doesn't work
|
from obitools3.dms.view.view import View, Line_selection # TODO cimport doesn't work
|
||||||
|
|
||||||
|
|
||||||
from obitools3.apps.optiongroups import addInputOption
|
from obitools3.apps.optiongroups import addSequenceInputOption
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -18,7 +18,7 @@ default_config = { 'inputview' : None,
|
|||||||
|
|
||||||
def addOptions(parser):
|
def addOptions(parser):
|
||||||
|
|
||||||
addInputOption(parser)
|
addSequenceInputOption(parser)
|
||||||
|
|
||||||
# TODO put this common group somewhere else but I don't know where
|
# TODO put this common group somewhere else but I don't know where
|
||||||
group=parser.add_argument_group('DMS and view options')
|
group=parser.add_argument_group('DMS and view options')
|
||||||
|
Reference in New Issue
Block a user