Commit Graph
70 Commits
Author SHA1 Message Date
Saugat Pachhai 476af100de ui: migrating rest to the ui.write (#6176)
* complete migration to ui.write

* fix small bugs
2021-06-21 22:14:59 +03:00
Saugat Pachhai 77be01ee2d try to close dvc.state on exit (#5962)
* try to close dvc.state on exit

I have a feeling that it is causing the issues with
shutil.copytree and some PermissionError during 'init',
as we are not closing it between multiple 'main()' calls.
But I am not quite sure, and this seems like a good thing to
do anyway.

* fixup

* close dvc on exit

* close cache on tests and on init
2021-05-06 14:32:25 +03:00
Peter Rowlands (변기호) 8a5dc6a781 init: move welcome message from Repo.init to command.init (#4759)
* repo: add quiet flag for Repo.init

* move welcome message to command/init
2020-10-22 12:49:48 +09:00
Saugat Pachhai c4bc4c83e8 upgrade to isort5 (#4399)
* Imports are no longer moved to top.
* `seed-isort-config` is no longer needed.
* Has a `black`-compatible profile/config.
* Also `isorts` the imports anywhere in the code
  (not just at the top).

Also bumps `restyled-isort` to newest version
2020-08-17 19:59:40 +05:45
Casper da Costa-Luis 2bb7257a06 lint: isort pre-commit & misc improvements (#3749)
* test: clean flake8 config root clutter

* test: pre-commit: add isort

Compatible with black (see https://github.com/timothycrosley/isort/issues/694)

* lint: reorder imports

* lint: more complex imports

* lint: fix deepsource

* config: isort: add first party dvc

* tests: restyled: add isort

* temp commit to revert before merge

* Revert "temp commit to revert before merge"

This reverts commit 11db0fd8e95fe891597cbb9bf804480909b19e24.
2020-05-06 23:56:07 +03:00
Jorge Orpinel f325921315 diff: update help output to match docs, et al. (#3601)
* diff: update help output to match docs
per https://github.com/iterative/dvc/pull/3566#pullrequestreview-388346350

* terms: git->Git, scm->SCM, spacing
2020-04-07 12:50:11 +03:00
Paweł Redzyński 8d04d6d3ce SCM: allow multiple DVC repos inside single SCM repo (#3257) 2020-02-25 14:40:20 +02:00
Jorge Orpinel 69c1aa5bbf dvc: revert capitalization of logger.exception strings
per https://github.com/iterative/dvc/pull/3220#pullrequestreview-347083819
2020-01-23 00:50:24 -06:00
Jorge Orpinel ec0c39a28e term: review capitalization and backquotes around "dvc"
rel: https://github.com/iterative/dvc/pull/3156#discussion_r369897073
2020-01-22 20:27:01 -06:00
Mr. Outis 94a0914bba py3: get rid of future imports 2019-12-30 19:35:48 -06:00
Ruslan Kuprieiev 95fe1578bb dvc: automatically reorder imports 2019-11-05 02:34:40 +02:00
Jorge Orpinel a48481b01f dvc: change ` for ' in dynamic parts of output messages (#2644)
* dvc: change ` for ' in dinamic parts of DVC outputs

per https://github.com/iterative/dvc/pull/2644#issuecomment-545151398

* dvc: use ' for dynamic output and ` for DVC names

per https://github.com/iterative/dvc/pull/2644#discussion_r338417698
2019-10-28 22:00:53 +02:00
Ruslan Kuprieiev cc2f28c12b cmd: use CmdBaseNoRepo for commands without repo
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-05-11 17:09:19 +03:00
Mr. Outis 85cd344152 logger: Use a more _pythonic_ logging
- Uses a formatter for coloring output
- Move the `progress_aware` decorator logic to the logger itself
- Refactor modules so each one uses their own instance of a logger

Close #1753
2019-04-06 18:19:32 -06:00
Ivan Shcheklein 4a9188c0b5 Move man doc links to descriptions, fix some help copies (#1805)
* move man doc links to descriptions, fix some help copies

* minor init force message fix

* deal with ugly inheritance in lock base

* remove unnecessary super calls

* add return back to python lock/unlock run functions
2019-03-29 03:56:41 +02:00
Lee Yi Jie Joel 2ba657c77a Add links to documentation for all commands (#1767) 2019-03-22 20:32:06 +02:00
Ruslan Kuprieiev ba8d83e9b1 dvc: refactor dvc project class
1) split Project's methods into separate files;
2) rename Project into Repo(similar to gitpython's Repo)

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-02-13 03:31:23 +02:00
Ruslan Kuprieiev 4896f08ddf dvc: comply with both flake8 and black
flake8 provides some additional features like unused vars check, etc, so
it makes total sense to use it as well.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-02-04 00:10:36 +02:00
Ruslan Kuprieiev 4069e34130 dvc: use black instead of flake8
Fixes #1546

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-01-30 03:48:36 +02:00
Mr. Outis 0d46921ec7 py2: add unicode literals
Fix #1512
2019-01-27 20:40:21 -06:00
Ruslan Kuprieiev 6fec8b16cd RFC: conform to pylint
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2019-01-16 14:12:19 +02:00
Mr. Outis 4c420d5f4d logger [rfc]: Use a module instead of a class
- Remove deprecation warnings
- Format error output and remove duplicated info

Close #1086
2018-12-23 21:06:39 -06:00
Ruslan Kuprieiev e02a33f934 logger: shortcut logger in quiet and normal modes
In scenarios with millions of files, late shorcutting of
debug msgs results in massive overhead. In order to avoid
that, just shortcut logger messages ASAP if verbose mode
is not enabled.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-12-11 12:07:28 +02:00
Ruslan Kuprieiev 22c6ad5ba3 analytics: send user events
Fixes #693

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-12-01 06:02:28 +02:00
Ruslan Kuprieiev 3410f8048a dvc: optimize imports to speedup startup time
Speeds up `time dvc` from 1.2 seconds to <0.2 seconds.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-07-18 11:20:05 +03:00
Ruslan Kuprieiev 6d120f474e dvc: handle double dvc init
Fixes #889

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-07-16 13:43:46 +03:00
Ruslan Kuprieiev a1460a6d92 init: properly handle dvc init in directory without scm
Fixes #660
Fixes #662

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-04-18 09:27:55 +03:00
Dmitry c760e53750 Duble space before class declaration 2017-12-24 23:29:07 -08:00
Ruslan Kuprieiev a779424a36 WIP RFC
Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-12-23 09:37:40 +02:00
Ruslan Kuprieiev e853fc76aa dvc: get rid of state dir and cache_state in favor of single .dvc
From now on everything is stored in filename + .dvc path, except for local_state.
This allows us to be more explicit and help users see everything they need in relation
to version control of their own data files.

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-12-05 20:33:21 +02:00
Ruslan Kuprieiev f12402771b init: add *.local_state to gitignore
Fixes #313

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-11-28 21:44:19 +02:00
Dmitry db625e8213 Use DvcLock from CmdBase class only 2017-11-19 04:14:12 -08:00
Dmitry 1349589ec7 Move CmdBase class to common dir 2017-11-19 03:12:37 -08:00
Dmitry 62e8b751ba Rename STATE_DIR to STATE_DIR_NAME 2017-11-12 22:41:46 -08:00
Dmitry 849dc2d873 get rid of the empty file 2017-11-05 18:18:51 -08:00
Ruslan Kuprieiev 4ffac507df dvc: remove data dir
From now on, we're no longer tied to fixed data dir, so we can
track individual data items without forcing user to use separate
dir for them. This way we add much more flexibility for dvc, so
users can use their own project structure.

Fixes #68

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-10-30 05:05:28 +02: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 898c4be0e2 Code improvements 2017-10-09 17:10:59 -07:00
Dmitry 276e910ba8 config command changes format of empty values. Clouse #245 2017-10-07 18:50:16 -07:00
Dmitry 9436430040 Read metrics from state file 2017-09-18 04:47:39 -07:00
Dmitry 0e9402d284 State file constructor param change 2017-09-18 01:50:43 -07:00
Ruslan Kuprieiev 3286af59ef target: remove 'target' command
Fixes #209

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-09-17 02:41:50 +03:00
Ruslan Kuprieiev 68186b08fc dvc: move config/cache/state/target to .dvc
This is a more natural way to store dvc-related files and dirs
and follows git-logic much better.

Fixes #200

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-09-16 16:48:46 +03:00
Ruslan Kuprieiev 30bacf7f95 dvc: rename empty to .empty
This will allow us to hide it.

Fixes #104

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2017-08-26 09:18:45 +03:00
Dmitry Petrov ee0e012f86 Config redesign 2017-08-23 00:38:28 -07:00
Dmitry Petrov 5c062aadaf Extract AWS credentials from data_cloud.py 2017-08-04 19:30:04 -07:00
Dmitry Petrov 54c1aa63b0 Cloud basic 2: init 2017-08-04 04:39:48 -07: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 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