-
Notifications
You must be signed in to change notification settings - Fork 1.3k
command: print the current cache directory when no cmd flags are provided #4613
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
Conversation
dd469e8 to
e2e9fb7
Compare
…ided tests: corrected the test for cache dir cmomand comamnd 'dvc cache dir' now prints the current cache dir when no cmd flags are provided and modified existing test for the same. Fixes treeverse#1998 Signed-off-by: Girish Joshi <girish946@gmail.com>
e2e9fb7 to
022ab73
Compare
dvc/command/cache.py
Outdated
| if not self.args.value: | ||
| print(self.config["cache"]["dir"]) | ||
| return 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a similar logic in dvc config: https://github.com/iterative/dvc/blob/738dfd49cf403412b018677e62b0b68e85c80886/dvc/command/config.py#L19 , but it also checks for --unset and uses logger.info (our current convention). Seems like we could do the same here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a similar logic in
dvc config:
, but it also checks for --unset and uses logger.info (our current convention). Seems like we could do the same here.
done.
efiop
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @girish946 !
Thank you for your patience! Looks good! Please see a comment above.
according to current convention in dvc/command/cache.py Signed-off-by: Girish Joshi <girish946@gmail.com>
|
Hi @efiop, |
|
Thank you @girish946 ! 🙏 |
|
Hi @girish946 would you like to also update the doc in https://dvc.org/doc/command-reference/cache/dir to reflect the change? (See https://dvc.org/doc/user-guide/contributing/docs) Np either way, just lmk please so we take care of it otherwise. Best |
|
Hi @jorgeorpinel Best. |
|
Sounds good, thanks @girish946 |
comamnd 'dvc cache dir' now prints the current cache dir
when no cmd flags are provided.
Fixes #1998
Signed-off-by: Girish Joshi girish946@gmail.com