* 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
Currently we kinda assume that whatever is returned by `get_file_hash`
is of type self.PARAM_CHECKSUM, which is not actually true. E.g. for
http it might return `etag` or `md5`, but we don't distinguish between
those and call both `etag`. This is becoming more relevant for dir
hashes that are computed a few different ways (e.g. in-memory md5 or
upload to remote and get etag for the dir file).
Prerequisite for #4144 and #3069
Fix#4333, as `is_ignored_file` and `is_ignored_dir` and `__call__`
share the same call `DvcIgnorePatterns.matches`, we only need to focus
on the out of repo situation.
1. Add tests for the `is_ignored_file` and `is_ignored_dir` for the out
of repo condition.
2. Now `is_ignored_file` and `is_ignored_dir` returns false for those
files outside the repo.
* experiments: add options to include/exclude specific metrics/params columns in
`dvc exp show`
* allow param/metric file to be provided to keep consistency with other
dvc commands
* match nested params/metrics names
* Remove dvcignore reset in `repo._reset`
Repo `add`,`checkout`,etc will not change `.dvcignore`, and can remove dvcignore reset after these operations.
* Reset dvcignore manually after a subrepo created.
1. subrepo created during session open time.
* tests: add test to ensure dir hashes are not pushed for incomplete
directories
* push: do not push .dir file for directory with missing files
* update test
* Error message when no match found.
1. remove error message when no match found.
* Test update.
1.Test update cover return 0 and 1
* Remove unused arguments
* Error message show in dvc check-ignore
fix#4361
1. Remove error message when input a empty string
2. Remove error message when read input from stream
2. Remove error message when interrupt by `CTRL-C`
* Allow ignoring subrepos in dvcignore
I implemented this inside dvcignore, and it
should not require "internal" APIs hack as we discussed before.
Right now, `ignore_subrepos` will only work for the paths of subrepo,
not anything inside it. And the API user is more or less only
RepoTree, so should be safe (we switch DvcTree and repo.tree based
on path prefixes, so this is only required during `walk`, so as it
shows the repo that were previously dvcignored and so that we could
switch the trees later during walk.
So, if dir is `dir -> repo`
So, `tree.walk("dir")` will return `[]`,
whereas `tree.walk("dir", ignore_subrepos=False)` will return `["repo"]`
But, successive walk will just return `("repo", [], [])`, and could
just be ignored as a side-effect.
* Fix tests
* Two new mode `-all` and `--stdin` for check-ignore
Fix#4321
Introduce new arguments --all for dvc check-ignore
Add tests for dvc check-ignore --all
* `--stdin` and targets only one
1. `--stdin` and targets can and only can have one
2. more tests
* New tests for stdin mode and solve a problem
1. Add a new tests with mock stdin for interactive mode
2. Solve the problem of `assert "" in caplog.text` in tests always `True`.
* Remove path_input interface
1. remove path_input and make _ask to a public method instead
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* Update dvc/command/check_ignore.py
* fix styling
Co-authored-by: karajan1001 <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: Ruslan Kuprieiev <[email protected]>
* tests: test importing into subdirectory
* import: fix bug when output subdir doesnt already exist
* use urlparse to determine if output path is local, not os.path.exists
* account for windows drive letters
* import: error out if output subdirectory does not exist
Tests had checks for python version number, expecting it to be only
single digits, which was failing for me on 3.6.10 and might fail
in the future with Python 3.10.
I adjusted it to expect minor and patch version to be of multiple digits.
* restore Experiments.chdir
* used in experiments.show
* experiments: make checkout work without `git reset --hard`
* experiments: remove --force parameter
* experiments: reject checkout if current workspace commit doesnt match
expected baseline
* Update some tests first
fix#3736
* first edition
* solve failure in Windows
* For Windows ci
* Some help ducuments issue.
* Update dvc/ignore.py
abspath
Co-authored-by: Ruslan Kuprieiev <[email protected]>
* Refactor with OutOfWorkSpaceError
* Solve a bug
* Update dvc/command/check_ignore.py
Co-authored-by: Jorge Orpinel <[email protected]>
* Update dvc/command/check_ignore.py
Co-authored-by: Jorge Orpinel <[email protected]>
* Update dvc/command/check_ignore.py
* Revert "Refactor with OutOfWorkSpaceError"
This reverts commit 27eec49ed67346c89157edea998b6b5fa81d88f5.
* Two change request
1. Argument `targets`'s description.
2. Error handling of `_get_normalize_path`
* Update dvc/main.py
Co-authored-by: Ruslan Kuprieiev <[email protected]>
* `check_ignore` now only accept one path a time
1. Add a new test for the out side repo cases
2. check ignore now only check one file not file lists
Co-authored-by: Ruslan Kuprieiev <[email protected]>
Co-authored-by: karajan1001 <[email protected]>
Co-authored-by: Jorge Orpinel <[email protected]>