Commit Graph
377 Commits
Author SHA1 Message Date
Ruslan Kuprieiev 04e66f94fc aws: use multipart to push changes, v2
Fixes #100

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 19:04:58 +03:00
Ruslan Kuprieiev 90762da18f cloud: fix typo
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 17:58:34 +03:00
Ruslan Kuprieiev 8b84d098cb Merge pull request #179 from dataversioncontrol/revert-178-master
Revert "aws: use multipart to push changes"
2017-08-20 17:56:17 +03:00
Ruslan Kuprieiev 163558c9c2 Revert "aws: use multipart to push changes" 2017-08-20 17:55:23 +03:00
Ruslan Kuprieiev b5866962a8 Merge pull request #178 from efiop/master
aws: use multipart to push changes
2017-08-20 16:36:15 +03:00
Ruslan Kuprieiev 78cad172c6 aws: use multipart to push changes
Fixes #100.
2017-08-20 16:12:38 +03:00
Ruslan Kuprieiev 78b337034d Merge pull request #176 from efiop/master
[WIP] Misc improvements and features
2017-08-20 10:11:22 +03:00
Ruslan Kuprieiev dc77e03459 travis: run functests
Fixes #175

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 09:32:32 +03:00
Ruslan Kuprieiev 0f45afb3a4 functest: rework test system and introduce new tests
Reworked existing tests and test-system, added a few new
tests(init, reworked repro, import).

Fixes #175

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 09:32:32 +03:00
Ruslan Kuprieiev 194e1ec419 dvc: add 'config' command
Fixes #177

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 06:19:38 +03:00
Ruslan Kuprieiev e7bf8054da functest: fix existing scripts
A few minor adjustments to make what we currently have work,
while I prepare new func tests.

Fixes #175

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-20 04:53:13 +03:00
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 552b571bb2 Merge pull request #174 from efiop/master
dvc: bring back frozen versions for deps
2017-08-16 22:43:00 +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