This PR is just a showcase to see how we like it. I've converted a few
tests to it, but there will be much more to come.
```
assert (tmp_dir / "file") == "contents"
assert (tmp_dir / "dir").read_text() == {"subdir": {"file": "hello"}}
```
This approach is nicer because it allows us to use a declaratory
asserts instead of relying on fs files. The problem becomes much more
apparent once you get into remote workspaces, where we `trees_equal`
doesn't work.
* s3,gs: don't append "/" to prefixed path when listing objects
* remote: use optional prefix kwarg for walk_files
* if prefix is True, path will be walked as a prefix
* if prefix is False, path will be treated as a directory (trailing
slash will be appended for S3-like remotes)
* tests: add unit test for BaseRemoteTree.list_paths
flufl.lock released 4.0 in which there is no finalize method anymore, hence
```
dvc/lock.py:143:16: E1101: Instance of 'HardlinkLock' has no 'finalize' member (no-member)
```
Clouds that have a non-noop `makedirs` should implement it in their own
method. Hdfs somehow slipped under the radar and had `mkdir` used
explicitly in `copy` and `upload` methods.
* pylint: enable attribute-outside-init check
* fix tests
* Fix mock for time
This was an interesting one. I was mocking `time` on function definition
and then, using those later on test run. When all the tests were run, there
would be some delay that'd make tests fail. Hmmm ...
* tree: walk: dynamically load directories as we go
This allows us to save time by not loading directories that we won't be
using anyway. This also allows us to list directories for which we don't
need the access to remote.
* list: add support for tracked directories
* pylint: enable checks for imports
* ci: add github action for pylint
* enable pylint on pre-commit
* Install requirements
* use local pylint installation rather than of pre-commit's
* fix import errors
* more checks
* Silence unused imports
* Make a copy of dict
We are currently missing url and license metadata:
```
Name : dvc
Arch : x86_64
Version : 0.94.0
Release : 1
Size : 172 M
Repo : installed
From repo : dvc
Summary : Data Version Control - datasets, models, and experiments
versioning for ML or data science projects
URL : http://example.com/no-uri-given
License : unknown
Description : Data Version Control - datasets, models, and experiments
versioning for ML or data science projects
```
https://github.com/iterative/dvc/issues/4088#issuecomment-648270797
* remove unnecessary generators/comprehensions
* Use dict literals
* remove unused variables
* misc fixes
ignore .iteritems, is a false +ve
remove function call in default argument
* Flake8 config: complexity, show source on err, show err counts
* flake8: add extensions
* remove flake8-string-format
* Add flake8-debugger support
* Add flake8-string-format extension
* remove flake8-debugger
It's having some problems to install on Windows in Travis