Commit Graph
77 Commits
Author SHA1 Message Date
Mr. Outis 7c0c89a688 upgpkg: requests >= 2.22.0
Close #2008
2019-05-16 13:28:36 -07:00
Ruslan Kuprieiev aacb0b4c98 pyinstaller: fix build for oss2
This version added support for oss as a remote, which has caused some
issues when building the binary package. To fix those, we need two
pyinstaller hools:

1) hook-Crypto.py
    This one has been added to PyInstaller's upstream, but wasn't
    released yet, so we are using a copy of it for now.

2) hook-aliyunsdkcore.py
    This one is a new one. Sent it to PyInstaller's team in a PR [1].

[1] https://github.com/pyinstaller/pyinstaller/pull/4228

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-05-11 21:35:41 +03:00
nanaya-tachibana 7ceaf88c54 remote: add support for aliyun oss (#1961)
* remote: add support for aliyun oss

Usage:
$ dvc remote add myremote oss://my-bucket.endpoint/path
Set key id and key secret using modify command
$ dvc remote modify myremote oss_key_id my-key-id
$ dvc remote modify myremote oss_key_secret my-key-secret
or environment variables
$ export OSS_ACCESS_KEY_ID="my-key-id"
$ export OSS_ACCESS_KEY_SECRET="my-key-secret"

Ref:
oss python SDK: https://www.alibabacloud.com/help/doc-detail/32026.htm

* Not needed, since we don't support external dependencies/outputs on OSS.
See https://github.com/iterative/dvc/pull/1961.

* Add a way to test oss storage using docker.

Start a container running an oss emulator.
$ git clone https://github.com/nanaya-tachibana/oss-emulator.git
$ docker image build -t oss:1.0 oss-emulator
$ docker run --detach -p 8880:8880 --name oss-emulator oss:1.0
Setup environment variables.
$ export OSS_BUCKET='my-bucket'
$ export OSS_ENDPOINT='localhost:8880'
$ export OSS_ACCESS_KEY_ID='AccessKeyID'
$ export OSS_ACCESS_KEY_SECRET='AccessKeySecret'

* Use default key id and key secret when they are not given,
which gives read access to public read bucket and public bucket.

* test: add oss tests to appveyor.

* remove unneeded tests.

* remote: use s3 style url for oss storage and make endpoint a configurable value.

Usage:
$ dvc remote add myremote oss://my-bucket/path
Set key id, key secret and endpoint using modify command
$ dvc remote modify myremote oss_key_id my-key-id
$ dvc remote modify myremote oss_key_secret my-key-secret
$ dvc remote modify myremote oss_endpoint endpoint
or environment variables
$ export OSS_ACCESS_KEY_ID="my-key-id"
$ export OSS_ACCESS_KEY_SECRET="my-key-secret"
$ export OSS_ENDPOINT="endpoint"

* remote: fallback to [] if there are no cinfos

Signed-off-by: Ruslan Kuprieiev <[email protected]>

* test: remote: add oss CLI test

Signed-off-by: Ruslan Kuprieiev <[email protected]>

* travis: use iterative's fork of oss-emulator

Just to keep things in-house.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-05-09 15:35:41 +03:00
Brett Barkley beef1e32b0 dvc metrics show: implement jsonpath-ng
Fixes #1919
2019-04-28 08:28:36 -04:00
Alexander Schepanovski 0c867399bb dvc: retain formatting and comments in .dvc files (#1885)
* test: remove never used copy of load_stage_file()

* dvc: save comments and custom formatting in stage files

* Add a couple of TODOs

* test: test repro doesn't clear comments and formatting in .dvc

As part of this I started writing pytest-like tests and added commonly
used fixtures.

* test: simplify and prettify dvc formatting retained test

Also test that line comments after md5 fields are retained.

* test: fix tests

* dvc: fix stage and metrics opens not closed

* dvc: always use utf-8 in stage files

It used to encode in system default encoding. Not sure if PyYAML was
handling this silently or we were just lucky all the way.

* test: unit test apply_diff()

* test: remove TODOs and ASK

* dvc: polish dvc-formatting PR

* dvc: move stage load/dump utils to a new stage utils file

* dvc: clean up apply_diff()

* test: test stage md5 ignores comments

* test: remove pytests starting marker
2019-04-20 01:12:53 +03:00
pared c467ccebcb ignore: introduce .dvcignore, apply when searching for stage files 2019-04-15 14:31:34 +02:00
Zhanibek 8b50ef8bb6 repo: replace custom plural func to inflect lib usage 2019-04-05 15:02:28 +06:00
Dmitrii Pukhov fba43277e6 cli: add pipeline show --tree
Add option to unfold dependencies into a tree.

Fixes #1038
2019-03-26 01:29:49 +09:00
Ivan Shcheklein 75421f0f21 migrate to pytest 2019-03-17 14:49:49 -07:00
Ivan Shcheklein 2e66119465 boto version up to make aws dependencies compatible with test requirements 2019-01-28 20:57:36 -08:00
Ruslan Kuprieiev c02fe1313f config: support 'global' and 'system' configs
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-12-01 02:31:14 +02:00
Ruslan Kuprieiev 532c9df053 dagascii: don't use unreleased wait_for_input method
Fixes #1359

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-11-23 04:38:26 +02:00
Ruslan Kuprieiev 259f88e58f dagascii: use wait_for_input from asciimatics
Fixes #1359

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-11-23 02:47:28 +02:00
Ruslan Kuprieiev 181ed5e55c reqs: update google-cloud-storage 2018-11-07 22:46:01 +02:00
Mr. Outis b6842fb089 updater: Add custom update message depending on package manager (#1287)
* updater: Add custom update message depending on package manager

Close #938
Close #1031

* Reduce cognitive complexity and avoid too many return functions

* Use a dictionary instead of if/else

* Take into account pkg installation with OSX

* updater: add platform detection

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-11-07 19:04:52 +02:00
Ruslan Kuprieiev a6ea2f3db9 dvc: stop using ntfsutils module
Fixes #1162

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-10-07 17:49:29 +03:00
Ruslan Kuprieiev 53b37bb266 show: use asciimatics to provide scrollable graph
Fixes #1177

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-10-06 01:04:00 +03:00
Mr. Outis 2a7ec2d2df Update networkx package (== 2.1, >= 2.1)
The latest version is 2.2 (https://pypi.org/project/networkx).

Updating it to prevent collisions with some package managers already
using the latest one.
2018-10-04 18:08:27 -05:00
Ruslan Kuprieiev f4fc3f47e4 show: don't use asciicanvas package
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-09-28 21:42:59 +03:00
pared 89e03c8606 pipeline show add --dot option (#1141)
* pipeline show add --dot option

* refactor common code, pydot in requirements

* code formatting

* code formatting
2018-09-24 02:50:41 +03:00
Ruslan Kuprieiev ff63376d49 dvc: use ctypes instead of cffi
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-09-23 12:45:16 +03:00
Ruslan Kuprieiev 5279b1ae8f requirements: stop using obsoleted google-cloud
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-09-23 08:36:42 +03:00
Ruslan Kuprieiev 8b513fb336 setup: misc fixes
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-09-23 06:06:01 +03:00
Ruslan Kuprieiev 6a55d1502f dvc: avoid using pyreflink module
Fixes #1149

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-09-22 12:11:18 +03:00
Ruslan Kuprieiev 9135944d7c reqs: use grandalf 0.6 2018-08-23 04:41:49 +03:00
Ruslan Kuprieiev c378e4b3d2 dvc: pipeline show: create ASCII visualizations for DAG
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-08-19 21:01:12 +03:00
Ruslan Kuprieiev f02bf73587 reqs: only requre futures pkg on python 2.7
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-08-03 20:55:23 +03:00
Ruslan Kuprieiev d0ce57adac reqs: move pytest to test-requirements
Fixes #966

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-08-03 13:33:24 +03:00
Ruslan Kuprieiev eaa994527d reqs: don't forget futures
Fixes #967

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-08-03 13:25:36 +03:00
Ruslan Kuprieiev f1a28c3812 dvc: support dvc add for external files
Fixes #890

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-07-16 16:34:16 +03:00
Clemens Wolff 6882a781a4 Add Azure Blob Storage remote
This change adds a new cloud remote based on Azure Blob Storage [1] and
the azure-storage-blob SDK [2].

The implementation closely follows the patterns laid out by the existing
cloud remotes (AWS and GCP). Notable differences include:

- No use of a lock in the progress-bar callback and no requirement to
  look up total transfer size ahead of time: the Azure Storage SDK
  provides the total transfer bytes and current transfer offset in its
  progress callback.

- When `exists` is called, check the existence of every blob instead of
  listing the entire container. Container list operations can be
  expensive so unless the number of checked files is very large, making
  separate requests is likely going to be more efficient.

- For increased flexibility, access credentials for the Azure Storage
  backend can be provided either connection-string style via the remote
  URL or via environment variables. The Azure Storage backend can be
  emulated via Azurite [3].

[1] https://azure.microsoft.com/en-us/services/storage/blobs/
[2] https://github.com/Azure/azure-storage-python
[3] https://github.com/Azure/azurite

This change was created together with @EricSchles.
2018-07-09 14:47:40 -04:00
Ruslan Kuprieiev 5d3a009886 metrics: require ply>=3.9 to avoid bug on binary windows package
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-07-08 01:02:26 +03:00
Ruslan Kuprieiev fba1d8c181 dvc: use heuristics to detect binary files
Fixes #859

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-07-06 01:32:14 +03:00
Ruslan Kuprieiev 82890ec2a4 reqs: lock google-cloud==0.32.0
0.33.0 is broken.
2018-05-22 23:54:59 +03:00
Ruslan Kuprieiev 7709f57f0b reqs: add pytest(required by setuptools on some systems)
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-17 18:30:15 +03:00
Ruslan Kuprieiev 0f8f682a6b build: remove uneeded deps of boto
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-17 16:40:27 +03:00
Ruslan Kuprieiev 91882bf8c4 reqs: freeze google-compute-engine at 2.4.1 2018-05-17 15:15:38 +03:00
Ruslan Kuprieiev d9a2cbb3ce reqs: add wheel to requirements.txt
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-17 14:04:11 +03:00
Ruslan Kuprieiev 76ed66e1af reqs: require PyInstaller 3.3.1
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-17 13:09:48 +03:00
Ruslan Kuprieiev 03ebdb5cf2 dvc: use our own api instead of github's for version retrieval
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-10 14:40:59 +03:00
Ruslan Kuprieiev 6e20e1f845 dvc: check updates and warn about using an older version
Fixes #687

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-05-06 22:12:28 +03:00
Ruslan Kuprieiev 0a049c232b cache: configurable cache dir and cache type
From now on we allow specifying standalone cache dirs as well as
specifying linking method(copy, symlink, hardlink, reflink) for it.
If 'cache type' is not specified in the config, dvc will try all of
them starting from reflink all the way down to copy.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-28 21:50:49 +03:00
Ruslan Kuprieiev 832af146c6 requirements: add hidden requirement
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-19 21:03:07 +03:00
Ruslan Kuprieiev 1e7d548ca4 dvc: add dvc metrics
Fixes #592

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-19 20:47:37 +03:00
Ruslan Kuprieiev f30e6e53c5 utils: convert to unix format when calculating md5
Fixes #619

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-14 22:07:29 +03:00
Ruslan Kuprieiev 3748164ddb cloud: aws: migrate to boto3
This allows us to abandon our own additional config parameters for
aws cloud(like region) and use the ones from .aws/config by default.
Plus, boto3 automatically switches to multipartupload if file is bigger
than a certain limit, allowing us to remove a lot of our own code.

Fixes #650
Fixes #636
Fixes #601

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-13 06:06:52 +03:00
Ruslan Kuprieiev 8839e72f07 dvc: stop using checksumdir and use our own way of checksuming a dir
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-10 01:56:06 +03:00
Ruslan Kuprieiev bd6688ff57 cloud: add ssh driver
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-08 22:26:18 +03:00
Ruslan Kuprieiev 13e0e9d2e4 dvc: use getdirinfo from ntfsutils
We can now use getdirinfo directly, since our patch
https://github.com/sid0/ntfs/pull/10 is now merged
and released in ntfsutils 0.1.4.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-03-22 13:27:08 +02:00
Ruslan Kuprieiev 6b285e611c dvc: validate stage files
Fixes #578

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-03-20 10:40:37 +02:00