From now on, we identify our cache files by their md5sum,
so that we can avoid cache collission in branching scenario
and also dedup same data at the same time.
Fixes#250, #251
Signed-off-by: Ruslan Kuprieiev <[email protected]>
From now on, 'dvc import' supports s3 and gcp links.
This patch also does some RFC to properly parse url's
scheme using urllib instead of relying on hand-made
regex. Code for downloding files from http urls is moved
to data_cloud.py in preparation for pull/push support
for http/https/ftp schemes in the future.
Also added dummy progress updates(start/finish) for gcp,
as i couldn't find an API call that allows callbacks to
update progress properly.
Fixes#49
Signed-off-by: Ruslan Kuprieiev <[email protected]>
Download to .part file first and rename at the very end,
so if we lose connection we could resume download.
Note: not all servers support 'Range' header, so this
feature is not going to work everywhere.
This feature is activated by -c/--continue cmdline option.
Fixes#108
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This will make the structure of dvc more linear
making it easier to read. Plus, these changes
are needed in preparation for libdvc, as they
move all cmdline parsing to one common place.
This patch also refactors our settings system
also make it more linear and remove abstraction
levels that are not needed and only cause confusion.
There is a lot more to be done in preparation for
dvc lib and RFC overall, but this a first step
in that long journey.
Signed-off-by: Ruslan Kuprieiev <[email protected]>
It replaces POOL_SIZE constant and by default equals to the
number of cpus available.
map_progress is a helper for 'sync' and 'import' commands to
run in a multi-threaded mode.
Signed-off-by: Ruslan Kuprieiev <[email protected]>
Currently progress bar is only supported for downloading
from web(aws,http* etc), but now it is also supported for
local files(i.e. LOCAL for 'data sync' and just local files
for 'import')
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This one is a bit like the one you see in yum/dnf.
It has one single line updating current progress
for different targets and once they are finished
prints them as standalone line. So it looks smth
like this:
$ dvc import https://foo.bar/one.data \
https://foo.bar/two.data \
https://foo.bar/three.data
(1/3): [########################################] 100% one.data
(2/3): [######################### ] 60% three.data
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This allows us to download files in a few threads.
Also includes RFC, as we can now get rid of import-bulk.py.
v2: use POOL_SIZE=4
Signed-off-by: Ruslan Kuprieiev <[email protected]>
This patch introduces DataCloud class that used config to
determine proper cloud class(DataCloudAWS and DataCloudGCP
are awailable) to use in "data_sync" and "remove" commands.
This patch focuses on introducing the common class itself
saving original code and definetly needs some RFC later.
It also adds simple DataCloudLOCAL class that uses directory
as a StoragePath and cp as a sync method. Which makes testing
so much easier and covers local scenarios.
And it also introduces ability to run data sync in parallel
by collecting files first and then running sync in a number
of threads.
Signed-off-by: Ruslan Kuprieiev <[email protected]>