-
Notifications
You must be signed in to change notification settings - Fork 393
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
cmd ref: get: document --show-url flag #936
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
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.
@skshetry thanks!! 🙏 if you have a few minutes feel free to address some comments, otherwise consider these comments for me and @jorgeorpinel :)
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.
Thanks for the initial version @skshetry! Looking good in general but there are some language improvements that could be made 🙂 I also left extra comments in some of Ivan's reviews above.
@skshetry @jorgeorpinel Saugat, are you okay if we start iterating on this with you? Jorge will put some modifications and will ask you to review before merging. |
@shcheklein, yes, if that'd be faster. I was just waiting for replies on the discussions before working on this. |
@skshetry @jorgeorpinel yes, I think it would be faster - your first iteration -> our changes applied -> you review and suggest fixes -> merge :) otherwise we spend too much time iterating for no reason. The most important here is that you review the last iteration to learn and teach us :) |
@shcheklein, okay, makes sense. 🙂 |
It is faster for small changes but not necessarily when we need to rethink the phrasing, etc. (because the docs team is small and can easily get backed up). But yep, I'll take over this one ASAP. The CI format-check is failing though (and Restyled didn't catch it, weird). Please take a look: https://circleci.com/gh/iterative/dvc.org/1890 Note: please use a branch directly on this repo instead of your fork in future PRs @skshetry – Ivan can give you access if needed. It makes it easier for others to contribute to the PR. Thanks |
in certain cases we can merge it then, even if it's not 100% perfect. It would be taking too long to expect from everyone to write the text of the highest quality. |
I wasn't referring to language quality but to clarify the idea and include all the information needed, even if it will be rewritten with different wording. Some reviews include this kind of questions which is easier/faster for the person who developed the change to include. |
Ok, I have now, and addressed all the feedback. Please review @shcheklein @skshetry. Thanks |
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.
Thanks @jorgeorpinel. Looks good.
- `--show-url` - `url` is expected to represent a DVC project for this option to | ||
have an effect (as opposed to a Git-only, non-DVC repository). When | ||
`--show-url` is used, instead of downloading the file or directory, this | ||
command just prints the storage location (URL) of the target data. |
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.
I still think we are overcomplicating this. The fact that it does not handle Git repos is only somewhat important and at least should go after the essence of what this command does. Also, probably it's not about DVC repo vs Git repo - it's about Git-tracked files vs DVC-tracked files. Am I correct here, @skshetry ?
Also, consider including a link the example below.
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.
No, it's about DVC repo vs Git repo. As an example, take this git repo. How can you get an url for this public/static/docs/command-reference/get.md
? Git does not work with files, so there's no URL/path to generate for (unless we do somekind of magic).
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.
okay, to clarify it's not about Git-only vs DVC. Any Git+DVC has files that are not under DVC control and probably we don't generate URL for them, right?
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.
I'm not even sure about DVC-controlled non-cached files (dvc run -O something
), probably we don't even handle that with this new option (even though we can download it)
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.
Yes, that should not also work, as it checks for all DVC controlled outputs.
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.
So, it's also about Git vs DVC tracked files. Sorry about that.
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.
The fact that it does not handle Git repos is only somewhat important and at least should go after the essence of what this command does.
@shcheklein You may be right but about this we're already using this style in most other options when there are pre-requisites. Putting the pre-req's as the first sentence. (See --rev
just above this.) That's not a great reason to keep this but I'm also not convinced that leaving the pre-req's for last is best. Maybe it is better to leave them on top? they are "pre" requisites after all 🙂
All that said I did shorten that first sentence now, and also the main explanation following it.
to clarify it's not about Git-only vs DVC. Any Git+DVC has files that are not under DVC control
True, I updated that as well. So the pre-req is not about url
then, but about path
: it should be a DVC-tracked file/dir.
See ab40ed7.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
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.
I'm not even sure about DVC-controlled non-cached files (dvc run -O something), probably we don't even handle that with this new option (even though we can download it)
Actually, both this option and get_url()
should support creating a URL for these. They don't atually check for the existence of the file in remote cache. They just interpret the project configured remote + the checksum in DVC-file from what I understand. Cc @shcheklein
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.
@skshetry @jorgeorpinel please, check the last comment
@shcheklein @jorgeorpinel Considering that Saugat is away for ~2weeks, could we merge it and work on top later? |
@efiop yep, it's on us now, no expectations from the eng team at this point. |
per previous 2 commits
Docs team for the win 🎉 |
Fixes #930
Disregard the recommendations below if you use Edit on GitHub button to improve the docs in place.
❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.
🐛 Please make sure to mention
Fix #issue
(if applicable) in the description of the PR. This enables GitHub to link the PR to the corresponding bug and close it automatically when PR is merged.Thank you for the contribution - we'll try to review and merge it as soon as possible. 🙏