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

Fix #404: Refactor root and improve its style. #408

Merged
merged 2 commits into from
Jun 11, 2019

Conversation

vibhor98
Copy link
Contributor

@vibhor98 vibhor98 commented Jun 5, 2019

Fixes #404 to refactor root command reference guide and improve its style to be aligned with other commands.

@vibhor98
Copy link
Contributor Author

vibhor98 commented Jun 5, 2019

Hi @shcheklein, kindly review! Thanks!


```usage
usage: dvc root [-h] [-q] [-v]
```

## Description

While modifying code in different sub-directories, there can be cases when
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand this to be honest, could you elaborate please? Even better can you ask a question on our Discord chat to get more information and insights?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll ask on Discord. Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, PTAL!

Copy link
Member

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great stuff @vibhor98 ! 🎉

  1. double check the motivation, ask on Discord.
  2. check the examples - they should be easily runnable

@vibhor98
Copy link
Contributor Author

vibhor98 commented Jun 8, 2019

Hi @shcheklein, I've improved the motivation after referring the original feature request #779. Also, I installed dvc on my Mac and checked the examples. They are easily runnable. Please review!

While in project's sub-directory, sometimes developers may want to refer some
file belonging to another directory. This command returns relative path to the
DVC project's root directory from the current working directory. So, this
command can be used to build a path to a dependency file, command, or output.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, am I correct that this command was not built to be used inside DVC-files? (cc @efiop). The primary use case is to simplify developers' life when they run dvc run. And make dvc run executable effectively from any subdirectory. So, primarily it can be useful if I use a script that generates some stage files?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shcheklein Correct. But it can also be used in dvc files as well, just by using it in the command itself, so that it is evaluated each time the command is ran.

@shcheklein
Copy link
Member

Looks great, @vibhor98 ! A quick question to discuss, mostly to @efiop :) Just trying to better understand the motivation for the command, in what user scenarios it gives value.

@vibhor98
Copy link
Contributor Author

Hi @shcheklein, shall I take up other issue while waiting for @efiop reply? Thanks!

@efiop
Copy link
Contributor

efiop commented Jun 10, 2019

Guys, sorry for the delay.

Copy link
Member

@shcheklein shcheklein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good as a first step, will keep the ticket open - we still need to clarify the motivation and add an example that is relevant to that motivation

@shcheklein shcheklein merged commit a4b0fbf into iterative:master Jun 11, 2019
@jeremydesroches
Copy link
Contributor

@jorgeorpinel I’ll work on closing this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cmd ref: review root ref to be aligned with other commands
4 participants