Commit Graph
365 Commits
Author SHA1 Message Date
Ruslan Kuprieiev eb533f9a9c RFC: fix issues reported by codeclimate
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 04:53:13 +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 3acc2146fa data_item: handle __eq__ if other == None
Currently it is not possible to check if data_item == None,
as __eq__ tries to access .data in 'None' object and thus
throws an exception.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:10:54 +03:00
Ruslan Kuprieiev c3a43c6d84 cloud: return data_item in sync/pull/push/import
This will help us distinguish if target was processed successfully.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:10:52 +03:00
Ruslan Kuprieiev 149c921576 dvc: add status command
This command shows status for data files. I.e.

    $ dvc status data/
        new file:       .cache/Posts-train.tsv_2ccd8e7
        new file:       data/llss
        modified:       .cache/Posts.xml_512a612
        new file:       .cache/empty_0000000
        new file:       data/oss
        new file:       .cache/matrix-test.p_69b924d
        new file:       .cache/dir21111/Posts.xml.tgz_cd71d01

so it will tell us if there are any new/modified/deleted data
files that you might want to push/pull/etc.

Fixes #158

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:10:24 +03:00
Ruslan Kuprieiev ec76c1aa8a utils: collect return value from map
Zip it together with the targets list and return back
to the caller so he can use it if he wants.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-19 20:10:24 +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 7a3b500390 dvc: bring back frozen versions for deps
Fixes #173.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-16 19:39:05 +03:00
Ophir Yoktan ed797b0998 Merge pull request #172 from ophiry/testing_none_value
replace eq\neq to is is not none - bug fix
2017-08-15 09:05:53 +03:00
Ophir Yoktan b73798270c replace eq\neq to is is not none - bug fix 2017-08-15 09:04:38 +03:00
Ophir Yoktan f3001dc2e1 Merge pull request #171 from ophiry/testing_none_value
replace eq\neq to is is not none
2017-08-15 09:03:04 +03:00
Ophir Yoktan 81b39b2ad7 replace eq\neq to is is not none 2017-08-15 09:00:24 +03:00
Ruslan Kuprieiev 49d286e5ad Merge pull request #170 from ophiry/md5_handle_missing_file
return empty md5 if file doesnt exist
2017-08-15 01:08:28 +03:00
Ophir Yoktan c21261b69f return empty md5 if file doesnt exist 2017-08-14 23:27:05 +03:00
Ruslan Kuprieiev 348f04462f Merge pull request #164 from efiop/master
import: resume download
2017-08-13 15:33:13 -07: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 04bb836fe0 Merge pull request #162 from efiop/master
travis: add workaround for mac build
2017-08-12 21:10:21 -07:00
Ruslan Kuprieiev 45253ba225 travis: add workaround for mac build
Travis doesn't natively support python builds on Mac yet,
so we need to workaround it by installing everything ourselves.

Fixes #133.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-13 06:55:04 +03:00
Ruslan Kuprieiev 990c72fcf7 Merge pull request #161 from efiop/master
build: cleanup build_macos.sh
2017-08-12 14:57:39 -07:00
Ruslan Kuprieiev f34bcdd959 build: cleanup build_macos.sh
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 14:38:13 -07:00
Ruslan Kuprieiev 2454b89963 Merge pull request #160 from efiop/master
Sync/cloud RFC, pull/push commands
2017-08-12 13:07:42 -07:00
Ruslan Kuprieiev 178834e572 cloud: aws: check md5 when pulling data
Currently dvc downloads data from cloud even if we already
have the same file downloaded. This patch fixes it by checking
md5 before attempting to download.

Fixes #159

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 22:51:16 +03:00
Ruslan Kuprieiev f21defdc68 RFC: cloud: rename methods
New names fit much better:

    sync_to_cloud     -> push
    sync_from_cloud   -> pull
    remove_from_cloud -> remove

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 22:44:20 +03:00
Ruslan Kuprieiev db43e6bc91 dvc: add pull/push commands
We already have 'sync' command, but users report it to be confusing
when both local and remote files exist, so lets introduce two direct
commands to implicitly push and pull from cloud.

