simple_dvc.cache_surgery module

class simple_dvc.cache_surgery.CachePurgeCLI(*args, **kwargs)[source]

Bases: DataConfig

Destroy all files in the DVC cache referenced in the target directory.

Example

cd /home/joncrall/remote/toothbrush/data/dvc-repos/smart_data_dvc-ssd/Aligned-Drop4-2022-08-08-TA1-S2-WV-PD-ACC python ~/code/watch/dev/poc/dvc_cache_surgery.py purge . –workers=0

Valid options: []

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

  • **kwargs – keyword arguments for this data config

classmethod main(cmdline=False, **kwargs)[source]
default = {'invert': <Value(False)>, 'path': <Value('.')>, 'workers': <Value(0)>}
class simple_dvc.cache_surgery.CacheCopyCLI(data=None, default=None, cmdline=False)[source]

Bases: Config

Copy all files referenced in the current checkout from one cache to another cache.

Parameters:
  • data (object) – filepath, dict, or None

  • default (dict | None) – overrides the class defaults

  • cmdline (bool | List[str] | str | dict) – If False, then no command line information is used. If True, then sys.argv is parsed and used. If a list of strings that used instead of sys.argv. If a string, then that is parsed using shlex and used instead

    of sys.argv.

    If a dictionary grants fine grained controls over the args passed to Config._read_argv(). Can contain:

    • strict (bool): defaults to False

    • argv (List[str]): defaults to None

    • special_options (bool): defaults to True

    • autocomplete (bool): defaults to False

    Defaults to False.

Note

Avoid setting cmdline parameter here. Instead prefer to use the cli classmethod to create a command line aware config instance..

classmethod main(cmdline=False, **kwargs)[source]
default = {'dpath': <Value('.')>, 'new_cache_dpath': <Value(None)>, 'workers': <Value(0)>}
simple_dvc.cache_surgery.find_cached_fpaths(dvc, dpath)[source]