Fixes#2039
Required by #2012 to be able to fetch data through the API without
interuption from updater.
Signed-off-by: Ruslan Kuprieiev <[email protected]>
------------------------------------------------------------
Traceback (most recent call last):
File "/Users/efiop/git/dvc/dvc/remote/local/__init__.py", line 280, in upload
no_progress_bar=no_progress_bar,
File "/Users/efiop/git/dvc/dvc/utils/__init__.py", line 129, in copyfile
System.reflink(src, dest)
File "/Users/efiop/git/dvc/dvc/system.py", line 125, in reflink
ret = System._reflink_darwin(source, link_name)
File "/Users/efiop/git/dvc/dvc/system.py", line 89, in _reflink_darwin
ctypes.c_char_p(src.encode("utf-8")),
AttributeError: 'PosixPathInfo' object has no attribute 'encode'
------------------------------------------------------------
Signed-off-by: Ruslan Kuprieiev <[email protected]>
Replaced Path* dataclasses with PathInfo/URLInfo/CloudURLInfo, which
know how parse, serialize, stringify and join themselves. They also
provide useful accessors like part of an url or pathlib.Path like
.parent or .name.
Along the way two families of bugs where fixed and should never occur in
the future:
- paths not matched as strings anymore, e.g. using str.startswith()
- Output.path is eliminated as ambiguous
Both families might had caused undefined surprising behavior when local
and remote paths clash.
* Add info for link and filesystem type
* Remove unnecessary `repo_dir` fixture
* Add cache info
* Classify `test_version.py` as functional test
* Remove redundancy
* Optimize some functions involved
* Add pathlib2 to install_requires
* Display fs type for cache directory
* Use `dvc.utils.compat` to import Path
* Remove redundancy in tests and make logs more descriptive
* Coalesce `requirements.txt` and `tests/requirements.txt` into `setup.py`
* Remove requirements for tests
* Parse tests requirements in setup.py
* Append extra dependenices in test_requirements in setup.py
* Modify CI build to pass the tests
* Correctly install black requirements
* Install all requirements to pass the tests
As a part of this:
- DataCloud._cloud was refactored into `.get_remote()`
- data stopped using internal _cloud
- added a parametrization for remote tests
* Document dvc.scm.git::Git::_get_diff_trees and shorten commit hashes in dvc.scm.git::Git::get_diff_trees
* diff: Changes to dvc.scm.git so `dvc diff` outputs short SHAs
- Docstring for Git class constructor
- Renames self.git for self.repo throughout module (involves several test changes)
- Better doc and logical refactor in Git._get_diff_trees
- `dvc diff` now outputs short SHA strings (Git._get_diff_trees) - hard coded to 7 length str
(involves some test changes in tests/func/test_diff.py)
For #1902
* Undoes "Renames self.git for self.repo throughout module" introduced in 3d2dc83.
* autocomplete: Brings scripts/completion/dvc.zsh up-to-date
- Reorganizes commands in alphabetical order;
- Updates the command dscriptions according to their current usage (-h) output;
- Adds comments for MISSING command entries
* Update scripts/completion/dvc.zsh
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
* Update scripts/completion/dvc.zsh
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
* Update scripts/completion/dvc.zsh
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
* Update scripts/completion/dvc.zsh
Co-Authored-By: Ruslan Kuprieiev <[email protected]>
* autocomplete: Adds missing commands to Zsh script
* cache: updates slow link type warning message (and test)
in accordance with https://github.com/iterative/dvc.org/pull/331
* Fixes accidental docstring rewrap
per https://github.com/iterative/dvc/pull/2003#discussion_r286206870
* Actually fixes accidental docstring rewrap...
per https://github.com/iterative/dvc/pull/2003#pullrequestreview-240994592
* Really fixes accidental docstring rewrap this time...
Currently `dvc version` outside of dvc repo raises "not dvc repo" error,
even though it is not really using repo in any way.
Signed-off-by: Ruslan Kuprieiev <[email protected]>
* Document dvc.scm.git::Git::_get_diff_trees and shorten commit hashes in dvc.scm.git::Git::get_diff_trees
* diff: Changes to dvc.scm.git so `dvc diff` outputs short SHAs
- Docstring for Git class constructor
- Renames self.git for self.repo throughout module (involves several test changes)
- Better doc and logical refactor in Git._get_diff_trees
- `dvc diff` now outputs short SHA strings (Git._get_diff_trees) - hard coded to 7 length str
(involves some test changes in tests/func/test_diff.py)
For #1902
* Undoes "Renames self.git for self.repo throughout module" introduced in 3d2dc83.
* diff: `dvc diff` uses code for `git rev_parse --short` instead of hard `[:7]` (for short commit hashes).
- Tests updated too.
Per https://github.com/iterative/dvc/pull/1906#discussion_r278510340
* tests: Reformatted with `black tests/func/test_diff.py`
* tests: Remove uneccessary `str()` casting form `dvc diff` tests (and reformat)