simple_dvc.main module

CLI definition

class simple_dvc.main.SimpleDVC_CLI(description='', sub_clis=None, version=None)[source]

Bases: ModalCLI

A DVC CLI That uses our simplified (and more permissive) interface.

The main advantage is that you can run these commands outside a DVC repo as long as you point to a valid in-repo path.

class Add(*args, **kwargs)[source]

Bases: DataConfig

Add data to the DVC repo.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'paths': <Value([])>, 'verbose': <Value(0)>}
class Pull(*args, **kwargs)[source]

Bases: DataConfig

Pull data from a DVC remote.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'allow_missing': <Value(False)>, 'force': <Value(False)>, 'jobs': <Value('default')>, 'paths': <Value([])>, 'recursive': <Value(False)>, 'remote': <Value(None)>, 'verbose': <Value(0)>}
class Push(*args, **kwargs)[source]

Bases: DataConfig

Push data to a DVC remote.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'jobs': <Value('default')>, 'paths': <Value([])>, 'recursive': <Value(False)>, 'remote': <Value(None)>, 'verbose': <Value(0)>}
class Request(*args, **kwargs)[source]

Bases: DataConfig

Like pull, but only tries to pull if the requested file doesn’t exist.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'paths': <Value([])>, 'pull': <Value(0)>, 'remote': <Value(None)>, 'verbose': <Value(0)>}
class CacheDir(*args, **kwargs)[source]

Bases: DataConfig

Print the cache directory

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'dvc_root': <Value('.')>}
class ListSidecars(*args, **kwargs)[source]

Bases: DataConfig

List all sidecars associated with a path.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'path': <Value('.')>}
class ValidateSidecar(*args, **kwargs)[source]

Bases: DataConfig

Validate that everything marked in a sidecar file looks ok.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=1, **kwargs)[source]
default = {'check_hash': <Value(False)>, 'path': <Value(None)>}
registery

alias of DVC_RegisteryCLI

class DvcCacheValidateCLI(*args, **kwargs)

Bases: DataConfig

Checks for corruption in the dvc cache.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

default = {'path': <Value(None)>}
classmethod main(cmdline=1, **kwargs)

Example

>>> # xdoctest: +SKIP
>>> from simple_dvc.cache_validate import *  # NOQA
>>> cmdline = 0
>>> kwargs = dict(path='.')
>>> cls = DvcCacheValidateCLI
>>> cls.main(cmdline=cmdline, **kwargs)
class DiscoverSshRemoteCLI(*args, **kwargs)

Bases: DataConfig

If you have a DVC repo checked out on another machine with the same directory layout (with respect to your home drive) as this machine, then this command finds the location of the cache on that remote machine and adds an appropriate DVC remote in this repo that references it.

Valid options: []

Parameters:
  • *args – positional arguments for this data config

  • **kwargs – keyword arguments for this data config

default = {'dry': <Value(False)>, 'force': <Value(False)>, 'forward_ssh_agent': <Value(False)>, 'host': <Value(None)>}
classmethod main(cmdline=1, **kwargs)

Example

>>> # xdoctest: +SKIP
>>> from simple_dvc.discover_ssh_remote import *  # NOQA
>>> cmdline = 0
>>> kwargs = dict()
>>> cls = DiscoverSshRemoteCLI
>>> cls.main(cmdline=cmdline, **kwargs)