Fixes #157.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 22:44:10 +03:00
Ruslan Kuprieiev a234311980 sync/cloud: move target logic to DataCloud
This should come in handy for pull and push commands.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 19:44:17 +03:00
Ruslan Kuprieiev 10f19f5c2e cloud: parse and store cloud in settings
Cloud is determined from config and stays the same from that moment,
so it makes sense to parse it once and store in settings, so whoever
needs it, could just use self.settings.cloud. This is going to be
more useful in the few next commits, where push/pull/status are introduced.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-12 08:00:53 +03:00
Ruslan Kuprieiev 7a5a17e9c6 Merge pull request #153 from efiop/master
RFC: fix codeclimate warnings
2017-08-07 03:07:18 +03:00
Ruslan Kuprieiev afcbb148b9 RFC: fix codeclimate warnings
codeclimate noted a few similiar code chunks and it looks
like it is worth fixing them.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-07 02:41:55 +03:00
Ruslan Kuprieiev 93326c99ad tests: utils: don't forget to init env 2017-08-07 02:26:26 +03:00
Ruslan Kuprieiev fa9996fe30 Merge pull request #152 from efiop/master
tests: add test for utils.py
2017-08-07 01:56:02 +03:00
Ruslan Kuprieiev c7df4bd0ba tests: add test for utils.py
Some sanity tests to make sure something like #132
doesn't happen anymore.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-07 01:36:26 +03:00
Ruslan Kuprieiev bfd2085707 Merge pull request #151 from efiop/master
init: check user.{name,email} to make sure git is ready
2017-08-06 03:21:41 +03:00
Ruslan Kuprieiev 0cd30e727a init: check user.{name,email} to make sure git is ready
Making sure git is configured at least with name and email,
so our commits can be commited without any problems.

Fixes #64.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-06 02:40:50 +03:00
Ruslan Kuprieiev 4a66bf2d95 Merge pull request #147 from efiop/master
dvc: get rid of pathlib
2017-08-03 23:54:45 +03:00
Ruslan Kuprieiev 883e6773f7 dvc: get rid of pathlib
Fixes #118

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-03 23:31:59 +03:00
Ruslan Kuprieiev 0f2a672804 Merge pull request #146 from efiop/master
cli: set dvc prog name to 'dvc'
2017-08-03 12:01:15 +03:00
Ruslan Kuprieiev a1971ad39a cli: set dvc prog name to 'dvc'
Fixes #145

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-03 11:46:39 +03:00
Ruslan Kuprieiev 4df6e1bdbf Merge pull request #143 from efiop/master
cli: fix help, 'run', 'repro' and 'sync'
2017-08-03 05:10:12 +03:00
Ruslan Kuprieiev b5623a32bd cli: fix help, 'run', 'repro' and 'sync'
Adding metavar='' is a legacy from previous design and should
be removed to achieve better help msgs.

'run' should have 'command' as a positional and _required_ argument and 'args'
as a remainder.

'repro' had CmdRun triggered when called from cli.

'sync' should have 'targets' as a positional and _required_ argument.

Fixes #136.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-03 04:55:07 +03:00
Ruslan Kuprieiev 2931a9230b travis: add pip caching
pip installs take quite some time in the build process, so to speed it up lets add pip caching.
2017-08-03 03:37:52 +03:00
Ruslan Kuprieiev 15030e7bce appveyor: remove 'artifact' from 'deploy' section
It should upload artifacts automatically.
2017-08-03 03:24:50 +03:00
Ruslan Kuprieiev f336a0456d appveyour: Update auth token for release deploy
Apparently it is not the same as for travis.
2017-08-03 03:01:14 +03:00
Ruslan Kuprieiev b3ab103680 Merge pull request #142 from efiop/master
appveyor: rename yml back
2017-08-02 14:43:19 +03:00
Ruslan Kuprieiev 36f8f77aed appveyor: rename yml back
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-02 14:21:20 +03:00
Ruslan Kuprieiev 7fbfc778df appveyor: add 'artifact' to 'deploy' 2017-08-02 01:15:58 +03:00
Ruslan Kuprieiev 1854ac5e23 Merge pull request #140 from efiop/master
appveyor: rename yml and add 'branches'
2017-08-02 01:02:43 +03:00
Ruslan Kuprieiev 4eb333b6ef appveyor: rename yml and add 'branches'
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-02 00:59:44 +03:00
Ruslan Kuprieiev 4908337219 Merge pull request #139 from efiop/master
appveyor: deploy dvc windows installer
2017-08-02 00:46:22 +03:00
Ruslan Kuprieiev e79a8bf9f8 appveyor: deploy dvc windows installer
Same as with travis, appveyor will push dvc installer
for windows, when new dvc is being released on github.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-02 00:40:37 +03:00