def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'update', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-n', '--name', action='store', help='name of environment (in %s)' % os.pathsep.join(config.envs_dirs), default=None, ) p.add_argument( '-f', '--file', action='store', help='environment definition (default: environment.yml)', default='environment.yml', ) p.add_argument( '-q', '--quiet', default=False, ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser('info', description = help, help = help) common.add_parser_json(p) p.add_argument( '-a', "--all", action = "store_true", help = "show all information, (environments, license, and system " "information") p.add_argument( '-e', "--envs", action = "store_true", help = "list all known conda environments", ) p.add_argument( '-l', "--license", action = "store_true", help = "display information about local conda licenses list", ) p.add_argument( '-s', "--system", action = "store_true", help = "list environment variables", ) p.add_argument( 'args', metavar = 'args', action = "store", nargs = '*', help = "display information about packages or files", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'update', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-n', '--name', action='store', help='name of environment (in %s)' % os.pathsep.join(config.envs_dirs), default=None, ) p.add_argument( '-f', '--file', action='store', help='environment definition (default: environment.yml)', default='environment.yml', ) p.add_argument( '-q', '--quiet', default=False, ) p.add_argument('remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?') common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser('info', description=help, help=help) common.add_parser_json(p) p.add_argument( '-a', "--all", action="store_true", help="show all information, (environments, license, and system " "information") p.add_argument( '-e', "--envs", action="store_true", help="list all known conda environments", ) p.add_argument( '-l', "--license", action="store_true", help="display information about local conda licenses list", ) p.add_argument( '-s', "--system", action="store_true", help="list environment variables", ) p.add_argument( 'packages', action="store", nargs='*', help="display information about packages or files", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'attach', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) group = p.add_mutually_exclusive_group(required=True) group.add_argument( '-n', '--name', action='store', help='local environment definition', default=None ) group.add_argument( '-r', '--remote', action='store', help='remote environment definition', default=None ) p.add_argument( '--force', action='store_true', default=False, help='Replace existing environment definition' ) p.add_argument( 'notebook', help='notebook file', action='store', default=None ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'run', description=descr, help=descr, epilog=examples, ) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_json(p) p.add_argument( 'package', metavar='COMMAND', action="store", nargs='?', help="Package to launch." ) p.add_argument( 'arguments', metavar='ARGUMENTS', action='store', nargs='*', help="Additional arguments to application." ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'upload', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument('-n', '--name', action='store', help='environment definition [Deprecated]', default=None, dest='old_name') p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) p.add_argument('--summary', help='Short summary of the environment', default='Environment file') p.add_argument('-q', '--quiet', default=False, action='store_true') p.add_argument('name', help='environment definition', action='store', default=None, nargs='?') common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers, name="remove"): p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name, help=help % name, epilog=example % name, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument("--all", action="store_true", help="%s all packages, i.e. the entire environment" % name) p.add_argument("--features", action="store_true", help="%s features (instead of packages)" % name) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) p.add_argument( "--force-pscheck", action="store_true", help=("force removal (when package process is running)" if config.platform == "win" else argparse.SUPPRESS), ) p.add_argument( "package_names", metavar="package_name", action="store", nargs="*", help="package names to %s from environment" % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser('info', description = help, help = help) common.add_parser_json(p) els_group = p.add_mutually_exclusive_group() els_group.add_argument( '-a', "--all", action = "store_true", help = "show all information, (environments, license, and system " "information.") els_group.add_argument( '-e', "--envs", action = "store_true", help = "list all known conda environments.", ) els_group.add_argument( "--license", action = "store_true", help = "display information about local conda licenses list", ) els_group.add_argument( '-s', "--system", action = "store_true", help = "list PATH and PYTHONPATH environments for debugging purposes", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'attach', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) group = p.add_mutually_exclusive_group(required=True) group.add_argument('-n', '--name', action='store', help='local environment definition', default=None) group.add_argument('-r', '--remote', action='store', help='remote environment definition', default=None) p.add_argument('--force', action='store_true', default=False, help='Replace existing environment definition') p.add_argument('--no-builds', default=False, action='store_true', required=False, help='Remove build specification from dependencies') p.add_argument('notebook', help='notebook file', action='store', default=None) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) p.add_argument( '-n', '--name', action='store', help='environment definition', default=None, dest='name' ) p.add_argument( '-q', '--quiet', action='store_false', default=False, ) p.add_argument( 'remote_definition', help='remote environment definition', action='store', default=None, nargs='?' ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'update', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_prefix(p) p.add_argument( '-f', '--file', action='store', help='environment definition (default: environment.yml)', default='environment.yml', ) p.add_argument( '--prune', action='store_true', default=False, help='remove installed packages not defined in environment.yml', ) p.add_argument( '-q', '--quiet', action='store_true', default=False, ) p.add_argument('remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?') common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, epilog = example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "-i", "--index-cache", action = "store_true", help = "remove index cache", ) p.add_argument( "-l", "--lock", action = "store_true", help = "remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action = "store_true", help = "remove cached package tarballs", ) p.add_argument( '-p', '--packages', action='store_true', help="""remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( "list", description=descr, help=descr, formatter_class=RawDescriptionHelpFormatter, epilog=examples, add_help=False, ) common.add_parser_help(p) common.add_parser_prefix(p) common.add_parser_json(p) common.add_parser_show_channel_urls(p) p.add_argument( "-c", "--canonical", action="store_true", help="Output canonical names of packages only. Implies --no-pip. " ) p.add_argument("-f", "--full-name", action="store_true", help="Only search for full names, i.e., ^<regex>$.") p.add_argument( "-e", "--export", action="store_true", help="""Output requirement string only (output may be used by conda create --file).""", ) p.add_argument("-r", "--revisions", action="store_true", help="List the revision history and exit.") p.add_argument( "--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages." ) p.add_argument("regex", action="store", nargs="?", help="List only packages matching this regular expression.") p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) p.add_argument( "--force", action="store_true", help= "Forces removal of a package without removing packages that depend on it. " "Using this option will usually leave your environment in a broken and " "inconsistent state.", ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) # Putting this one first makes it the default common.add_parser_no_use_index_cache(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) common.add_parser_pscheck(p) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'search', description=descr, help=descr, epilog=example, ) common.add_parser_prefix(p) p.add_argument( "--canonical", action="store_true", help="Output canonical names of packages only.", ) p.add_argument( '-f', "--full-name", action="store_true", help="Only search for full name, ie. ^<regex>$.", ) p.add_argument( "--names-only", action="store_true", help="Output only package names.", ) common.add_parser_known(p) common.add_parser_use_index_cache(p) p.add_argument( '-o', "--outdated", action="store_true", help="Only display installed but outdated packages.", ) p.add_argument( '--platform', action='store', dest='platform', help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32', 'win-64', and so on. The default is to search the current platform.""", choices=Platforms(), default=None, ) p.add_argument( "--spec", action="store_true", help="""Treat the regex argument as a package specification instead (package_name[=version[=build]]).""", ) p.add_argument( 'regex', metavar='regex', action="store", nargs="?", help="""Package specification or regular expression to search for (default: display all packages).""", ).completer = common.Packages common.add_parser_offline(p) common.add_parser_channels(p) common.add_parser_json(p) common.add_parser_use_local(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers, name="update"): if name == "update": p = sub_parsers.add_parser("update", description=descr, help=descr, epilog=example % name) else: p = sub_parsers.add_parser(name, description=alias_help, help=alias_help, epilog=example % name) common.add_parser_install(p) common.add_parser_json(p) p.add_argument("--all", action="store_true", help="Update all installed packages in the environment.") p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) p.add_argument( "--force", action="store_true", help="Forces removal of a package without removing packages that depend on it. " "Using this option will usually leave your environment in a broken and " "inconsistent state.", ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) # Putting this one first makes it the default common.add_parser_no_use_index_cache(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) common.add_parser_pscheck(p) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'list', description=descr, help=descr, formatter_class=RawDescriptionHelpFormatter, epilog=examples, add_help=False, ) common.add_parser_help(p) common.add_parser_prefix(p) common.add_parser_json(p) common.add_parser_show_channel_urls(p) p.add_argument( '-c', "--canonical", action="store_true", help="Output canonical names of packages only. Implies --no-pip. ", ) p.add_argument( '-f', "--full-name", action="store_true", help="Only search for full names, i.e., ^<regex>$.", ) p.add_argument( "--explicit", action="store_true", help="List explicitly all installed conda packaged with URL " "(output may be used by conda create --file).", ) p.add_argument( '-e', "--export", action="store_true", help="Output requirement string only (output may be used by " " conda create --file).", ) p.add_argument( '-r', "--revisions", action="store_true", help="List the revision history and exit.", ) p.add_argument("--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages.") p.add_argument( 'regex', action="store", nargs="?", help="List only packages matching this regular expression.", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'share', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, ) common.add_parser_prefix(p) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'search', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example, ) common.add_parser_prefix(p) p.add_argument( "--canonical", action="store_true", help="output canonical names of packages only", ) common.add_parser_known(p) common.add_parser_use_index_cache(p) p.add_argument( '-o', "--outdated", action="store_true", help="only display installed but outdated packages", ) p.add_argument( '-v', "--verbose", action="store_true", help="Show available packages as blocks of data", ) p.add_argument( '--platform', action='store', dest='platform', help= """Search the given platform. Should be formatted like 'osx-64', 'linux-32', 'win-64', and so on. The default is to search the current platform.""", choices=Platforms(), default=None, ) p.add_argument( "--spec", action="store_true", help="Treat regex argument as a package specification instead " "(package_name[=version[=build]])", ) p.add_argument( 'regex', action="store", nargs="?", help="package specification or regular expression to search for " "(default: display all packages)", ) common.add_parser_channels(p) common.add_parser_json(p) common.add_parser_use_local(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) p.add_argument( "--force-pscheck", action="store_true", help=("Force removal (when package process is running) (deprecated)" if config.platform == 'win' else argparse.SUPPRESS)) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): l = sub_parsers.add_parser( 'list', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) common.add_parser_json(l) l.set_defaults(func=execute)
def configure_parser(sub_parsers, name='remove'): if name == 'remove': p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name.capitalize(), help=help % name.capitalize(), epilog=example % name, add_help=False, ) else: p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=uninstall_help, help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="%s all packages, i.e., the entire environment." % name.capitalize(), ) p.add_argument( "--features", action="store_true", help="%s features (instead of packages)." % name.capitalize(), ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) common.add_parser_offline(p) p.add_argument( "--force-pscheck", action="store_true", help=("Force removal (when package process is running) (deprecated)" if config.platform == 'win' else argparse.SUPPRESS) ) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="Package names to %s from the environment." % name, ).completer = common.InstalledPackages p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'search', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, epilog = example, ) common.add_parser_prefix(p) p.add_argument( "--canonical", action = "store_true", help = "output canonical names of packages only", ) common.add_parser_known(p) common.add_parser_use_index_cache(p) p.add_argument( '-o', "--outdated", action = "store_true", help = "only display installed but outdated packages", ) p.add_argument( '-v', "--verbose", action = "store_true", help = "Show available packages as blocks of data", ) p.add_argument( '--platform', action='store', dest='platform', help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32', 'win-64', and so on. The default is to search the current platform.""", choices=Platforms(), default=None, ) p.add_argument( "--spec", action = "store_true", help = "Treat regex argument as a package specification instead " "(package_name[=version[=build]])", ) p.add_argument( 'regex', action = "store", nargs = "?", help = "package specification or regular expression to search for " "(default: display all packages)", ) common.add_parser_channels(p) common.add_parser_json(p) common.add_parser_use_local(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'info', description=help, help=help, epilog=example, ) common.add_parser_json(p) p.add_argument( '-a', "--all", action="store_true", help="Show all information, (environments, license, and system " "information.") p.add_argument( '-e', "--envs", action="store_true", help="List all known conda environments.", ) p.add_argument( '-l', "--license", action="store_true", help="Display information about the local conda licenses list.", ) p.add_argument( '-s', "--system", action="store_true", help="List environment variables.", ) p.add_argument( 'packages', action="store", nargs='*', help="Display information about packages.", ) p.add_argument( '--root', action='store_true', help='Display root environment path.', ) p.add_argument( '--unsafe-channels', action='store_true', help='Display list of channels with tokens exposed.', ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'attach', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) group = p.add_mutually_exclusive_group(required=True) group.add_argument( '-n', '--name', action='store', help='local environment definition', default=None ) group.add_argument( '-r', '--remote', action='store', help='remote environment definition', default=None ) p.add_argument( '-p', "--prefix", action="store", help="Full path to environment prefix", metavar='PATH', default=None ) p.add_argument( '--force', action='store_true', default=False, help='Replace existing environment definition' ) p.add_argument( '--no-builds', default=False, action='store_true', required=False, help='Remove build specification from dependencies' ) p.add_argument( 'notebook', help='notebook file', action='store', default=None ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'update', description=descr, help=descr, epilog=example, ) common.add_parser_install(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="Update all installed packages in the environment.", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'remove', formatter_class=RawDescriptionHelpFormatter, description=_description, help=_help, epilog=_example, ) common.add_parser_prefix(p) common.add_parser_json(p) common.add_parser_quiet(p) common.add_parser_yes(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', description=descr, help=descr, epilog=example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "-a", "--all", action="store_true", help="Remove index cache, lock files, tarballs, " "unused cache packages, and source cache.", ) p.add_argument( "-i", "--index-cache", action="store_true", help="Remove index cache.", ) p.add_argument( "-l", "--lock", action="store_true", help="Remove all conda lock files.", ) p.add_argument( "-t", "--tarballs", action="store_true", help="Remove cached package tarballs.", ) p.add_argument( '-p', '--packages', action='store_true', help="""Remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.add_argument( '-s', '--source-cache', action='store_true', help="""Remove files from the source cache of conda build.""", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'install', description=descr, help=help, epilog=example, ) p.add_argument( "--revision", action="store", help="Revert to the specified REVISION.", metavar='REVISION', ) common.add_parser_install(p) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser("info", description=help, help=help) common.add_parser_json(p) p.add_argument( "-a", "--all", action="store_true", help="show all information, (environments, license, and system " "information", ) p.add_argument("-e", "--envs", action="store_true", help="list all known conda environments") p.add_argument("-l", "--license", action="store_true", help="display information about local conda licenses list") p.add_argument("-s", "--system", action="store_true", help="list environment variables") p.add_argument( "pkg_names", metavar="package_name", action="store", nargs="*", help="display information about packages" ) p.set_defaults(func=execute)
def configure_parser(): p = ArgumentParser( 'analysispackage', description="analysis package", ) cxgroup = p.add_mutually_exclusive_group() cxgroup.add_argument('-c', "--create", action="store_true", help="create analysis package") cxgroup.add_argument('-x', "--extract", action="store", help="extact analysis package located at PATH", metavar="PATH") cxgroup.add_argument("--metadump", action="store", help="dump metadata of analysis package at PATH", metavar="PATH") common.add_parser_prefix(p) common.add_parser_quiet(p) p.add_argument( "--analysispackage-name", action="store", help="name of analysis package", metavar='NAME', ) p.add_argument( "--data-path", action="store", help="path to data to be included in analysis package", metavar="PATH", ) p.add_argument( "--extra-meta", action="store", help="path to json file with additional meta-data no", metavar="PATH", ) p.add_argument( "--no-env", action="store_true", help="no environment", ) common.add_parser_json(p) p.set_defaults(func=execute) return p
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'bundle', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, ) cxgroup = p.add_mutually_exclusive_group() cxgroup.add_argument('-c', "--create", action="store_true", help="create bundle") cxgroup.add_argument('-x', "--extract", action="store", help="extact bundle located at PATH", metavar="PATH") cxgroup.add_argument("--metadump", action="store", help="dump metadata of bundle at PATH", metavar="PATH") common.add_parser_prefix(p) common.add_parser_quiet(p) p.add_argument( "--bundle-name", action="store", help="name of bundle", metavar='NAME', ) p.add_argument("--data-path", action="store", help="path to data to be included in bundle", metavar="PATH") p.add_argument( "--extra-meta", action="store", help="path to json file with additional meta-data", metavar="PATH", ) p.add_argument( "--no-env", action="store_true", help="no environment", ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clone', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, ) p.add_argument( 'path', metavar = 'PATH', action = "store", nargs = 1, help = 'path to "share package"', ) common.add_parser_prefix(p) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'update', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-n', '--name', action='store', help='name of environment (in %s)' % os.pathsep.join(config.envs_dirs), default=None, ) p.add_argument( '-f', '--file', action='store', help='environment definition (default: environment.yml)', default='environment.yml', ) p.add_argument( '--prune', action='store_true', default=False, help='remove installed packages not defined in environment.yml', ) p.add_argument( '-q', '--quiet', action='store_true', default=False, ) p.add_argument( 'remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?' ) p.add_argument( '--select', action='append', help="toggle preprocessing selectors. pass multiple times to toggle multiple selectors. pass 'all' to toggle all selectors", metavar="SELECTORS", ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) # Add name and prefix args common.add_parser_prefix(p) p.add_argument( '-q', '--quiet', action='store_true', default=False, ) p.add_argument('remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?') p.add_argument( '--force', help= 'force creation of environment (removing a previously existing environment of the same name).', action='store_true', default=False, ) p.add_argument( '--select', action='append', help= "toggle preprocessing selectors. pass multiple times to toggle multiple selectors. pass 'all' to toggle all selectors", metavar="SELECTORS", ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'upload', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-n', '--name', action='store', help='environment definition [Deprecated]', default=None, dest='old_name' ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) p.add_argument( '--summary', help='Short summary of the environment', default='Environment file' ) p.add_argument( '--force', action='store_true', default=False, help='Replace existing environment definition' ) p.add_argument( '-q', '--quiet', default=False, action='store_false' ) p.add_argument( 'name', help='environment definition', action='store', default=None, nargs='?' ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser("list", description=descr, help=descr) common.add_parser_prefix(p) common.add_parser_json(p) p.add_argument("-c", "--canonical", action="store_true", help="output canonical names of packages only") p.add_argument( "-e", "--export", action="store_true", help="output requirement string only " "(output may be used by conda create --file)", ) p.add_argument("-r", "--revisions", action="store_true", help="list the revision history and exit") p.add_argument( "--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages" ) p.add_argument("regex", action="store", nargs="?", help="list only packages matching this regular expression") p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'list', description=descr, help=descr, ) common.add_parser_prefix(p) common.add_parser_json(p) p.add_argument( '-c', "--canonical", action="store_true", help="output canonical names of packages only", ) p.add_argument( '-f', "--full-name", action="store_true", help="only search for full name, ie. ^<regex>$", ) p.add_argument( '-e', "--export", action="store_true", help="output requirement string only " "(output may be used by conda create --file)", ) p.add_argument( '-r', "--revisions", action="store_true", help="list the revision history and exit", ) p.add_argument("--no-pip", action="store_false", default=True, dest="pip", help="Do not include pip-only installed packages") p.add_argument( 'regex', action="store", nargs="?", help="list only packages matching this regular expression", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'export', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-c', '--channel', action='append', help='Additional channel to include in the export' ) p.add_argument( "--override-channels", action="store_true", help="Do not include .condarc channels", ) add_parser_prefix(p) p.add_argument( '-f', '--file', default=None, required=False ) p.add_argument( '--no-builds', default=False, action='store_true', required=False, help='Remove build specification from dependencies' ) p.add_argument( '--ignore-channels', default=False, action='store_true', required=False, help='Do not include channel names with package names.') add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) # Add name and prefix args common.add_parser_prefix(p) p.add_argument( '-q', '--quiet', action='store_true', default=False, ) p.add_argument( 'remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?' ) p.add_argument( '--force', help='force creation of environment (removing a previously existing environment of the same name).', action='store_true', default=False, ) p.add_argument( '--select', action='append', help="toggle preprocessing selectors. pass multiple times to toggle multiple selectors. pass 'all' to toggle all selectors", metavar="SELECTORS", ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'bundle', formatter_class = RawDescriptionHelpFormatter, description = descr, help = descr, ) cxgroup = p.add_mutually_exclusive_group() cxgroup.add_argument('-c', "--create", action = "store_true", help = "create bundle") cxgroup.add_argument('-x', "--extract", action = "store", help = "extact bundle located at PATH", metavar = "PATH") cxgroup.add_argument("--metadump", action = "store", help = "dump metadata of bundle at PATH", metavar = "PATH") common.add_parser_prefix(p) common.add_parser_quiet(p) p.add_argument("--bundle-name", action = "store", help = "name of bundle", metavar = 'NAME', ) p.add_argument("--data-path", action = "store", help = "path to data to be included in bundle", metavar = "PATH" ) p.add_argument("--extra-meta", action = "store", help = "path to json file with additional meta-data", metavar = "PATH", ) p.add_argument("--no-env", action = "store_true", help = "no environment", ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) p.add_argument( '-n', '--name', action='store', help='environment definition', default=None, dest='name' ) p.add_argument( '-q', '--quiet', action='store_false', default=False, ) p.add_argument( 'remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?' ) p.add_argument( '--force', help='force creation of environment (removing a previously existing environment of the same name).', action='store_true', default=False, ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', formatter_class=RawDescriptionHelpFormatter, description=description, help=description, epilog=example, ) p.add_argument( '-f', '--file', action='store', help='environment definition file (default: environment.yml)', default='environment.yml', ) p.add_argument('-n', '--name', action='store', help='environment definition', default=None, dest='name') p.add_argument( '-q', '--quiet', action='store_true', default=False, ) p.add_argument('remote_definition', help='remote environment definition / IPython notebook', action='store', default=None, nargs='?') p.add_argument( '--force', help= 'force creation of environment (removing a previously existing environment of the same name).', action='store_true', default=False, ) common.add_parser_json(p) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'create', description=descr, help=help, epilog=example, ) common.add_parser_install(p) common.add_parser_json(p) p.add_argument( "--clone", action="store", help='Path to (or name of) existing local environment.', metavar='ENV', ) p.add_argument( "--no-default-packages", action="store_true", help='Ignore create_default_packages in the .condarc file.', ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'remove', formatter_class=RawDescriptionHelpFormatter, description=descr, help=help, epilog=example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", help="remove all packages, i.e. the entire environment", ) p.add_argument( "--features", action="store_true", help="remove features (instead of packages)", ) common.add_parser_no_pin(p) common.add_parser_channels(p) common.add_parser_prefix(p) common.add_parser_quiet(p) common.add_parser_use_index_cache(p) common.add_parser_use_local(p) p.add_argument("--force-pscheck", action="store_true", help=("force removal (when package process is running)" if config.platform == 'win' else argparse.SUPPRESS)) p.add_argument( 'package_names', metavar='package_name', action="store", nargs='*', help="package names to remove from environment", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'clean', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example, ) common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "-i", "--index-cache", action="store_true", help="remove index cache", ) p.add_argument( "-l", "--lock", action="store_true", help="remove all conda lock files", ) p.add_argument( "-t", "--tarballs", action="store_true", help="remove cached package tarballs", ) p.add_argument( '-p', '--packages', action='store_true', help="""remove unused cached packages. Warning: this does not check for symlinked packages.""", ) p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'config', formatter_class=RawDescriptionHelpFormatter, description=descr, help=descr, epilog=example, ) common.add_parser_json(p) # TODO: use argparse.FileType location = p.add_mutually_exclusive_group() location.add_argument( "--system", action="store_true", help="""\ write to the system .condarc file ({system}). Otherwise writes to the user config file ({user}).""".format(system=config.sys_rc_path, user=config.user_rc_path), ) location.add_argument( "--file", action="store", help="""\ write to the given file. Otherwise writes to the user config file ({user}).""".format(user=config.user_rc_path), ) # XXX: Does this really have to be mutually exclusive. I think the below # code will work even if it is a regular group (although combination of # --add and --remove with the same keys will not be well-defined). action = p.add_mutually_exclusive_group(required=True) action.add_argument("--get", nargs='*', action="store", help="get the configuration value", default=None, metavar=('KEY'), choices=BoolOrListKey()) action.add_argument( "--add", nargs=2, action="append", help="""add one configuration value to a list key. The default behavior is to prepend.""", default=[], choices=ListKey(), metavar=('KEY', 'VALUE'), ) action.add_argument( "--set", nargs=2, action="append", help="set a boolean key. BOOL_VALUE should be 'yes' or 'no'", default=[], choices=BoolKey(), metavar=('KEY', 'BOOL_VALUE'), ) action.add_argument( "--remove", nargs=2, action="append", help="""remove a configuration value from a list key. This removes all instances of the value""", default=[], metavar=('KEY', 'VALUE'), ) action.add_argument( "--remove-key", nargs=1, action="append", help="""remove a configuration key (and all its values)""", default=[], metavar="KEY", ) p.add_argument( "-f", "--force", action="store_true", help="""Write to the config file using the yaml parser. This will remove any comments or structure from the file.""") p.set_defaults(func=execute)
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'config', description=descr, help=descr, epilog=additional_descr + example, ) common.add_parser_json(p) # TODO: use argparse.FileType location = p.add_mutually_exclusive_group() location.add_argument( "--system", action="store_true", help= """Write to the system .condarc file ({system}). Otherwise writes to the user config file ({user}).""".format(system=sys_rc_path, user=user_rc_path), ) location.add_argument( "--file", action="store", help= """Write to the given file. Otherwise writes to the user config file ({user}) or the file path given by the 'CONDARC' environment variable, if it is set (default: %(default)s).""".format(user=user_rc_path), default=os.environ.get('CONDARC', user_rc_path)) # XXX: Does this really have to be mutually exclusive. I think the below # code will work even if it is a regular group (although combination of # --add and --remove with the same keys will not be well-defined). action = p.add_mutually_exclusive_group(required=True) action.add_argument("--get", nargs='*', action="store", help="Get a configuration value.", default=None, metavar=('KEY'), choices=BoolOrListKey()) action.add_argument( "--add", nargs=2, action="append", help="""Add one configuration value to a list key. The default behavior is to prepend.""", default=[], choices=ListKey(), metavar=('KEY', 'VALUE'), ) action.add_argument( "--set", nargs=2, action="append", help="""Set a boolean or string key""", default=[], choices=SingleValueKey(), metavar=('KEY', 'VALUE'), ) action.add_argument( "--remove", nargs=2, action="append", help="""Remove a configuration value from a list key. This removes all instances of the value.""", default=[], metavar=('KEY', 'VALUE'), ) action.add_argument( "--remove-key", nargs=1, action="append", help="""Remove a configuration key (and all its values).""", default=[], metavar="KEY", ) p.add_argument( "-f", "--force", action="store_true", help="""Write to the config file using the yaml parser. This will remove any comments or structure from the file.""") p.set_defaults(func=execute)
help=uninstall_help, epilog=example % name, add_help=False, ) common.add_parser_help(p) ======= p = sub_parsers.add_parser( name, formatter_class=RawDescriptionHelpFormatter, description=descr % name, help=help % name, epilog=example % name, ) >>>>>>> conda/feature/instruction-arguments common.add_parser_yes(p) common.add_parser_json(p) p.add_argument( "--all", action="store_true", <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD <<<<<<< HEAD help="%s all packages, i.e., the entire environment." % name.capitalize(), ======= help="%s all packages, i.e. the entire environment" % name, >>>>>>> conda/feature/instruction-arguments ======= help="%s all packages, i.e. the entire environment" % name,
def configure_parser(sub_parsers): p = sub_parsers.add_parser( 'search', description=descr, help=descr, epilog=example, ) common.add_parser_prefix(p) p.add_argument( "--canonical", action="store_true", help="Output canonical names of packages only.", ) p.add_argument( '-f', "--full-name", action="store_true", help="Only search for full name, ie. ^<regex>$.", ) p.add_argument( "--names-only", action="store_true", help="Output only package names.", ) common.add_parser_known(p) common.add_parser_use_index_cache(p) p.add_argument( '-o', "--outdated", action="store_true", help="Only display installed but outdated packages.", ) p.add_argument( '--platform', action='store', dest='platform', help="""Search the given platform. Should be formatted like 'osx-64', 'linux-32', 'win-64', and so on. The default is to search the current platform.""", choices=Platforms(), default=None, ) p.add_argument( "--spec", action="store_true", help="""Treat the regex argument as a package specification instead (package_name[=version[=build]]).""", ) p.add_argument( "--reverse-dependency", action="store_true", help="""Perform a reverse dependency search. When using this flag, the --full-name flag is recommended. Use 'conda info package' to see the dependencies of a package.""", ) p.add_argument( 'regex', metavar='regex', action="store", nargs="?", help="""Package specification or Python regular expression to search for (default: display all packages).""", ).completer = common.Packages common.add_parser_offline(p) common.add_parser_channels(p) common.add_parser_json(p) common.add_parser_use_local(p) p.set_defaults(func=execute)