Commit Graph
33 Commits
Author SHA1 Message Date
Dmitry 8d6c134780 Extract cache_dir\state_dir as a CongigI class variable 2017-11-13 00:38:44 -08:00
Ruslan Kuprieiev a813ebaeb7 dvc: use hardlinks instead of symlinks
Fixes #225
Fixes #273

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-10-30 05:05:28 +02:00
Ruslan Kuprieiev 8bb51f5efc cache: use checksums instead of commit_id
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]>
2017-10-17 14:06:43 +03:00
Dmitry 0e9402d284 State file constructor param change 2017-09-18 01:50:43 -07:00
Ruslan Kuprieiev 17f0c0de10 RFC: find and fix errors and some warning reported by pylint
Fixes #219

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-09-17 19:25:03 +03:00
Dmitry d77ea9877e First workflow graph 2017-09-02 01:27:39 -07:00
Ruslan Kuprieiev 1eab71c97f RFC: import: pass jobs early
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-27 23:35:22 +03:00
Ruslan Kuprieiev 4fe831712e import: don't create state files for failed imports
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:10:54 +03:00
Ruslan Kuprieiev 5f7f608529 import: import from clouds
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]>
2017-08-19 20:10:10 +03:00
Ruslan Kuprieiev 7f78331003 import: use content-md5 to verify download
Fixes #167

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:02:43 +03:00
Ruslan Kuprieiev ebeb32a8ac import: resume download
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]>
2017-08-14 01:16:28 +03:00
Ruslan Kuprieiev ee34fdfa31 RFC: move cmdline parsing to cli.py and settings RFC
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]>
2017-07-31 01:39:32 +03:00
Ruslan Kuprieiev 76db9db5c2 dvc: introduce --jobs option and use map_progress
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]>
2017-06-25 04:04:19 +03:00
Ruslan Kuprieiev 7c6765c196 import/sync: add progress bar for local copy
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]>
2017-06-25 02:03:46 +03:00
Ruslan Kuprieiev 11d1fb502a progress: use global variable 'progress'
There is no point in having more than just one
global progress bar.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-06-21 03:37:42 +03:00
Dmitry Petrov ed923db203 Import cmd unit-tests 2017-06-19 21:31:31 -07:00
Dmitry Petrov 674f20c800 Verify output refactoring. Small fixes. 2017-06-19 19:30:01 -07:00
Dmitry Petrov 47e1b421f5 Verify output refactoring. Attempt 2 2017-06-19 19:20:04 -07:00
Dmitry Petrov c16f97a3cf Verify output refactoring 2017-06-19 19:07:54 -07:00
Dmitry Petrov 15cadc44f6 Simplify output validation logic 2017-06-19 18:48:05 -07:00
Dmitry Petrov df6abc7528 Small sync and import fixes 2017-06-19 16:44:18 -07:00
Ruslan Kuprieiev 57691297a8 Merge pull request #95 from efiop/master
progress: add progress bar to 'import'
2017-06-19 04:52:05 +03:00
Ruslan Kuprieiev e9a9e32357 progress: add progress bar to 'import'
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]>
2017-06-19 04:30:32 +03:00
Dmitry Petrov f2bac9aac1 GC command 2017-06-14 23:48:58 -07:00
Ruslan Kuprieiev 4f938cec71 dvc: introduce multithreaded import and RFC, v2
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]>
2017-06-07 14:16:15 +03:00
Ruslan Kuprieiev a01ef3197c dvc: misc changes for DataCloud, 'data sync' and 'remove'
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]>
2017-05-28 22:28:58 +03:00
Dmitry Petrov 43e80bec4a Extract DvcLock logic to a separate class 2017-05-15 19:44:56 -07:00
Dmitry Petrov 26461e910e dvc help messages 2017-05-01 16:33:58 -07:00
Dmitry Petrov f6ded2fa72 Lock cmd: small changes 2017-04-29 18:01:24 -07:00
Dmitry Petrov 223380d299 New command: lock 2017-04-29 15:12:31 -07:00
Dmitry Petrov dac5d36f9f Small changes 2017-04-28 02:23:16 -07:00
Dmitry Petrov cb87de1f4c import commit message formatting fix 2017-04-27 21:35:08 -07:00
Dmitry Petrov b5dd8c1d71 Fix repro command. Close #31 2017-04-19 03:07:04 -07:00