geowatch.cli.find_dvc module¶
NODE: Deprecated in favor of “simple_dvc”
- SeeAlso:
../cli/find_dvc.py
Todo
[ ] This needs a better API. Something like the API for git/dvc remotes.
Example Usage:
# List default directories (hard coded ones that exist) python -m geowatch.cli.find_dvc –command=list
python -m geowatch.cli.find_dvc –command=add –name=test –path=$HOME –hardware=hdd
# List after adding python -m geowatch.cli.find_dvc list
# Now get one python -m geowatch.cli.find_dvc
# Force it to recall “test” python -m geowatch.cli.find_dvc –name=test
# Remove the test dir python -m geowatch.cli.find_dvc –command=remove –name=test
# Final list python -m geowatch.cli.find_dvc –command=list
python -m geowatch.cli.find_dvc –hardware=ssd python -m geowatch.cli.find_dvc –hardware=hdd
Example Usage:
#### ON PROJECT DATA
# When you register your drop4 data / experiment paths, the DVC examples in # this repo will generally work out of the box. The important part is that # your path agrees with the tags used in the examples. Telling the registry # if the path lives on an HDD or SSD is also useful. geowatch_dvc add my_drop4_data –path=$HOME/Projects/SMART/smart_data_dvc –hardware=hdd –priority=100 –tags=phase2_data geowatch_dvc add my_drop4_data –path=$HOME/Projects/SMART/smart_expt_dvc –hardware=hdd –priority=100 –tags=phase2_expt
# The examples in this repo will generally use this pattern to query for # the machine-specific data location. Ensure that these commands work # and output the correct paths DVC_DATA_DPATH=$(geowatch_dvc –tags=’phase2_data’ –hardware=auto) DVC_EXPT_DPATH=$(geowatch_dvc –tags=’phase2_expt’ –hardware=auto)
echo “DVC_DATA_DPATH = $DVC_DATA_DPATH” echo “DVC_EXPT_DPATH = $DVC_EXPT_DPATH”
- class geowatch.cli.find_dvc.FindDVCConfig(*args, **kwargs)[source]¶
Bases:
DataConfigFind the path to a registered DVC repo.
- Example Usage:
# List currently known directories geowatch_dvc list
# Add a new path (with optional hardware and tags) mkdir -p $HOME/tmp/datadir geowatch_dvc add –name=testdir –path=$HOME/tmp/datadir –hardware=hdd –tags=mytag
# Lookup the newly registered path geowatch_dvc find –tags mytag
# Remove the test entry geowatch_dvc remove testdir
Valid options: []
- Parameters:
*args – positional arguments for this data config
**kwargs – keyword arguments for this data config
- default = {'command': <Value('find')>, 'hardware': <Value(None)>, 'must_exist': <Value('auto')>, 'name': <Value(None)>, 'path': <Value(None)>, 'priority': <Value(None)>, 'tags': <Value(None)>, 'verbose': <Value(1)>}¶