-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
import: allow importing from non-DVC git repositories #3020
Conversation
Also, no tests? Your PR even broke existing tests. Is this change ready for review? Or is it a WIP? |
No, it's not ready for review yet, sorry |
Since this function does not create a `Repo` class, it can be called on a git repo with no '.dvc' directory
Fixes #2977 Refactor `_copy_if_git_file` to use `cached_clone` directly, so that copying still works even if the source repo does not have a '.dvc' subdirectory.
The DeepSource check wants me to group imports, but this goes against the style of the existing code. What should I do? https://deepsource.io/gh/iterative/dvc/run/9af8c44e-672d-48c3-84e0-032d14abb837/#python |
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. |
@chatcannon , you don't need to make DeepSource pass, use it more as a guideline (that you might not follow). |
@jorgeorpinel , what do you suggest? |
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
@chatcannon 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. |
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.
Sorry for a late review. This is neat!
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.
LGTM
@chatcannon Please either create an issue for adjusting docs for this or, even better, send a PR to adjust the docs. Thanks! π |
#3020 (review) |
I went ahead and created iterative/dvc.org/issues/898 because I feel it may be forgotten now that this PR is merged without the docs checkbox. Feel free to take that one, @chatcannon. Thanks π |
Fixes #2977
When accessing an
external_repo
, create a '.dvc' directory ifthere is not already one there.
β Have you followed the guidelines in the Contributing to DVC list?
π Check this box if this PR does not require documentation updates, or if it does and you have created a separate PR in dvc.org with such updates (or at least opened an issue about it in that repo). Please link below to your PR (or issue) in the dvc.org repo.
β Have you checked DeepSource, CodeClimate, and other sanity checks below? We consider their findings recommendatory and don't expect everything to be addressed. Please review them carefully and fix those that actually improve code or fix bugs.
Thank you for the contribution - we'll try to review it as soon as possible. π