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: update import: it now supports non-DVC Git repos #898

Closed
jorgeorpinel opened this issue Jan 6, 2020 · 9 comments · Fixed by #1339
Closed

cmd ref: update import: it now supports non-DVC Git repos #898

jorgeorpinel opened this issue Jan 6, 2020 · 9 comments · Fixed by #1339
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference good first issue Good for newcomers

Comments

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Jan 6, 2020

Per iterative/dvc/pull/3020.

See iterative/dvc#3020 (comment), iterative/dvc#3020 (comment), and iterative/dvc#3020 (comment):

Regarding documentation, I could edit https://github.com/iterative/dvc.org/blob/master/static/docs/command-reference/import.md and change "DVC repository" to "DVC or Git repository" but I'm not sure if that's really necessary.

  • sounds like a good first step but I imagine there needs to be more changes, would have to read the cmd ref thoroughly and think about it. Please open the PR and we'll get that review process stated.
  • Regarding docs, sure we need to note that this now works on non-dvc repos, there is no doubt about it and it is clearly necessary. 🙂
  • Yes I think docs definitely need to be updated so that the dvc import command reference reflects the changes in this PR. You can open a separate iterative/PR on dvc.org for that and we'll review it there and help finish it if necessary. Thanks for the heads up, guys.

UPDATE: Perhaps the only thing missing is to add an example specific to importing Git-tracked file. See #898 (comment)

@jorgeorpinel jorgeorpinel added help wanted Contributors especially welcome good first issue Good for newcomers A: docs Area: user documentation (gatsby-theme-iterative) command-reference labels Jan 6, 2020
@jorgeorpinel jorgeorpinel changed the title cmd ref: update import – it now supports cmd ref: update import – it now supports importing from non-DVC Git repos Jan 6, 2020
@jorgeorpinel jorgeorpinel changed the title cmd ref: update import – it now supports importing from non-DVC Git repos cmd ref: update import – it now supports non-DVC Git repos Jan 6, 2020
@jorgeorpinel jorgeorpinel changed the title cmd ref: update import – it now supports non-DVC Git repos cmd ref: update import: it now supports non-DVC Git repos Jan 18, 2020
@jorgeorpinel jorgeorpinel removed the help wanted Contributors especially welcome label Jan 18, 2020
@utkarshsingh99
Copy link
Contributor

utkarshsingh99 commented May 20, 2020

It seems this issue has been solved by a PR that may not have mentioned this issue.
The import.md page in command-reference mentions this:

Download a file or directory tracked by DVC or by Git into the workspace. It also creates a DVC-file with information about the data source, which can later be used to update the import.

In case if it needs to be more explicitly stated 'non-DVC Git repos', I'll be happy to take this up

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented May 20, 2020

@utkarshsingh99 thanks! Indeed this is now included in https://dvc.org/doc/command-reference/import but perhaps

  • the only thing missing is to add an example specific to importing Git-tracked files.

You can try this if you wish.

@utkarshsingh99

This comment has been minimized.

@utkarshsingh99
Copy link
Contributor

If a Git-tracked file is added through dvc update then it will automatically be put in .gitignore and the user might not want to do it.
So the best way for the user would have to be dvc add, right?

@shcheklein
Copy link
Member

If a Git-tracked file is added through dvc update

dvc update does not add file. Not sure I understand you question. Did you mean dvc import?

If file (Git or DVC - tracked) is imported it is indeed by default is cached (added into DVC). It's a good question if people want that or not. Let's first try to edit the .dvc file it produces and add cache: false to the specific out section, remove it from .gitignore, and see what happens + try to run dvc update. Just to see if it works or not at all right now.

@utkarshsingh99
Copy link
Contributor

Yeah, I meant dvc import there.
So here's what I did.
Changed a .dvc file's cache: true to false. Removed that file from .gitignore. Executed dvc update.
As expected, everything did work. Although, I am not sure what different command would be needed on the user's side apart from this example in the docs which imports a DVC repo:
https://dvc.org/doc/command-reference/import#examples

@jorgeorpinel
Copy link
Contributor Author

Changed a .dvc file's cache: true to false

How was that .dvc file produced? I'm assuming with dvc import but it would be better to see a full sequence of commands for readability. However...

This is a great question but I'm not sure how it relates to the pending task here, "add an example specific to importing Git-tracked file". I mean... I see how it relates, but can that be done without figuring out this new question first? If so, please focus on it and just open a separate issue about whether to cache or not imports in the core repo, @utkarshsingh99

Thanks

@utkarshsingh99
Copy link
Contributor

utkarshsingh99 commented May 22, 2020

Yeah, I think it can be done.

add an example specific to importing Git-tracked

With this in context, I am not sure what different command would be needed on the user's side apart from this example in the docs which imports a DVC repo:
https://dvc.org/doc/command-reference/import#examples

Can you give me an idea about this? @jorgeorpinel

@jorgeorpinel
Copy link
Contributor Author

I am not sure what different command would be needed on the user's side apart from this example in the docs

Indeed. It's basically the same thing. But having a separate example with the title specifically mentioning "Git-tracked file", and clarifying some of the caveats in the example explanation could be helpful for some users and it adds explicitness to the doc. It also allows us to continue assessing your PRs. But if it seems to small feel free to pick another issue.

@iesahin iesahin added the C: ref Content of /doc/*-reference label Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: docs Area: user documentation (gatsby-theme-iterative) C: ref Content of /doc/*-reference good first issue Good for newcomers
Projects
None yet
4 participants