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

cmd ref: get: document --show-url flag #936

Merged
merged 8 commits into from
Jan 24, 2020

Conversation

skshetry
Copy link
Member

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. 🙏

@skshetry skshetry self-assigned this Jan 20, 2020
@skshetry

This comment has been minimized.

@shcheklein

This comment has been minimized.

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.

@skshetry thanks!! 🙏 if you have a few minutes feel free to address some comments, otherwise consider these comments for me and @jorgeorpinel :)

Copy link
Contributor

@jorgeorpinel jorgeorpinel left a 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.

public/static/docs/command-reference/get.md Outdated Show resolved Hide resolved
public/static/docs/command-reference/get.md Outdated Show resolved Hide resolved
public/static/docs/command-reference/get.md Outdated Show resolved Hide resolved
@shcheklein
Copy link
Member

@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.

@skshetry
Copy link
Member Author

@shcheklein, yes, if that'd be faster. I was just waiting for replies on the discussions before working on this.

@shcheklein
Copy link
Member

@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 :)

@skshetry
Copy link
Member Author

@shcheklein, okay, makes sense. 🙂

@jorgeorpinel
Copy link
Contributor

I think it would be faster - your first iteration -> our changes applied -> you review and suggest fixes -> merge

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

@shcheklein
Copy link
Member

@jorgeorpinel

when we need to rethink the phrasing

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.

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Jan 23, 2020

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.

@jorgeorpinel
Copy link
Contributor

I'll take over this one ASAP.

Ok, I have now, and addressed all the feedback. Please review @shcheklein @skshetry. Thanks

Copy link
Member Author

@skshetry skshetry left a 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.
Copy link
Member

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.

Copy link
Member Author

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).

Copy link
Member

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?

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 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)

Copy link
Member Author

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Contributor

@jorgeorpinel jorgeorpinel Jan 23, 2020

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

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.

@skshetry @jorgeorpinel please, check the last comment

@efiop
Copy link
Contributor

efiop commented Jan 24, 2020

@shcheklein @jorgeorpinel Considering that Saugat is away for ~2weeks, could we merge it and work on top later?

jorgeorpinel added a commit to maxhora/dvc.org that referenced this pull request Jan 24, 2020
@shcheklein
Copy link
Member

@efiop yep, it's on us now, no expectations from the eng team at this point.

@jorgeorpinel jorgeorpinel merged commit b0575dd into iterative:master Jan 24, 2020
@jorgeorpinel
Copy link
Contributor

Docs team for the win 🎉

@skshetry skshetry deleted the doc-get-show-url-ref branch February 7, 2020 08:00
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: document get --show-url option
4 participants