reproman.cmdline.helpers

class reproman.cmdline.helpers.HelpAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

class reproman.cmdline.helpers.LogLevelAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

class reproman.cmdline.helpers.PBSAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None)[source]

Bases: argparse.Action

Action to schedule actual command execution via PBS (e.g. Condor)

class reproman.cmdline.helpers.RegexpType[source]

Bases: object

Factory for creating regular expression types for argparse

DEPRECATED AFAIK – now things are in the config file, but we might provide a mode where we operate solely from cmdline

reproman.cmdline.helpers.get_repo_instance(path='.', class_=None)[source]

Returns an instance of appropriate reproman repository for path. Check whether a certain path is inside a known type of repository and returns an instance representing it. May also check for a certain type instead of detecting the type of repository.

Parameters:
  • path (str) – path to check; default: current working directory
  • class (class) – if given, check whether path is inside a repository, that can be represented as an instance of the passed class.
Raises:

RuntimeError, in case cwd is not inside a known repository.

reproman.cmdline.helpers.parser_add_common_args(parser, pos=None, opt=None, **kwargs)[source]
reproman.cmdline.helpers.parser_add_common_opt(parser, opt, names=None, **kwargs)[source]
reproman.cmdline.helpers.run_via_pbs(args, pbs)[source]
reproman.cmdline.helpers.strip_arg_from_argv(args, value, opt_names)[source]

Strip an originally listed option (with its value) from the list cmdline args