Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive mode and all patterns mode for dvc check-ignore command #4321

Closed
karajan1001 opened this issue Aug 3, 2020 · 0 comments · Fixed by #4323
Closed

Interactive mode and all patterns mode for dvc check-ignore command #4321

karajan1001 opened this issue Aug 3, 2020 · 0 comments · Fixed by #4323
Labels
triage Needs to be triaged

Comments

@karajan1001
Copy link
Contributor

Follow #3736

Two more modes:

  1. interactive mode --stdin which reads pathnames from the standard input.
  2. all patterns mode --all which prints all pattern matches instead of only the last one.
@triage-new-issues triage-new-issues bot added the triage Needs to be triaged label Aug 3, 2020
karajan1001 added a commit to karajan1001/dvc that referenced this issue Aug 3, 2020
Fix iterative#4321

Introduce new arguments --all for dvc check-ignore
Add tests for dvc check-ignore --all
efiop added a commit that referenced this issue Aug 6, 2020
* 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 <jah@mail.ustc.edu.cn>
Co-authored-by: Ruslan Kuprieiev <kupruser@gmail.com>
Co-authored-by: Ruslan Kuprieiev <ruslan@iterative.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs to be triaged
Projects
None yet
1 participant